blob: c2073d0564443dd433b130481be6a23b422aa106 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Jack Jansen3c2c4332002-11-06 13:33:32 +00002# From configure.in Revision: 1.362 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis88afe662002-10-26 13:47:44 +00004# Generated by GNU Autoconf 2.53 for python 2.3.
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.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000256PACKAGE_NAME='python'
257PACKAGE_TARNAME='python'
258PACKAGE_VERSION='2.3'
259PACKAGE_STRING='python 2.3'
260PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000261
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
Martin v. Löwis88afe662002-10-26 13:47:44 +0000764\`configure' configures python 2.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000765
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
Martin v. Löwis88afe662002-10-26 13:47:44 +0000820 case $ac_init_help in
821 short | recursive ) echo "Configuration of python 2.3:";;
822 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 cat <<\_ACEOF
824
825Optional Features:
826 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
827 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000828 --enable-framework[=INSTALLDIR]
829 Build (MacOSX|Darwin) framework
830 --enable-shared disable/enable building shared python library
831 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
832 --enable-ipv6 Enable ipv6 (with ipv4) support
833 --disable-ipv6 Disable ipv6 support
834 --enable-unicode[=ucs[24]]
835 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000836
837Optional Packages:
838 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
839 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000840 --without-gcc never use gcc
841 --with-cxx=<compiler> enable C++ support
842 --with-suffix=.exe set executable suffix
843 --with-pydebug build with Py_DEBUG defined
844 --with-libs='lib1 ...' link against additional libs
845 --with-signal-module disable/enable signal module
846 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
847 --with(out)-threads[=DIRECTORY]
848 disable/enable thread support
849 --with(out)-thread[=DIRECTORY]
850 deprecated; use --with(out)-threads
851 --with-pth use GNU pth threading libraries
852 --with(out)-universal-newlines
853 disable/enable foreign newlines
854 --with(out)-doc-strings disable/enable documentation strings
855 --with(out)-pymalloc disable/enable specialized mallocs
856 --with-wctype-functions use wctype.h functions
857 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
858 --with-dl-dld=DL_DIR GNU dynamic linking
859 --with-fpectl enable SIGFPE catching
860 --with-libm=STRING math library
861 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000862
863Some influential environment variables:
864 CC C compiler command
865 CFLAGS C compiler flags
866 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
867 nonstandard directory <lib dir>
868 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
869 headers in a nonstandard directory <include dir>
870 CPP C preprocessor
871
872Use these variables to override the choices made by `configure' or to help
873it to find libraries and programs with nonstandard names/locations.
874
875_ACEOF
876fi
877
878if test "$ac_init_help" = "recursive"; then
879 # If there are subdirs, report their specific --help.
880 ac_popdir=`pwd`
881 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
882 test -d $ac_dir || continue
883 ac_builddir=.
884
885if test "$ac_dir" != .; then
886 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
887 # A "../" for each directory in $ac_dir_suffix.
888 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
889else
890 ac_dir_suffix= ac_top_builddir=
891fi
892
893case $srcdir in
894 .) # No --srcdir option. We are building in place.
895 ac_srcdir=.
896 if test -z "$ac_top_builddir"; then
897 ac_top_srcdir=.
898 else
899 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
900 fi ;;
901 [\\/]* | ?:[\\/]* ) # Absolute path.
902 ac_srcdir=$srcdir$ac_dir_suffix;
903 ac_top_srcdir=$srcdir ;;
904 *) # Relative path.
905 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
906 ac_top_srcdir=$ac_top_builddir$srcdir ;;
907esac
908# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
909# absolute.
910ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise4826582002-10-26 13:33:00 +0000911ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000912ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
913ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
914
915 cd $ac_dir
916 # Check for guested configure; otherwise get Cygnus style configure.
917 if test -f $ac_srcdir/configure.gnu; then
918 echo
919 $SHELL $ac_srcdir/configure.gnu --help=recursive
920 elif test -f $ac_srcdir/configure; then
921 echo
922 $SHELL $ac_srcdir/configure --help=recursive
923 elif test -f $ac_srcdir/configure.ac ||
924 test -f $ac_srcdir/configure.in; then
925 echo
926 $ac_configure --help
927 else
928 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
929 fi
930 cd $ac_popdir
931 done
932fi
933
934test -n "$ac_init_help" && exit 0
935if $ac_init_version; then
936 cat <<\_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000937python configure 2.3
938generated by GNU Autoconf 2.53
Martin v. Löwis11437992002-04-12 09:54:03 +0000939
940Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
941Free Software Foundation, Inc.
942This configure script is free software; the Free Software Foundation
943gives unlimited permission to copy, distribute and modify it.
944_ACEOF
945 exit 0
946fi
947exec 5>config.log
948cat >&5 <<_ACEOF
949This file contains any messages produced by compilers while
950running configure, to aid debugging if configure makes a mistake.
951
Martin v. Löwis88afe662002-10-26 13:47:44 +0000952It was created by python $as_me 2.3, which was
Martin v. Löwis11437992002-04-12 09:54:03 +0000953generated by GNU Autoconf 2.53. Invocation command line was
954
955 $ $0 $@
956
957_ACEOF
958{
959cat <<_ASUNAME
960## --------- ##
961## Platform. ##
962## --------- ##
963
964hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
965uname -m = `(uname -m) 2>/dev/null || echo unknown`
966uname -r = `(uname -r) 2>/dev/null || echo unknown`
967uname -s = `(uname -s) 2>/dev/null || echo unknown`
968uname -v = `(uname -v) 2>/dev/null || echo unknown`
969
970/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
971/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
972
973/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
974/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
975/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
976hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
977/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
978/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
979/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
980
981_ASUNAME
982
983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
984for as_dir in $PATH
985do
986 IFS=$as_save_IFS
987 test -z "$as_dir" && as_dir=.
988 echo "PATH: $as_dir"
989done
990
991} >&5
992
993cat >&5 <<_ACEOF
994
995
996## ----------- ##
997## Core tests. ##
998## ----------- ##
999
1000_ACEOF
1001
1002
1003# Keep a trace of the command line.
1004# Strip out --no-create and --no-recursion so they do not pile up.
1005# Also quote any args containing shell meta-characters.
1006ac_configure_args=
1007ac_sep=
1008for ac_arg
1009do
1010 case $ac_arg in
1011 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1012 | --no-cr | --no-c | -n ) continue ;;
1013 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1014 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1015 continue ;;
1016 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1017 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1018 esac
1019 case " $ac_configure_args " in
1020 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1021 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1022 ac_sep=" " ;;
1023 esac
1024 # Get rid of the leading space.
1025done
1026
1027# When interrupted or exit'd, cleanup temporary files, and complete
1028# config.log. We remove comments because anyway the quotes in there
1029# would cause problems or look ugly.
1030# WARNING: Be sure not to use single quotes in there, as some shells,
1031# such as our DU 5.0 friend, will then `close' the trap.
1032trap 'exit_status=$?
1033 # Save into config.log some information that might help in debugging.
1034 {
1035 echo
1036 cat <<\_ASBOX
1037## ---------------- ##
1038## Cache variables. ##
1039## ---------------- ##
1040_ASBOX
1041 echo
1042 # The following way of writing the cache mishandles newlines in values,
1043{
1044 (set) 2>&1 |
1045 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1046 *ac_space=\ *)
1047 sed -n \
1048 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1049 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1050 ;;
1051 *)
1052 sed -n \
1053 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1054 ;;
1055 esac;
1056}
1057 echo
1058 if test -s confdefs.h; then
1059 cat <<\_ASBOX
1060## ----------- ##
1061## confdefs.h. ##
1062## ----------- ##
1063_ASBOX
1064 echo
1065 sed "/^$/d" confdefs.h
1066 echo
1067 fi
1068 test "$ac_signal" != 0 &&
1069 echo "$as_me: caught signal $ac_signal"
1070 echo "$as_me: exit $exit_status"
1071 } >&5
1072 rm -f core core.* *.core &&
1073 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1074 exit $exit_status
1075 ' 0
1076for ac_signal in 1 2 13 15; do
1077 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1078done
1079ac_signal=0
1080
1081# confdefs.h avoids OS command line length limits that DEFS can exceed.
1082rm -rf conftest* confdefs.h
1083# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1084echo >confdefs.h
1085
1086# Predefined preprocessor variables.
1087
1088cat >>confdefs.h <<_ACEOF
1089#define PACKAGE_NAME "$PACKAGE_NAME"
1090_ACEOF
1091
1092
1093cat >>confdefs.h <<_ACEOF
1094#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1095_ACEOF
1096
1097
1098cat >>confdefs.h <<_ACEOF
1099#define PACKAGE_VERSION "$PACKAGE_VERSION"
1100_ACEOF
1101
1102
1103cat >>confdefs.h <<_ACEOF
1104#define PACKAGE_STRING "$PACKAGE_STRING"
1105_ACEOF
1106
1107
1108cat >>confdefs.h <<_ACEOF
1109#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1110_ACEOF
1111
1112
1113# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114# Prefer explicitly selected file to automatically selected ones.
1115if test -z "$CONFIG_SITE"; then
1116 if test "x$prefix" != xNONE; then
1117 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1118 else
1119 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1120 fi
1121fi
1122for ac_site_file in $CONFIG_SITE; do
1123 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1125echo "$as_me: loading site script $ac_site_file" >&6;}
1126 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 . "$ac_site_file"
1128 fi
1129done
1130
1131if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 # Some versions of bash will fail to source /dev/null (special
1133 # files actually), so we avoid doing that.
1134 if test -f "$cache_file"; then
1135 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1136echo "$as_me: loading cache $cache_file" >&6;}
1137 case $cache_file in
1138 [\\/]* | ?:[\\/]* ) . $cache_file;;
1139 *) . ./$cache_file;;
1140 esac
1141 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142else
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1144echo "$as_me: creating cache $cache_file" >&6;}
1145 >$cache_file
1146fi
1147
1148# Check that the precious variables saved in the cache have kept the same
1149# value.
1150ac_cache_corrupted=false
1151for ac_var in `(set) 2>&1 |
1152 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1153 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1154 eval ac_new_set=\$ac_env_${ac_var}_set
1155 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1156 eval ac_new_val="\$ac_env_${ac_var}_value"
1157 case $ac_old_set,$ac_new_set in
1158 set,)
1159 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1160echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1161 ac_cache_corrupted=: ;;
1162 ,set)
1163 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1164echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1165 ac_cache_corrupted=: ;;
1166 ,);;
1167 *)
1168 if test "x$ac_old_val" != "x$ac_new_val"; then
1169 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1170echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1171 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1172echo "$as_me: former value: $ac_old_val" >&2;}
1173 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1174echo "$as_me: current value: $ac_new_val" >&2;}
1175 ac_cache_corrupted=:
1176 fi;;
1177 esac
1178 # Pass precious variables to config.status.
1179 if test "$ac_new_set" = set; then
1180 case $ac_new_val in
1181 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1182 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1183 *) ac_arg=$ac_var=$ac_new_val ;;
1184 esac
1185 case " $ac_configure_args " in
1186 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1187 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1188 esac
1189 fi
1190done
1191if $ac_cache_corrupted; then
1192 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1193echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1194 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1195echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1196 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197fi
1198
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1203ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204
Guido van Rossum627b2d71993-12-24 10:39:16 +00001205
Michael W. Hudson54241132001-12-07 15:38:26 +00001206
1207
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208
Martin v. Löwis11437992002-04-12 09:54:03 +00001209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
Martin v. Löwis88afe662002-10-26 13:47:44 +00001222
1223
1224
1225
1226
1227
1228
1229
1230
Martin v. Löwis11437992002-04-12 09:54:03 +00001231ac_config_headers="$ac_config_headers pyconfig.h"
1232
1233
1234# This is for stuff that absolutely must end up in pyconfig.h.
1235# Please use pyport.h instead, if possible.
1236
1237
1238
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001239
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001240VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001241
Martin v. Löwis1142de32002-03-29 16:28:31 +00001242
1243SOVERSION=1.0
1244
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001245# The later defininition of _XOPEN_SOURCE disables certain features
1246# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1247
1248cat >>confdefs.h <<\_ACEOF
1249#define _GNU_SOURCE 1
1250_ACEOF
1251
1252
1253# The definition of _GNU_SOURCE potentially causes a change of the value
1254# of _XOPEN_SOURCE. So define it only conditionally.
1255
1256
1257cat >>confdefs.h <<\_ACEOF
1258#define _XOPEN_SOURCE 500
1259_ACEOF
1260
1261
Martin v. Löwise4826582002-10-26 13:33:00 +00001262# On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires definition
1263# of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else several APIs
1264# are not declared. Since this is also needed in some cases for HP-UX,
1265# we define it globally.
1266
1267cat >>confdefs.h <<\_ACEOF
1268#define _XOPEN_SOURCE_EXTENDED 1
1269_ACEOF
1270
1271
1272cat >>confdefs.h <<\_ACEOF
1273#define _POSIX_C_SOURCE 199506L
1274_ACEOF
1275
1276
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001277# Arguments passed to configure.
1278
1279CONFIG_ARGS="$ac_configure_args"
1280
Jack Jansene578a632001-08-15 01:27:14 +00001281# Check whether --enable-framework or --disable-framework was given.
1282if test "${enable_framework+set}" = set; then
1283 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001284
Jack Jansene578a632001-08-15 01:27:14 +00001285 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001286 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001287 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001288 esac
1289 case $enableval in
1290 no)
1291 PYTHONFRAMEWORK=
1292 PYTHONFRAMEWORKDIR=no-framework
1293 PYTHONFRAMEWORKPREFIX=
1294 PYTHONFRAMEWORKINSTALLDIR=
1295 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001296 ;;
1297 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001298 PYTHONFRAMEWORK=Python
1299 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001300 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001301 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1302 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001303 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001304
Guido van Rossum563e7081996-09-10 18:20:48 +00001305else
Martin v. Löwis11437992002-04-12 09:54:03 +00001306
Jack Jansene578a632001-08-15 01:27:14 +00001307 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001308 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001309 PYTHONFRAMEWORKPREFIX=
1310 PYTHONFRAMEWORKINSTALLDIR=
1311 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001312
Martin v. Löwis11437992002-04-12 09:54:03 +00001313fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001314
1315
1316
1317
Jack Jansene578a632001-08-15 01:27:14 +00001318
1319##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001320## AC_HELP_STRING(--with-dyld,
1321## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001322##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001323# Set name for machine-dependent library files
1324
Martin v. Löwis11437992002-04-12 09:54:03 +00001325echo "$as_me:$LINENO: checking MACHDEP" >&5
1326echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001327if test -z "$MACHDEP"
1328then
Guido van Rossum563e7081996-09-10 18:20:48 +00001329 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001330 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1331 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001332 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001333 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001334 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001335 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001336 ac_md_system=`echo $ac_sys_system |
1337 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1338 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001339 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001340 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001341
Guido van Rossum07397971997-04-29 21:49:50 +00001342 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001343 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001344 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001345 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001346 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001347 esac
1348fi
Guido van Rossum91922671997-10-09 20:24:13 +00001349
1350#
1351# SGI compilers allow the specification of the both the ABI and the
1352# ISA on the command line. Depending on the values of these switches,
1353# different and often incompatable code will be generated.
1354#
1355# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1356# thus supply support for various ABI/ISA combinations. The MACHDEP
1357# variable is also adjusted.
1358#
1359
1360if test ! -z "$SGI_ABI"
1361then
1362 CC="cc $SGI_ABI"
1363 LDFLAGS="$SGI_ABI $LDFLAGS"
1364 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1365fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001366echo "$as_me:$LINENO: result: $MACHDEP" >&5
1367echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001368
Guido van Rossum627b2d71993-12-24 10:39:16 +00001369# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001370echo "$as_me:$LINENO: checking for --without-gcc" >&5
1371echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1372
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001373# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001374if test "${with_gcc+set}" = set; then
1375 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001376
Guido van Rossum7f43da71994-08-01 12:15:30 +00001377 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001378 no) CC=cc
1379 without_gcc=yes;;
1380 yes) CC=gcc
1381 without_gcc=no;;
1382 *) CC=$withval
1383 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001384 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001385else
Martin v. Löwis11437992002-04-12 09:54:03 +00001386
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001387 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001388 AIX*) CC=cc_r
1389 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001390 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001391 case $BE_HOST_CPU in
1392 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001393 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001394 without_gcc=yes
Mark Hammond8235ea12002-07-19 06:55:41 +00001395 OPT="-O -export pragma"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001396 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001397 ;;
1398 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001399 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001400 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001401 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001402 ;;
1403 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001404 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1405echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1406 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001407 ;;
1408 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001409 AR="\$(srcdir)/Modules/ar_beos"
1410 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001411 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001412 Monterey*)
1413 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001414 without_gcc=;;
1415 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001416 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001417fi;
1418echo "$as_me:$LINENO: result: $without_gcc" >&5
1419echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001420
1421
Guido van Rossum95012191999-12-16 17:50:52 +00001422
Fred Drakea1a84e72001-03-06 05:52:16 +00001423MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001424echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1425echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1426
Guido van Rossum95012191999-12-16 17:50:52 +00001427# Check whether --with-cxx or --without-cxx was given.
1428if test "${with_cxx+set}" = set; then
1429 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001430
Martin v. Löwis22352952000-12-13 17:37:02 +00001431 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001432 case $withval in
1433 no) CXX=
1434 with_cxx=no;;
1435 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001436 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001437 with_cxx=$withval;;
1438 esac
1439else
Martin v. Löwis11437992002-04-12 09:54:03 +00001440
Guido van Rossum95012191999-12-16 17:50:52 +00001441 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001442 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001443
Martin v. Löwis11437992002-04-12 09:54:03 +00001444fi;
1445echo "$as_me:$LINENO: result: $with_cxx" >&5
1446echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001447
1448if test "$with_cxx" = "yes"
1449then
Martin v. Löwis11437992002-04-12 09:54:03 +00001450 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1451echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1452 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001453fi
1454
1455
1456
1457
Martin v. Löwis11437992002-04-12 09:54:03 +00001458if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001459then
1460 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1461do
Martin v. Löwis11437992002-04-12 09:54:03 +00001462 # 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 +00001463set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001464echo "$as_me:$LINENO: checking for $ac_word" >&5
1465echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1466if test "${ac_cv_prog_CXX+set}" = set; then
1467 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001468else
1469 if test -n "$CXX"; then
1470 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1471else
Martin v. Löwis11437992002-04-12 09:54:03 +00001472as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1473for as_dir in $PATH
1474do
1475 IFS=$as_save_IFS
1476 test -z "$as_dir" && as_dir=.
1477 for ac_exec_ext in '' $ac_executable_extensions; do
1478 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1479 ac_cv_prog_CXX="$ac_prog"
1480 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1481 break 2
1482 fi
1483done
1484done
1485
Martin v. Löwis22352952000-12-13 17:37:02 +00001486fi
1487fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001488CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001489if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001490 echo "$as_me:$LINENO: result: $CXX" >&5
1491echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001492else
Martin v. Löwis11437992002-04-12 09:54:03 +00001493 echo "$as_me:$LINENO: result: no" >&5
1494echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001495fi
1496
Martin v. Löwis11437992002-04-12 09:54:03 +00001497 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001498done
1499test -n "$CXX" || CXX="notfound"
1500
1501 if test "$CXX" = "notfound"
1502 then
1503 CXX=
1504 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001505 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001506ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001507ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1508ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1509ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1510 cat >conftest.$ac_ext <<_ACEOF
1511#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001512#include "confdefs.h"
1513
Martin v. Löwis11437992002-04-12 09:54:03 +00001514#ifdef F77_DUMMY_MAIN
1515# ifdef __cplusplus
1516 extern "C"
1517# endif
1518 int F77_DUMMY_MAIN() { return 1; }
1519#endif
1520int
1521main ()
1522{
Michael W. Hudson54241132001-12-07 15:38:26 +00001523
Martin v. Löwis11437992002-04-12 09:54:03 +00001524 ;
1525 return 0;
1526}
1527_ACEOF
1528ac_clean_files_save=$ac_clean_files
1529ac_clean_files="$ac_clean_files a.out a.exe"
1530# Try to create an executable without -o first, disregard a.out.
1531# It will help us diagnose broken compilers, and finding out an intuition
1532# of exeext.
1533echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1534echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1535ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1536if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1537 (eval $ac_link_default) 2>&5
1538 ac_status=$?
1539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1540 (exit $ac_status); }; then
1541 # Find the output, starting from the most likely. This scheme is
1542# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1543# resort.
1544
1545# Be careful to initialize this variable, since it used to be cached.
1546# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1547ac_cv_exeext=
1548for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1549 ls a.out conftest 2>/dev/null;
1550 ls a.* conftest.* 2>/dev/null`; do
1551 case $ac_file in
1552 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1553 a.out ) # We found the default executable, but exeext='' is most
1554 # certainly right.
1555 break;;
1556 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1557 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1558 export ac_cv_exeext
1559 break;;
1560 * ) break;;
1561 esac
1562done
1563else
1564 echo "$as_me: failed program was:" >&5
1565cat conftest.$ac_ext >&5
1566{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1567echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1568 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001569fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001570
1571ac_exeext=$ac_cv_exeext
1572echo "$as_me:$LINENO: result: $ac_file" >&5
1573echo "${ECHO_T}$ac_file" >&6
1574
1575# Check the compiler produces executables we can run. If not, either
1576# the compiler is broken, or we cross compile.
1577echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1578echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1579# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1580# If not cross compiling, check that we can run a simple program.
1581if test "$cross_compiling" != yes; then
1582 if { ac_try='./$ac_file'
1583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1584 (eval $ac_try) 2>&5
1585 ac_status=$?
1586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1587 (exit $ac_status); }; }; then
1588 cross_compiling=no
1589 else
1590 if test "$cross_compiling" = maybe; then
1591 cross_compiling=yes
1592 else
1593 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1594If you meant to cross compile, use \`--host'." >&5
1595echo "$as_me: error: cannot run C++ compiled programs.
1596If you meant to cross compile, use \`--host'." >&2;}
1597 { (exit 1); exit 1; }; }
1598 fi
1599 fi
1600fi
1601echo "$as_me:$LINENO: result: yes" >&5
1602echo "${ECHO_T}yes" >&6
1603
1604rm -f a.out a.exe conftest$ac_cv_exeext
1605ac_clean_files=$ac_clean_files_save
1606# Check the compiler produces executables we can run. If not, either
1607# the compiler is broken, or we cross compile.
1608echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1609echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1610echo "$as_me:$LINENO: result: $cross_compiling" >&5
1611echo "${ECHO_T}$cross_compiling" >&6
1612
1613echo "$as_me:$LINENO: checking for suffix of executables" >&5
1614echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1615if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1616 (eval $ac_link) 2>&5
1617 ac_status=$?
1618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1619 (exit $ac_status); }; then
1620 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1621# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1622# work properly (i.e., refer to `conftest.exe'), while it won't with
1623# `rm'.
1624for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1625 case $ac_file in
1626 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1627 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1628 export ac_cv_exeext
1629 break;;
1630 * ) break;;
1631 esac
1632done
1633else
1634 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1635echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1636 { (exit 1); exit 1; }; }
1637fi
1638
1639rm -f conftest$ac_cv_exeext
1640echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1641echo "${ECHO_T}$ac_cv_exeext" >&6
1642
1643rm -f conftest.$ac_ext
1644EXEEXT=$ac_cv_exeext
1645ac_exeext=$EXEEXT
1646
1647 ac_ext=c
1648ac_cpp='$CPP $CPPFLAGS'
1649ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1650ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1651ac_compiler_gnu=$ac_cv_c_compiler_gnu
1652
1653
Martin v. Löwis22352952000-12-13 17:37:02 +00001654
1655 fi
1656fi
1657
Guido van Rossum8b131c51995-03-09 14:10:13 +00001658# If the user switches compilers, we can't believe the cache
1659if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1660then
Martin v. Löwis11437992002-04-12 09:54:03 +00001661 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1662(it is also a good idea to do 'make clean' before compiling)" >&5
1663echo "$as_me: error: cached CC is different -- throw away $cache_file
1664(it is also a good idea to do 'make clean' before compiling)" >&2;}
1665 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001666fi
1667
Martin v. Löwis11437992002-04-12 09:54:03 +00001668ac_ext=c
1669ac_cpp='$CPP $CPPFLAGS'
1670ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1671ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1672ac_compiler_gnu=$ac_cv_c_compiler_gnu
1673if test -n "$ac_tool_prefix"; then
1674 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1675set dummy ${ac_tool_prefix}gcc; ac_word=$2
1676echo "$as_me:$LINENO: checking for $ac_word" >&5
1677echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1678if test "${ac_cv_prog_CC+set}" = set; then
1679 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001680else
1681 if test -n "$CC"; then
1682 ac_cv_prog_CC="$CC" # Let the user override the test.
1683else
Martin v. Löwis11437992002-04-12 09:54:03 +00001684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1685for as_dir in $PATH
1686do
1687 IFS=$as_save_IFS
1688 test -z "$as_dir" && as_dir=.
1689 for ac_exec_ext in '' $ac_executable_extensions; do
1690 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1691 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1692 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1693 break 2
1694 fi
1695done
1696done
1697
Jack Jansendd19cf82001-12-06 22:36:17 +00001698fi
1699fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001700CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001701if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001702 echo "$as_me:$LINENO: result: $CC" >&5
1703echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001704else
Martin v. Löwis11437992002-04-12 09:54:03 +00001705 echo "$as_me:$LINENO: result: no" >&5
1706echo "${ECHO_T}no" >&6
1707fi
1708
1709fi
1710if test -z "$ac_cv_prog_CC"; then
1711 ac_ct_CC=$CC
1712 # Extract the first word of "gcc", so it can be a program name with args.
1713set dummy gcc; ac_word=$2
1714echo "$as_me:$LINENO: checking for $ac_word" >&5
1715echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1716if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1717 echo $ECHO_N "(cached) $ECHO_C" >&6
1718else
1719 if test -n "$ac_ct_CC"; then
1720 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1721else
1722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1723for as_dir in $PATH
1724do
1725 IFS=$as_save_IFS
1726 test -z "$as_dir" && as_dir=.
1727 for ac_exec_ext in '' $ac_executable_extensions; do
1728 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1729 ac_cv_prog_ac_ct_CC="gcc"
1730 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1731 break 2
1732 fi
1733done
1734done
1735
1736fi
1737fi
1738ac_ct_CC=$ac_cv_prog_ac_ct_CC
1739if test -n "$ac_ct_CC"; then
1740 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1741echo "${ECHO_T}$ac_ct_CC" >&6
1742else
1743 echo "$as_me:$LINENO: result: no" >&5
1744echo "${ECHO_T}no" >&6
1745fi
1746
1747 CC=$ac_ct_CC
1748else
1749 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001750fi
1751
Jack Jansendd19cf82001-12-06 22:36:17 +00001752if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001753 if test -n "$ac_tool_prefix"; then
1754 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1755set dummy ${ac_tool_prefix}cc; ac_word=$2
1756echo "$as_me:$LINENO: checking for $ac_word" >&5
1757echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1758if test "${ac_cv_prog_CC+set}" = set; then
1759 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001760else
1761 if test -n "$CC"; then
1762 ac_cv_prog_CC="$CC" # Let the user override the test.
1763else
Martin v. Löwis11437992002-04-12 09:54:03 +00001764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1765for as_dir in $PATH
1766do
1767 IFS=$as_save_IFS
1768 test -z "$as_dir" && as_dir=.
1769 for ac_exec_ext in '' $ac_executable_extensions; do
1770 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1771 ac_cv_prog_CC="${ac_tool_prefix}cc"
1772 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1773 break 2
1774 fi
1775done
1776done
1777
1778fi
1779fi
1780CC=$ac_cv_prog_CC
1781if test -n "$CC"; then
1782 echo "$as_me:$LINENO: result: $CC" >&5
1783echo "${ECHO_T}$CC" >&6
1784else
1785 echo "$as_me:$LINENO: result: no" >&5
1786echo "${ECHO_T}no" >&6
1787fi
1788
1789fi
1790if test -z "$ac_cv_prog_CC"; then
1791 ac_ct_CC=$CC
1792 # Extract the first word of "cc", so it can be a program name with args.
1793set dummy cc; ac_word=$2
1794echo "$as_me:$LINENO: checking for $ac_word" >&5
1795echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1796if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1797 echo $ECHO_N "(cached) $ECHO_C" >&6
1798else
1799 if test -n "$ac_ct_CC"; then
1800 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1801else
1802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1803for as_dir in $PATH
1804do
1805 IFS=$as_save_IFS
1806 test -z "$as_dir" && as_dir=.
1807 for ac_exec_ext in '' $ac_executable_extensions; do
1808 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1809 ac_cv_prog_ac_ct_CC="cc"
1810 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1811 break 2
1812 fi
1813done
1814done
1815
1816fi
1817fi
1818ac_ct_CC=$ac_cv_prog_ac_ct_CC
1819if test -n "$ac_ct_CC"; then
1820 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1821echo "${ECHO_T}$ac_ct_CC" >&6
1822else
1823 echo "$as_me:$LINENO: result: no" >&5
1824echo "${ECHO_T}no" >&6
1825fi
1826
1827 CC=$ac_ct_CC
1828else
1829 CC="$ac_cv_prog_CC"
1830fi
1831
1832fi
1833if test -z "$CC"; then
1834 # Extract the first word of "cc", so it can be a program name with args.
1835set dummy cc; ac_word=$2
1836echo "$as_me:$LINENO: checking for $ac_word" >&5
1837echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1838if test "${ac_cv_prog_CC+set}" = set; then
1839 echo $ECHO_N "(cached) $ECHO_C" >&6
1840else
1841 if test -n "$CC"; then
1842 ac_cv_prog_CC="$CC" # Let the user override the test.
1843else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001844 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001845as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1846for as_dir in $PATH
1847do
1848 IFS=$as_save_IFS
1849 test -z "$as_dir" && as_dir=.
1850 for ac_exec_ext in '' $ac_executable_extensions; do
1851 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1852 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1853 ac_prog_rejected=yes
1854 continue
1855 fi
1856 ac_cv_prog_CC="cc"
1857 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1858 break 2
1859 fi
1860done
1861done
1862
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001863if test $ac_prog_rejected = yes; then
1864 # We found a bogon in the path, so make sure we never use it.
1865 set dummy $ac_cv_prog_CC
1866 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001867 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001868 # We chose a different compiler from the bogus one.
1869 # However, it has the same basename, so the bogon will be chosen
1870 # first if we set CC to just the basename; use the full file name.
1871 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001872 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001873 shift
1874 ac_cv_prog_CC="$@"
1875 fi
1876fi
1877fi
1878fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001879CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001880if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001881 echo "$as_me:$LINENO: result: $CC" >&5
1882echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001883else
Martin v. Löwis11437992002-04-12 09:54:03 +00001884 echo "$as_me:$LINENO: result: no" >&5
1885echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001886fi
1887
Martin v. Löwis11437992002-04-12 09:54:03 +00001888fi
1889if test -z "$CC"; then
1890 if test -n "$ac_tool_prefix"; then
1891 for ac_prog in cl
1892 do
1893 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1894set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1895echo "$as_me:$LINENO: checking for $ac_word" >&5
1896echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1897if test "${ac_cv_prog_CC+set}" = set; then
1898 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001899else
1900 if test -n "$CC"; then
1901 ac_cv_prog_CC="$CC" # Let the user override the test.
1902else
Martin v. Löwis11437992002-04-12 09:54:03 +00001903as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1904for as_dir in $PATH
1905do
1906 IFS=$as_save_IFS
1907 test -z "$as_dir" && as_dir=.
1908 for ac_exec_ext in '' $ac_executable_extensions; do
1909 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1910 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1911 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1912 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001913 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001914done
1915done
1916
1917fi
1918fi
1919CC=$ac_cv_prog_CC
1920if test -n "$CC"; then
1921 echo "$as_me:$LINENO: result: $CC" >&5
1922echo "${ECHO_T}$CC" >&6
1923else
1924 echo "$as_me:$LINENO: result: no" >&5
1925echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001926fi
1927
Martin v. Löwis11437992002-04-12 09:54:03 +00001928 test -n "$CC" && break
1929 done
1930fi
1931if test -z "$CC"; then
1932 ac_ct_CC=$CC
1933 for ac_prog in cl
1934do
1935 # Extract the first word of "$ac_prog", so it can be a program name with args.
1936set dummy $ac_prog; ac_word=$2
1937echo "$as_me:$LINENO: checking for $ac_word" >&5
1938echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1939if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1940 echo $ECHO_N "(cached) $ECHO_C" >&6
1941else
1942 if test -n "$ac_ct_CC"; then
1943 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1944else
1945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1946for as_dir in $PATH
1947do
1948 IFS=$as_save_IFS
1949 test -z "$as_dir" && as_dir=.
1950 for ac_exec_ext in '' $ac_executable_extensions; do
1951 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1952 ac_cv_prog_ac_ct_CC="$ac_prog"
1953 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1954 break 2
1955 fi
1956done
1957done
Jack Jansendd19cf82001-12-06 22:36:17 +00001958
Martin v. Löwis11437992002-04-12 09:54:03 +00001959fi
1960fi
1961ac_ct_CC=$ac_cv_prog_ac_ct_CC
1962if test -n "$ac_ct_CC"; then
1963 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1964echo "${ECHO_T}$ac_ct_CC" >&6
1965else
1966 echo "$as_me:$LINENO: result: no" >&5
1967echo "${ECHO_T}no" >&6
1968fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001969
Martin v. Löwis11437992002-04-12 09:54:03 +00001970 test -n "$ac_ct_CC" && break
1971done
Michael W. Hudson54241132001-12-07 15:38:26 +00001972
Martin v. Löwis11437992002-04-12 09:54:03 +00001973 CC=$ac_ct_CC
1974fi
1975
1976fi
1977
1978
1979test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1980echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1981 { (exit 1); exit 1; }; }
1982
1983# Provide some information about the compiler.
1984echo "$as_me:$LINENO:" \
1985 "checking for C compiler version" >&5
1986ac_compiler=`set X $ac_compile; echo $2`
1987{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1988 (eval $ac_compiler --version </dev/null >&5) 2>&5
1989 ac_status=$?
1990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1991 (exit $ac_status); }
1992{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1993 (eval $ac_compiler -v </dev/null >&5) 2>&5
1994 ac_status=$?
1995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1996 (exit $ac_status); }
1997{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1998 (eval $ac_compiler -V </dev/null >&5) 2>&5
1999 ac_status=$?
2000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2001 (exit $ac_status); }
2002
2003cat >conftest.$ac_ext <<_ACEOF
2004#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002005#include "confdefs.h"
2006
Martin v. Löwis11437992002-04-12 09:54:03 +00002007#ifdef F77_DUMMY_MAIN
2008# ifdef __cplusplus
2009 extern "C"
2010# endif
2011 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002012#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002013int
2014main ()
2015{
2016
2017 ;
2018 return 0;
2019}
2020_ACEOF
2021ac_clean_files_save=$ac_clean_files
2022ac_clean_files="$ac_clean_files a.out a.exe"
2023# Try to create an executable without -o first, disregard a.out.
2024# It will help us diagnose broken compilers, and finding out an intuition
2025# of exeext.
2026echo "$as_me:$LINENO: checking for C compiler default output" >&5
2027echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2028ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2029if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2030 (eval $ac_link_default) 2>&5
2031 ac_status=$?
2032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2033 (exit $ac_status); }; then
2034 # Find the output, starting from the most likely. This scheme is
2035# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2036# resort.
2037
2038# Be careful to initialize this variable, since it used to be cached.
2039# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2040ac_cv_exeext=
2041for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2042 ls a.out conftest 2>/dev/null;
2043 ls a.* conftest.* 2>/dev/null`; do
2044 case $ac_file in
2045 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2046 a.out ) # We found the default executable, but exeext='' is most
2047 # certainly right.
2048 break;;
2049 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2050 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2051 export ac_cv_exeext
2052 break;;
2053 * ) break;;
2054 esac
2055done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002056else
Martin v. Löwis11437992002-04-12 09:54:03 +00002057 echo "$as_me: failed program was:" >&5
2058cat conftest.$ac_ext >&5
2059{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2060echo "$as_me: error: C compiler cannot create executables" >&2;}
2061 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002062fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002063
Martin v. Löwis11437992002-04-12 09:54:03 +00002064ac_exeext=$ac_cv_exeext
2065echo "$as_me:$LINENO: result: $ac_file" >&5
2066echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002067
Martin v. Löwis11437992002-04-12 09:54:03 +00002068# Check the compiler produces executables we can run. If not, either
2069# the compiler is broken, or we cross compile.
2070echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2071echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2072# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2073# If not cross compiling, check that we can run a simple program.
2074if test "$cross_compiling" != yes; then
2075 if { ac_try='./$ac_file'
2076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2077 (eval $ac_try) 2>&5
2078 ac_status=$?
2079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2080 (exit $ac_status); }; }; then
2081 cross_compiling=no
2082 else
2083 if test "$cross_compiling" = maybe; then
2084 cross_compiling=yes
2085 else
2086 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2087If you meant to cross compile, use \`--host'." >&5
2088echo "$as_me: error: cannot run C compiled programs.
2089If you meant to cross compile, use \`--host'." >&2;}
2090 { (exit 1); exit 1; }; }
2091 fi
2092 fi
2093fi
2094echo "$as_me:$LINENO: result: yes" >&5
2095echo "${ECHO_T}yes" >&6
2096
2097rm -f a.out a.exe conftest$ac_cv_exeext
2098ac_clean_files=$ac_clean_files_save
2099# Check the compiler produces executables we can run. If not, either
2100# the compiler is broken, or we cross compile.
2101echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2102echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2103echo "$as_me:$LINENO: result: $cross_compiling" >&5
2104echo "${ECHO_T}$cross_compiling" >&6
2105
2106echo "$as_me:$LINENO: checking for suffix of executables" >&5
2107echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2108if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2109 (eval $ac_link) 2>&5
2110 ac_status=$?
2111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2112 (exit $ac_status); }; then
2113 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2114# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2115# work properly (i.e., refer to `conftest.exe'), while it won't with
2116# `rm'.
2117for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2118 case $ac_file in
2119 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2120 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2121 export ac_cv_exeext
2122 break;;
2123 * ) break;;
2124 esac
2125done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002126else
Martin v. Löwis11437992002-04-12 09:54:03 +00002127 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2128echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2129 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002130fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002131
Martin v. Löwis11437992002-04-12 09:54:03 +00002132rm -f conftest$ac_cv_exeext
2133echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2134echo "${ECHO_T}$ac_cv_exeext" >&6
2135
2136rm -f conftest.$ac_ext
2137EXEEXT=$ac_cv_exeext
2138ac_exeext=$EXEEXT
2139echo "$as_me:$LINENO: checking for suffix of object files" >&5
2140echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2141if test "${ac_cv_objext+set}" = set; then
2142 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002143else
Martin v. Löwis11437992002-04-12 09:54:03 +00002144 cat >conftest.$ac_ext <<_ACEOF
2145#line $LINENO "configure"
2146#include "confdefs.h"
2147
2148#ifdef F77_DUMMY_MAIN
2149# ifdef __cplusplus
2150 extern "C"
2151# endif
2152 int F77_DUMMY_MAIN() { return 1; }
2153#endif
2154int
2155main ()
2156{
2157
2158 ;
2159 return 0;
2160}
2161_ACEOF
2162rm -f conftest.o conftest.obj
2163if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2164 (eval $ac_compile) 2>&5
2165 ac_status=$?
2166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2167 (exit $ac_status); }; then
2168 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2169 case $ac_file in
2170 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2171 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2172 break;;
2173 esac
2174done
2175else
2176 echo "$as_me: failed program was:" >&5
2177cat conftest.$ac_ext >&5
2178{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2179echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2180 { (exit 1); exit 1; }; }
2181fi
2182
2183rm -f conftest.$ac_cv_objext conftest.$ac_ext
2184fi
2185echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2186echo "${ECHO_T}$ac_cv_objext" >&6
2187OBJEXT=$ac_cv_objext
2188ac_objext=$OBJEXT
2189echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2190echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2191if test "${ac_cv_c_compiler_gnu+set}" = set; then
2192 echo $ECHO_N "(cached) $ECHO_C" >&6
2193else
2194 cat >conftest.$ac_ext <<_ACEOF
2195#line $LINENO "configure"
2196#include "confdefs.h"
2197
2198#ifdef F77_DUMMY_MAIN
2199# ifdef __cplusplus
2200 extern "C"
2201# endif
2202 int F77_DUMMY_MAIN() { return 1; }
2203#endif
2204int
2205main ()
2206{
2207#ifndef __GNUC__
2208 choke me
2209#endif
2210
2211 ;
2212 return 0;
2213}
2214_ACEOF
2215rm -f conftest.$ac_objext
2216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2217 (eval $ac_compile) 2>&5
2218 ac_status=$?
2219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2220 (exit $ac_status); } &&
2221 { ac_try='test -s conftest.$ac_objext'
2222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2223 (eval $ac_try) 2>&5
2224 ac_status=$?
2225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2226 (exit $ac_status); }; }; then
2227 ac_compiler_gnu=yes
2228else
2229 echo "$as_me: failed program was:" >&5
2230cat conftest.$ac_ext >&5
2231ac_compiler_gnu=no
2232fi
2233rm -f conftest.$ac_objext conftest.$ac_ext
2234ac_cv_c_compiler_gnu=$ac_compiler_gnu
2235
2236fi
2237echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2238echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2239GCC=`test $ac_compiler_gnu = yes && echo yes`
2240ac_test_CFLAGS=${CFLAGS+set}
2241ac_save_CFLAGS=$CFLAGS
2242CFLAGS="-g"
2243echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2244echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2245if test "${ac_cv_prog_cc_g+set}" = set; then
2246 echo $ECHO_N "(cached) $ECHO_C" >&6
2247else
2248 cat >conftest.$ac_ext <<_ACEOF
2249#line $LINENO "configure"
2250#include "confdefs.h"
2251
2252#ifdef F77_DUMMY_MAIN
2253# ifdef __cplusplus
2254 extern "C"
2255# endif
2256 int F77_DUMMY_MAIN() { return 1; }
2257#endif
2258int
2259main ()
2260{
2261
2262 ;
2263 return 0;
2264}
2265_ACEOF
2266rm -f conftest.$ac_objext
2267if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2268 (eval $ac_compile) 2>&5
2269 ac_status=$?
2270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2271 (exit $ac_status); } &&
2272 { ac_try='test -s conftest.$ac_objext'
2273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2274 (eval $ac_try) 2>&5
2275 ac_status=$?
2276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2277 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002278 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002279else
Martin v. Löwis11437992002-04-12 09:54:03 +00002280 echo "$as_me: failed program was:" >&5
2281cat conftest.$ac_ext >&5
2282ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002283fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002284rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002285fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002286echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2287echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002288if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002289 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002290elif test $ac_cv_prog_cc_g = yes; then
2291 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002292 CFLAGS="-g -O2"
2293 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002294 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002295 fi
2296else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002297 if test "$GCC" = yes; then
2298 CFLAGS="-O2"
2299 else
2300 CFLAGS=
2301 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002302fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002303# Some people use a C++ compiler to compile C. Since we use `exit',
2304# in C++ we need to declare it. In case someone uses the same compiler
2305# for both compiling C and C++ we need to have the C++ compiler decide
2306# the declaration of exit, since it's the most demanding environment.
2307cat >conftest.$ac_ext <<_ACEOF
2308#ifndef __cplusplus
2309 choke me
2310#endif
2311_ACEOF
2312rm -f conftest.$ac_objext
2313if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2314 (eval $ac_compile) 2>&5
2315 ac_status=$?
2316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2317 (exit $ac_status); } &&
2318 { ac_try='test -s conftest.$ac_objext'
2319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2320 (eval $ac_try) 2>&5
2321 ac_status=$?
2322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2323 (exit $ac_status); }; }; then
2324 for ac_declaration in \
2325 ''\
2326 '#include <stdlib.h>' \
2327 'extern "C" void std::exit (int) throw (); using std::exit;' \
2328 'extern "C" void std::exit (int); using std::exit;' \
2329 'extern "C" void exit (int) throw ();' \
2330 'extern "C" void exit (int);' \
2331 'void exit (int);'
2332do
2333 cat >conftest.$ac_ext <<_ACEOF
2334#line $LINENO "configure"
2335#include "confdefs.h"
2336#include <stdlib.h>
2337$ac_declaration
2338#ifdef F77_DUMMY_MAIN
2339# ifdef __cplusplus
2340 extern "C"
2341# endif
2342 int F77_DUMMY_MAIN() { return 1; }
2343#endif
2344int
2345main ()
2346{
2347exit (42);
2348 ;
2349 return 0;
2350}
2351_ACEOF
2352rm -f conftest.$ac_objext
2353if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2354 (eval $ac_compile) 2>&5
2355 ac_status=$?
2356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2357 (exit $ac_status); } &&
2358 { ac_try='test -s conftest.$ac_objext'
2359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2360 (eval $ac_try) 2>&5
2361 ac_status=$?
2362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2363 (exit $ac_status); }; }; then
2364 :
2365else
2366 echo "$as_me: failed program was:" >&5
2367cat conftest.$ac_ext >&5
2368continue
2369fi
2370rm -f conftest.$ac_objext conftest.$ac_ext
2371 cat >conftest.$ac_ext <<_ACEOF
2372#line $LINENO "configure"
2373#include "confdefs.h"
2374$ac_declaration
2375#ifdef F77_DUMMY_MAIN
2376# ifdef __cplusplus
2377 extern "C"
2378# endif
2379 int F77_DUMMY_MAIN() { return 1; }
2380#endif
2381int
2382main ()
2383{
2384exit (42);
2385 ;
2386 return 0;
2387}
2388_ACEOF
2389rm -f conftest.$ac_objext
2390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2391 (eval $ac_compile) 2>&5
2392 ac_status=$?
2393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2394 (exit $ac_status); } &&
2395 { ac_try='test -s conftest.$ac_objext'
2396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2397 (eval $ac_try) 2>&5
2398 ac_status=$?
2399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2400 (exit $ac_status); }; }; then
2401 break
2402else
2403 echo "$as_me: failed program was:" >&5
2404cat conftest.$ac_ext >&5
2405fi
2406rm -f conftest.$ac_objext conftest.$ac_ext
2407done
2408rm -f conftest*
2409if test -n "$ac_declaration"; then
2410 echo '#ifdef __cplusplus' >>confdefs.h
2411 echo $ac_declaration >>confdefs.h
2412 echo '#endif' >>confdefs.h
2413fi
2414
2415else
2416 echo "$as_me: failed program was:" >&5
2417cat conftest.$ac_ext >&5
2418fi
2419rm -f conftest.$ac_objext conftest.$ac_ext
2420ac_ext=c
2421ac_cpp='$CPP $CPPFLAGS'
2422ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2423ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2424ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002425
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002426
2427# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002428
2429ac_ext=c
2430ac_cpp='$CPP $CPPFLAGS'
2431ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2432ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2433ac_compiler_gnu=$ac_cv_c_compiler_gnu
2434echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2435echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002436# On Suns, sometimes $CPP names a directory.
2437if test -n "$CPP" && test -d "$CPP"; then
2438 CPP=
2439fi
2440if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002441 if test "${ac_cv_prog_CPP+set}" = set; then
2442 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002443else
Martin v. Löwis11437992002-04-12 09:54:03 +00002444 # Double quotes because CPP needs to be expanded
2445 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2446 do
2447 ac_preproc_ok=false
2448for ac_c_preproc_warn_flag in '' yes
2449do
2450 # Use a header file that comes with gcc, so configuring glibc
2451 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002452 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002453 # not just through cpp. "Syntax error" is here to catch this case.
2454 cat >conftest.$ac_ext <<_ACEOF
2455#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002456#include "confdefs.h"
2457#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002458 Syntax error
2459_ACEOF
2460if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2461 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2462 ac_status=$?
2463 egrep -v '^ *\+' conftest.er1 >conftest.err
2464 rm -f conftest.er1
2465 cat conftest.err >&5
2466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2467 (exit $ac_status); } >/dev/null; then
2468 if test -s conftest.err; then
2469 ac_cpp_err=$ac_c_preproc_warn_flag
2470 else
2471 ac_cpp_err=
2472 fi
2473else
2474 ac_cpp_err=yes
2475fi
2476if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002477 :
2478else
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002480 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002481 # Broken: fails on valid input.
2482continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002483fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002484rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002485
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 # OK, works on sane cases. Now check whether non-existent headers
2487 # can be detected and how.
2488 cat >conftest.$ac_ext <<_ACEOF
2489#line $LINENO "configure"
2490#include "confdefs.h"
2491#include <ac_nonexistent.h>
2492_ACEOF
2493if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2494 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2495 ac_status=$?
2496 egrep -v '^ *\+' conftest.er1 >conftest.err
2497 rm -f conftest.er1
2498 cat conftest.err >&5
2499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2500 (exit $ac_status); } >/dev/null; then
2501 if test -s conftest.err; then
2502 ac_cpp_err=$ac_c_preproc_warn_flag
2503 else
2504 ac_cpp_err=
2505 fi
2506else
2507 ac_cpp_err=yes
2508fi
2509if test -z "$ac_cpp_err"; then
2510 # Broken: success on invalid input.
2511continue
2512else
2513 echo "$as_me: failed program was:" >&5
2514 cat conftest.$ac_ext >&5
2515 # Passes both tests.
2516ac_preproc_ok=:
2517break
2518fi
2519rm -f conftest.err conftest.$ac_ext
2520
2521done
2522# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2523rm -f conftest.err conftest.$ac_ext
2524if $ac_preproc_ok; then
2525 break
2526fi
2527
2528 done
2529 ac_cv_prog_CPP=$CPP
2530
2531fi
2532 CPP=$ac_cv_prog_CPP
2533else
2534 ac_cv_prog_CPP=$CPP
2535fi
2536echo "$as_me:$LINENO: result: $CPP" >&5
2537echo "${ECHO_T}$CPP" >&6
2538ac_preproc_ok=false
2539for ac_c_preproc_warn_flag in '' yes
2540do
2541 # Use a header file that comes with gcc, so configuring glibc
2542 # with a fresh cross-compiler works.
2543 # On the NeXT, cc -E runs the code through the compiler's parser,
2544 # not just through cpp. "Syntax error" is here to catch this case.
2545 cat >conftest.$ac_ext <<_ACEOF
2546#line $LINENO "configure"
2547#include "confdefs.h"
2548#include <assert.h>
2549 Syntax error
2550_ACEOF
2551if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2552 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2553 ac_status=$?
2554 egrep -v '^ *\+' conftest.er1 >conftest.err
2555 rm -f conftest.er1
2556 cat conftest.err >&5
2557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2558 (exit $ac_status); } >/dev/null; then
2559 if test -s conftest.err; then
2560 ac_cpp_err=$ac_c_preproc_warn_flag
2561 else
2562 ac_cpp_err=
2563 fi
2564else
2565 ac_cpp_err=yes
2566fi
2567if test -z "$ac_cpp_err"; then
2568 :
2569else
2570 echo "$as_me: failed program was:" >&5
2571 cat conftest.$ac_ext >&5
2572 # Broken: fails on valid input.
2573continue
2574fi
2575rm -f conftest.err conftest.$ac_ext
2576
2577 # OK, works on sane cases. Now check whether non-existent headers
2578 # can be detected and how.
2579 cat >conftest.$ac_ext <<_ACEOF
2580#line $LINENO "configure"
2581#include "confdefs.h"
2582#include <ac_nonexistent.h>
2583_ACEOF
2584if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2585 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2586 ac_status=$?
2587 egrep -v '^ *\+' conftest.er1 >conftest.err
2588 rm -f conftest.er1
2589 cat conftest.err >&5
2590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2591 (exit $ac_status); } >/dev/null; then
2592 if test -s conftest.err; then
2593 ac_cpp_err=$ac_c_preproc_warn_flag
2594 else
2595 ac_cpp_err=
2596 fi
2597else
2598 ac_cpp_err=yes
2599fi
2600if test -z "$ac_cpp_err"; then
2601 # Broken: success on invalid input.
2602continue
2603else
2604 echo "$as_me: failed program was:" >&5
2605 cat conftest.$ac_ext >&5
2606 # Passes both tests.
2607ac_preproc_ok=:
2608break
2609fi
2610rm -f conftest.err conftest.$ac_ext
2611
2612done
2613# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2614rm -f conftest.err conftest.$ac_ext
2615if $ac_preproc_ok; then
2616 :
2617else
2618 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2619echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2620 { (exit 1); exit 1; }; }
2621fi
2622
2623ac_ext=c
2624ac_cpp='$CPP $CPPFLAGS'
2625ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2626ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2627ac_compiler_gnu=$ac_cv_c_compiler_gnu
2628
2629
2630
2631echo "$as_me:$LINENO: checking for AIX" >&5
2632echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2633cat >conftest.$ac_ext <<_ACEOF
2634#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002635#include "confdefs.h"
2636#ifdef _AIX
2637 yes
2638#endif
2639
Martin v. Löwis11437992002-04-12 09:54:03 +00002640_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002641if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2642 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 echo "$as_me:$LINENO: result: yes" >&5
2644echo "${ECHO_T}yes" >&6
2645cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002646#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002647_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002648
2649else
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 echo "$as_me:$LINENO: result: no" >&5
2651echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002652fi
2653rm -f conftest*
2654
Michael W. Hudson54241132001-12-07 15:38:26 +00002655
Martin v. Löwis11437992002-04-12 09:54:03 +00002656echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2657echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2658if test "${ac_cv_header_stdc+set}" = set; then
2659 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002660else
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 cat >conftest.$ac_ext <<_ACEOF
2662#line $LINENO "configure"
2663#include "confdefs.h"
2664#include <stdlib.h>
2665#include <stdarg.h>
2666#include <string.h>
2667#include <float.h>
2668
2669_ACEOF
2670if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2671 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2672 ac_status=$?
2673 egrep -v '^ *\+' conftest.er1 >conftest.err
2674 rm -f conftest.er1
2675 cat conftest.err >&5
2676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2677 (exit $ac_status); } >/dev/null; then
2678 if test -s conftest.err; then
2679 ac_cpp_err=$ac_c_preproc_warn_flag
2680 else
2681 ac_cpp_err=
2682 fi
2683else
2684 ac_cpp_err=yes
2685fi
2686if test -z "$ac_cpp_err"; then
2687 ac_cv_header_stdc=yes
2688else
2689 echo "$as_me: failed program was:" >&5
2690 cat conftest.$ac_ext >&5
2691 ac_cv_header_stdc=no
2692fi
2693rm -f conftest.err conftest.$ac_ext
2694
2695if test $ac_cv_header_stdc = yes; then
2696 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2697 cat >conftest.$ac_ext <<_ACEOF
2698#line $LINENO "configure"
2699#include "confdefs.h"
2700#include <string.h>
2701
2702_ACEOF
2703if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2704 egrep "memchr" >/dev/null 2>&1; then
2705 :
2706else
2707 ac_cv_header_stdc=no
2708fi
2709rm -f conftest*
2710
2711fi
2712
2713if test $ac_cv_header_stdc = yes; then
2714 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2715 cat >conftest.$ac_ext <<_ACEOF
2716#line $LINENO "configure"
2717#include "confdefs.h"
2718#include <stdlib.h>
2719
2720_ACEOF
2721if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2722 egrep "free" >/dev/null 2>&1; then
2723 :
2724else
2725 ac_cv_header_stdc=no
2726fi
2727rm -f conftest*
2728
2729fi
2730
2731if test $ac_cv_header_stdc = yes; then
2732 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2733 if test "$cross_compiling" = yes; then
2734 :
2735else
2736 cat >conftest.$ac_ext <<_ACEOF
2737#line $LINENO "configure"
2738#include "confdefs.h"
2739#include <ctype.h>
2740#if ((' ' & 0x0FF) == 0x020)
2741# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2742# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2743#else
2744# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2745 || ('j' <= (c) && (c) <= 'r') \
2746 || ('s' <= (c) && (c) <= 'z'))
2747# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2748#endif
2749
2750#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2751int
2752main ()
2753{
2754 int i;
2755 for (i = 0; i < 256; i++)
2756 if (XOR (islower (i), ISLOWER (i))
2757 || toupper (i) != TOUPPER (i))
2758 exit(2);
2759 exit (0);
2760}
2761_ACEOF
2762rm -f conftest$ac_exeext
2763if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2764 (eval $ac_link) 2>&5
2765 ac_status=$?
2766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2767 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2769 (eval $ac_try) 2>&5
2770 ac_status=$?
2771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2772 (exit $ac_status); }; }; then
2773 :
2774else
2775 echo "$as_me: program exited with status $ac_status" >&5
2776echo "$as_me: failed program was:" >&5
2777cat conftest.$ac_ext >&5
2778( exit $ac_status )
2779ac_cv_header_stdc=no
2780fi
2781rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2782fi
2783fi
2784fi
2785echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2786echo "${ECHO_T}$ac_cv_header_stdc" >&6
2787if test $ac_cv_header_stdc = yes; then
2788
2789cat >>confdefs.h <<\_ACEOF
2790#define STDC_HEADERS 1
2791_ACEOF
2792
2793fi
2794
2795# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2806 inttypes.h stdint.h unistd.h
2807do
2808as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2809echo "$as_me:$LINENO: checking for $ac_header" >&5
2810echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2811if eval "test \"\${$as_ac_Header+set}\" = set"; then
2812 echo $ECHO_N "(cached) $ECHO_C" >&6
2813else
2814 cat >conftest.$ac_ext <<_ACEOF
2815#line $LINENO "configure"
2816#include "confdefs.h"
2817$ac_includes_default
2818
2819#include <$ac_header>
2820_ACEOF
2821rm -f conftest.$ac_objext
2822if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2823 (eval $ac_compile) 2>&5
2824 ac_status=$?
2825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2826 (exit $ac_status); } &&
2827 { ac_try='test -s conftest.$ac_objext'
2828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2829 (eval $ac_try) 2>&5
2830 ac_status=$?
2831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2832 (exit $ac_status); }; }; then
2833 eval "$as_ac_Header=yes"
2834else
2835 echo "$as_me: failed program was:" >&5
2836cat conftest.$ac_ext >&5
2837eval "$as_ac_Header=no"
2838fi
2839rm -f conftest.$ac_objext conftest.$ac_ext
2840fi
2841echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2842echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2843if test `eval echo '${'$as_ac_Header'}'` = yes; then
2844 cat >>confdefs.h <<_ACEOF
2845#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2846_ACEOF
2847
2848fi
2849
2850done
2851
2852
2853if test "${ac_cv_header_minix_config_h+set}" = set; then
2854 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2855echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2856if test "${ac_cv_header_minix_config_h+set}" = set; then
2857 echo $ECHO_N "(cached) $ECHO_C" >&6
2858fi
2859echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2860echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2861else
2862 # Is the header compilable?
2863echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2864echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2865cat >conftest.$ac_ext <<_ACEOF
2866#line $LINENO "configure"
2867#include "confdefs.h"
2868$ac_includes_default
2869#include <minix/config.h>
2870_ACEOF
2871rm -f conftest.$ac_objext
2872if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2873 (eval $ac_compile) 2>&5
2874 ac_status=$?
2875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2876 (exit $ac_status); } &&
2877 { ac_try='test -s conftest.$ac_objext'
2878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2879 (eval $ac_try) 2>&5
2880 ac_status=$?
2881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2882 (exit $ac_status); }; }; then
2883 ac_header_compiler=yes
2884else
2885 echo "$as_me: failed program was:" >&5
2886cat conftest.$ac_ext >&5
2887ac_header_compiler=no
2888fi
2889rm -f conftest.$ac_objext conftest.$ac_ext
2890echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2891echo "${ECHO_T}$ac_header_compiler" >&6
2892
2893# Is the header present?
2894echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2895echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2896cat >conftest.$ac_ext <<_ACEOF
2897#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002898#include "confdefs.h"
2899#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002900_ACEOF
2901if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2902 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2903 ac_status=$?
2904 egrep -v '^ *\+' conftest.er1 >conftest.err
2905 rm -f conftest.er1
2906 cat conftest.err >&5
2907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2908 (exit $ac_status); } >/dev/null; then
2909 if test -s conftest.err; then
2910 ac_cpp_err=$ac_c_preproc_warn_flag
2911 else
2912 ac_cpp_err=
2913 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002914else
Martin v. Löwis11437992002-04-12 09:54:03 +00002915 ac_cpp_err=yes
2916fi
2917if test -z "$ac_cpp_err"; then
2918 ac_header_preproc=yes
2919else
2920 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002921 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002922 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002923fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002924rm -f conftest.err conftest.$ac_ext
2925echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2926echo "${ECHO_T}$ac_header_preproc" >&6
2927
2928# So? What about this header?
2929case $ac_header_compiler:$ac_header_preproc in
2930 yes:no )
2931 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2932echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2933 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2934echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2935 no:yes )
2936 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2937echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2938 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2939echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2940 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2941echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2942esac
2943echo "$as_me:$LINENO: checking for minix/config.h" >&5
2944echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2945if test "${ac_cv_header_minix_config_h+set}" = set; then
2946 echo $ECHO_N "(cached) $ECHO_C" >&6
2947else
2948 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002949fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002950echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2951echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2952
2953fi
2954if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002955 MINIX=yes
2956else
Martin v. Löwis11437992002-04-12 09:54:03 +00002957 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002958fi
2959
Martin v. Löwis11437992002-04-12 09:54:03 +00002960
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002961if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002962
2963cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002964#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002965_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002966
Martin v. Löwis11437992002-04-12 09:54:03 +00002967
2968cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002969#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002970_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002971
Martin v. Löwis11437992002-04-12 09:54:03 +00002972
2973cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002974#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002975_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002976
2977fi
2978
2979
Michael W. Hudson54241132001-12-07 15:38:26 +00002980
Martin v. Löwis11437992002-04-12 09:54:03 +00002981echo "$as_me:$LINENO: checking for --with-suffix" >&5
2982echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002983
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002984# Check whether --with-suffix or --without-suffix was given.
2985if test "${with_suffix+set}" = set; then
2986 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002987
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002988 case $withval in
2989 no) EXEEXT=;;
2990 yes) EXEEXT=.exe;;
2991 *) EXEEXT=$withval;;
2992 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002993fi;
2994echo "$as_me:$LINENO: result: $EXEEXT" >&5
2995echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002996
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002997# Test whether we're running on a non-case-sensitive system, in which
2998# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002999
Martin v. Löwis11437992002-04-12 09:54:03 +00003000echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3001echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003002if test ! -d CaseSensitiveTestDir; then
3003mkdir CaseSensitiveTestDir
3004fi
3005
3006if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003007then
Martin v. Löwis11437992002-04-12 09:54:03 +00003008 echo "$as_me:$LINENO: result: yes" >&5
3009echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003010 BUILDEXEEXT=.exe
3011else
Martin v. Löwis11437992002-04-12 09:54:03 +00003012 echo "$as_me:$LINENO: result: no" >&5
3013echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003014 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003015fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003016rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003017
Guido van Rossumdd997f71998-10-07 19:58:26 +00003018case $MACHDEP in
3019bsdos*)
3020 case $CC in
3021 gcc) CC="$CC -D_HAVE_BSDI";;
3022 esac;;
3023esac
3024
Guido van Rossum24b1e751997-08-21 02:29:16 +00003025case $ac_sys_system in
3026hp*|HP*)
3027 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003028 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003029 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003030Monterey*)
3031 case $CC in
3032 cc) CC="$CC -Wl,-Bexport";;
3033 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003034SunOS*)
3035 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003036
3037cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003038#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003039_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003040
3041 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003042esac
3043
Michael W. Hudson54241132001-12-07 15:38:26 +00003044
3045
Martin v. Löwis11437992002-04-12 09:54:03 +00003046echo "$as_me:$LINENO: checking LIBRARY" >&5
3047echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003048if test -z "$LIBRARY"
3049then
3050 LIBRARY='libpython$(VERSION).a'
3051fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003052echo "$as_me:$LINENO: result: $LIBRARY" >&5
3053echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003054
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003055# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003056# name of the library into which to insert object files). BLDLIBRARY is also
3057# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3058# is blank as the main program is not linked directly against LDLIBRARY.
3059# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3060# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3061# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3062# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003063#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003064# RUNSHARED is used to run shared python without installed libraries
3065#
3066# INSTSONAME is the name of the shared library that will be use to install
3067# on the system - some systems like version suffix, others don't
3068
3069
Michael W. Hudson54241132001-12-07 15:38:26 +00003070
3071
3072
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003073
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003074LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003075BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003076INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003077DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003078LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003079RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003080
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003081# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003082# If CXX is set, and if it is needed to link a main function that was
3083# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3084# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003085# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003086# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003087
Martin v. Löwis11437992002-04-12 09:54:03 +00003088echo "$as_me:$LINENO: checking LINKCC" >&5
3089echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003090if test -z "$LINKCC"
3091then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003092 if test -z "$CXX"; then
3093 LINKCC="\$(PURIFY) \$(CC)"
3094 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003095 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003096 $CXX -c conftest.$ac_ext 2>&5
3097 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3098 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3099 then
3100 LINKCC="\$(PURIFY) \$(CC)"
3101 else
3102 LINKCC="\$(PURIFY) \$(CXX)"
3103 fi
3104 rm -fr conftest*
3105 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003106 case $ac_sys_system in
3107 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003108 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003109 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003110 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003111 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003112 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003113 esac
3114fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003115echo "$as_me:$LINENO: result: $LINKCC" >&5
3116echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003117
Martin v. Löwis11437992002-04-12 09:54:03 +00003118echo "$as_me:$LINENO: checking for --enable-shared" >&5
3119echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003120# Check whether --enable-shared or --disable-shared was given.
3121if test "${enable_shared+set}" = set; then
3122 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003123
Martin v. Löwis11437992002-04-12 09:54:03 +00003124fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003125
3126if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003127then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003128 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003129 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003130 enable_shared="yes";;
3131 *)
3132 enable_shared="no";;
3133 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003134fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003135echo "$as_me:$LINENO: result: $enable_shared" >&5
3136echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003137
3138
Martin v. Löwis11437992002-04-12 09:54:03 +00003139echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3140echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003141
Guido van Rossumb8552162001-09-05 14:58:11 +00003142# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3143# library that we build, but we do not want to link against it (we
3144# will find it with a -framework option). For this reason there is an
3145# extra variable BLDLIBRARY against which Python and the extension
3146# modules are linked, BLDLIBRARY. This is normally the same as
3147# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003148if test "$enable_framework"
3149then
3150 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3151 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3152 BLDLIBRARY=''
3153else
3154 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003155fi
Jack Jansene578a632001-08-15 01:27:14 +00003156
Martin v. Löwis1142de32002-03-29 16:28:31 +00003157# Other platforms follow
3158if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003159
3160cat >>confdefs.h <<\_ACEOF
3161#define Py_ENABLE_SHARED 1
3162_ACEOF
3163
Martin v. Löwis1142de32002-03-29 16:28:31 +00003164 case $ac_sys_system in
3165 BeOS*)
3166 LDLIBRARY='libpython$(VERSION).so'
3167 ;;
3168 CYGWIN*)
3169 LDLIBRARY='libpython$(VERSION).dll.a'
3170 DLLLIBRARY='libpython$(VERSION).dll'
3171 ;;
3172 SunOS*)
3173 LDLIBRARY='libpython$(VERSION).so'
3174 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3175 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3176 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003177 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003178 LDLIBRARY='libpython$(VERSION).so'
3179 BLDLIBRARY='-L. -lpython$(VERSION)'
3180 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3181 INSTSONAME="$LDLIBRARY".$SOVERSION
3182 ;;
3183 hp*|HP*)
3184 LDLIBRARY='libpython$(VERSION).sl'
3185 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3186 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3187 ;;
3188 OSF*)
3189 LDLIBRARY='libpython$(VERSION).so'
3190 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3191 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3192 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003193 atheos*)
3194 LDLIBRARY='libpython$(VERSION).so'
3195 BLDLIBRARY='-L. -lpython$(VERSION)'
3196 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3197 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003198 esac
3199 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3200 case $MACHDEP in
3201 dguxR4)
3202 LDLIBRARY='libpython$(VERSION).so'
3203 OPT="$OPT -pic"
3204 ;;
3205 esac
3206fi
3207
Martin v. Löwis11437992002-04-12 09:54:03 +00003208echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3209echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003210
Martin v. Löwis11437992002-04-12 09:54:03 +00003211if test -n "$ac_tool_prefix"; then
3212 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3213set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3214echo "$as_me:$LINENO: checking for $ac_word" >&5
3215echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3216if test "${ac_cv_prog_RANLIB+set}" = set; then
3217 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003218else
3219 if test -n "$RANLIB"; then
3220 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3221else
Martin v. Löwis11437992002-04-12 09:54:03 +00003222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3223for as_dir in $PATH
3224do
3225 IFS=$as_save_IFS
3226 test -z "$as_dir" && as_dir=.
3227 for ac_exec_ext in '' $ac_executable_extensions; do
3228 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3229 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3230 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3231 break 2
3232 fi
3233done
3234done
3235
Guido van Rossum627b2d71993-12-24 10:39:16 +00003236fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003237fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003238RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003239if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003240 echo "$as_me:$LINENO: result: $RANLIB" >&5
3241echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003242else
Martin v. Löwis11437992002-04-12 09:54:03 +00003243 echo "$as_me:$LINENO: result: no" >&5
3244echo "${ECHO_T}no" >&6
3245fi
3246
3247fi
3248if test -z "$ac_cv_prog_RANLIB"; then
3249 ac_ct_RANLIB=$RANLIB
3250 # Extract the first word of "ranlib", so it can be a program name with args.
3251set dummy ranlib; ac_word=$2
3252echo "$as_me:$LINENO: checking for $ac_word" >&5
3253echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3254if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3255 echo $ECHO_N "(cached) $ECHO_C" >&6
3256else
3257 if test -n "$ac_ct_RANLIB"; then
3258 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3259else
3260as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3261for as_dir in $PATH
3262do
3263 IFS=$as_save_IFS
3264 test -z "$as_dir" && as_dir=.
3265 for ac_exec_ext in '' $ac_executable_extensions; do
3266 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3267 ac_cv_prog_ac_ct_RANLIB="ranlib"
3268 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3269 break 2
3270 fi
3271done
3272done
3273
3274 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3275fi
3276fi
3277ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3278if test -n "$ac_ct_RANLIB"; then
3279 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3280echo "${ECHO_T}$ac_ct_RANLIB" >&6
3281else
3282 echo "$as_me:$LINENO: result: no" >&5
3283echo "${ECHO_T}no" >&6
3284fi
3285
3286 RANLIB=$ac_ct_RANLIB
3287else
3288 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003289fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003290
3291
Guido van Rossum7f43da71994-08-01 12:15:30 +00003292for ac_prog in ar aal
3293do
Martin v. Löwis11437992002-04-12 09:54:03 +00003294 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003295set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003296echo "$as_me:$LINENO: checking for $ac_word" >&5
3297echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3298if test "${ac_cv_prog_AR+set}" = set; then
3299 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003300else
3301 if test -n "$AR"; then
3302 ac_cv_prog_AR="$AR" # Let the user override the test.
3303else
Martin v. Löwis11437992002-04-12 09:54:03 +00003304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3305for as_dir in $PATH
3306do
3307 IFS=$as_save_IFS
3308 test -z "$as_dir" && as_dir=.
3309 for ac_exec_ext in '' $ac_executable_extensions; do
3310 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3311 ac_cv_prog_AR="$ac_prog"
3312 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3313 break 2
3314 fi
3315done
3316done
3317
Guido van Rossum7f43da71994-08-01 12:15:30 +00003318fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003319fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003320AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003321if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003322 echo "$as_me:$LINENO: result: $AR" >&5
3323echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003324else
Martin v. Löwis11437992002-04-12 09:54:03 +00003325 echo "$as_me:$LINENO: result: no" >&5
3326echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003327fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003328
Martin v. Löwis11437992002-04-12 09:54:03 +00003329 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003330done
3331test -n "$AR" || AR="ar"
3332
Michael W. Hudson54241132001-12-07 15:38:26 +00003333
Neil Schemenauera42c8272001-03-31 00:01:55 +00003334case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003335bsdos*|hp*|HP*)
3336 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003337 if test -z "$INSTALL"
3338 then
3339 INSTALL="${srcdir}/install-sh -c"
3340 fi
3341esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003342ac_aux_dir=
3343for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3344 if test -f $ac_dir/install-sh; then
3345 ac_aux_dir=$ac_dir
3346 ac_install_sh="$ac_aux_dir/install-sh -c"
3347 break
3348 elif test -f $ac_dir/install.sh; then
3349 ac_aux_dir=$ac_dir
3350 ac_install_sh="$ac_aux_dir/install.sh -c"
3351 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003352 elif test -f $ac_dir/shtool; then
3353 ac_aux_dir=$ac_dir
3354 ac_install_sh="$ac_aux_dir/shtool install -c"
3355 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003356 fi
3357done
3358if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003359 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3360echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3361 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003363ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3364ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3365ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003366
3367# Find a good install program. We prefer a C program (faster),
3368# so one script is as good as another. But avoid the broken or
3369# incompatible versions:
3370# SysV /etc/install, /usr/sbin/install
3371# SunOS /usr/etc/install
3372# IRIX /sbin/install
3373# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003374# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003375# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3376# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3377# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3378# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003379echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3380echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003381if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003382if test "${ac_cv_path_install+set}" = set; then
3383 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003384else
Martin v. Löwis11437992002-04-12 09:54:03 +00003385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3386for as_dir in $PATH
3387do
3388 IFS=$as_save_IFS
3389 test -z "$as_dir" && as_dir=.
3390 # Account for people who put trailing slashes in PATH elements.
3391case $as_dir/ in
3392 ./ | .// | /cC/* | \
3393 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3394 /usr/ucb/* ) ;;
3395 *)
3396 # OSF1 and SCO ODT 3.0 have their own names for install.
3397 # Don't use installbsd from OSF since it installs stuff as root
3398 # by default.
3399 for ac_prog in ginstall scoinst install; do
3400 for ac_exec_ext in '' $ac_executable_extensions; do
3401 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3402 if test $ac_prog = install &&
3403 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3404 # AIX install. It has an incompatible calling convention.
3405 :
3406 elif test $ac_prog = install &&
3407 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3408 # program-specific install script used by HP pwplus--don't use.
3409 :
3410 else
3411 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3412 break 3
3413 fi
3414 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003415 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003416 done
3417 ;;
3418esac
3419done
3420
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003421
3422fi
3423 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003424 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003425 else
3426 # As a last resort, use the slow shell script. We don't cache a
3427 # path for INSTALL within a source directory, because that will
3428 # break other packages using the cache if that directory is
3429 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003430 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003431 fi
3432fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003433echo "$as_me:$LINENO: result: $INSTALL" >&5
3434echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003435
3436# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3437# It thinks the first close brace ends the variable substitution.
3438test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3439
Martin v. Löwis11437992002-04-12 09:54:03 +00003440test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003441
3442test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3443
Michael W. Hudson54241132001-12-07 15:38:26 +00003444
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003445# Not every filesystem supports hard links
3446
3447if test -z "$LN" ; then
3448 case $ac_sys_system in
3449 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003450 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003451 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003452 *) LN=ln;;
3453 esac
3454fi
3455
Fred Drake109d9862001-07-11 06:27:56 +00003456# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003457echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3458echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3459
Fred Drake109d9862001-07-11 06:27:56 +00003460# Check whether --with-pydebug or --without-pydebug was given.
3461if test "${with_pydebug+set}" = set; then
3462 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003463
Fred Drake109d9862001-07-11 06:27:56 +00003464if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003465then
3466
3467cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003468#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003469_ACEOF
3470
3471 echo "$as_me:$LINENO: result: yes" >&5
3472echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003473 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003474else echo "$as_me:$LINENO: result: no" >&5
3475echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003476fi
3477else
Martin v. Löwis11437992002-04-12 09:54:03 +00003478 echo "$as_me:$LINENO: result: no" >&5
3479echo "${ECHO_T}no" >&6
3480fi;
Fred Drake109d9862001-07-11 06:27:56 +00003481
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003482# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003483
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003484if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003485then
Neal Norwitzd957f392002-09-25 21:26:19 +00003486 case $GCC in
Guido van Rossumedca74a1997-07-18 23:29:40 +00003487 yes)
3488 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003489 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003490 if test "$Py_DEBUG" = 'true' ; then
3491 # Optimization messes up debuggers, so turn it off for
3492 # debug builds.
3493 OPT="-g -Wall -Wstrict-prototypes"
3494 else
3495 OPT="-g -O3 -Wall -Wstrict-prototypes"
3496 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003497 *)
Fred Drake109d9862001-07-11 06:27:56 +00003498 OPT="-O3 -Wall -Wstrict-prototypes";;
3499 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003500 case $ac_sys_system in
3501 SCO_SV*) OPT="$OPT -m486 -DSCO5";;
3502 esac
Fred Drake109d9862001-07-11 06:27:56 +00003503 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003504 *)
3505 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003506 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003507 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003508 SCO_SV*)
3509 CFLAGS="$CFLAGS -belf"
3510 OPT="-belf -O -Ki486 -DSCO5";;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003511 *)
3512 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003513 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003514 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003515 case $ac_sys_system in
3516 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003517 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003518 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003519fi
3520
Fred Drakee1ceaa02001-12-04 20:55:47 +00003521if test "$Py_DEBUG" = 'true'; then
3522 :
3523else
3524 OPT="-DNDEBUG $OPT"
3525fi
3526
Trent Mick635f6fb2000-08-23 21:33:05 +00003527# The current (beta) Monterey compiler dies with optimizations
3528case $ac_sys_system in
3529Monterey*) OPT="";;
3530esac
3531
Guido van Rossum563e7081996-09-10 18:20:48 +00003532if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003533then
3534 OPT="$OPT $ac_arch_flags"
3535fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003536
Martin v. Löwis11437992002-04-12 09:54:03 +00003537echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3538echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3539if test "${ac_cv_opt_olimit_ok+set}" = set; then
3540 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003541else
3542 ac_save_cc="$CC"
3543CC="$CC -OPT:Olimit=0"
3544if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003545 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003546else
Martin v. Löwis11437992002-04-12 09:54:03 +00003547 cat >conftest.$ac_ext <<_ACEOF
3548#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003549#include "confdefs.h"
3550int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003551_ACEOF
3552rm -f conftest$ac_exeext
3553if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3554 (eval $ac_link) 2>&5
3555 ac_status=$?
3556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3557 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3559 (eval $ac_try) 2>&5
3560 ac_status=$?
3561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3562 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003563 ac_cv_opt_olimit_ok=yes
3564else
Martin v. Löwis11437992002-04-12 09:54:03 +00003565 echo "$as_me: program exited with status $ac_status" >&5
3566echo "$as_me: failed program was:" >&5
3567cat conftest.$ac_ext >&5
3568( exit $ac_status )
3569ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003570fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003571rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003572fi
Guido van Rossum91922671997-10-09 20:24:13 +00003573CC="$ac_save_cc"
3574fi
3575
Martin v. Löwis11437992002-04-12 09:54:03 +00003576echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3577echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003578if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003579 case $ac_sys_system in
3580 Darwin*) OPT="$OPT" ;;
3581 *) OPT="$OPT -OPT:Olimit=0";;
3582 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003583else
Martin v. Löwis11437992002-04-12 09:54:03 +00003584 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3585echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3586 if test "${ac_cv_olimit_ok+set}" = set; then
3587 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003588else
3589 ac_save_cc="$CC"
3590 CC="$CC -Olimit 1500"
3591 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003592 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003593else
Martin v. Löwis11437992002-04-12 09:54:03 +00003594 cat >conftest.$ac_ext <<_ACEOF
3595#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003596#include "confdefs.h"
3597int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003598_ACEOF
3599rm -f conftest$ac_exeext
3600if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3601 (eval $ac_link) 2>&5
3602 ac_status=$?
3603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3604 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3606 (eval $ac_try) 2>&5
3607 ac_status=$?
3608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3609 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003610 ac_cv_olimit_ok=yes
3611else
Martin v. Löwis11437992002-04-12 09:54:03 +00003612 echo "$as_me: program exited with status $ac_status" >&5
3613echo "$as_me: failed program was:" >&5
3614cat conftest.$ac_ext >&5
3615( exit $ac_status )
3616ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003617fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003618rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003619fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003620 CC="$ac_save_cc"
3621fi
3622
Martin v. Löwis11437992002-04-12 09:54:03 +00003623 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3624echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003625 if test $ac_cv_olimit_ok = yes; then
3626 OPT="$OPT -Olimit 1500"
3627 fi
3628fi
3629
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003630# On some compilers, pthreads are available without further options
3631# (e.g. MacOS X). On some of these systems, the compiler will not
3632# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3633# So we have to see first whether pthreads are available without
3634# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003635echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3636echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3637if test "${ac_cv_pthread_is_default+set}" = set; then
3638 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003639else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003640 if test "$cross_compiling" = yes; then
3641 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003642else
Martin v. Löwis11437992002-04-12 09:54:03 +00003643 cat >conftest.$ac_ext <<_ACEOF
3644#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003645#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003646
Martin v. Löwis130fb172001-07-19 11:00:41 +00003647#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003648
3649void* routine(void* p){return NULL;}
3650
3651int main(){
3652 pthread_t p;
3653 if(pthread_create(&p,NULL,routine,NULL)!=0)
3654 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003655 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003656 return 0;
3657}
3658
Martin v. Löwis11437992002-04-12 09:54:03 +00003659_ACEOF
3660rm -f conftest$ac_exeext
3661if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3662 (eval $ac_link) 2>&5
3663 ac_status=$?
3664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3665 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3667 (eval $ac_try) 2>&5
3668 ac_status=$?
3669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3670 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003671 ac_cv_pthread_is_default=yes
3672else
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 echo "$as_me: program exited with status $ac_status" >&5
3674echo "$as_me: failed program was:" >&5
3675cat conftest.$ac_ext >&5
3676( exit $ac_status )
3677ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003678fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003679rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003680fi
3681
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003682fi
3683
Martin v. Löwis11437992002-04-12 09:54:03 +00003684echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3685echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003686
Michael W. Hudson54241132001-12-07 15:38:26 +00003687
Martin v. Löwis11437992002-04-12 09:54:03 +00003688if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003689then
3690 ac_cv_kpthread=no
3691else
3692# -Kpthread, if available, provides the right #defines
3693# and linker options to make pthread_create available
3694# Some compilers won't report that they do not support -Kpthread,
3695# so we need to run a program to see whether it really made the
3696# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003697echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3698echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3699if test "${ac_cv_kpthread+set}" = set; then
3700 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003701else
3702 ac_save_cc="$CC"
3703CC="$CC -Kpthread"
3704if test "$cross_compiling" = yes; then
3705 ac_cv_kpthread=no
3706else
Martin v. Löwis11437992002-04-12 09:54:03 +00003707 cat >conftest.$ac_ext <<_ACEOF
3708#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003709#include "confdefs.h"
3710
3711#include <pthread.h>
3712
3713void* routine(void* p){return NULL;}
3714
3715int main(){
3716 pthread_t p;
3717 if(pthread_create(&p,NULL,routine,NULL)!=0)
3718 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003719 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003720 return 0;
3721}
3722
Martin v. Löwis11437992002-04-12 09:54:03 +00003723_ACEOF
3724rm -f conftest$ac_exeext
3725if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3726 (eval $ac_link) 2>&5
3727 ac_status=$?
3728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3729 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3731 (eval $ac_try) 2>&5
3732 ac_status=$?
3733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3734 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003735 ac_cv_kpthread=yes
3736else
Martin v. Löwis11437992002-04-12 09:54:03 +00003737 echo "$as_me: program exited with status $ac_status" >&5
3738echo "$as_me: failed program was:" >&5
3739cat conftest.$ac_ext >&5
3740( exit $ac_status )
3741ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003742fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003743rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003744fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003745CC="$ac_save_cc"
3746fi
3747
Martin v. Löwis11437992002-04-12 09:54:03 +00003748echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3749echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003750fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003751
Michael W. Hudson54241132001-12-07 15:38:26 +00003752
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003753# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003754echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3755echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3756if test "${ac_cv_header_stdc+set}" = set; then
3757 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003758else
Martin v. Löwis11437992002-04-12 09:54:03 +00003759 cat >conftest.$ac_ext <<_ACEOF
3760#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003761#include "confdefs.h"
3762#include <stdlib.h>
3763#include <stdarg.h>
3764#include <string.h>
3765#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003766
3767_ACEOF
3768if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3769 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3770 ac_status=$?
3771 egrep -v '^ *\+' conftest.er1 >conftest.err
3772 rm -f conftest.er1
3773 cat conftest.err >&5
3774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3775 (exit $ac_status); } >/dev/null; then
3776 if test -s conftest.err; then
3777 ac_cpp_err=$ac_c_preproc_warn_flag
3778 else
3779 ac_cpp_err=
3780 fi
3781else
3782 ac_cpp_err=yes
3783fi
3784if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003785 ac_cv_header_stdc=yes
3786else
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003788 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003789 ac_cv_header_stdc=no
3790fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003791rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003792
3793if test $ac_cv_header_stdc = yes; then
3794 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003795 cat >conftest.$ac_ext <<_ACEOF
3796#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003797#include "confdefs.h"
3798#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003799
3800_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003801if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3802 egrep "memchr" >/dev/null 2>&1; then
3803 :
3804else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003805 ac_cv_header_stdc=no
3806fi
3807rm -f conftest*
3808
3809fi
3810
3811if test $ac_cv_header_stdc = yes; then
3812 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003813 cat >conftest.$ac_ext <<_ACEOF
3814#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003815#include "confdefs.h"
3816#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003817
3818_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003819if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3820 egrep "free" >/dev/null 2>&1; then
3821 :
3822else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003823 ac_cv_header_stdc=no
3824fi
3825rm -f conftest*
3826
3827fi
3828
3829if test $ac_cv_header_stdc = yes; then
3830 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003831 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003832 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003833else
Martin v. Löwis11437992002-04-12 09:54:03 +00003834 cat >conftest.$ac_ext <<_ACEOF
3835#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003836#include "confdefs.h"
3837#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003838#if ((' ' & 0x0FF) == 0x020)
3839# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3840# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3841#else
3842# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3843 || ('j' <= (c) && (c) <= 'r') \
3844 || ('s' <= (c) && (c) <= 'z'))
3845# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3846#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003847
Martin v. Löwis11437992002-04-12 09:54:03 +00003848#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3849int
3850main ()
3851{
3852 int i;
3853 for (i = 0; i < 256; i++)
3854 if (XOR (islower (i), ISLOWER (i))
3855 || toupper (i) != TOUPPER (i))
3856 exit(2);
3857 exit (0);
3858}
3859_ACEOF
3860rm -f conftest$ac_exeext
3861if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3862 (eval $ac_link) 2>&5
3863 ac_status=$?
3864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3865 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3867 (eval $ac_try) 2>&5
3868 ac_status=$?
3869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3870 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003871 :
3872else
Martin v. Löwis11437992002-04-12 09:54:03 +00003873 echo "$as_me: program exited with status $ac_status" >&5
3874echo "$as_me: failed program was:" >&5
3875cat conftest.$ac_ext >&5
3876( exit $ac_status )
3877ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003878fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003879rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003880fi
3881fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003882fi
3883echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3884echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003885if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003886
3887cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003888#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003889_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003890
3891fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003892
Martin v. Löwis11437992002-04-12 09:54:03 +00003893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
Martin v. Löwis11437992002-04-12 09:54:03 +00003930for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003931libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003932signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003933sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003934sys/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 +00003935sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003936sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003937do
Martin v. Löwis11437992002-04-12 09:54:03 +00003938as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3939if eval "test \"\${$as_ac_Header+set}\" = set"; then
3940 echo "$as_me:$LINENO: checking for $ac_header" >&5
3941echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3942if eval "test \"\${$as_ac_Header+set}\" = set"; then
3943 echo $ECHO_N "(cached) $ECHO_C" >&6
3944fi
3945echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3946echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003947else
Martin v. Löwis11437992002-04-12 09:54:03 +00003948 # Is the header compilable?
3949echo "$as_me:$LINENO: checking $ac_header usability" >&5
3950echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3951cat >conftest.$ac_ext <<_ACEOF
3952#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003953#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003954$ac_includes_default
3955#include <$ac_header>
3956_ACEOF
3957rm -f conftest.$ac_objext
3958if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3959 (eval $ac_compile) 2>&5
3960 ac_status=$?
3961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3962 (exit $ac_status); } &&
3963 { ac_try='test -s conftest.$ac_objext'
3964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3965 (eval $ac_try) 2>&5
3966 ac_status=$?
3967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3968 (exit $ac_status); }; }; then
3969 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003970else
Martin v. Löwis11437992002-04-12 09:54:03 +00003971 echo "$as_me: failed program was:" >&5
3972cat conftest.$ac_ext >&5
3973ac_header_compiler=no
3974fi
3975rm -f conftest.$ac_objext conftest.$ac_ext
3976echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3977echo "${ECHO_T}$ac_header_compiler" >&6
3978
3979# Is the header present?
3980echo "$as_me:$LINENO: checking $ac_header presence" >&5
3981echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3982cat >conftest.$ac_ext <<_ACEOF
3983#line $LINENO "configure"
3984#include "confdefs.h"
3985#include <$ac_header>
3986_ACEOF
3987if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3988 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3989 ac_status=$?
3990 egrep -v '^ *\+' conftest.er1 >conftest.err
3991 rm -f conftest.er1
3992 cat conftest.err >&5
3993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3994 (exit $ac_status); } >/dev/null; then
3995 if test -s conftest.err; then
3996 ac_cpp_err=$ac_c_preproc_warn_flag
3997 else
3998 ac_cpp_err=
3999 fi
4000else
4001 ac_cpp_err=yes
4002fi
4003if test -z "$ac_cpp_err"; then
4004 ac_header_preproc=yes
4005else
4006 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004007 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004008 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004009fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004010rm -f conftest.err conftest.$ac_ext
4011echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4012echo "${ECHO_T}$ac_header_preproc" >&6
4013
4014# So? What about this header?
4015case $ac_header_compiler:$ac_header_preproc in
4016 yes:no )
4017 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4018echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4019 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4020echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4021 no:yes )
4022 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4023echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4024 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4025echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4026 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4027echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4028esac
4029echo "$as_me:$LINENO: checking for $ac_header" >&5
4030echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4031if eval "test \"\${$as_ac_Header+set}\" = set"; then
4032 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004033else
Martin v. Löwis11437992002-04-12 09:54:03 +00004034 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004035fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004036echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4037echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4038
4039fi
4040if test `eval echo '${'$as_ac_Header'}'` = yes; then
4041 cat >>confdefs.h <<_ACEOF
4042#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4043_ACEOF
4044
4045fi
4046
Guido van Rossum627b2d71993-12-24 10:39:16 +00004047done
4048
Martin v. Löwis11437992002-04-12 09:54:03 +00004049
4050
4051
4052
4053
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004054ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004055for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4056 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4057echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4058echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4059if eval "test \"\${$as_ac_Header+set}\" = set"; then
4060 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004061else
Martin v. Löwis11437992002-04-12 09:54:03 +00004062 cat >conftest.$ac_ext <<_ACEOF
4063#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004064#include "confdefs.h"
4065#include <sys/types.h>
4066#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004067
4068#ifdef F77_DUMMY_MAIN
4069# ifdef __cplusplus
4070 extern "C"
4071# endif
4072 int F77_DUMMY_MAIN() { return 1; }
4073#endif
4074int
4075main ()
4076{
4077if ((DIR *) 0)
4078return 0;
4079 ;
4080 return 0;
4081}
4082_ACEOF
4083rm -f conftest.$ac_objext
4084if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4085 (eval $ac_compile) 2>&5
4086 ac_status=$?
4087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4088 (exit $ac_status); } &&
4089 { ac_try='test -s conftest.$ac_objext'
4090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4091 (eval $ac_try) 2>&5
4092 ac_status=$?
4093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4094 (exit $ac_status); }; }; then
4095 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004096else
Martin v. Löwis11437992002-04-12 09:54:03 +00004097 echo "$as_me: failed program was:" >&5
4098cat conftest.$ac_ext >&5
4099eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004100fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004101rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004102fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004103echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4104echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4105if test `eval echo '${'$as_ac_Header'}'` = yes; then
4106 cat >>confdefs.h <<_ACEOF
4107#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4108_ACEOF
4109
4110ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004111fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004112
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004113done
4114# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4115if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004116 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4117echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4118if test "${ac_cv_search_opendir+set}" = set; then
4119 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004120else
Martin v. Löwis11437992002-04-12 09:54:03 +00004121 ac_func_search_save_LIBS=$LIBS
4122ac_cv_search_opendir=no
4123cat >conftest.$ac_ext <<_ACEOF
4124#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004125#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004126
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004127/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004128#ifdef __cplusplus
4129extern "C"
4130#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004131/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004132 builtin and then its argument prototype would still apply. */
4133char opendir ();
4134#ifdef F77_DUMMY_MAIN
4135# ifdef __cplusplus
4136 extern "C"
4137# endif
4138 int F77_DUMMY_MAIN() { return 1; }
4139#endif
4140int
4141main ()
4142{
4143opendir ();
4144 ;
4145 return 0;
4146}
4147_ACEOF
4148rm -f conftest.$ac_objext conftest$ac_exeext
4149if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4150 (eval $ac_link) 2>&5
4151 ac_status=$?
4152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4153 (exit $ac_status); } &&
4154 { ac_try='test -s conftest$ac_exeext'
4155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4156 (eval $ac_try) 2>&5
4157 ac_status=$?
4158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4159 (exit $ac_status); }; }; then
4160 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004161else
Martin v. Löwis11437992002-04-12 09:54:03 +00004162 echo "$as_me: failed program was:" >&5
4163cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004164fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004165rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4166if test "$ac_cv_search_opendir" = no; then
4167 for ac_lib in dir; do
4168 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4169 cat >conftest.$ac_ext <<_ACEOF
4170#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004171#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004172
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004173/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004174#ifdef __cplusplus
4175extern "C"
4176#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004177/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004178 builtin and then its argument prototype would still apply. */
4179char opendir ();
4180#ifdef F77_DUMMY_MAIN
4181# ifdef __cplusplus
4182 extern "C"
4183# endif
4184 int F77_DUMMY_MAIN() { return 1; }
4185#endif
4186int
4187main ()
4188{
4189opendir ();
4190 ;
4191 return 0;
4192}
4193_ACEOF
4194rm -f conftest.$ac_objext conftest$ac_exeext
4195if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4196 (eval $ac_link) 2>&5
4197 ac_status=$?
4198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4199 (exit $ac_status); } &&
4200 { ac_try='test -s conftest$ac_exeext'
4201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4202 (eval $ac_try) 2>&5
4203 ac_status=$?
4204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4205 (exit $ac_status); }; }; then
4206 ac_cv_search_opendir="-l$ac_lib"
4207break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004208else
Martin v. Löwis11437992002-04-12 09:54:03 +00004209 echo "$as_me: failed program was:" >&5
4210cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004211fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004212rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4213 done
4214fi
4215LIBS=$ac_func_search_save_LIBS
4216fi
4217echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4218echo "${ECHO_T}$ac_cv_search_opendir" >&6
4219if test "$ac_cv_search_opendir" != no; then
4220 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004221
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004222fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004223
Michael W. Hudson54241132001-12-07 15:38:26 +00004224else
Martin v. Löwis11437992002-04-12 09:54:03 +00004225 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4226echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4227if test "${ac_cv_search_opendir+set}" = set; then
4228 echo $ECHO_N "(cached) $ECHO_C" >&6
4229else
4230 ac_func_search_save_LIBS=$LIBS
4231ac_cv_search_opendir=no
4232cat >conftest.$ac_ext <<_ACEOF
4233#line $LINENO "configure"
4234#include "confdefs.h"
4235
4236/* Override any gcc2 internal prototype to avoid an error. */
4237#ifdef __cplusplus
4238extern "C"
4239#endif
4240/* We use char because int might match the return type of a gcc2
4241 builtin and then its argument prototype would still apply. */
4242char opendir ();
4243#ifdef F77_DUMMY_MAIN
4244# ifdef __cplusplus
4245 extern "C"
4246# endif
4247 int F77_DUMMY_MAIN() { return 1; }
4248#endif
4249int
4250main ()
4251{
4252opendir ();
4253 ;
4254 return 0;
4255}
4256_ACEOF
4257rm -f conftest.$ac_objext conftest$ac_exeext
4258if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4259 (eval $ac_link) 2>&5
4260 ac_status=$?
4261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4262 (exit $ac_status); } &&
4263 { ac_try='test -s conftest$ac_exeext'
4264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4265 (eval $ac_try) 2>&5
4266 ac_status=$?
4267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4268 (exit $ac_status); }; }; then
4269 ac_cv_search_opendir="none required"
4270else
4271 echo "$as_me: failed program was:" >&5
4272cat conftest.$ac_ext >&5
4273fi
4274rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4275if test "$ac_cv_search_opendir" = no; then
4276 for ac_lib in x; do
4277 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4278 cat >conftest.$ac_ext <<_ACEOF
4279#line $LINENO "configure"
4280#include "confdefs.h"
4281
4282/* Override any gcc2 internal prototype to avoid an error. */
4283#ifdef __cplusplus
4284extern "C"
4285#endif
4286/* We use char because int might match the return type of a gcc2
4287 builtin and then its argument prototype would still apply. */
4288char opendir ();
4289#ifdef F77_DUMMY_MAIN
4290# ifdef __cplusplus
4291 extern "C"
4292# endif
4293 int F77_DUMMY_MAIN() { return 1; }
4294#endif
4295int
4296main ()
4297{
4298opendir ();
4299 ;
4300 return 0;
4301}
4302_ACEOF
4303rm -f conftest.$ac_objext conftest$ac_exeext
4304if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4305 (eval $ac_link) 2>&5
4306 ac_status=$?
4307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4308 (exit $ac_status); } &&
4309 { ac_try='test -s conftest$ac_exeext'
4310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4311 (eval $ac_try) 2>&5
4312 ac_status=$?
4313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4314 (exit $ac_status); }; }; then
4315 ac_cv_search_opendir="-l$ac_lib"
4316break
4317else
4318 echo "$as_me: failed program was:" >&5
4319cat conftest.$ac_ext >&5
4320fi
4321rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4322 done
4323fi
4324LIBS=$ac_func_search_save_LIBS
4325fi
4326echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4327echo "${ECHO_T}$ac_cv_search_opendir" >&6
4328if test "$ac_cv_search_opendir" != no; then
4329 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4330
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004331fi
4332
4333fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004334
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004335echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4336echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4337if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4338 echo $ECHO_N "(cached) $ECHO_C" >&6
4339else
4340 cat >conftest.$ac_ext <<_ACEOF
4341#line $LINENO "configure"
4342#include "confdefs.h"
4343#include <sys/types.h>
4344#ifdef F77_DUMMY_MAIN
4345# ifdef __cplusplus
4346 extern "C"
4347# endif
4348 int F77_DUMMY_MAIN() { return 1; }
4349#endif
4350int
4351main ()
4352{
4353return makedev(0, 0);
4354 ;
4355 return 0;
4356}
4357_ACEOF
4358rm -f conftest.$ac_objext conftest$ac_exeext
4359if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4360 (eval $ac_link) 2>&5
4361 ac_status=$?
4362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4363 (exit $ac_status); } &&
4364 { ac_try='test -s conftest$ac_exeext'
4365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4366 (eval $ac_try) 2>&5
4367 ac_status=$?
4368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4369 (exit $ac_status); }; }; then
4370 ac_cv_header_sys_types_h_makedev=yes
4371else
4372 echo "$as_me: failed program was:" >&5
4373cat conftest.$ac_ext >&5
4374ac_cv_header_sys_types_h_makedev=no
4375fi
4376rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4377
4378fi
4379echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4380echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4381
4382if test $ac_cv_header_sys_types_h_makedev = no; then
4383if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4384 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4385echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4386if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4387 echo $ECHO_N "(cached) $ECHO_C" >&6
4388fi
4389echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4390echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4391else
4392 # Is the header compilable?
4393echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4394echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4395cat >conftest.$ac_ext <<_ACEOF
4396#line $LINENO "configure"
4397#include "confdefs.h"
4398$ac_includes_default
4399#include <sys/mkdev.h>
4400_ACEOF
4401rm -f conftest.$ac_objext
4402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4403 (eval $ac_compile) 2>&5
4404 ac_status=$?
4405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4406 (exit $ac_status); } &&
4407 { ac_try='test -s conftest.$ac_objext'
4408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4409 (eval $ac_try) 2>&5
4410 ac_status=$?
4411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4412 (exit $ac_status); }; }; then
4413 ac_header_compiler=yes
4414else
4415 echo "$as_me: failed program was:" >&5
4416cat conftest.$ac_ext >&5
4417ac_header_compiler=no
4418fi
4419rm -f conftest.$ac_objext conftest.$ac_ext
4420echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4421echo "${ECHO_T}$ac_header_compiler" >&6
4422
4423# Is the header present?
4424echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4425echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4426cat >conftest.$ac_ext <<_ACEOF
4427#line $LINENO "configure"
4428#include "confdefs.h"
4429#include <sys/mkdev.h>
4430_ACEOF
4431if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4432 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4433 ac_status=$?
4434 egrep -v '^ *\+' conftest.er1 >conftest.err
4435 rm -f conftest.er1
4436 cat conftest.err >&5
4437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4438 (exit $ac_status); } >/dev/null; then
4439 if test -s conftest.err; then
4440 ac_cpp_err=$ac_c_preproc_warn_flag
4441 else
4442 ac_cpp_err=
4443 fi
4444else
4445 ac_cpp_err=yes
4446fi
4447if test -z "$ac_cpp_err"; then
4448 ac_header_preproc=yes
4449else
4450 echo "$as_me: failed program was:" >&5
4451 cat conftest.$ac_ext >&5
4452 ac_header_preproc=no
4453fi
4454rm -f conftest.err conftest.$ac_ext
4455echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4456echo "${ECHO_T}$ac_header_preproc" >&6
4457
4458# So? What about this header?
4459case $ac_header_compiler:$ac_header_preproc in
4460 yes:no )
4461 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4462echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4463 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4464echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4465 no:yes )
4466 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4467echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4468 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4469echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4470 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4471echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4472esac
4473echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4474echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4475if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4476 echo $ECHO_N "(cached) $ECHO_C" >&6
4477else
4478 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4479fi
4480echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4481echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4482
4483fi
4484if test $ac_cv_header_sys_mkdev_h = yes; then
4485
4486cat >>confdefs.h <<\_ACEOF
4487#define MAJOR_IN_MKDEV 1
4488_ACEOF
4489
4490fi
4491
4492
4493
4494 if test $ac_cv_header_sys_mkdev_h = no; then
4495 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4496 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4497echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4498if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4499 echo $ECHO_N "(cached) $ECHO_C" >&6
4500fi
4501echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4502echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4503else
4504 # Is the header compilable?
4505echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4506echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4507cat >conftest.$ac_ext <<_ACEOF
4508#line $LINENO "configure"
4509#include "confdefs.h"
4510$ac_includes_default
4511#include <sys/sysmacros.h>
4512_ACEOF
4513rm -f conftest.$ac_objext
4514if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4515 (eval $ac_compile) 2>&5
4516 ac_status=$?
4517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4518 (exit $ac_status); } &&
4519 { ac_try='test -s conftest.$ac_objext'
4520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4521 (eval $ac_try) 2>&5
4522 ac_status=$?
4523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4524 (exit $ac_status); }; }; then
4525 ac_header_compiler=yes
4526else
4527 echo "$as_me: failed program was:" >&5
4528cat conftest.$ac_ext >&5
4529ac_header_compiler=no
4530fi
4531rm -f conftest.$ac_objext conftest.$ac_ext
4532echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4533echo "${ECHO_T}$ac_header_compiler" >&6
4534
4535# Is the header present?
4536echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4537echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4538cat >conftest.$ac_ext <<_ACEOF
4539#line $LINENO "configure"
4540#include "confdefs.h"
4541#include <sys/sysmacros.h>
4542_ACEOF
4543if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4544 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4545 ac_status=$?
4546 egrep -v '^ *\+' conftest.er1 >conftest.err
4547 rm -f conftest.er1
4548 cat conftest.err >&5
4549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4550 (exit $ac_status); } >/dev/null; then
4551 if test -s conftest.err; then
4552 ac_cpp_err=$ac_c_preproc_warn_flag
4553 else
4554 ac_cpp_err=
4555 fi
4556else
4557 ac_cpp_err=yes
4558fi
4559if test -z "$ac_cpp_err"; then
4560 ac_header_preproc=yes
4561else
4562 echo "$as_me: failed program was:" >&5
4563 cat conftest.$ac_ext >&5
4564 ac_header_preproc=no
4565fi
4566rm -f conftest.err conftest.$ac_ext
4567echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4568echo "${ECHO_T}$ac_header_preproc" >&6
4569
4570# So? What about this header?
4571case $ac_header_compiler:$ac_header_preproc in
4572 yes:no )
4573 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4574echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4575 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4576echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4577 no:yes )
4578 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4579echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4580 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4581echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4582 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4583echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4584esac
4585echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4586echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4587if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4588 echo $ECHO_N "(cached) $ECHO_C" >&6
4589else
4590 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4591fi
4592echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4593echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4594
4595fi
4596if test $ac_cv_header_sys_sysmacros_h = yes; then
4597
4598cat >>confdefs.h <<\_ACEOF
4599#define MAJOR_IN_SYSMACROS 1
4600_ACEOF
4601
4602fi
4603
4604
4605 fi
4606fi
4607
Michael W. Hudson54241132001-12-07 15:38:26 +00004608
Guido van Rossum627b2d71993-12-24 10:39:16 +00004609# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004610was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004611echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4612echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4613cat >conftest.$ac_ext <<_ACEOF
4614#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004615#include "confdefs.h"
4616#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004617
4618_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004619if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4620 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004621 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004622else
Martin v. Löwis11437992002-04-12 09:54:03 +00004623
4624
4625cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004626#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004627_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004628
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004629
Guido van Rossum627b2d71993-12-24 10:39:16 +00004630fi
4631rm -f conftest*
4632
Martin v. Löwis11437992002-04-12 09:54:03 +00004633echo "$as_me:$LINENO: result: $was_it_defined" >&5
4634echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004635
Neal Norwitz11690112002-07-30 01:08:28 +00004636# Check whether using makedev requires defining _OSF_SOURCE
4637echo "$as_me:$LINENO: checking for makedev" >&5
4638echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4639cat >conftest.$ac_ext <<_ACEOF
4640#line $LINENO "configure"
4641#include "confdefs.h"
4642 #include <sys/types.h>
4643#ifdef F77_DUMMY_MAIN
4644# ifdef __cplusplus
4645 extern "C"
4646# endif
4647 int F77_DUMMY_MAIN() { return 1; }
4648#endif
4649int
4650main ()
4651{
4652 makedev(0, 0)
4653 ;
4654 return 0;
4655}
4656_ACEOF
4657rm -f conftest.$ac_objext conftest$ac_exeext
4658if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4659 (eval $ac_link) 2>&5
4660 ac_status=$?
4661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4662 (exit $ac_status); } &&
4663 { ac_try='test -s conftest$ac_exeext'
4664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4665 (eval $ac_try) 2>&5
4666 ac_status=$?
4667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4668 (exit $ac_status); }; }; then
4669 ac_cv_has_makedev=yes
4670else
4671 echo "$as_me: failed program was:" >&5
4672cat conftest.$ac_ext >&5
4673ac_cv_has_makedev=no
4674fi
4675rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4676if test "$ac_cv_has_makedev" = "no"; then
4677 # we didn't link, try if _OSF_SOURCE will allow us to link
4678 cat >conftest.$ac_ext <<_ACEOF
4679#line $LINENO "configure"
4680#include "confdefs.h"
4681
4682 #define _OSF_SOURCE 1
4683 #include <sys/types.h>
4684
4685#ifdef F77_DUMMY_MAIN
4686# ifdef __cplusplus
4687 extern "C"
4688# endif
4689 int F77_DUMMY_MAIN() { return 1; }
4690#endif
4691int
4692main ()
4693{
4694 makedev(0, 0)
4695 ;
4696 return 0;
4697}
4698_ACEOF
4699rm -f conftest.$ac_objext conftest$ac_exeext
4700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4701 (eval $ac_link) 2>&5
4702 ac_status=$?
4703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4704 (exit $ac_status); } &&
4705 { ac_try='test -s conftest$ac_exeext'
4706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4707 (eval $ac_try) 2>&5
4708 ac_status=$?
4709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4710 (exit $ac_status); }; }; then
4711 ac_cv_has_makedev=yes
4712else
4713 echo "$as_me: failed program was:" >&5
4714cat conftest.$ac_ext >&5
4715ac_cv_has_makedev=no
4716fi
4717rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4718 if test "$ac_cv_has_makedev" = "yes"; then
4719
4720cat >>confdefs.h <<\_ACEOF
4721#define _OSF_SOURCE 1
4722_ACEOF
4723
4724 fi
4725fi
4726echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4727echo "${ECHO_T}$ac_cv_has_makedev" >&6
4728if test "$ac_cv_has_makedev" = "yes"; then
4729
4730cat >>confdefs.h <<\_ACEOF
4731#define HAVE_MAKEDEV 1
4732_ACEOF
4733
4734fi
4735
Martin v. Löwis399a6892002-10-04 10:22:02 +00004736# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4737# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4738# defined, but the compiler does not support pragma redefine_extname,
4739# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4740# structures (such as rlimit64) without declaring them. As a
4741# work-around, disable LFS on such configurations
4742
4743use_lfs=yes
4744echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4745echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4746cat >conftest.$ac_ext <<_ACEOF
4747#line $LINENO "configure"
4748#include "confdefs.h"
4749
4750#define _LARGEFILE_SOURCE 1
4751#define _FILE_OFFSET_BITS 64
4752#include <sys/resource.h>
4753
4754#ifdef F77_DUMMY_MAIN
4755# ifdef __cplusplus
4756 extern "C"
4757# endif
4758 int F77_DUMMY_MAIN() { return 1; }
4759#endif
4760int
4761main ()
4762{
4763struct rlimit foo;
4764 ;
4765 return 0;
4766}
4767_ACEOF
4768rm -f conftest.$ac_objext
4769if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4770 (eval $ac_compile) 2>&5
4771 ac_status=$?
4772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4773 (exit $ac_status); } &&
4774 { ac_try='test -s conftest.$ac_objext'
4775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4776 (eval $ac_try) 2>&5
4777 ac_status=$?
4778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4779 (exit $ac_status); }; }; then
4780 sol_lfs_bug=no
4781else
4782 echo "$as_me: failed program was:" >&5
4783cat conftest.$ac_ext >&5
4784sol_lfs_bug=yes
4785fi
4786rm -f conftest.$ac_objext conftest.$ac_ext
4787echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4788echo "${ECHO_T}$sol_lfs_bug" >&6
4789if test "$sol_lfs_bug" = "yes"; then
4790 use_lfs=no
4791fi
4792
4793if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004794# Two defines needed to enable largefile support on various platforms
4795# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004796
Martin v. Löwis11437992002-04-12 09:54:03 +00004797cat >>confdefs.h <<\_ACEOF
4798#define _LARGEFILE_SOURCE 1
4799_ACEOF
4800
4801
4802cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004803#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004804_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004805
Martin v. Löwis399a6892002-10-04 10:22:02 +00004806fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004807
Guido van Rossum84e7b241996-08-19 21:59:00 +00004808# Add some code to confdefs.h so that the test for off_t works on SCO
4809cat >> confdefs.h <<\EOF
4810#if defined(SCO_DS)
4811#undef _OFF_T
4812#endif
4813EOF
4814
Guido van Rossumef2255b2000-03-10 22:30:29 +00004815# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004816echo "$as_me:$LINENO: checking for mode_t" >&5
4817echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4818if test "${ac_cv_type_mode_t+set}" = set; then
4819 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004820else
Martin v. Löwis11437992002-04-12 09:54:03 +00004821 cat >conftest.$ac_ext <<_ACEOF
4822#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004823#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004824$ac_includes_default
4825#ifdef F77_DUMMY_MAIN
4826# ifdef __cplusplus
4827 extern "C"
4828# endif
4829 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004830#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004831int
4832main ()
4833{
4834if ((mode_t *) 0)
4835 return 0;
4836if (sizeof (mode_t))
4837 return 0;
4838 ;
4839 return 0;
4840}
4841_ACEOF
4842rm -f conftest.$ac_objext
4843if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4844 (eval $ac_compile) 2>&5
4845 ac_status=$?
4846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4847 (exit $ac_status); } &&
4848 { ac_try='test -s conftest.$ac_objext'
4849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4850 (eval $ac_try) 2>&5
4851 ac_status=$?
4852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4853 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004854 ac_cv_type_mode_t=yes
4855else
Martin v. Löwis11437992002-04-12 09:54:03 +00004856 echo "$as_me: failed program was:" >&5
4857cat conftest.$ac_ext >&5
4858ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004859fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004860rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004861fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004862echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4863echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4864if test $ac_cv_type_mode_t = yes; then
4865 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004866else
Martin v. Löwis11437992002-04-12 09:54:03 +00004867
4868cat >>confdefs.h <<_ACEOF
4869#define mode_t int
4870_ACEOF
4871
4872fi
4873
4874echo "$as_me:$LINENO: checking for off_t" >&5
4875echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4876if test "${ac_cv_type_off_t+set}" = set; then
4877 echo $ECHO_N "(cached) $ECHO_C" >&6
4878else
4879 cat >conftest.$ac_ext <<_ACEOF
4880#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004881#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004882$ac_includes_default
4883#ifdef F77_DUMMY_MAIN
4884# ifdef __cplusplus
4885 extern "C"
4886# endif
4887 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004888#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004889int
4890main ()
4891{
4892if ((off_t *) 0)
4893 return 0;
4894if (sizeof (off_t))
4895 return 0;
4896 ;
4897 return 0;
4898}
4899_ACEOF
4900rm -f conftest.$ac_objext
4901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4902 (eval $ac_compile) 2>&5
4903 ac_status=$?
4904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4905 (exit $ac_status); } &&
4906 { ac_try='test -s conftest.$ac_objext'
4907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4908 (eval $ac_try) 2>&5
4909 ac_status=$?
4910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4911 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004912 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004913else
Martin v. Löwis11437992002-04-12 09:54:03 +00004914 echo "$as_me: failed program was:" >&5
4915cat conftest.$ac_ext >&5
4916ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004917fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004918rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004919fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004920echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4921echo "${ECHO_T}$ac_cv_type_off_t" >&6
4922if test $ac_cv_type_off_t = yes; then
4923 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004924else
Martin v. Löwis11437992002-04-12 09:54:03 +00004925
4926cat >>confdefs.h <<_ACEOF
4927#define off_t long
4928_ACEOF
4929
4930fi
4931
4932echo "$as_me:$LINENO: checking for pid_t" >&5
4933echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4934if test "${ac_cv_type_pid_t+set}" = set; then
4935 echo $ECHO_N "(cached) $ECHO_C" >&6
4936else
4937 cat >conftest.$ac_ext <<_ACEOF
4938#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004939#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004940$ac_includes_default
4941#ifdef F77_DUMMY_MAIN
4942# ifdef __cplusplus
4943 extern "C"
4944# endif
4945 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004946#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004947int
4948main ()
4949{
4950if ((pid_t *) 0)
4951 return 0;
4952if (sizeof (pid_t))
4953 return 0;
4954 ;
4955 return 0;
4956}
4957_ACEOF
4958rm -f conftest.$ac_objext
4959if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4960 (eval $ac_compile) 2>&5
4961 ac_status=$?
4962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4963 (exit $ac_status); } &&
4964 { ac_try='test -s conftest.$ac_objext'
4965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4966 (eval $ac_try) 2>&5
4967 ac_status=$?
4968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4969 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004970 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004971else
Martin v. Löwis11437992002-04-12 09:54:03 +00004972 echo "$as_me: failed program was:" >&5
4973cat conftest.$ac_ext >&5
4974ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004975fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004976rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004977fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004978echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4979echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4980if test $ac_cv_type_pid_t = yes; then
4981 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004982else
Martin v. Löwis11437992002-04-12 09:54:03 +00004983
4984cat >>confdefs.h <<_ACEOF
4985#define pid_t int
4986_ACEOF
4987
4988fi
4989
4990echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4991echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4992if test "${ac_cv_type_signal+set}" = set; then
4993 echo $ECHO_N "(cached) $ECHO_C" >&6
4994else
4995 cat >conftest.$ac_ext <<_ACEOF
4996#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004997#include "confdefs.h"
4998#include <sys/types.h>
4999#include <signal.h>
5000#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005001# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005002#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005003#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005004extern "C" void (*signal (int, void (*)(int)))(int);
5005#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005006void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005007#endif
5008
Martin v. Löwis11437992002-04-12 09:54:03 +00005009#ifdef F77_DUMMY_MAIN
5010# ifdef __cplusplus
5011 extern "C"
5012# endif
5013 int F77_DUMMY_MAIN() { return 1; }
5014#endif
5015int
5016main ()
5017{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005018int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005019 ;
5020 return 0;
5021}
5022_ACEOF
5023rm -f conftest.$ac_objext
5024if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5025 (eval $ac_compile) 2>&5
5026 ac_status=$?
5027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5028 (exit $ac_status); } &&
5029 { ac_try='test -s conftest.$ac_objext'
5030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5031 (eval $ac_try) 2>&5
5032 ac_status=$?
5033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5034 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005035 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005036else
Martin v. Löwis11437992002-04-12 09:54:03 +00005037 echo "$as_me: failed program was:" >&5
5038cat conftest.$ac_ext >&5
5039ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005040fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005041rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005042fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005043echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5044echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005045
Martin v. Löwis11437992002-04-12 09:54:03 +00005046cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005047#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005048_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005049
Michael W. Hudson54241132001-12-07 15:38:26 +00005050
Martin v. Löwis11437992002-04-12 09:54:03 +00005051echo "$as_me:$LINENO: checking for size_t" >&5
5052echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5053if test "${ac_cv_type_size_t+set}" = set; then
5054 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005055else
Martin v. Löwis11437992002-04-12 09:54:03 +00005056 cat >conftest.$ac_ext <<_ACEOF
5057#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005058#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005059$ac_includes_default
5060#ifdef F77_DUMMY_MAIN
5061# ifdef __cplusplus
5062 extern "C"
5063# endif
5064 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005066int
5067main ()
5068{
5069if ((size_t *) 0)
5070 return 0;
5071if (sizeof (size_t))
5072 return 0;
5073 ;
5074 return 0;
5075}
5076_ACEOF
5077rm -f conftest.$ac_objext
5078if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5079 (eval $ac_compile) 2>&5
5080 ac_status=$?
5081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5082 (exit $ac_status); } &&
5083 { ac_try='test -s conftest.$ac_objext'
5084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5085 (eval $ac_try) 2>&5
5086 ac_status=$?
5087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5088 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005089 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005090else
Martin v. Löwis11437992002-04-12 09:54:03 +00005091 echo "$as_me: failed program was:" >&5
5092cat conftest.$ac_ext >&5
5093ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005094fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005095rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005096fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005097echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5098echo "${ECHO_T}$ac_cv_type_size_t" >&6
5099if test $ac_cv_type_size_t = yes; then
5100 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005101else
Martin v. Löwis11437992002-04-12 09:54:03 +00005102
5103cat >>confdefs.h <<_ACEOF
5104#define size_t unsigned
5105_ACEOF
5106
5107fi
5108
5109echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5110echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5111if test "${ac_cv_type_uid_t+set}" = set; then
5112 echo $ECHO_N "(cached) $ECHO_C" >&6
5113else
5114 cat >conftest.$ac_ext <<_ACEOF
5115#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005116#include "confdefs.h"
5117#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005118
5119_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005120if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5121 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005122 ac_cv_type_uid_t=yes
5123else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005124 ac_cv_type_uid_t=no
5125fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005126rm -f conftest*
5127
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005128fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005129echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5130echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005131if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005132
Martin v. Löwis11437992002-04-12 09:54:03 +00005133cat >>confdefs.h <<\_ACEOF
5134#define uid_t int
5135_ACEOF
5136
5137
5138cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005139#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005140_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005141
5142fi
5143
Jack Jansendd19cf82001-12-06 22:36:17 +00005144
Michael W. Hudson54241132001-12-07 15:38:26 +00005145# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005146echo "$as_me:$LINENO: checking for int" >&5
5147echo $ECHO_N "checking for int... $ECHO_C" >&6
5148if test "${ac_cv_type_int+set}" = set; then
5149 echo $ECHO_N "(cached) $ECHO_C" >&6
5150else
5151 cat >conftest.$ac_ext <<_ACEOF
5152#line $LINENO "configure"
5153#include "confdefs.h"
5154$ac_includes_default
5155#ifdef F77_DUMMY_MAIN
5156# ifdef __cplusplus
5157 extern "C"
5158# endif
5159 int F77_DUMMY_MAIN() { return 1; }
5160#endif
5161int
5162main ()
5163{
5164if ((int *) 0)
5165 return 0;
5166if (sizeof (int))
5167 return 0;
5168 ;
5169 return 0;
5170}
5171_ACEOF
5172rm -f conftest.$ac_objext
5173if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5174 (eval $ac_compile) 2>&5
5175 ac_status=$?
5176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5177 (exit $ac_status); } &&
5178 { ac_try='test -s conftest.$ac_objext'
5179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5180 (eval $ac_try) 2>&5
5181 ac_status=$?
5182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5183 (exit $ac_status); }; }; then
5184 ac_cv_type_int=yes
5185else
5186 echo "$as_me: failed program was:" >&5
5187cat conftest.$ac_ext >&5
5188ac_cv_type_int=no
5189fi
5190rm -f conftest.$ac_objext conftest.$ac_ext
5191fi
5192echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5193echo "${ECHO_T}$ac_cv_type_int" >&6
5194
5195echo "$as_me:$LINENO: checking size of int" >&5
5196echo $ECHO_N "checking size of int... $ECHO_C" >&6
5197if test "${ac_cv_sizeof_int+set}" = set; then
5198 echo $ECHO_N "(cached) $ECHO_C" >&6
5199else
5200 if test "$ac_cv_type_int" = yes; then
5201 # The cast to unsigned long works around a bug in the HP C Compiler
5202 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5203 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5204 # This bug is HP SR number 8606223364.
5205 if test "$cross_compiling" = yes; then
5206 # Depending upon the size, compute the lo and hi bounds.
5207cat >conftest.$ac_ext <<_ACEOF
5208#line $LINENO "configure"
5209#include "confdefs.h"
5210$ac_includes_default
5211#ifdef F77_DUMMY_MAIN
5212# ifdef __cplusplus
5213 extern "C"
5214# endif
5215 int F77_DUMMY_MAIN() { return 1; }
5216#endif
5217int
5218main ()
5219{
5220static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5221test_array [0] = 0
5222
5223 ;
5224 return 0;
5225}
5226_ACEOF
5227rm -f conftest.$ac_objext
5228if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5229 (eval $ac_compile) 2>&5
5230 ac_status=$?
5231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5232 (exit $ac_status); } &&
5233 { ac_try='test -s conftest.$ac_objext'
5234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5235 (eval $ac_try) 2>&5
5236 ac_status=$?
5237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5238 (exit $ac_status); }; }; then
5239 ac_lo=0 ac_mid=0
5240 while :; do
5241 cat >conftest.$ac_ext <<_ACEOF
5242#line $LINENO "configure"
5243#include "confdefs.h"
5244$ac_includes_default
5245#ifdef F77_DUMMY_MAIN
5246# ifdef __cplusplus
5247 extern "C"
5248# endif
5249 int F77_DUMMY_MAIN() { return 1; }
5250#endif
5251int
5252main ()
5253{
5254static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5255test_array [0] = 0
5256
5257 ;
5258 return 0;
5259}
5260_ACEOF
5261rm -f conftest.$ac_objext
5262if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5263 (eval $ac_compile) 2>&5
5264 ac_status=$?
5265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5266 (exit $ac_status); } &&
5267 { ac_try='test -s conftest.$ac_objext'
5268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5269 (eval $ac_try) 2>&5
5270 ac_status=$?
5271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5272 (exit $ac_status); }; }; then
5273 ac_hi=$ac_mid; break
5274else
5275 echo "$as_me: failed program was:" >&5
5276cat conftest.$ac_ext >&5
5277ac_lo=`expr $ac_mid + 1`
5278 if test $ac_lo -le $ac_mid; then
5279 ac_lo= ac_hi=
5280 break
5281 fi
5282 ac_mid=`expr 2 '*' $ac_mid + 1`
5283fi
5284rm -f conftest.$ac_objext conftest.$ac_ext
5285 done
5286else
5287 echo "$as_me: failed program was:" >&5
5288cat conftest.$ac_ext >&5
5289cat >conftest.$ac_ext <<_ACEOF
5290#line $LINENO "configure"
5291#include "confdefs.h"
5292$ac_includes_default
5293#ifdef F77_DUMMY_MAIN
5294# ifdef __cplusplus
5295 extern "C"
5296# endif
5297 int F77_DUMMY_MAIN() { return 1; }
5298#endif
5299int
5300main ()
5301{
5302static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5303test_array [0] = 0
5304
5305 ;
5306 return 0;
5307}
5308_ACEOF
5309rm -f conftest.$ac_objext
5310if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5311 (eval $ac_compile) 2>&5
5312 ac_status=$?
5313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5314 (exit $ac_status); } &&
5315 { ac_try='test -s conftest.$ac_objext'
5316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5317 (eval $ac_try) 2>&5
5318 ac_status=$?
5319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5320 (exit $ac_status); }; }; then
5321 ac_hi=-1 ac_mid=-1
5322 while :; do
5323 cat >conftest.$ac_ext <<_ACEOF
5324#line $LINENO "configure"
5325#include "confdefs.h"
5326$ac_includes_default
5327#ifdef F77_DUMMY_MAIN
5328# ifdef __cplusplus
5329 extern "C"
5330# endif
5331 int F77_DUMMY_MAIN() { return 1; }
5332#endif
5333int
5334main ()
5335{
5336static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5337test_array [0] = 0
5338
5339 ;
5340 return 0;
5341}
5342_ACEOF
5343rm -f conftest.$ac_objext
5344if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5345 (eval $ac_compile) 2>&5
5346 ac_status=$?
5347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5348 (exit $ac_status); } &&
5349 { ac_try='test -s conftest.$ac_objext'
5350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5351 (eval $ac_try) 2>&5
5352 ac_status=$?
5353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5354 (exit $ac_status); }; }; then
5355 ac_lo=$ac_mid; break
5356else
5357 echo "$as_me: failed program was:" >&5
5358cat conftest.$ac_ext >&5
5359ac_hi=`expr '(' $ac_mid ')' - 1`
5360 if test $ac_mid -le $ac_hi; then
5361 ac_lo= ac_hi=
5362 break
5363 fi
5364 ac_mid=`expr 2 '*' $ac_mid`
5365fi
5366rm -f conftest.$ac_objext conftest.$ac_ext
5367 done
5368else
5369 echo "$as_me: failed program was:" >&5
5370cat conftest.$ac_ext >&5
5371ac_lo= ac_hi=
5372fi
5373rm -f conftest.$ac_objext conftest.$ac_ext
5374fi
5375rm -f conftest.$ac_objext conftest.$ac_ext
5376# Binary search between lo and hi bounds.
5377while test "x$ac_lo" != "x$ac_hi"; do
5378 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5379 cat >conftest.$ac_ext <<_ACEOF
5380#line $LINENO "configure"
5381#include "confdefs.h"
5382$ac_includes_default
5383#ifdef F77_DUMMY_MAIN
5384# ifdef __cplusplus
5385 extern "C"
5386# endif
5387 int F77_DUMMY_MAIN() { return 1; }
5388#endif
5389int
5390main ()
5391{
5392static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5393test_array [0] = 0
5394
5395 ;
5396 return 0;
5397}
5398_ACEOF
5399rm -f conftest.$ac_objext
5400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5401 (eval $ac_compile) 2>&5
5402 ac_status=$?
5403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5404 (exit $ac_status); } &&
5405 { ac_try='test -s conftest.$ac_objext'
5406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5407 (eval $ac_try) 2>&5
5408 ac_status=$?
5409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5410 (exit $ac_status); }; }; then
5411 ac_hi=$ac_mid
5412else
5413 echo "$as_me: failed program was:" >&5
5414cat conftest.$ac_ext >&5
5415ac_lo=`expr '(' $ac_mid ')' + 1`
5416fi
5417rm -f conftest.$ac_objext conftest.$ac_ext
5418done
5419case $ac_lo in
5420?*) ac_cv_sizeof_int=$ac_lo;;
5421'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5422echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5423 { (exit 1); exit 1; }; } ;;
5424esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005425else
5426 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005427 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5428echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5429 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005430else
Martin v. Löwis11437992002-04-12 09:54:03 +00005431 cat >conftest.$ac_ext <<_ACEOF
5432#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005433#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005434$ac_includes_default
5435long longval () { return (long) (sizeof (int)); }
5436unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005437#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005438#include <stdlib.h>
5439#ifdef F77_DUMMY_MAIN
5440# ifdef __cplusplus
5441 extern "C"
5442# endif
5443 int F77_DUMMY_MAIN() { return 1; }
5444#endif
5445int
5446main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005447{
Martin v. Löwis11437992002-04-12 09:54:03 +00005448
5449 FILE *f = fopen ("conftest.val", "w");
5450 if (! f)
5451 exit (1);
5452 if (((long) (sizeof (int))) < 0)
5453 {
5454 long i = longval ();
5455 if (i != ((long) (sizeof (int))))
5456 exit (1);
5457 fprintf (f, "%ld\n", i);
5458 }
5459 else
5460 {
5461 unsigned long i = ulongval ();
5462 if (i != ((long) (sizeof (int))))
5463 exit (1);
5464 fprintf (f, "%lu\n", i);
5465 }
5466 exit (ferror (f) || fclose (f) != 0);
5467
5468 ;
5469 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005470}
Martin v. Löwis11437992002-04-12 09:54:03 +00005471_ACEOF
5472rm -f conftest$ac_exeext
5473if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5474 (eval $ac_link) 2>&5
5475 ac_status=$?
5476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5477 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5479 (eval $ac_try) 2>&5
5480 ac_status=$?
5481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5482 (exit $ac_status); }; }; then
5483 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005484else
Martin v. Löwis11437992002-04-12 09:54:03 +00005485 echo "$as_me: program exited with status $ac_status" >&5
5486echo "$as_me: failed program was:" >&5
5487cat conftest.$ac_ext >&5
5488( exit $ac_status )
5489{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5490echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5491 { (exit 1); exit 1; }; }
5492fi
5493rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5494fi
5495fi
5496rm -f conftest.val
5497else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005498 ac_cv_sizeof_int=0
5499fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005500fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005501echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5502echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5503cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005504#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005505_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005506
5507
Martin v. Löwis11437992002-04-12 09:54:03 +00005508echo "$as_me:$LINENO: checking for long" >&5
5509echo $ECHO_N "checking for long... $ECHO_C" >&6
5510if test "${ac_cv_type_long+set}" = set; then
5511 echo $ECHO_N "(cached) $ECHO_C" >&6
5512else
5513 cat >conftest.$ac_ext <<_ACEOF
5514#line $LINENO "configure"
5515#include "confdefs.h"
5516$ac_includes_default
5517#ifdef F77_DUMMY_MAIN
5518# ifdef __cplusplus
5519 extern "C"
5520# endif
5521 int F77_DUMMY_MAIN() { return 1; }
5522#endif
5523int
5524main ()
5525{
5526if ((long *) 0)
5527 return 0;
5528if (sizeof (long))
5529 return 0;
5530 ;
5531 return 0;
5532}
5533_ACEOF
5534rm -f conftest.$ac_objext
5535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5536 (eval $ac_compile) 2>&5
5537 ac_status=$?
5538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5539 (exit $ac_status); } &&
5540 { ac_try='test -s conftest.$ac_objext'
5541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5542 (eval $ac_try) 2>&5
5543 ac_status=$?
5544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5545 (exit $ac_status); }; }; then
5546 ac_cv_type_long=yes
5547else
5548 echo "$as_me: failed program was:" >&5
5549cat conftest.$ac_ext >&5
5550ac_cv_type_long=no
5551fi
5552rm -f conftest.$ac_objext conftest.$ac_ext
5553fi
5554echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5555echo "${ECHO_T}$ac_cv_type_long" >&6
5556
5557echo "$as_me:$LINENO: checking size of long" >&5
5558echo $ECHO_N "checking size of long... $ECHO_C" >&6
5559if test "${ac_cv_sizeof_long+set}" = set; then
5560 echo $ECHO_N "(cached) $ECHO_C" >&6
5561else
5562 if test "$ac_cv_type_long" = yes; then
5563 # The cast to unsigned long works around a bug in the HP C Compiler
5564 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5565 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5566 # This bug is HP SR number 8606223364.
5567 if test "$cross_compiling" = yes; then
5568 # Depending upon the size, compute the lo and hi bounds.
5569cat >conftest.$ac_ext <<_ACEOF
5570#line $LINENO "configure"
5571#include "confdefs.h"
5572$ac_includes_default
5573#ifdef F77_DUMMY_MAIN
5574# ifdef __cplusplus
5575 extern "C"
5576# endif
5577 int F77_DUMMY_MAIN() { return 1; }
5578#endif
5579int
5580main ()
5581{
5582static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5583test_array [0] = 0
5584
5585 ;
5586 return 0;
5587}
5588_ACEOF
5589rm -f conftest.$ac_objext
5590if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5591 (eval $ac_compile) 2>&5
5592 ac_status=$?
5593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5594 (exit $ac_status); } &&
5595 { ac_try='test -s conftest.$ac_objext'
5596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5597 (eval $ac_try) 2>&5
5598 ac_status=$?
5599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5600 (exit $ac_status); }; }; then
5601 ac_lo=0 ac_mid=0
5602 while :; do
5603 cat >conftest.$ac_ext <<_ACEOF
5604#line $LINENO "configure"
5605#include "confdefs.h"
5606$ac_includes_default
5607#ifdef F77_DUMMY_MAIN
5608# ifdef __cplusplus
5609 extern "C"
5610# endif
5611 int F77_DUMMY_MAIN() { return 1; }
5612#endif
5613int
5614main ()
5615{
5616static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5617test_array [0] = 0
5618
5619 ;
5620 return 0;
5621}
5622_ACEOF
5623rm -f conftest.$ac_objext
5624if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5625 (eval $ac_compile) 2>&5
5626 ac_status=$?
5627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5628 (exit $ac_status); } &&
5629 { ac_try='test -s conftest.$ac_objext'
5630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5631 (eval $ac_try) 2>&5
5632 ac_status=$?
5633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5634 (exit $ac_status); }; }; then
5635 ac_hi=$ac_mid; break
5636else
5637 echo "$as_me: failed program was:" >&5
5638cat conftest.$ac_ext >&5
5639ac_lo=`expr $ac_mid + 1`
5640 if test $ac_lo -le $ac_mid; then
5641 ac_lo= ac_hi=
5642 break
5643 fi
5644 ac_mid=`expr 2 '*' $ac_mid + 1`
5645fi
5646rm -f conftest.$ac_objext conftest.$ac_ext
5647 done
5648else
5649 echo "$as_me: failed program was:" >&5
5650cat conftest.$ac_ext >&5
5651cat >conftest.$ac_ext <<_ACEOF
5652#line $LINENO "configure"
5653#include "confdefs.h"
5654$ac_includes_default
5655#ifdef F77_DUMMY_MAIN
5656# ifdef __cplusplus
5657 extern "C"
5658# endif
5659 int F77_DUMMY_MAIN() { return 1; }
5660#endif
5661int
5662main ()
5663{
5664static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5665test_array [0] = 0
5666
5667 ;
5668 return 0;
5669}
5670_ACEOF
5671rm -f conftest.$ac_objext
5672if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5673 (eval $ac_compile) 2>&5
5674 ac_status=$?
5675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5676 (exit $ac_status); } &&
5677 { ac_try='test -s conftest.$ac_objext'
5678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5679 (eval $ac_try) 2>&5
5680 ac_status=$?
5681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5682 (exit $ac_status); }; }; then
5683 ac_hi=-1 ac_mid=-1
5684 while :; do
5685 cat >conftest.$ac_ext <<_ACEOF
5686#line $LINENO "configure"
5687#include "confdefs.h"
5688$ac_includes_default
5689#ifdef F77_DUMMY_MAIN
5690# ifdef __cplusplus
5691 extern "C"
5692# endif
5693 int F77_DUMMY_MAIN() { return 1; }
5694#endif
5695int
5696main ()
5697{
5698static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5699test_array [0] = 0
5700
5701 ;
5702 return 0;
5703}
5704_ACEOF
5705rm -f conftest.$ac_objext
5706if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5707 (eval $ac_compile) 2>&5
5708 ac_status=$?
5709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5710 (exit $ac_status); } &&
5711 { ac_try='test -s conftest.$ac_objext'
5712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5713 (eval $ac_try) 2>&5
5714 ac_status=$?
5715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5716 (exit $ac_status); }; }; then
5717 ac_lo=$ac_mid; break
5718else
5719 echo "$as_me: failed program was:" >&5
5720cat conftest.$ac_ext >&5
5721ac_hi=`expr '(' $ac_mid ')' - 1`
5722 if test $ac_mid -le $ac_hi; then
5723 ac_lo= ac_hi=
5724 break
5725 fi
5726 ac_mid=`expr 2 '*' $ac_mid`
5727fi
5728rm -f conftest.$ac_objext conftest.$ac_ext
5729 done
5730else
5731 echo "$as_me: failed program was:" >&5
5732cat conftest.$ac_ext >&5
5733ac_lo= ac_hi=
5734fi
5735rm -f conftest.$ac_objext conftest.$ac_ext
5736fi
5737rm -f conftest.$ac_objext conftest.$ac_ext
5738# Binary search between lo and hi bounds.
5739while test "x$ac_lo" != "x$ac_hi"; do
5740 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5741 cat >conftest.$ac_ext <<_ACEOF
5742#line $LINENO "configure"
5743#include "confdefs.h"
5744$ac_includes_default
5745#ifdef F77_DUMMY_MAIN
5746# ifdef __cplusplus
5747 extern "C"
5748# endif
5749 int F77_DUMMY_MAIN() { return 1; }
5750#endif
5751int
5752main ()
5753{
5754static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5755test_array [0] = 0
5756
5757 ;
5758 return 0;
5759}
5760_ACEOF
5761rm -f conftest.$ac_objext
5762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5763 (eval $ac_compile) 2>&5
5764 ac_status=$?
5765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5766 (exit $ac_status); } &&
5767 { ac_try='test -s conftest.$ac_objext'
5768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5769 (eval $ac_try) 2>&5
5770 ac_status=$?
5771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5772 (exit $ac_status); }; }; then
5773 ac_hi=$ac_mid
5774else
5775 echo "$as_me: failed program was:" >&5
5776cat conftest.$ac_ext >&5
5777ac_lo=`expr '(' $ac_mid ')' + 1`
5778fi
5779rm -f conftest.$ac_objext conftest.$ac_ext
5780done
5781case $ac_lo in
5782?*) ac_cv_sizeof_long=$ac_lo;;
5783'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5784echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5785 { (exit 1); exit 1; }; } ;;
5786esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005787else
5788 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005789 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5790echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5791 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005792else
Martin v. Löwis11437992002-04-12 09:54:03 +00005793 cat >conftest.$ac_ext <<_ACEOF
5794#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005795#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005796$ac_includes_default
5797long longval () { return (long) (sizeof (long)); }
5798unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005799#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005800#include <stdlib.h>
5801#ifdef F77_DUMMY_MAIN
5802# ifdef __cplusplus
5803 extern "C"
5804# endif
5805 int F77_DUMMY_MAIN() { return 1; }
5806#endif
5807int
5808main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005809{
Martin v. Löwis11437992002-04-12 09:54:03 +00005810
5811 FILE *f = fopen ("conftest.val", "w");
5812 if (! f)
5813 exit (1);
5814 if (((long) (sizeof (long))) < 0)
5815 {
5816 long i = longval ();
5817 if (i != ((long) (sizeof (long))))
5818 exit (1);
5819 fprintf (f, "%ld\n", i);
5820 }
5821 else
5822 {
5823 unsigned long i = ulongval ();
5824 if (i != ((long) (sizeof (long))))
5825 exit (1);
5826 fprintf (f, "%lu\n", i);
5827 }
5828 exit (ferror (f) || fclose (f) != 0);
5829
5830 ;
5831 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005832}
Martin v. Löwis11437992002-04-12 09:54:03 +00005833_ACEOF
5834rm -f conftest$ac_exeext
5835if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5836 (eval $ac_link) 2>&5
5837 ac_status=$?
5838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5839 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5841 (eval $ac_try) 2>&5
5842 ac_status=$?
5843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5844 (exit $ac_status); }; }; then
5845 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005846else
Martin v. Löwis11437992002-04-12 09:54:03 +00005847 echo "$as_me: program exited with status $ac_status" >&5
5848echo "$as_me: failed program was:" >&5
5849cat conftest.$ac_ext >&5
5850( exit $ac_status )
5851{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5852echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5853 { (exit 1); exit 1; }; }
5854fi
5855rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5856fi
5857fi
5858rm -f conftest.val
5859else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005860 ac_cv_sizeof_long=0
5861fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005862fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005863echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5864echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5865cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005866#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005867_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005868
5869
Martin v. Löwis11437992002-04-12 09:54:03 +00005870echo "$as_me:$LINENO: checking for void *" >&5
5871echo $ECHO_N "checking for void *... $ECHO_C" >&6
5872if test "${ac_cv_type_void_p+set}" = set; then
5873 echo $ECHO_N "(cached) $ECHO_C" >&6
5874else
5875 cat >conftest.$ac_ext <<_ACEOF
5876#line $LINENO "configure"
5877#include "confdefs.h"
5878$ac_includes_default
5879#ifdef F77_DUMMY_MAIN
5880# ifdef __cplusplus
5881 extern "C"
5882# endif
5883 int F77_DUMMY_MAIN() { return 1; }
5884#endif
5885int
5886main ()
5887{
5888if ((void * *) 0)
5889 return 0;
5890if (sizeof (void *))
5891 return 0;
5892 ;
5893 return 0;
5894}
5895_ACEOF
5896rm -f conftest.$ac_objext
5897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5898 (eval $ac_compile) 2>&5
5899 ac_status=$?
5900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5901 (exit $ac_status); } &&
5902 { ac_try='test -s conftest.$ac_objext'
5903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5904 (eval $ac_try) 2>&5
5905 ac_status=$?
5906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5907 (exit $ac_status); }; }; then
5908 ac_cv_type_void_p=yes
5909else
5910 echo "$as_me: failed program was:" >&5
5911cat conftest.$ac_ext >&5
5912ac_cv_type_void_p=no
5913fi
5914rm -f conftest.$ac_objext conftest.$ac_ext
5915fi
5916echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5917echo "${ECHO_T}$ac_cv_type_void_p" >&6
5918
5919echo "$as_me:$LINENO: checking size of void *" >&5
5920echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5921if test "${ac_cv_sizeof_void_p+set}" = set; then
5922 echo $ECHO_N "(cached) $ECHO_C" >&6
5923else
5924 if test "$ac_cv_type_void_p" = yes; then
5925 # The cast to unsigned long works around a bug in the HP C Compiler
5926 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5927 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5928 # This bug is HP SR number 8606223364.
5929 if test "$cross_compiling" = yes; then
5930 # Depending upon the size, compute the lo and hi bounds.
5931cat >conftest.$ac_ext <<_ACEOF
5932#line $LINENO "configure"
5933#include "confdefs.h"
5934$ac_includes_default
5935#ifdef F77_DUMMY_MAIN
5936# ifdef __cplusplus
5937 extern "C"
5938# endif
5939 int F77_DUMMY_MAIN() { return 1; }
5940#endif
5941int
5942main ()
5943{
5944static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5945test_array [0] = 0
5946
5947 ;
5948 return 0;
5949}
5950_ACEOF
5951rm -f conftest.$ac_objext
5952if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5953 (eval $ac_compile) 2>&5
5954 ac_status=$?
5955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5956 (exit $ac_status); } &&
5957 { ac_try='test -s conftest.$ac_objext'
5958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5959 (eval $ac_try) 2>&5
5960 ac_status=$?
5961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5962 (exit $ac_status); }; }; then
5963 ac_lo=0 ac_mid=0
5964 while :; do
5965 cat >conftest.$ac_ext <<_ACEOF
5966#line $LINENO "configure"
5967#include "confdefs.h"
5968$ac_includes_default
5969#ifdef F77_DUMMY_MAIN
5970# ifdef __cplusplus
5971 extern "C"
5972# endif
5973 int F77_DUMMY_MAIN() { return 1; }
5974#endif
5975int
5976main ()
5977{
5978static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5979test_array [0] = 0
5980
5981 ;
5982 return 0;
5983}
5984_ACEOF
5985rm -f conftest.$ac_objext
5986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5987 (eval $ac_compile) 2>&5
5988 ac_status=$?
5989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5990 (exit $ac_status); } &&
5991 { ac_try='test -s conftest.$ac_objext'
5992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5993 (eval $ac_try) 2>&5
5994 ac_status=$?
5995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5996 (exit $ac_status); }; }; then
5997 ac_hi=$ac_mid; break
5998else
5999 echo "$as_me: failed program was:" >&5
6000cat conftest.$ac_ext >&5
6001ac_lo=`expr $ac_mid + 1`
6002 if test $ac_lo -le $ac_mid; then
6003 ac_lo= ac_hi=
6004 break
6005 fi
6006 ac_mid=`expr 2 '*' $ac_mid + 1`
6007fi
6008rm -f conftest.$ac_objext conftest.$ac_ext
6009 done
6010else
6011 echo "$as_me: failed program was:" >&5
6012cat conftest.$ac_ext >&5
6013cat >conftest.$ac_ext <<_ACEOF
6014#line $LINENO "configure"
6015#include "confdefs.h"
6016$ac_includes_default
6017#ifdef F77_DUMMY_MAIN
6018# ifdef __cplusplus
6019 extern "C"
6020# endif
6021 int F77_DUMMY_MAIN() { return 1; }
6022#endif
6023int
6024main ()
6025{
6026static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6027test_array [0] = 0
6028
6029 ;
6030 return 0;
6031}
6032_ACEOF
6033rm -f conftest.$ac_objext
6034if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6035 (eval $ac_compile) 2>&5
6036 ac_status=$?
6037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6038 (exit $ac_status); } &&
6039 { ac_try='test -s conftest.$ac_objext'
6040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6041 (eval $ac_try) 2>&5
6042 ac_status=$?
6043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6044 (exit $ac_status); }; }; then
6045 ac_hi=-1 ac_mid=-1
6046 while :; do
6047 cat >conftest.$ac_ext <<_ACEOF
6048#line $LINENO "configure"
6049#include "confdefs.h"
6050$ac_includes_default
6051#ifdef F77_DUMMY_MAIN
6052# ifdef __cplusplus
6053 extern "C"
6054# endif
6055 int F77_DUMMY_MAIN() { return 1; }
6056#endif
6057int
6058main ()
6059{
6060static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6061test_array [0] = 0
6062
6063 ;
6064 return 0;
6065}
6066_ACEOF
6067rm -f conftest.$ac_objext
6068if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6069 (eval $ac_compile) 2>&5
6070 ac_status=$?
6071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6072 (exit $ac_status); } &&
6073 { ac_try='test -s conftest.$ac_objext'
6074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6075 (eval $ac_try) 2>&5
6076 ac_status=$?
6077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6078 (exit $ac_status); }; }; then
6079 ac_lo=$ac_mid; break
6080else
6081 echo "$as_me: failed program was:" >&5
6082cat conftest.$ac_ext >&5
6083ac_hi=`expr '(' $ac_mid ')' - 1`
6084 if test $ac_mid -le $ac_hi; then
6085 ac_lo= ac_hi=
6086 break
6087 fi
6088 ac_mid=`expr 2 '*' $ac_mid`
6089fi
6090rm -f conftest.$ac_objext conftest.$ac_ext
6091 done
6092else
6093 echo "$as_me: failed program was:" >&5
6094cat conftest.$ac_ext >&5
6095ac_lo= ac_hi=
6096fi
6097rm -f conftest.$ac_objext conftest.$ac_ext
6098fi
6099rm -f conftest.$ac_objext conftest.$ac_ext
6100# Binary search between lo and hi bounds.
6101while test "x$ac_lo" != "x$ac_hi"; do
6102 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6103 cat >conftest.$ac_ext <<_ACEOF
6104#line $LINENO "configure"
6105#include "confdefs.h"
6106$ac_includes_default
6107#ifdef F77_DUMMY_MAIN
6108# ifdef __cplusplus
6109 extern "C"
6110# endif
6111 int F77_DUMMY_MAIN() { return 1; }
6112#endif
6113int
6114main ()
6115{
6116static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6117test_array [0] = 0
6118
6119 ;
6120 return 0;
6121}
6122_ACEOF
6123rm -f conftest.$ac_objext
6124if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6125 (eval $ac_compile) 2>&5
6126 ac_status=$?
6127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6128 (exit $ac_status); } &&
6129 { ac_try='test -s conftest.$ac_objext'
6130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6131 (eval $ac_try) 2>&5
6132 ac_status=$?
6133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6134 (exit $ac_status); }; }; then
6135 ac_hi=$ac_mid
6136else
6137 echo "$as_me: failed program was:" >&5
6138cat conftest.$ac_ext >&5
6139ac_lo=`expr '(' $ac_mid ')' + 1`
6140fi
6141rm -f conftest.$ac_objext conftest.$ac_ext
6142done
6143case $ac_lo in
6144?*) ac_cv_sizeof_void_p=$ac_lo;;
6145'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6146echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6147 { (exit 1); exit 1; }; } ;;
6148esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006149else
6150 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006151 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6152echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6153 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006154else
Martin v. Löwis11437992002-04-12 09:54:03 +00006155 cat >conftest.$ac_ext <<_ACEOF
6156#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006157#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006158$ac_includes_default
6159long longval () { return (long) (sizeof (void *)); }
6160unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006161#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006162#include <stdlib.h>
6163#ifdef F77_DUMMY_MAIN
6164# ifdef __cplusplus
6165 extern "C"
6166# endif
6167 int F77_DUMMY_MAIN() { return 1; }
6168#endif
6169int
6170main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006171{
Martin v. Löwis11437992002-04-12 09:54:03 +00006172
6173 FILE *f = fopen ("conftest.val", "w");
6174 if (! f)
6175 exit (1);
6176 if (((long) (sizeof (void *))) < 0)
6177 {
6178 long i = longval ();
6179 if (i != ((long) (sizeof (void *))))
6180 exit (1);
6181 fprintf (f, "%ld\n", i);
6182 }
6183 else
6184 {
6185 unsigned long i = ulongval ();
6186 if (i != ((long) (sizeof (void *))))
6187 exit (1);
6188 fprintf (f, "%lu\n", i);
6189 }
6190 exit (ferror (f) || fclose (f) != 0);
6191
6192 ;
6193 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006194}
Martin v. Löwis11437992002-04-12 09:54:03 +00006195_ACEOF
6196rm -f conftest$ac_exeext
6197if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6198 (eval $ac_link) 2>&5
6199 ac_status=$?
6200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6201 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6203 (eval $ac_try) 2>&5
6204 ac_status=$?
6205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6206 (exit $ac_status); }; }; then
6207 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006208else
Martin v. Löwis11437992002-04-12 09:54:03 +00006209 echo "$as_me: program exited with status $ac_status" >&5
6210echo "$as_me: failed program was:" >&5
6211cat conftest.$ac_ext >&5
6212( exit $ac_status )
6213{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6214echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6215 { (exit 1); exit 1; }; }
6216fi
6217rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6218fi
6219fi
6220rm -f conftest.val
6221else
Guido van Rossumad678af1998-10-02 14:42:15 +00006222 ac_cv_sizeof_void_p=0
6223fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006224fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006225echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6226echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6227cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006228#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006229_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006230
6231
Martin v. Löwis11437992002-04-12 09:54:03 +00006232echo "$as_me:$LINENO: checking for char" >&5
6233echo $ECHO_N "checking for char... $ECHO_C" >&6
6234if test "${ac_cv_type_char+set}" = set; then
6235 echo $ECHO_N "(cached) $ECHO_C" >&6
6236else
6237 cat >conftest.$ac_ext <<_ACEOF
6238#line $LINENO "configure"
6239#include "confdefs.h"
6240$ac_includes_default
6241#ifdef F77_DUMMY_MAIN
6242# ifdef __cplusplus
6243 extern "C"
6244# endif
6245 int F77_DUMMY_MAIN() { return 1; }
6246#endif
6247int
6248main ()
6249{
6250if ((char *) 0)
6251 return 0;
6252if (sizeof (char))
6253 return 0;
6254 ;
6255 return 0;
6256}
6257_ACEOF
6258rm -f conftest.$ac_objext
6259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6260 (eval $ac_compile) 2>&5
6261 ac_status=$?
6262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6263 (exit $ac_status); } &&
6264 { ac_try='test -s conftest.$ac_objext'
6265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6266 (eval $ac_try) 2>&5
6267 ac_status=$?
6268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6269 (exit $ac_status); }; }; then
6270 ac_cv_type_char=yes
6271else
6272 echo "$as_me: failed program was:" >&5
6273cat conftest.$ac_ext >&5
6274ac_cv_type_char=no
6275fi
6276rm -f conftest.$ac_objext conftest.$ac_ext
6277fi
6278echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6279echo "${ECHO_T}$ac_cv_type_char" >&6
6280
6281echo "$as_me:$LINENO: checking size of char" >&5
6282echo $ECHO_N "checking size of char... $ECHO_C" >&6
6283if test "${ac_cv_sizeof_char+set}" = set; then
6284 echo $ECHO_N "(cached) $ECHO_C" >&6
6285else
6286 if test "$ac_cv_type_char" = yes; then
6287 # The cast to unsigned long works around a bug in the HP C Compiler
6288 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6289 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6290 # This bug is HP SR number 8606223364.
6291 if test "$cross_compiling" = yes; then
6292 # Depending upon the size, compute the lo and hi bounds.
6293cat >conftest.$ac_ext <<_ACEOF
6294#line $LINENO "configure"
6295#include "confdefs.h"
6296$ac_includes_default
6297#ifdef F77_DUMMY_MAIN
6298# ifdef __cplusplus
6299 extern "C"
6300# endif
6301 int F77_DUMMY_MAIN() { return 1; }
6302#endif
6303int
6304main ()
6305{
6306static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6307test_array [0] = 0
6308
6309 ;
6310 return 0;
6311}
6312_ACEOF
6313rm -f conftest.$ac_objext
6314if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6315 (eval $ac_compile) 2>&5
6316 ac_status=$?
6317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6318 (exit $ac_status); } &&
6319 { ac_try='test -s conftest.$ac_objext'
6320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6321 (eval $ac_try) 2>&5
6322 ac_status=$?
6323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6324 (exit $ac_status); }; }; then
6325 ac_lo=0 ac_mid=0
6326 while :; do
6327 cat >conftest.$ac_ext <<_ACEOF
6328#line $LINENO "configure"
6329#include "confdefs.h"
6330$ac_includes_default
6331#ifdef F77_DUMMY_MAIN
6332# ifdef __cplusplus
6333 extern "C"
6334# endif
6335 int F77_DUMMY_MAIN() { return 1; }
6336#endif
6337int
6338main ()
6339{
6340static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6341test_array [0] = 0
6342
6343 ;
6344 return 0;
6345}
6346_ACEOF
6347rm -f conftest.$ac_objext
6348if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6349 (eval $ac_compile) 2>&5
6350 ac_status=$?
6351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6352 (exit $ac_status); } &&
6353 { ac_try='test -s conftest.$ac_objext'
6354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6355 (eval $ac_try) 2>&5
6356 ac_status=$?
6357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6358 (exit $ac_status); }; }; then
6359 ac_hi=$ac_mid; break
6360else
6361 echo "$as_me: failed program was:" >&5
6362cat conftest.$ac_ext >&5
6363ac_lo=`expr $ac_mid + 1`
6364 if test $ac_lo -le $ac_mid; then
6365 ac_lo= ac_hi=
6366 break
6367 fi
6368 ac_mid=`expr 2 '*' $ac_mid + 1`
6369fi
6370rm -f conftest.$ac_objext conftest.$ac_ext
6371 done
6372else
6373 echo "$as_me: failed program was:" >&5
6374cat conftest.$ac_ext >&5
6375cat >conftest.$ac_ext <<_ACEOF
6376#line $LINENO "configure"
6377#include "confdefs.h"
6378$ac_includes_default
6379#ifdef F77_DUMMY_MAIN
6380# ifdef __cplusplus
6381 extern "C"
6382# endif
6383 int F77_DUMMY_MAIN() { return 1; }
6384#endif
6385int
6386main ()
6387{
6388static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6389test_array [0] = 0
6390
6391 ;
6392 return 0;
6393}
6394_ACEOF
6395rm -f conftest.$ac_objext
6396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6397 (eval $ac_compile) 2>&5
6398 ac_status=$?
6399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6400 (exit $ac_status); } &&
6401 { ac_try='test -s conftest.$ac_objext'
6402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6403 (eval $ac_try) 2>&5
6404 ac_status=$?
6405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6406 (exit $ac_status); }; }; then
6407 ac_hi=-1 ac_mid=-1
6408 while :; do
6409 cat >conftest.$ac_ext <<_ACEOF
6410#line $LINENO "configure"
6411#include "confdefs.h"
6412$ac_includes_default
6413#ifdef F77_DUMMY_MAIN
6414# ifdef __cplusplus
6415 extern "C"
6416# endif
6417 int F77_DUMMY_MAIN() { return 1; }
6418#endif
6419int
6420main ()
6421{
6422static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6423test_array [0] = 0
6424
6425 ;
6426 return 0;
6427}
6428_ACEOF
6429rm -f conftest.$ac_objext
6430if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6431 (eval $ac_compile) 2>&5
6432 ac_status=$?
6433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6434 (exit $ac_status); } &&
6435 { ac_try='test -s conftest.$ac_objext'
6436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6437 (eval $ac_try) 2>&5
6438 ac_status=$?
6439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6440 (exit $ac_status); }; }; then
6441 ac_lo=$ac_mid; break
6442else
6443 echo "$as_me: failed program was:" >&5
6444cat conftest.$ac_ext >&5
6445ac_hi=`expr '(' $ac_mid ')' - 1`
6446 if test $ac_mid -le $ac_hi; then
6447 ac_lo= ac_hi=
6448 break
6449 fi
6450 ac_mid=`expr 2 '*' $ac_mid`
6451fi
6452rm -f conftest.$ac_objext conftest.$ac_ext
6453 done
6454else
6455 echo "$as_me: failed program was:" >&5
6456cat conftest.$ac_ext >&5
6457ac_lo= ac_hi=
6458fi
6459rm -f conftest.$ac_objext conftest.$ac_ext
6460fi
6461rm -f conftest.$ac_objext conftest.$ac_ext
6462# Binary search between lo and hi bounds.
6463while test "x$ac_lo" != "x$ac_hi"; do
6464 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6465 cat >conftest.$ac_ext <<_ACEOF
6466#line $LINENO "configure"
6467#include "confdefs.h"
6468$ac_includes_default
6469#ifdef F77_DUMMY_MAIN
6470# ifdef __cplusplus
6471 extern "C"
6472# endif
6473 int F77_DUMMY_MAIN() { return 1; }
6474#endif
6475int
6476main ()
6477{
6478static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6479test_array [0] = 0
6480
6481 ;
6482 return 0;
6483}
6484_ACEOF
6485rm -f conftest.$ac_objext
6486if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6487 (eval $ac_compile) 2>&5
6488 ac_status=$?
6489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6490 (exit $ac_status); } &&
6491 { ac_try='test -s conftest.$ac_objext'
6492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6493 (eval $ac_try) 2>&5
6494 ac_status=$?
6495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6496 (exit $ac_status); }; }; then
6497 ac_hi=$ac_mid
6498else
6499 echo "$as_me: failed program was:" >&5
6500cat conftest.$ac_ext >&5
6501ac_lo=`expr '(' $ac_mid ')' + 1`
6502fi
6503rm -f conftest.$ac_objext conftest.$ac_ext
6504done
6505case $ac_lo in
6506?*) ac_cv_sizeof_char=$ac_lo;;
6507'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6508echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6509 { (exit 1); exit 1; }; } ;;
6510esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006511else
6512 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006513 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6514echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6515 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006516else
Martin v. Löwis11437992002-04-12 09:54:03 +00006517 cat >conftest.$ac_ext <<_ACEOF
6518#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006519#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006520$ac_includes_default
6521long longval () { return (long) (sizeof (char)); }
6522unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006523#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006524#include <stdlib.h>
6525#ifdef F77_DUMMY_MAIN
6526# ifdef __cplusplus
6527 extern "C"
6528# endif
6529 int F77_DUMMY_MAIN() { return 1; }
6530#endif
6531int
6532main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006533{
Martin v. Löwis11437992002-04-12 09:54:03 +00006534
6535 FILE *f = fopen ("conftest.val", "w");
6536 if (! f)
6537 exit (1);
6538 if (((long) (sizeof (char))) < 0)
6539 {
6540 long i = longval ();
6541 if (i != ((long) (sizeof (char))))
6542 exit (1);
6543 fprintf (f, "%ld\n", i);
6544 }
6545 else
6546 {
6547 unsigned long i = ulongval ();
6548 if (i != ((long) (sizeof (char))))
6549 exit (1);
6550 fprintf (f, "%lu\n", i);
6551 }
6552 exit (ferror (f) || fclose (f) != 0);
6553
6554 ;
6555 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006556}
Martin v. Löwis11437992002-04-12 09:54:03 +00006557_ACEOF
6558rm -f conftest$ac_exeext
6559if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6560 (eval $ac_link) 2>&5
6561 ac_status=$?
6562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6563 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6565 (eval $ac_try) 2>&5
6566 ac_status=$?
6567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6568 (exit $ac_status); }; }; then
6569 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006570else
Martin v. Löwis11437992002-04-12 09:54:03 +00006571 echo "$as_me: program exited with status $ac_status" >&5
6572echo "$as_me: failed program was:" >&5
6573cat conftest.$ac_ext >&5
6574( exit $ac_status )
6575{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6576echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6577 { (exit 1); exit 1; }; }
6578fi
6579rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6580fi
6581fi
6582rm -f conftest.val
6583else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006584 ac_cv_sizeof_char=0
6585fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006586fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006587echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6588echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6589cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006590#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006591_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006592
6593
Martin v. Löwis11437992002-04-12 09:54:03 +00006594echo "$as_me:$LINENO: checking for short" >&5
6595echo $ECHO_N "checking for short... $ECHO_C" >&6
6596if test "${ac_cv_type_short+set}" = set; then
6597 echo $ECHO_N "(cached) $ECHO_C" >&6
6598else
6599 cat >conftest.$ac_ext <<_ACEOF
6600#line $LINENO "configure"
6601#include "confdefs.h"
6602$ac_includes_default
6603#ifdef F77_DUMMY_MAIN
6604# ifdef __cplusplus
6605 extern "C"
6606# endif
6607 int F77_DUMMY_MAIN() { return 1; }
6608#endif
6609int
6610main ()
6611{
6612if ((short *) 0)
6613 return 0;
6614if (sizeof (short))
6615 return 0;
6616 ;
6617 return 0;
6618}
6619_ACEOF
6620rm -f conftest.$ac_objext
6621if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6622 (eval $ac_compile) 2>&5
6623 ac_status=$?
6624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6625 (exit $ac_status); } &&
6626 { ac_try='test -s conftest.$ac_objext'
6627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6628 (eval $ac_try) 2>&5
6629 ac_status=$?
6630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6631 (exit $ac_status); }; }; then
6632 ac_cv_type_short=yes
6633else
6634 echo "$as_me: failed program was:" >&5
6635cat conftest.$ac_ext >&5
6636ac_cv_type_short=no
6637fi
6638rm -f conftest.$ac_objext conftest.$ac_ext
6639fi
6640echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6641echo "${ECHO_T}$ac_cv_type_short" >&6
6642
6643echo "$as_me:$LINENO: checking size of short" >&5
6644echo $ECHO_N "checking size of short... $ECHO_C" >&6
6645if test "${ac_cv_sizeof_short+set}" = set; then
6646 echo $ECHO_N "(cached) $ECHO_C" >&6
6647else
6648 if test "$ac_cv_type_short" = yes; then
6649 # The cast to unsigned long works around a bug in the HP C Compiler
6650 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6651 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6652 # This bug is HP SR number 8606223364.
6653 if test "$cross_compiling" = yes; then
6654 # Depending upon the size, compute the lo and hi bounds.
6655cat >conftest.$ac_ext <<_ACEOF
6656#line $LINENO "configure"
6657#include "confdefs.h"
6658$ac_includes_default
6659#ifdef F77_DUMMY_MAIN
6660# ifdef __cplusplus
6661 extern "C"
6662# endif
6663 int F77_DUMMY_MAIN() { return 1; }
6664#endif
6665int
6666main ()
6667{
6668static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6669test_array [0] = 0
6670
6671 ;
6672 return 0;
6673}
6674_ACEOF
6675rm -f conftest.$ac_objext
6676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6677 (eval $ac_compile) 2>&5
6678 ac_status=$?
6679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6680 (exit $ac_status); } &&
6681 { ac_try='test -s conftest.$ac_objext'
6682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6683 (eval $ac_try) 2>&5
6684 ac_status=$?
6685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6686 (exit $ac_status); }; }; then
6687 ac_lo=0 ac_mid=0
6688 while :; do
6689 cat >conftest.$ac_ext <<_ACEOF
6690#line $LINENO "configure"
6691#include "confdefs.h"
6692$ac_includes_default
6693#ifdef F77_DUMMY_MAIN
6694# ifdef __cplusplus
6695 extern "C"
6696# endif
6697 int F77_DUMMY_MAIN() { return 1; }
6698#endif
6699int
6700main ()
6701{
6702static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6703test_array [0] = 0
6704
6705 ;
6706 return 0;
6707}
6708_ACEOF
6709rm -f conftest.$ac_objext
6710if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6711 (eval $ac_compile) 2>&5
6712 ac_status=$?
6713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6714 (exit $ac_status); } &&
6715 { ac_try='test -s conftest.$ac_objext'
6716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6717 (eval $ac_try) 2>&5
6718 ac_status=$?
6719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6720 (exit $ac_status); }; }; then
6721 ac_hi=$ac_mid; break
6722else
6723 echo "$as_me: failed program was:" >&5
6724cat conftest.$ac_ext >&5
6725ac_lo=`expr $ac_mid + 1`
6726 if test $ac_lo -le $ac_mid; then
6727 ac_lo= ac_hi=
6728 break
6729 fi
6730 ac_mid=`expr 2 '*' $ac_mid + 1`
6731fi
6732rm -f conftest.$ac_objext conftest.$ac_ext
6733 done
6734else
6735 echo "$as_me: failed program was:" >&5
6736cat conftest.$ac_ext >&5
6737cat >conftest.$ac_ext <<_ACEOF
6738#line $LINENO "configure"
6739#include "confdefs.h"
6740$ac_includes_default
6741#ifdef F77_DUMMY_MAIN
6742# ifdef __cplusplus
6743 extern "C"
6744# endif
6745 int F77_DUMMY_MAIN() { return 1; }
6746#endif
6747int
6748main ()
6749{
6750static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6751test_array [0] = 0
6752
6753 ;
6754 return 0;
6755}
6756_ACEOF
6757rm -f conftest.$ac_objext
6758if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6759 (eval $ac_compile) 2>&5
6760 ac_status=$?
6761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6762 (exit $ac_status); } &&
6763 { ac_try='test -s conftest.$ac_objext'
6764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6765 (eval $ac_try) 2>&5
6766 ac_status=$?
6767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6768 (exit $ac_status); }; }; then
6769 ac_hi=-1 ac_mid=-1
6770 while :; do
6771 cat >conftest.$ac_ext <<_ACEOF
6772#line $LINENO "configure"
6773#include "confdefs.h"
6774$ac_includes_default
6775#ifdef F77_DUMMY_MAIN
6776# ifdef __cplusplus
6777 extern "C"
6778# endif
6779 int F77_DUMMY_MAIN() { return 1; }
6780#endif
6781int
6782main ()
6783{
6784static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6785test_array [0] = 0
6786
6787 ;
6788 return 0;
6789}
6790_ACEOF
6791rm -f conftest.$ac_objext
6792if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6793 (eval $ac_compile) 2>&5
6794 ac_status=$?
6795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6796 (exit $ac_status); } &&
6797 { ac_try='test -s conftest.$ac_objext'
6798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6799 (eval $ac_try) 2>&5
6800 ac_status=$?
6801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6802 (exit $ac_status); }; }; then
6803 ac_lo=$ac_mid; break
6804else
6805 echo "$as_me: failed program was:" >&5
6806cat conftest.$ac_ext >&5
6807ac_hi=`expr '(' $ac_mid ')' - 1`
6808 if test $ac_mid -le $ac_hi; then
6809 ac_lo= ac_hi=
6810 break
6811 fi
6812 ac_mid=`expr 2 '*' $ac_mid`
6813fi
6814rm -f conftest.$ac_objext conftest.$ac_ext
6815 done
6816else
6817 echo "$as_me: failed program was:" >&5
6818cat conftest.$ac_ext >&5
6819ac_lo= ac_hi=
6820fi
6821rm -f conftest.$ac_objext conftest.$ac_ext
6822fi
6823rm -f conftest.$ac_objext conftest.$ac_ext
6824# Binary search between lo and hi bounds.
6825while test "x$ac_lo" != "x$ac_hi"; do
6826 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6827 cat >conftest.$ac_ext <<_ACEOF
6828#line $LINENO "configure"
6829#include "confdefs.h"
6830$ac_includes_default
6831#ifdef F77_DUMMY_MAIN
6832# ifdef __cplusplus
6833 extern "C"
6834# endif
6835 int F77_DUMMY_MAIN() { return 1; }
6836#endif
6837int
6838main ()
6839{
6840static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6841test_array [0] = 0
6842
6843 ;
6844 return 0;
6845}
6846_ACEOF
6847rm -f conftest.$ac_objext
6848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6849 (eval $ac_compile) 2>&5
6850 ac_status=$?
6851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6852 (exit $ac_status); } &&
6853 { ac_try='test -s conftest.$ac_objext'
6854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6855 (eval $ac_try) 2>&5
6856 ac_status=$?
6857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6858 (exit $ac_status); }; }; then
6859 ac_hi=$ac_mid
6860else
6861 echo "$as_me: failed program was:" >&5
6862cat conftest.$ac_ext >&5
6863ac_lo=`expr '(' $ac_mid ')' + 1`
6864fi
6865rm -f conftest.$ac_objext conftest.$ac_ext
6866done
6867case $ac_lo in
6868?*) ac_cv_sizeof_short=$ac_lo;;
6869'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6870echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6871 { (exit 1); exit 1; }; } ;;
6872esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006873else
6874 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006875 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6876echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6877 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006878else
Martin v. Löwis11437992002-04-12 09:54:03 +00006879 cat >conftest.$ac_ext <<_ACEOF
6880#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006881#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006882$ac_includes_default
6883long longval () { return (long) (sizeof (short)); }
6884unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006885#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006886#include <stdlib.h>
6887#ifdef F77_DUMMY_MAIN
6888# ifdef __cplusplus
6889 extern "C"
6890# endif
6891 int F77_DUMMY_MAIN() { return 1; }
6892#endif
6893int
6894main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006895{
Martin v. Löwis11437992002-04-12 09:54:03 +00006896
6897 FILE *f = fopen ("conftest.val", "w");
6898 if (! f)
6899 exit (1);
6900 if (((long) (sizeof (short))) < 0)
6901 {
6902 long i = longval ();
6903 if (i != ((long) (sizeof (short))))
6904 exit (1);
6905 fprintf (f, "%ld\n", i);
6906 }
6907 else
6908 {
6909 unsigned long i = ulongval ();
6910 if (i != ((long) (sizeof (short))))
6911 exit (1);
6912 fprintf (f, "%lu\n", i);
6913 }
6914 exit (ferror (f) || fclose (f) != 0);
6915
6916 ;
6917 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006918}
Martin v. Löwis11437992002-04-12 09:54:03 +00006919_ACEOF
6920rm -f conftest$ac_exeext
6921if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6922 (eval $ac_link) 2>&5
6923 ac_status=$?
6924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6925 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6927 (eval $ac_try) 2>&5
6928 ac_status=$?
6929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6930 (exit $ac_status); }; }; then
6931 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006932else
Martin v. Löwis11437992002-04-12 09:54:03 +00006933 echo "$as_me: program exited with status $ac_status" >&5
6934echo "$as_me: failed program was:" >&5
6935cat conftest.$ac_ext >&5
6936( exit $ac_status )
6937{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6938echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6939 { (exit 1); exit 1; }; }
6940fi
6941rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6942fi
6943fi
6944rm -f conftest.val
6945else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006946 ac_cv_sizeof_short=0
6947fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006948fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006949echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6950echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6951cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006952#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006953_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006954
6955
Martin v. Löwis11437992002-04-12 09:54:03 +00006956echo "$as_me:$LINENO: checking for float" >&5
6957echo $ECHO_N "checking for float... $ECHO_C" >&6
6958if test "${ac_cv_type_float+set}" = set; then
6959 echo $ECHO_N "(cached) $ECHO_C" >&6
6960else
6961 cat >conftest.$ac_ext <<_ACEOF
6962#line $LINENO "configure"
6963#include "confdefs.h"
6964$ac_includes_default
6965#ifdef F77_DUMMY_MAIN
6966# ifdef __cplusplus
6967 extern "C"
6968# endif
6969 int F77_DUMMY_MAIN() { return 1; }
6970#endif
6971int
6972main ()
6973{
6974if ((float *) 0)
6975 return 0;
6976if (sizeof (float))
6977 return 0;
6978 ;
6979 return 0;
6980}
6981_ACEOF
6982rm -f conftest.$ac_objext
6983if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6984 (eval $ac_compile) 2>&5
6985 ac_status=$?
6986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6987 (exit $ac_status); } &&
6988 { ac_try='test -s conftest.$ac_objext'
6989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6990 (eval $ac_try) 2>&5
6991 ac_status=$?
6992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6993 (exit $ac_status); }; }; then
6994 ac_cv_type_float=yes
6995else
6996 echo "$as_me: failed program was:" >&5
6997cat conftest.$ac_ext >&5
6998ac_cv_type_float=no
6999fi
7000rm -f conftest.$ac_objext conftest.$ac_ext
7001fi
7002echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7003echo "${ECHO_T}$ac_cv_type_float" >&6
7004
7005echo "$as_me:$LINENO: checking size of float" >&5
7006echo $ECHO_N "checking size of float... $ECHO_C" >&6
7007if test "${ac_cv_sizeof_float+set}" = set; then
7008 echo $ECHO_N "(cached) $ECHO_C" >&6
7009else
7010 if test "$ac_cv_type_float" = yes; then
7011 # The cast to unsigned long works around a bug in the HP C Compiler
7012 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7013 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7014 # This bug is HP SR number 8606223364.
7015 if test "$cross_compiling" = yes; then
7016 # Depending upon the size, compute the lo and hi bounds.
7017cat >conftest.$ac_ext <<_ACEOF
7018#line $LINENO "configure"
7019#include "confdefs.h"
7020$ac_includes_default
7021#ifdef F77_DUMMY_MAIN
7022# ifdef __cplusplus
7023 extern "C"
7024# endif
7025 int F77_DUMMY_MAIN() { return 1; }
7026#endif
7027int
7028main ()
7029{
7030static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7031test_array [0] = 0
7032
7033 ;
7034 return 0;
7035}
7036_ACEOF
7037rm -f conftest.$ac_objext
7038if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7039 (eval $ac_compile) 2>&5
7040 ac_status=$?
7041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7042 (exit $ac_status); } &&
7043 { ac_try='test -s conftest.$ac_objext'
7044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7045 (eval $ac_try) 2>&5
7046 ac_status=$?
7047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7048 (exit $ac_status); }; }; then
7049 ac_lo=0 ac_mid=0
7050 while :; do
7051 cat >conftest.$ac_ext <<_ACEOF
7052#line $LINENO "configure"
7053#include "confdefs.h"
7054$ac_includes_default
7055#ifdef F77_DUMMY_MAIN
7056# ifdef __cplusplus
7057 extern "C"
7058# endif
7059 int F77_DUMMY_MAIN() { return 1; }
7060#endif
7061int
7062main ()
7063{
7064static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7065test_array [0] = 0
7066
7067 ;
7068 return 0;
7069}
7070_ACEOF
7071rm -f conftest.$ac_objext
7072if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7073 (eval $ac_compile) 2>&5
7074 ac_status=$?
7075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7076 (exit $ac_status); } &&
7077 { ac_try='test -s conftest.$ac_objext'
7078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7079 (eval $ac_try) 2>&5
7080 ac_status=$?
7081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7082 (exit $ac_status); }; }; then
7083 ac_hi=$ac_mid; break
7084else
7085 echo "$as_me: failed program was:" >&5
7086cat conftest.$ac_ext >&5
7087ac_lo=`expr $ac_mid + 1`
7088 if test $ac_lo -le $ac_mid; then
7089 ac_lo= ac_hi=
7090 break
7091 fi
7092 ac_mid=`expr 2 '*' $ac_mid + 1`
7093fi
7094rm -f conftest.$ac_objext conftest.$ac_ext
7095 done
7096else
7097 echo "$as_me: failed program was:" >&5
7098cat conftest.$ac_ext >&5
7099cat >conftest.$ac_ext <<_ACEOF
7100#line $LINENO "configure"
7101#include "confdefs.h"
7102$ac_includes_default
7103#ifdef F77_DUMMY_MAIN
7104# ifdef __cplusplus
7105 extern "C"
7106# endif
7107 int F77_DUMMY_MAIN() { return 1; }
7108#endif
7109int
7110main ()
7111{
7112static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7113test_array [0] = 0
7114
7115 ;
7116 return 0;
7117}
7118_ACEOF
7119rm -f conftest.$ac_objext
7120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7121 (eval $ac_compile) 2>&5
7122 ac_status=$?
7123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7124 (exit $ac_status); } &&
7125 { ac_try='test -s conftest.$ac_objext'
7126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7127 (eval $ac_try) 2>&5
7128 ac_status=$?
7129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7130 (exit $ac_status); }; }; then
7131 ac_hi=-1 ac_mid=-1
7132 while :; do
7133 cat >conftest.$ac_ext <<_ACEOF
7134#line $LINENO "configure"
7135#include "confdefs.h"
7136$ac_includes_default
7137#ifdef F77_DUMMY_MAIN
7138# ifdef __cplusplus
7139 extern "C"
7140# endif
7141 int F77_DUMMY_MAIN() { return 1; }
7142#endif
7143int
7144main ()
7145{
7146static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7147test_array [0] = 0
7148
7149 ;
7150 return 0;
7151}
7152_ACEOF
7153rm -f conftest.$ac_objext
7154if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7155 (eval $ac_compile) 2>&5
7156 ac_status=$?
7157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7158 (exit $ac_status); } &&
7159 { ac_try='test -s conftest.$ac_objext'
7160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7161 (eval $ac_try) 2>&5
7162 ac_status=$?
7163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7164 (exit $ac_status); }; }; then
7165 ac_lo=$ac_mid; break
7166else
7167 echo "$as_me: failed program was:" >&5
7168cat conftest.$ac_ext >&5
7169ac_hi=`expr '(' $ac_mid ')' - 1`
7170 if test $ac_mid -le $ac_hi; then
7171 ac_lo= ac_hi=
7172 break
7173 fi
7174 ac_mid=`expr 2 '*' $ac_mid`
7175fi
7176rm -f conftest.$ac_objext conftest.$ac_ext
7177 done
7178else
7179 echo "$as_me: failed program was:" >&5
7180cat conftest.$ac_ext >&5
7181ac_lo= ac_hi=
7182fi
7183rm -f conftest.$ac_objext conftest.$ac_ext
7184fi
7185rm -f conftest.$ac_objext conftest.$ac_ext
7186# Binary search between lo and hi bounds.
7187while test "x$ac_lo" != "x$ac_hi"; do
7188 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7189 cat >conftest.$ac_ext <<_ACEOF
7190#line $LINENO "configure"
7191#include "confdefs.h"
7192$ac_includes_default
7193#ifdef F77_DUMMY_MAIN
7194# ifdef __cplusplus
7195 extern "C"
7196# endif
7197 int F77_DUMMY_MAIN() { return 1; }
7198#endif
7199int
7200main ()
7201{
7202static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7203test_array [0] = 0
7204
7205 ;
7206 return 0;
7207}
7208_ACEOF
7209rm -f conftest.$ac_objext
7210if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7211 (eval $ac_compile) 2>&5
7212 ac_status=$?
7213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7214 (exit $ac_status); } &&
7215 { ac_try='test -s conftest.$ac_objext'
7216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7217 (eval $ac_try) 2>&5
7218 ac_status=$?
7219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7220 (exit $ac_status); }; }; then
7221 ac_hi=$ac_mid
7222else
7223 echo "$as_me: failed program was:" >&5
7224cat conftest.$ac_ext >&5
7225ac_lo=`expr '(' $ac_mid ')' + 1`
7226fi
7227rm -f conftest.$ac_objext conftest.$ac_ext
7228done
7229case $ac_lo in
7230?*) ac_cv_sizeof_float=$ac_lo;;
7231'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7232echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7233 { (exit 1); exit 1; }; } ;;
7234esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007235else
7236 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007237 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7238echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7239 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007240else
Martin v. Löwis11437992002-04-12 09:54:03 +00007241 cat >conftest.$ac_ext <<_ACEOF
7242#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007243#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007244$ac_includes_default
7245long longval () { return (long) (sizeof (float)); }
7246unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007247#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007248#include <stdlib.h>
7249#ifdef F77_DUMMY_MAIN
7250# ifdef __cplusplus
7251 extern "C"
7252# endif
7253 int F77_DUMMY_MAIN() { return 1; }
7254#endif
7255int
7256main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007257{
Martin v. Löwis11437992002-04-12 09:54:03 +00007258
7259 FILE *f = fopen ("conftest.val", "w");
7260 if (! f)
7261 exit (1);
7262 if (((long) (sizeof (float))) < 0)
7263 {
7264 long i = longval ();
7265 if (i != ((long) (sizeof (float))))
7266 exit (1);
7267 fprintf (f, "%ld\n", i);
7268 }
7269 else
7270 {
7271 unsigned long i = ulongval ();
7272 if (i != ((long) (sizeof (float))))
7273 exit (1);
7274 fprintf (f, "%lu\n", i);
7275 }
7276 exit (ferror (f) || fclose (f) != 0);
7277
7278 ;
7279 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007280}
Martin v. Löwis11437992002-04-12 09:54:03 +00007281_ACEOF
7282rm -f conftest$ac_exeext
7283if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7284 (eval $ac_link) 2>&5
7285 ac_status=$?
7286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7287 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7289 (eval $ac_try) 2>&5
7290 ac_status=$?
7291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7292 (exit $ac_status); }; }; then
7293 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007294else
Martin v. Löwis11437992002-04-12 09:54:03 +00007295 echo "$as_me: program exited with status $ac_status" >&5
7296echo "$as_me: failed program was:" >&5
7297cat conftest.$ac_ext >&5
7298( exit $ac_status )
7299{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7300echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7301 { (exit 1); exit 1; }; }
7302fi
7303rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7304fi
7305fi
7306rm -f conftest.val
7307else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007308 ac_cv_sizeof_float=0
7309fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007310fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007311echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7312echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7313cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007314#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007315_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007316
7317
Martin v. Löwis11437992002-04-12 09:54:03 +00007318echo "$as_me:$LINENO: checking for double" >&5
7319echo $ECHO_N "checking for double... $ECHO_C" >&6
7320if test "${ac_cv_type_double+set}" = set; then
7321 echo $ECHO_N "(cached) $ECHO_C" >&6
7322else
7323 cat >conftest.$ac_ext <<_ACEOF
7324#line $LINENO "configure"
7325#include "confdefs.h"
7326$ac_includes_default
7327#ifdef F77_DUMMY_MAIN
7328# ifdef __cplusplus
7329 extern "C"
7330# endif
7331 int F77_DUMMY_MAIN() { return 1; }
7332#endif
7333int
7334main ()
7335{
7336if ((double *) 0)
7337 return 0;
7338if (sizeof (double))
7339 return 0;
7340 ;
7341 return 0;
7342}
7343_ACEOF
7344rm -f conftest.$ac_objext
7345if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7346 (eval $ac_compile) 2>&5
7347 ac_status=$?
7348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7349 (exit $ac_status); } &&
7350 { ac_try='test -s conftest.$ac_objext'
7351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7352 (eval $ac_try) 2>&5
7353 ac_status=$?
7354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7355 (exit $ac_status); }; }; then
7356 ac_cv_type_double=yes
7357else
7358 echo "$as_me: failed program was:" >&5
7359cat conftest.$ac_ext >&5
7360ac_cv_type_double=no
7361fi
7362rm -f conftest.$ac_objext conftest.$ac_ext
7363fi
7364echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7365echo "${ECHO_T}$ac_cv_type_double" >&6
7366
7367echo "$as_me:$LINENO: checking size of double" >&5
7368echo $ECHO_N "checking size of double... $ECHO_C" >&6
7369if test "${ac_cv_sizeof_double+set}" = set; then
7370 echo $ECHO_N "(cached) $ECHO_C" >&6
7371else
7372 if test "$ac_cv_type_double" = yes; then
7373 # The cast to unsigned long works around a bug in the HP C Compiler
7374 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7375 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7376 # This bug is HP SR number 8606223364.
7377 if test "$cross_compiling" = yes; then
7378 # Depending upon the size, compute the lo and hi bounds.
7379cat >conftest.$ac_ext <<_ACEOF
7380#line $LINENO "configure"
7381#include "confdefs.h"
7382$ac_includes_default
7383#ifdef F77_DUMMY_MAIN
7384# ifdef __cplusplus
7385 extern "C"
7386# endif
7387 int F77_DUMMY_MAIN() { return 1; }
7388#endif
7389int
7390main ()
7391{
7392static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7393test_array [0] = 0
7394
7395 ;
7396 return 0;
7397}
7398_ACEOF
7399rm -f conftest.$ac_objext
7400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7401 (eval $ac_compile) 2>&5
7402 ac_status=$?
7403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7404 (exit $ac_status); } &&
7405 { ac_try='test -s conftest.$ac_objext'
7406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7407 (eval $ac_try) 2>&5
7408 ac_status=$?
7409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7410 (exit $ac_status); }; }; then
7411 ac_lo=0 ac_mid=0
7412 while :; do
7413 cat >conftest.$ac_ext <<_ACEOF
7414#line $LINENO "configure"
7415#include "confdefs.h"
7416$ac_includes_default
7417#ifdef F77_DUMMY_MAIN
7418# ifdef __cplusplus
7419 extern "C"
7420# endif
7421 int F77_DUMMY_MAIN() { return 1; }
7422#endif
7423int
7424main ()
7425{
7426static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7427test_array [0] = 0
7428
7429 ;
7430 return 0;
7431}
7432_ACEOF
7433rm -f conftest.$ac_objext
7434if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7435 (eval $ac_compile) 2>&5
7436 ac_status=$?
7437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7438 (exit $ac_status); } &&
7439 { ac_try='test -s conftest.$ac_objext'
7440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7441 (eval $ac_try) 2>&5
7442 ac_status=$?
7443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7444 (exit $ac_status); }; }; then
7445 ac_hi=$ac_mid; break
7446else
7447 echo "$as_me: failed program was:" >&5
7448cat conftest.$ac_ext >&5
7449ac_lo=`expr $ac_mid + 1`
7450 if test $ac_lo -le $ac_mid; then
7451 ac_lo= ac_hi=
7452 break
7453 fi
7454 ac_mid=`expr 2 '*' $ac_mid + 1`
7455fi
7456rm -f conftest.$ac_objext conftest.$ac_ext
7457 done
7458else
7459 echo "$as_me: failed program was:" >&5
7460cat conftest.$ac_ext >&5
7461cat >conftest.$ac_ext <<_ACEOF
7462#line $LINENO "configure"
7463#include "confdefs.h"
7464$ac_includes_default
7465#ifdef F77_DUMMY_MAIN
7466# ifdef __cplusplus
7467 extern "C"
7468# endif
7469 int F77_DUMMY_MAIN() { return 1; }
7470#endif
7471int
7472main ()
7473{
7474static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7475test_array [0] = 0
7476
7477 ;
7478 return 0;
7479}
7480_ACEOF
7481rm -f conftest.$ac_objext
7482if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7483 (eval $ac_compile) 2>&5
7484 ac_status=$?
7485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7486 (exit $ac_status); } &&
7487 { ac_try='test -s conftest.$ac_objext'
7488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7489 (eval $ac_try) 2>&5
7490 ac_status=$?
7491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7492 (exit $ac_status); }; }; then
7493 ac_hi=-1 ac_mid=-1
7494 while :; do
7495 cat >conftest.$ac_ext <<_ACEOF
7496#line $LINENO "configure"
7497#include "confdefs.h"
7498$ac_includes_default
7499#ifdef F77_DUMMY_MAIN
7500# ifdef __cplusplus
7501 extern "C"
7502# endif
7503 int F77_DUMMY_MAIN() { return 1; }
7504#endif
7505int
7506main ()
7507{
7508static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7509test_array [0] = 0
7510
7511 ;
7512 return 0;
7513}
7514_ACEOF
7515rm -f conftest.$ac_objext
7516if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7517 (eval $ac_compile) 2>&5
7518 ac_status=$?
7519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7520 (exit $ac_status); } &&
7521 { ac_try='test -s conftest.$ac_objext'
7522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7523 (eval $ac_try) 2>&5
7524 ac_status=$?
7525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7526 (exit $ac_status); }; }; then
7527 ac_lo=$ac_mid; break
7528else
7529 echo "$as_me: failed program was:" >&5
7530cat conftest.$ac_ext >&5
7531ac_hi=`expr '(' $ac_mid ')' - 1`
7532 if test $ac_mid -le $ac_hi; then
7533 ac_lo= ac_hi=
7534 break
7535 fi
7536 ac_mid=`expr 2 '*' $ac_mid`
7537fi
7538rm -f conftest.$ac_objext conftest.$ac_ext
7539 done
7540else
7541 echo "$as_me: failed program was:" >&5
7542cat conftest.$ac_ext >&5
7543ac_lo= ac_hi=
7544fi
7545rm -f conftest.$ac_objext conftest.$ac_ext
7546fi
7547rm -f conftest.$ac_objext conftest.$ac_ext
7548# Binary search between lo and hi bounds.
7549while test "x$ac_lo" != "x$ac_hi"; do
7550 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7551 cat >conftest.$ac_ext <<_ACEOF
7552#line $LINENO "configure"
7553#include "confdefs.h"
7554$ac_includes_default
7555#ifdef F77_DUMMY_MAIN
7556# ifdef __cplusplus
7557 extern "C"
7558# endif
7559 int F77_DUMMY_MAIN() { return 1; }
7560#endif
7561int
7562main ()
7563{
7564static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7565test_array [0] = 0
7566
7567 ;
7568 return 0;
7569}
7570_ACEOF
7571rm -f conftest.$ac_objext
7572if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7573 (eval $ac_compile) 2>&5
7574 ac_status=$?
7575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7576 (exit $ac_status); } &&
7577 { ac_try='test -s conftest.$ac_objext'
7578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7579 (eval $ac_try) 2>&5
7580 ac_status=$?
7581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7582 (exit $ac_status); }; }; then
7583 ac_hi=$ac_mid
7584else
7585 echo "$as_me: failed program was:" >&5
7586cat conftest.$ac_ext >&5
7587ac_lo=`expr '(' $ac_mid ')' + 1`
7588fi
7589rm -f conftest.$ac_objext conftest.$ac_ext
7590done
7591case $ac_lo in
7592?*) ac_cv_sizeof_double=$ac_lo;;
7593'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7594echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7595 { (exit 1); exit 1; }; } ;;
7596esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007597else
7598 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007599 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7600echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7601 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007602else
Martin v. Löwis11437992002-04-12 09:54:03 +00007603 cat >conftest.$ac_ext <<_ACEOF
7604#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007605#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007606$ac_includes_default
7607long longval () { return (long) (sizeof (double)); }
7608unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007609#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007610#include <stdlib.h>
7611#ifdef F77_DUMMY_MAIN
7612# ifdef __cplusplus
7613 extern "C"
7614# endif
7615 int F77_DUMMY_MAIN() { return 1; }
7616#endif
7617int
7618main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007619{
Martin v. Löwis11437992002-04-12 09:54:03 +00007620
7621 FILE *f = fopen ("conftest.val", "w");
7622 if (! f)
7623 exit (1);
7624 if (((long) (sizeof (double))) < 0)
7625 {
7626 long i = longval ();
7627 if (i != ((long) (sizeof (double))))
7628 exit (1);
7629 fprintf (f, "%ld\n", i);
7630 }
7631 else
7632 {
7633 unsigned long i = ulongval ();
7634 if (i != ((long) (sizeof (double))))
7635 exit (1);
7636 fprintf (f, "%lu\n", i);
7637 }
7638 exit (ferror (f) || fclose (f) != 0);
7639
7640 ;
7641 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007642}
Martin v. Löwis11437992002-04-12 09:54:03 +00007643_ACEOF
7644rm -f conftest$ac_exeext
7645if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7646 (eval $ac_link) 2>&5
7647 ac_status=$?
7648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7649 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7651 (eval $ac_try) 2>&5
7652 ac_status=$?
7653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7654 (exit $ac_status); }; }; then
7655 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007656else
Martin v. Löwis11437992002-04-12 09:54:03 +00007657 echo "$as_me: program exited with status $ac_status" >&5
7658echo "$as_me: failed program was:" >&5
7659cat conftest.$ac_ext >&5
7660( exit $ac_status )
7661{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7662echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7663 { (exit 1); exit 1; }; }
7664fi
7665rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7666fi
7667fi
7668rm -f conftest.val
7669else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007670 ac_cv_sizeof_double=0
7671fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007672fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007673echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7674echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7675cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007676#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007677_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007678
7679
Martin v. Löwis11437992002-04-12 09:54:03 +00007680echo "$as_me:$LINENO: checking for fpos_t" >&5
7681echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7682if test "${ac_cv_type_fpos_t+set}" = set; then
7683 echo $ECHO_N "(cached) $ECHO_C" >&6
7684else
7685 cat >conftest.$ac_ext <<_ACEOF
7686#line $LINENO "configure"
7687#include "confdefs.h"
7688$ac_includes_default
7689#ifdef F77_DUMMY_MAIN
7690# ifdef __cplusplus
7691 extern "C"
7692# endif
7693 int F77_DUMMY_MAIN() { return 1; }
7694#endif
7695int
7696main ()
7697{
7698if ((fpos_t *) 0)
7699 return 0;
7700if (sizeof (fpos_t))
7701 return 0;
7702 ;
7703 return 0;
7704}
7705_ACEOF
7706rm -f conftest.$ac_objext
7707if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7708 (eval $ac_compile) 2>&5
7709 ac_status=$?
7710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7711 (exit $ac_status); } &&
7712 { ac_try='test -s conftest.$ac_objext'
7713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7714 (eval $ac_try) 2>&5
7715 ac_status=$?
7716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7717 (exit $ac_status); }; }; then
7718 ac_cv_type_fpos_t=yes
7719else
7720 echo "$as_me: failed program was:" >&5
7721cat conftest.$ac_ext >&5
7722ac_cv_type_fpos_t=no
7723fi
7724rm -f conftest.$ac_objext conftest.$ac_ext
7725fi
7726echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7727echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7728
7729echo "$as_me:$LINENO: checking size of fpos_t" >&5
7730echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7731if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7732 echo $ECHO_N "(cached) $ECHO_C" >&6
7733else
7734 if test "$ac_cv_type_fpos_t" = yes; then
7735 # The cast to unsigned long works around a bug in the HP C Compiler
7736 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7737 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7738 # This bug is HP SR number 8606223364.
7739 if test "$cross_compiling" = yes; then
7740 # Depending upon the size, compute the lo and hi bounds.
7741cat >conftest.$ac_ext <<_ACEOF
7742#line $LINENO "configure"
7743#include "confdefs.h"
7744$ac_includes_default
7745#ifdef F77_DUMMY_MAIN
7746# ifdef __cplusplus
7747 extern "C"
7748# endif
7749 int F77_DUMMY_MAIN() { return 1; }
7750#endif
7751int
7752main ()
7753{
7754static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7755test_array [0] = 0
7756
7757 ;
7758 return 0;
7759}
7760_ACEOF
7761rm -f conftest.$ac_objext
7762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7763 (eval $ac_compile) 2>&5
7764 ac_status=$?
7765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7766 (exit $ac_status); } &&
7767 { ac_try='test -s conftest.$ac_objext'
7768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7769 (eval $ac_try) 2>&5
7770 ac_status=$?
7771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7772 (exit $ac_status); }; }; then
7773 ac_lo=0 ac_mid=0
7774 while :; do
7775 cat >conftest.$ac_ext <<_ACEOF
7776#line $LINENO "configure"
7777#include "confdefs.h"
7778$ac_includes_default
7779#ifdef F77_DUMMY_MAIN
7780# ifdef __cplusplus
7781 extern "C"
7782# endif
7783 int F77_DUMMY_MAIN() { return 1; }
7784#endif
7785int
7786main ()
7787{
7788static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7789test_array [0] = 0
7790
7791 ;
7792 return 0;
7793}
7794_ACEOF
7795rm -f conftest.$ac_objext
7796if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7797 (eval $ac_compile) 2>&5
7798 ac_status=$?
7799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7800 (exit $ac_status); } &&
7801 { ac_try='test -s conftest.$ac_objext'
7802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7803 (eval $ac_try) 2>&5
7804 ac_status=$?
7805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7806 (exit $ac_status); }; }; then
7807 ac_hi=$ac_mid; break
7808else
7809 echo "$as_me: failed program was:" >&5
7810cat conftest.$ac_ext >&5
7811ac_lo=`expr $ac_mid + 1`
7812 if test $ac_lo -le $ac_mid; then
7813 ac_lo= ac_hi=
7814 break
7815 fi
7816 ac_mid=`expr 2 '*' $ac_mid + 1`
7817fi
7818rm -f conftest.$ac_objext conftest.$ac_ext
7819 done
7820else
7821 echo "$as_me: failed program was:" >&5
7822cat conftest.$ac_ext >&5
7823cat >conftest.$ac_ext <<_ACEOF
7824#line $LINENO "configure"
7825#include "confdefs.h"
7826$ac_includes_default
7827#ifdef F77_DUMMY_MAIN
7828# ifdef __cplusplus
7829 extern "C"
7830# endif
7831 int F77_DUMMY_MAIN() { return 1; }
7832#endif
7833int
7834main ()
7835{
7836static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7837test_array [0] = 0
7838
7839 ;
7840 return 0;
7841}
7842_ACEOF
7843rm -f conftest.$ac_objext
7844if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7845 (eval $ac_compile) 2>&5
7846 ac_status=$?
7847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7848 (exit $ac_status); } &&
7849 { ac_try='test -s conftest.$ac_objext'
7850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7851 (eval $ac_try) 2>&5
7852 ac_status=$?
7853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7854 (exit $ac_status); }; }; then
7855 ac_hi=-1 ac_mid=-1
7856 while :; do
7857 cat >conftest.$ac_ext <<_ACEOF
7858#line $LINENO "configure"
7859#include "confdefs.h"
7860$ac_includes_default
7861#ifdef F77_DUMMY_MAIN
7862# ifdef __cplusplus
7863 extern "C"
7864# endif
7865 int F77_DUMMY_MAIN() { return 1; }
7866#endif
7867int
7868main ()
7869{
7870static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7871test_array [0] = 0
7872
7873 ;
7874 return 0;
7875}
7876_ACEOF
7877rm -f conftest.$ac_objext
7878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7879 (eval $ac_compile) 2>&5
7880 ac_status=$?
7881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7882 (exit $ac_status); } &&
7883 { ac_try='test -s conftest.$ac_objext'
7884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7885 (eval $ac_try) 2>&5
7886 ac_status=$?
7887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7888 (exit $ac_status); }; }; then
7889 ac_lo=$ac_mid; break
7890else
7891 echo "$as_me: failed program was:" >&5
7892cat conftest.$ac_ext >&5
7893ac_hi=`expr '(' $ac_mid ')' - 1`
7894 if test $ac_mid -le $ac_hi; then
7895 ac_lo= ac_hi=
7896 break
7897 fi
7898 ac_mid=`expr 2 '*' $ac_mid`
7899fi
7900rm -f conftest.$ac_objext conftest.$ac_ext
7901 done
7902else
7903 echo "$as_me: failed program was:" >&5
7904cat conftest.$ac_ext >&5
7905ac_lo= ac_hi=
7906fi
7907rm -f conftest.$ac_objext conftest.$ac_ext
7908fi
7909rm -f conftest.$ac_objext conftest.$ac_ext
7910# Binary search between lo and hi bounds.
7911while test "x$ac_lo" != "x$ac_hi"; do
7912 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7913 cat >conftest.$ac_ext <<_ACEOF
7914#line $LINENO "configure"
7915#include "confdefs.h"
7916$ac_includes_default
7917#ifdef F77_DUMMY_MAIN
7918# ifdef __cplusplus
7919 extern "C"
7920# endif
7921 int F77_DUMMY_MAIN() { return 1; }
7922#endif
7923int
7924main ()
7925{
7926static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7927test_array [0] = 0
7928
7929 ;
7930 return 0;
7931}
7932_ACEOF
7933rm -f conftest.$ac_objext
7934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7935 (eval $ac_compile) 2>&5
7936 ac_status=$?
7937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7938 (exit $ac_status); } &&
7939 { ac_try='test -s conftest.$ac_objext'
7940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7941 (eval $ac_try) 2>&5
7942 ac_status=$?
7943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7944 (exit $ac_status); }; }; then
7945 ac_hi=$ac_mid
7946else
7947 echo "$as_me: failed program was:" >&5
7948cat conftest.$ac_ext >&5
7949ac_lo=`expr '(' $ac_mid ')' + 1`
7950fi
7951rm -f conftest.$ac_objext conftest.$ac_ext
7952done
7953case $ac_lo in
7954?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7955'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7956echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7957 { (exit 1); exit 1; }; } ;;
7958esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007959else
7960 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007961 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7962echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7963 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007964else
Martin v. Löwis11437992002-04-12 09:54:03 +00007965 cat >conftest.$ac_ext <<_ACEOF
7966#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007967#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007968$ac_includes_default
7969long longval () { return (long) (sizeof (fpos_t)); }
7970unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007971#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007972#include <stdlib.h>
7973#ifdef F77_DUMMY_MAIN
7974# ifdef __cplusplus
7975 extern "C"
7976# endif
7977 int F77_DUMMY_MAIN() { return 1; }
7978#endif
7979int
7980main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007981{
Martin v. Löwis11437992002-04-12 09:54:03 +00007982
7983 FILE *f = fopen ("conftest.val", "w");
7984 if (! f)
7985 exit (1);
7986 if (((long) (sizeof (fpos_t))) < 0)
7987 {
7988 long i = longval ();
7989 if (i != ((long) (sizeof (fpos_t))))
7990 exit (1);
7991 fprintf (f, "%ld\n", i);
7992 }
7993 else
7994 {
7995 unsigned long i = ulongval ();
7996 if (i != ((long) (sizeof (fpos_t))))
7997 exit (1);
7998 fprintf (f, "%lu\n", i);
7999 }
8000 exit (ferror (f) || fclose (f) != 0);
8001
8002 ;
8003 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008004}
Martin v. Löwis11437992002-04-12 09:54:03 +00008005_ACEOF
8006rm -f conftest$ac_exeext
8007if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8008 (eval $ac_link) 2>&5
8009 ac_status=$?
8010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8011 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8013 (eval $ac_try) 2>&5
8014 ac_status=$?
8015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8016 (exit $ac_status); }; }; then
8017 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008018else
Martin v. Löwis11437992002-04-12 09:54:03 +00008019 echo "$as_me: program exited with status $ac_status" >&5
8020echo "$as_me: failed program was:" >&5
8021cat conftest.$ac_ext >&5
8022( exit $ac_status )
8023{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8024echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8025 { (exit 1); exit 1; }; }
8026fi
8027rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8028fi
8029fi
8030rm -f conftest.val
8031else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008032 ac_cv_sizeof_fpos_t=0
8033fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008034fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008035echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8036echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8037cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008038#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008039_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008040
Michael W. Hudson54241132001-12-07 15:38:26 +00008041
8042
Martin v. Löwis11437992002-04-12 09:54:03 +00008043echo "$as_me:$LINENO: checking for long long support" >&5
8044echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008045have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008046cat >conftest.$ac_ext <<_ACEOF
8047#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008048#include "confdefs.h"
8049
Martin v. Löwis11437992002-04-12 09:54:03 +00008050#ifdef F77_DUMMY_MAIN
8051# ifdef __cplusplus
8052 extern "C"
8053# endif
8054 int F77_DUMMY_MAIN() { return 1; }
8055#endif
8056int
8057main ()
8058{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008059long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008060 ;
8061 return 0;
8062}
8063_ACEOF
8064rm -f conftest.$ac_objext
8065if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8066 (eval $ac_compile) 2>&5
8067 ac_status=$?
8068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8069 (exit $ac_status); } &&
8070 { ac_try='test -s conftest.$ac_objext'
8071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8072 (eval $ac_try) 2>&5
8073 ac_status=$?
8074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8075 (exit $ac_status); }; }; then
8076
8077
8078cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008079#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008080_ACEOF
8081
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008082 have_long_long=yes
8083
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008084else
Martin v. Löwis11437992002-04-12 09:54:03 +00008085 echo "$as_me: failed program was:" >&5
8086cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008087fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008088rm -f conftest.$ac_objext conftest.$ac_ext
8089echo "$as_me:$LINENO: result: $have_long_long" >&5
8090echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008091if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008092echo "$as_me:$LINENO: checking for long long" >&5
8093echo $ECHO_N "checking for long long... $ECHO_C" >&6
8094if test "${ac_cv_type_long_long+set}" = set; then
8095 echo $ECHO_N "(cached) $ECHO_C" >&6
8096else
8097 cat >conftest.$ac_ext <<_ACEOF
8098#line $LINENO "configure"
8099#include "confdefs.h"
8100$ac_includes_default
8101#ifdef F77_DUMMY_MAIN
8102# ifdef __cplusplus
8103 extern "C"
8104# endif
8105 int F77_DUMMY_MAIN() { return 1; }
8106#endif
8107int
8108main ()
8109{
8110if ((long long *) 0)
8111 return 0;
8112if (sizeof (long long))
8113 return 0;
8114 ;
8115 return 0;
8116}
8117_ACEOF
8118rm -f conftest.$ac_objext
8119if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8120 (eval $ac_compile) 2>&5
8121 ac_status=$?
8122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8123 (exit $ac_status); } &&
8124 { ac_try='test -s conftest.$ac_objext'
8125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8126 (eval $ac_try) 2>&5
8127 ac_status=$?
8128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8129 (exit $ac_status); }; }; then
8130 ac_cv_type_long_long=yes
8131else
8132 echo "$as_me: failed program was:" >&5
8133cat conftest.$ac_ext >&5
8134ac_cv_type_long_long=no
8135fi
8136rm -f conftest.$ac_objext conftest.$ac_ext
8137fi
8138echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8139echo "${ECHO_T}$ac_cv_type_long_long" >&6
8140
8141echo "$as_me:$LINENO: checking size of long long" >&5
8142echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8143if test "${ac_cv_sizeof_long_long+set}" = set; then
8144 echo $ECHO_N "(cached) $ECHO_C" >&6
8145else
8146 if test "$ac_cv_type_long_long" = yes; then
8147 # The cast to unsigned long works around a bug in the HP C Compiler
8148 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8149 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8150 # This bug is HP SR number 8606223364.
8151 if test "$cross_compiling" = yes; then
8152 # Depending upon the size, compute the lo and hi bounds.
8153cat >conftest.$ac_ext <<_ACEOF
8154#line $LINENO "configure"
8155#include "confdefs.h"
8156$ac_includes_default
8157#ifdef F77_DUMMY_MAIN
8158# ifdef __cplusplus
8159 extern "C"
8160# endif
8161 int F77_DUMMY_MAIN() { return 1; }
8162#endif
8163int
8164main ()
8165{
8166static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8167test_array [0] = 0
8168
8169 ;
8170 return 0;
8171}
8172_ACEOF
8173rm -f conftest.$ac_objext
8174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8175 (eval $ac_compile) 2>&5
8176 ac_status=$?
8177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8178 (exit $ac_status); } &&
8179 { ac_try='test -s conftest.$ac_objext'
8180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8181 (eval $ac_try) 2>&5
8182 ac_status=$?
8183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8184 (exit $ac_status); }; }; then
8185 ac_lo=0 ac_mid=0
8186 while :; do
8187 cat >conftest.$ac_ext <<_ACEOF
8188#line $LINENO "configure"
8189#include "confdefs.h"
8190$ac_includes_default
8191#ifdef F77_DUMMY_MAIN
8192# ifdef __cplusplus
8193 extern "C"
8194# endif
8195 int F77_DUMMY_MAIN() { return 1; }
8196#endif
8197int
8198main ()
8199{
8200static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8201test_array [0] = 0
8202
8203 ;
8204 return 0;
8205}
8206_ACEOF
8207rm -f conftest.$ac_objext
8208if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8209 (eval $ac_compile) 2>&5
8210 ac_status=$?
8211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8212 (exit $ac_status); } &&
8213 { ac_try='test -s conftest.$ac_objext'
8214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8215 (eval $ac_try) 2>&5
8216 ac_status=$?
8217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8218 (exit $ac_status); }; }; then
8219 ac_hi=$ac_mid; break
8220else
8221 echo "$as_me: failed program was:" >&5
8222cat conftest.$ac_ext >&5
8223ac_lo=`expr $ac_mid + 1`
8224 if test $ac_lo -le $ac_mid; then
8225 ac_lo= ac_hi=
8226 break
8227 fi
8228 ac_mid=`expr 2 '*' $ac_mid + 1`
8229fi
8230rm -f conftest.$ac_objext conftest.$ac_ext
8231 done
8232else
8233 echo "$as_me: failed program was:" >&5
8234cat conftest.$ac_ext >&5
8235cat >conftest.$ac_ext <<_ACEOF
8236#line $LINENO "configure"
8237#include "confdefs.h"
8238$ac_includes_default
8239#ifdef F77_DUMMY_MAIN
8240# ifdef __cplusplus
8241 extern "C"
8242# endif
8243 int F77_DUMMY_MAIN() { return 1; }
8244#endif
8245int
8246main ()
8247{
8248static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8249test_array [0] = 0
8250
8251 ;
8252 return 0;
8253}
8254_ACEOF
8255rm -f conftest.$ac_objext
8256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8257 (eval $ac_compile) 2>&5
8258 ac_status=$?
8259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8260 (exit $ac_status); } &&
8261 { ac_try='test -s conftest.$ac_objext'
8262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8263 (eval $ac_try) 2>&5
8264 ac_status=$?
8265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8266 (exit $ac_status); }; }; then
8267 ac_hi=-1 ac_mid=-1
8268 while :; do
8269 cat >conftest.$ac_ext <<_ACEOF
8270#line $LINENO "configure"
8271#include "confdefs.h"
8272$ac_includes_default
8273#ifdef F77_DUMMY_MAIN
8274# ifdef __cplusplus
8275 extern "C"
8276# endif
8277 int F77_DUMMY_MAIN() { return 1; }
8278#endif
8279int
8280main ()
8281{
8282static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8283test_array [0] = 0
8284
8285 ;
8286 return 0;
8287}
8288_ACEOF
8289rm -f conftest.$ac_objext
8290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8291 (eval $ac_compile) 2>&5
8292 ac_status=$?
8293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8294 (exit $ac_status); } &&
8295 { ac_try='test -s conftest.$ac_objext'
8296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8297 (eval $ac_try) 2>&5
8298 ac_status=$?
8299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8300 (exit $ac_status); }; }; then
8301 ac_lo=$ac_mid; break
8302else
8303 echo "$as_me: failed program was:" >&5
8304cat conftest.$ac_ext >&5
8305ac_hi=`expr '(' $ac_mid ')' - 1`
8306 if test $ac_mid -le $ac_hi; then
8307 ac_lo= ac_hi=
8308 break
8309 fi
8310 ac_mid=`expr 2 '*' $ac_mid`
8311fi
8312rm -f conftest.$ac_objext conftest.$ac_ext
8313 done
8314else
8315 echo "$as_me: failed program was:" >&5
8316cat conftest.$ac_ext >&5
8317ac_lo= ac_hi=
8318fi
8319rm -f conftest.$ac_objext conftest.$ac_ext
8320fi
8321rm -f conftest.$ac_objext conftest.$ac_ext
8322# Binary search between lo and hi bounds.
8323while test "x$ac_lo" != "x$ac_hi"; do
8324 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8325 cat >conftest.$ac_ext <<_ACEOF
8326#line $LINENO "configure"
8327#include "confdefs.h"
8328$ac_includes_default
8329#ifdef F77_DUMMY_MAIN
8330# ifdef __cplusplus
8331 extern "C"
8332# endif
8333 int F77_DUMMY_MAIN() { return 1; }
8334#endif
8335int
8336main ()
8337{
8338static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8339test_array [0] = 0
8340
8341 ;
8342 return 0;
8343}
8344_ACEOF
8345rm -f conftest.$ac_objext
8346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8347 (eval $ac_compile) 2>&5
8348 ac_status=$?
8349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8350 (exit $ac_status); } &&
8351 { ac_try='test -s conftest.$ac_objext'
8352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8353 (eval $ac_try) 2>&5
8354 ac_status=$?
8355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8356 (exit $ac_status); }; }; then
8357 ac_hi=$ac_mid
8358else
8359 echo "$as_me: failed program was:" >&5
8360cat conftest.$ac_ext >&5
8361ac_lo=`expr '(' $ac_mid ')' + 1`
8362fi
8363rm -f conftest.$ac_objext conftest.$ac_ext
8364done
8365case $ac_lo in
8366?*) ac_cv_sizeof_long_long=$ac_lo;;
8367'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8368echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8369 { (exit 1); exit 1; }; } ;;
8370esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008371else
8372 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008373 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8374echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8375 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008376else
Martin v. Löwis11437992002-04-12 09:54:03 +00008377 cat >conftest.$ac_ext <<_ACEOF
8378#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008379#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008380$ac_includes_default
8381long longval () { return (long) (sizeof (long long)); }
8382unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008383#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008384#include <stdlib.h>
8385#ifdef F77_DUMMY_MAIN
8386# ifdef __cplusplus
8387 extern "C"
8388# endif
8389 int F77_DUMMY_MAIN() { return 1; }
8390#endif
8391int
8392main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008393{
Martin v. Löwis11437992002-04-12 09:54:03 +00008394
8395 FILE *f = fopen ("conftest.val", "w");
8396 if (! f)
8397 exit (1);
8398 if (((long) (sizeof (long long))) < 0)
8399 {
8400 long i = longval ();
8401 if (i != ((long) (sizeof (long long))))
8402 exit (1);
8403 fprintf (f, "%ld\n", i);
8404 }
8405 else
8406 {
8407 unsigned long i = ulongval ();
8408 if (i != ((long) (sizeof (long long))))
8409 exit (1);
8410 fprintf (f, "%lu\n", i);
8411 }
8412 exit (ferror (f) || fclose (f) != 0);
8413
8414 ;
8415 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008416}
Martin v. Löwis11437992002-04-12 09:54:03 +00008417_ACEOF
8418rm -f conftest$ac_exeext
8419if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8420 (eval $ac_link) 2>&5
8421 ac_status=$?
8422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8423 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8425 (eval $ac_try) 2>&5
8426 ac_status=$?
8427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8428 (exit $ac_status); }; }; then
8429 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008430else
Martin v. Löwis11437992002-04-12 09:54:03 +00008431 echo "$as_me: program exited with status $ac_status" >&5
8432echo "$as_me: failed program was:" >&5
8433cat conftest.$ac_ext >&5
8434( exit $ac_status )
8435{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8436echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8437 { (exit 1); exit 1; }; }
8438fi
8439rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8440fi
8441fi
8442rm -f conftest.val
8443else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008444 ac_cv_sizeof_long_long=0
8445fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008446fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008447echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8448echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8449cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008450#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008451_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008452
Michael W. Hudson54241132001-12-07 15:38:26 +00008453
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008454fi
8455
Martin v. Löwis11437992002-04-12 09:54:03 +00008456echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8457echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008458have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008459cat >conftest.$ac_ext <<_ACEOF
8460#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008461#include "confdefs.h"
8462
Martin v. Löwis11437992002-04-12 09:54:03 +00008463#ifdef F77_DUMMY_MAIN
8464# ifdef __cplusplus
8465 extern "C"
8466# endif
8467 int F77_DUMMY_MAIN() { return 1; }
8468#endif
8469int
8470main ()
8471{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008472uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008473 ;
8474 return 0;
8475}
8476_ACEOF
8477rm -f conftest.$ac_objext
8478if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8479 (eval $ac_compile) 2>&5
8480 ac_status=$?
8481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8482 (exit $ac_status); } &&
8483 { ac_try='test -s conftest.$ac_objext'
8484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8485 (eval $ac_try) 2>&5
8486 ac_status=$?
8487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8488 (exit $ac_status); }; }; then
8489
8490
8491cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008492#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008493_ACEOF
8494
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008495 have_uintptr_t=yes
8496
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008497else
Martin v. Löwis11437992002-04-12 09:54:03 +00008498 echo "$as_me: failed program was:" >&5
8499cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008500fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008501rm -f conftest.$ac_objext conftest.$ac_ext
8502echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8503echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008504if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008505echo "$as_me:$LINENO: checking for uintptr_t" >&5
8506echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8507if test "${ac_cv_type_uintptr_t+set}" = set; then
8508 echo $ECHO_N "(cached) $ECHO_C" >&6
8509else
8510 cat >conftest.$ac_ext <<_ACEOF
8511#line $LINENO "configure"
8512#include "confdefs.h"
8513$ac_includes_default
8514#ifdef F77_DUMMY_MAIN
8515# ifdef __cplusplus
8516 extern "C"
8517# endif
8518 int F77_DUMMY_MAIN() { return 1; }
8519#endif
8520int
8521main ()
8522{
8523if ((uintptr_t *) 0)
8524 return 0;
8525if (sizeof (uintptr_t))
8526 return 0;
8527 ;
8528 return 0;
8529}
8530_ACEOF
8531rm -f conftest.$ac_objext
8532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8533 (eval $ac_compile) 2>&5
8534 ac_status=$?
8535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8536 (exit $ac_status); } &&
8537 { ac_try='test -s conftest.$ac_objext'
8538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8539 (eval $ac_try) 2>&5
8540 ac_status=$?
8541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8542 (exit $ac_status); }; }; then
8543 ac_cv_type_uintptr_t=yes
8544else
8545 echo "$as_me: failed program was:" >&5
8546cat conftest.$ac_ext >&5
8547ac_cv_type_uintptr_t=no
8548fi
8549rm -f conftest.$ac_objext conftest.$ac_ext
8550fi
8551echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8552echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8553
8554echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8555echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8556if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8557 echo $ECHO_N "(cached) $ECHO_C" >&6
8558else
8559 if test "$ac_cv_type_uintptr_t" = yes; then
8560 # The cast to unsigned long works around a bug in the HP C Compiler
8561 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8562 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8563 # This bug is HP SR number 8606223364.
8564 if test "$cross_compiling" = yes; then
8565 # Depending upon the size, compute the lo and hi bounds.
8566cat >conftest.$ac_ext <<_ACEOF
8567#line $LINENO "configure"
8568#include "confdefs.h"
8569$ac_includes_default
8570#ifdef F77_DUMMY_MAIN
8571# ifdef __cplusplus
8572 extern "C"
8573# endif
8574 int F77_DUMMY_MAIN() { return 1; }
8575#endif
8576int
8577main ()
8578{
8579static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8580test_array [0] = 0
8581
8582 ;
8583 return 0;
8584}
8585_ACEOF
8586rm -f conftest.$ac_objext
8587if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8588 (eval $ac_compile) 2>&5
8589 ac_status=$?
8590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8591 (exit $ac_status); } &&
8592 { ac_try='test -s conftest.$ac_objext'
8593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8594 (eval $ac_try) 2>&5
8595 ac_status=$?
8596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8597 (exit $ac_status); }; }; then
8598 ac_lo=0 ac_mid=0
8599 while :; do
8600 cat >conftest.$ac_ext <<_ACEOF
8601#line $LINENO "configure"
8602#include "confdefs.h"
8603$ac_includes_default
8604#ifdef F77_DUMMY_MAIN
8605# ifdef __cplusplus
8606 extern "C"
8607# endif
8608 int F77_DUMMY_MAIN() { return 1; }
8609#endif
8610int
8611main ()
8612{
8613static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8614test_array [0] = 0
8615
8616 ;
8617 return 0;
8618}
8619_ACEOF
8620rm -f conftest.$ac_objext
8621if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8622 (eval $ac_compile) 2>&5
8623 ac_status=$?
8624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8625 (exit $ac_status); } &&
8626 { ac_try='test -s conftest.$ac_objext'
8627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8628 (eval $ac_try) 2>&5
8629 ac_status=$?
8630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8631 (exit $ac_status); }; }; then
8632 ac_hi=$ac_mid; break
8633else
8634 echo "$as_me: failed program was:" >&5
8635cat conftest.$ac_ext >&5
8636ac_lo=`expr $ac_mid + 1`
8637 if test $ac_lo -le $ac_mid; then
8638 ac_lo= ac_hi=
8639 break
8640 fi
8641 ac_mid=`expr 2 '*' $ac_mid + 1`
8642fi
8643rm -f conftest.$ac_objext conftest.$ac_ext
8644 done
8645else
8646 echo "$as_me: failed program was:" >&5
8647cat conftest.$ac_ext >&5
8648cat >conftest.$ac_ext <<_ACEOF
8649#line $LINENO "configure"
8650#include "confdefs.h"
8651$ac_includes_default
8652#ifdef F77_DUMMY_MAIN
8653# ifdef __cplusplus
8654 extern "C"
8655# endif
8656 int F77_DUMMY_MAIN() { return 1; }
8657#endif
8658int
8659main ()
8660{
8661static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8662test_array [0] = 0
8663
8664 ;
8665 return 0;
8666}
8667_ACEOF
8668rm -f conftest.$ac_objext
8669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8670 (eval $ac_compile) 2>&5
8671 ac_status=$?
8672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8673 (exit $ac_status); } &&
8674 { ac_try='test -s conftest.$ac_objext'
8675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8676 (eval $ac_try) 2>&5
8677 ac_status=$?
8678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8679 (exit $ac_status); }; }; then
8680 ac_hi=-1 ac_mid=-1
8681 while :; do
8682 cat >conftest.$ac_ext <<_ACEOF
8683#line $LINENO "configure"
8684#include "confdefs.h"
8685$ac_includes_default
8686#ifdef F77_DUMMY_MAIN
8687# ifdef __cplusplus
8688 extern "C"
8689# endif
8690 int F77_DUMMY_MAIN() { return 1; }
8691#endif
8692int
8693main ()
8694{
8695static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8696test_array [0] = 0
8697
8698 ;
8699 return 0;
8700}
8701_ACEOF
8702rm -f conftest.$ac_objext
8703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8704 (eval $ac_compile) 2>&5
8705 ac_status=$?
8706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8707 (exit $ac_status); } &&
8708 { ac_try='test -s conftest.$ac_objext'
8709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8710 (eval $ac_try) 2>&5
8711 ac_status=$?
8712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8713 (exit $ac_status); }; }; then
8714 ac_lo=$ac_mid; break
8715else
8716 echo "$as_me: failed program was:" >&5
8717cat conftest.$ac_ext >&5
8718ac_hi=`expr '(' $ac_mid ')' - 1`
8719 if test $ac_mid -le $ac_hi; then
8720 ac_lo= ac_hi=
8721 break
8722 fi
8723 ac_mid=`expr 2 '*' $ac_mid`
8724fi
8725rm -f conftest.$ac_objext conftest.$ac_ext
8726 done
8727else
8728 echo "$as_me: failed program was:" >&5
8729cat conftest.$ac_ext >&5
8730ac_lo= ac_hi=
8731fi
8732rm -f conftest.$ac_objext conftest.$ac_ext
8733fi
8734rm -f conftest.$ac_objext conftest.$ac_ext
8735# Binary search between lo and hi bounds.
8736while test "x$ac_lo" != "x$ac_hi"; do
8737 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8738 cat >conftest.$ac_ext <<_ACEOF
8739#line $LINENO "configure"
8740#include "confdefs.h"
8741$ac_includes_default
8742#ifdef F77_DUMMY_MAIN
8743# ifdef __cplusplus
8744 extern "C"
8745# endif
8746 int F77_DUMMY_MAIN() { return 1; }
8747#endif
8748int
8749main ()
8750{
8751static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8752test_array [0] = 0
8753
8754 ;
8755 return 0;
8756}
8757_ACEOF
8758rm -f conftest.$ac_objext
8759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8760 (eval $ac_compile) 2>&5
8761 ac_status=$?
8762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8763 (exit $ac_status); } &&
8764 { ac_try='test -s conftest.$ac_objext'
8765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8766 (eval $ac_try) 2>&5
8767 ac_status=$?
8768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8769 (exit $ac_status); }; }; then
8770 ac_hi=$ac_mid
8771else
8772 echo "$as_me: failed program was:" >&5
8773cat conftest.$ac_ext >&5
8774ac_lo=`expr '(' $ac_mid ')' + 1`
8775fi
8776rm -f conftest.$ac_objext conftest.$ac_ext
8777done
8778case $ac_lo in
8779?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8780'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8781echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8782 { (exit 1); exit 1; }; } ;;
8783esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008784else
8785 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008786 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8787echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8788 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008789else
Martin v. Löwis11437992002-04-12 09:54:03 +00008790 cat >conftest.$ac_ext <<_ACEOF
8791#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008792#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008793$ac_includes_default
8794long longval () { return (long) (sizeof (uintptr_t)); }
8795unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008796#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008797#include <stdlib.h>
8798#ifdef F77_DUMMY_MAIN
8799# ifdef __cplusplus
8800 extern "C"
8801# endif
8802 int F77_DUMMY_MAIN() { return 1; }
8803#endif
8804int
8805main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008806{
Martin v. Löwis11437992002-04-12 09:54:03 +00008807
8808 FILE *f = fopen ("conftest.val", "w");
8809 if (! f)
8810 exit (1);
8811 if (((long) (sizeof (uintptr_t))) < 0)
8812 {
8813 long i = longval ();
8814 if (i != ((long) (sizeof (uintptr_t))))
8815 exit (1);
8816 fprintf (f, "%ld\n", i);
8817 }
8818 else
8819 {
8820 unsigned long i = ulongval ();
8821 if (i != ((long) (sizeof (uintptr_t))))
8822 exit (1);
8823 fprintf (f, "%lu\n", i);
8824 }
8825 exit (ferror (f) || fclose (f) != 0);
8826
8827 ;
8828 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008829}
Martin v. Löwis11437992002-04-12 09:54:03 +00008830_ACEOF
8831rm -f conftest$ac_exeext
8832if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8833 (eval $ac_link) 2>&5
8834 ac_status=$?
8835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8836 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8838 (eval $ac_try) 2>&5
8839 ac_status=$?
8840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8841 (exit $ac_status); }; }; then
8842 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008843else
Martin v. Löwis11437992002-04-12 09:54:03 +00008844 echo "$as_me: program exited with status $ac_status" >&5
8845echo "$as_me: failed program was:" >&5
8846cat conftest.$ac_ext >&5
8847( exit $ac_status )
8848{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8849echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8850 { (exit 1); exit 1; }; }
8851fi
8852rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8853fi
8854fi
8855rm -f conftest.val
8856else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008857 ac_cv_sizeof_uintptr_t=0
8858fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008859fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008860echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8861echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8862cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008863#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008864_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008865
Michael W. Hudson54241132001-12-07 15:38:26 +00008866
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008867fi
8868
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008869# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008870echo "$as_me:$LINENO: checking size of off_t" >&5
8871echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8872if test "${ac_cv_sizeof_off_t+set}" = set; then
8873 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008874else
8875 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008876 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008877else
Martin v. Löwis11437992002-04-12 09:54:03 +00008878 cat >conftest.$ac_ext <<_ACEOF
8879#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008880#include "confdefs.h"
8881#include <stdio.h>
8882#include <sys/types.h>
8883main()
8884{
8885 FILE *f=fopen("conftestval", "w");
8886 if (!f) exit(1);
8887 fprintf(f, "%d\n", sizeof(off_t));
8888 exit(0);
8889}
Martin v. Löwis11437992002-04-12 09:54:03 +00008890_ACEOF
8891rm -f conftest$ac_exeext
8892if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8893 (eval $ac_link) 2>&5
8894 ac_status=$?
8895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8896 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8898 (eval $ac_try) 2>&5
8899 ac_status=$?
8900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8901 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008902 ac_cv_sizeof_off_t=`cat conftestval`
8903else
Martin v. Löwis11437992002-04-12 09:54:03 +00008904 echo "$as_me: program exited with status $ac_status" >&5
8905echo "$as_me: failed program was:" >&5
8906cat conftest.$ac_ext >&5
8907( exit $ac_status )
8908ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008909fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008910rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008911fi
8912
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008913fi
8914
Martin v. Löwis11437992002-04-12 09:54:03 +00008915echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8916echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8917
8918cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008919#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008920_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008921
Michael W. Hudson54241132001-12-07 15:38:26 +00008922
Martin v. Löwis11437992002-04-12 09:54:03 +00008923echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8924echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008925if test "$have_long_long" = yes -a \
8926 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8927 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008928
Martin v. Löwis11437992002-04-12 09:54:03 +00008929cat >>confdefs.h <<\_ACEOF
8930#define HAVE_LARGEFILE_SUPPORT 1
8931_ACEOF
8932
8933 echo "$as_me:$LINENO: result: yes" >&5
8934echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008935else
Martin v. Löwis11437992002-04-12 09:54:03 +00008936 echo "$as_me:$LINENO: result: no" >&5
8937echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008938fi
8939
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008940# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008941echo "$as_me:$LINENO: checking size of time_t" >&5
8942echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8943if test "${ac_cv_sizeof_time_t+set}" = set; then
8944 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008945else
8946 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008947 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008948else
Martin v. Löwis11437992002-04-12 09:54:03 +00008949 cat >conftest.$ac_ext <<_ACEOF
8950#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008951#include "confdefs.h"
8952#include <stdio.h>
8953#include <time.h>
8954main()
8955{
8956 FILE *f=fopen("conftestval", "w");
8957 if (!f) exit(1);
8958 fprintf(f, "%d\n", sizeof(time_t));
8959 exit(0);
8960}
Martin v. Löwis11437992002-04-12 09:54:03 +00008961_ACEOF
8962rm -f conftest$ac_exeext
8963if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8964 (eval $ac_link) 2>&5
8965 ac_status=$?
8966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8967 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8969 (eval $ac_try) 2>&5
8970 ac_status=$?
8971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8972 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008973 ac_cv_sizeof_time_t=`cat conftestval`
8974else
Martin v. Löwis11437992002-04-12 09:54:03 +00008975 echo "$as_me: program exited with status $ac_status" >&5
8976echo "$as_me: failed program was:" >&5
8977cat conftest.$ac_ext >&5
8978( exit $ac_status )
8979ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008980fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008981rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008982fi
8983
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008984fi
8985
Martin v. Löwis11437992002-04-12 09:54:03 +00008986echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8987echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8988
8989cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008990#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008991_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008992
Michael W. Hudson54241132001-12-07 15:38:26 +00008993
8994
Trent Mick635f6fb2000-08-23 21:33:05 +00008995# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008996ac_save_cc="$CC"
8997if test "$ac_cv_kpthread" = "yes"
8998then CC="$CC -Kpthread"
8999fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009000echo "$as_me:$LINENO: checking for pthread_t" >&5
9001echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009002have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009003cat >conftest.$ac_ext <<_ACEOF
9004#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009005#include "confdefs.h"
9006#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009007#ifdef F77_DUMMY_MAIN
9008# ifdef __cplusplus
9009 extern "C"
9010# endif
9011 int F77_DUMMY_MAIN() { return 1; }
9012#endif
9013int
9014main ()
9015{
Guido van Rossum12580492000-09-24 16:47:19 +00009016pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009017 ;
9018 return 0;
9019}
9020_ACEOF
9021rm -f conftest.$ac_objext
9022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9023 (eval $ac_compile) 2>&5
9024 ac_status=$?
9025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9026 (exit $ac_status); } &&
9027 { ac_try='test -s conftest.$ac_objext'
9028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9029 (eval $ac_try) 2>&5
9030 ac_status=$?
9031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9032 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009033 have_pthread_t=yes
9034else
Martin v. Löwis11437992002-04-12 09:54:03 +00009035 echo "$as_me: failed program was:" >&5
9036cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009037fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009038rm -f conftest.$ac_objext conftest.$ac_ext
9039echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9040echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009041if test "$have_pthread_t" = yes ; then
9042 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9044echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9045 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9046 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009047else
9048 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009049 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009050else
Martin v. Löwis11437992002-04-12 09:54:03 +00009051 cat >conftest.$ac_ext <<_ACEOF
9052#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009053#include "confdefs.h"
9054#include <stdio.h>
9055 #include <pthread.h>
9056 main()
9057 {
9058 FILE *f=fopen("conftestval", "w");
9059 if (!f) exit(1);
9060 fprintf(f, "%d\n", sizeof(pthread_t));
9061 exit(0);
9062 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009063_ACEOF
9064rm -f conftest$ac_exeext
9065if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9066 (eval $ac_link) 2>&5
9067 ac_status=$?
9068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9069 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9071 (eval $ac_try) 2>&5
9072 ac_status=$?
9073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9074 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009075 ac_cv_sizeof_pthread_t=`cat conftestval`
9076else
Martin v. Löwis11437992002-04-12 09:54:03 +00009077 echo "$as_me: program exited with status $ac_status" >&5
9078echo "$as_me: failed program was:" >&5
9079cat conftest.$ac_ext >&5
9080( exit $ac_status )
9081ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009082fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009083rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009084fi
9085
Trent Mick635f6fb2000-08-23 21:33:05 +00009086fi
9087
Martin v. Löwis11437992002-04-12 09:54:03 +00009088 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9089echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9090
9091cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009092#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009093_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009094
9095fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009096CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009097
Martin v. Löwis11437992002-04-12 09:54:03 +00009098echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9099echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009100# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9101if test "${enable_toolbox_glue+set}" = set; then
9102 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009103
Martin v. Löwis11437992002-04-12 09:54:03 +00009104fi;
Jack Jansene578a632001-08-15 01:27:14 +00009105
9106if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009107then
Jack Jansene578a632001-08-15 01:27:14 +00009108 case $ac_sys_system/$ac_sys_release in
9109 Darwin/*)
9110 enable_toolbox_glue="yes";;
9111 *)
9112 enable_toolbox_glue="no";;
9113 esac
9114fi
9115case "$enable_toolbox_glue" in
9116yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009117 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009118 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009119 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009120
9121cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009122#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009123_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009124
9125 ;;
9126*)
9127 extra_frameworks=""
9128 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009129 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009130 ;;
9131esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009132echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9133echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009134
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009135
9136case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009137 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009138 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009139 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009140 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9141 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009142 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009143 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009144 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009145 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9146 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009147esac
9148
Martin v. Löwis11437992002-04-12 09:54:03 +00009149echo "$as_me:$LINENO: checking for --enable-framework" >&5
9150echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009151if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009152then
Jack Jansenca06bc62001-08-03 15:32:23 +00009153 OPT="$OPT -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009154 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009155 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009156 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009157
Martin v. Löwis11437992002-04-12 09:54:03 +00009158cat >>confdefs.h <<\_ACEOF
9159#define WITH_NEXT_FRAMEWORK 1
9160_ACEOF
9161
9162 echo "$as_me:$LINENO: result: yes" >&5
9163echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009164else
Martin v. Löwis11437992002-04-12 09:54:03 +00009165 echo "$as_me:$LINENO: result: no" >&5
9166echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009167fi
9168
Martin v. Löwis11437992002-04-12 09:54:03 +00009169echo "$as_me:$LINENO: checking for dyld" >&5
9170echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009171case $ac_sys_system/$ac_sys_release in
9172 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009173
Martin v. Löwis11437992002-04-12 09:54:03 +00009174cat >>confdefs.h <<\_ACEOF
9175#define WITH_DYLD 1
9176_ACEOF
9177
9178 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9179echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009180 ;;
9181 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009182 echo "$as_me:$LINENO: result: no" >&5
9183echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009184 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009185esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009186
Guido van Rossum0a516c91994-09-12 10:58:40 +00009187# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009188
Michael W. Hudson54241132001-12-07 15:38:26 +00009189
9190
9191
9192
Guido van Rossum0a516c91994-09-12 10:58:40 +00009193# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009194# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009195echo "$as_me:$LINENO: checking SO" >&5
9196echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009197if test -z "$SO"
9198then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009199 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009200 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009201 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009202 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009203 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009204fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009205echo "$as_me:$LINENO: result: $SO" >&5
9206echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009207# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009208# -- "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 +00009209# (Shared libraries in this instance are shared modules to be loaded into
9210# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009211echo "$as_me:$LINENO: checking LDSHARED" >&5
9212echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009213if test -z "$LDSHARED"
9214then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009215 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009216 AIX*)
9217 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009218 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009219 ;;
9220 BeOS*)
9221 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009222 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009223 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009224 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009225 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009226 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009227 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00009228 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009229 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009230 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +00009231 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009232 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009233 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9234 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009235 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009236 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9237 if test "$enable_framework" ; then
9238 # Link against the framework. All externals should be defined.
9239 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9240 else
9241 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009242 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009243 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009244 Darwin/*)
9245 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9246 if test "$enable_framework" ; then
9247 # Link against the framework. All externals should be defined.
9248 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9249 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009250 # No framework, use the Python app as bundle-loader
9251 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9252 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009253 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009254 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009255 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009256 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009257 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009258 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009259 then
9260 LDSHARED="cc -shared ${LDFLAGS}"
9261 else
9262 LDSHARED="ld -Bshareable ${LDFLAGS}"
9263 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009264 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009265 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009266 if test "$GCC" = "yes"
9267 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009268 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009269 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009270 SCO_SV*) LDSHARED="$(CC) -Wl,-G,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00009271 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009272 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009273 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009274 *) LDSHARED="ld";;
9275 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009276fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009277echo "$as_me:$LINENO: result: $LDSHARED" >&5
9278echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009279BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009280# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009281# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009282echo "$as_me:$LINENO: checking CCSHARED" >&5
9283echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009284if test -z "$CCSHARED"
9285then
Guido van Rossum07397971997-04-29 21:49:50 +00009286 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009287 SunOS*) if test "$GCC" = yes;
9288 then CCSHARED="-fPIC";
9289 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009290 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009291 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009292 else CCSHARED="+z";
9293 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009294 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009295 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009296 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009297 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009298 if test "$GCC" = "yes"
9299 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009300 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009301 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009302 SCO_SV*)
9303 if test "$GCC" = "yes"
9304 then CCSHARED="-fPIC"
9305 else CCSHARED="-Kpic -belf"
9306 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009307 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009308 IRIX*/6*) case $CC in
9309 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009310 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009311 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009312 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009313 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009314fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009315echo "$as_me:$LINENO: result: $CCSHARED" >&5
9316echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009317# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009318# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009319echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9320echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009321if test -z "$LINKFORSHARED"
9322then
Guido van Rossum07397971997-04-29 21:49:50 +00009323 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009324 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009325 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009326 LINKFORSHARED="-Wl,-E -Wl,+s";;
9327# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009328 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009329 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009330 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009331 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009332 # -u __dummy makes the linker aware of the objc runtime
9333 # in System.framework; otherwise, __objcInit (referenced in
9334 # crt1.o) gets erroneously defined as common, which breaks dynamic
9335 # loading of any modules which reference it in System.framework.
9336 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9337 # not used by the core itself but which needs to be in the core so
9338 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00009339 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009340 if test "$enable_framework"
9341 then
9342 LINKFORSHARED="$LINKFORSHARED -framework Python"
9343 fi
9344 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009345 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009346 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009347 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009348 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009349 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9350 then
9351 LINKFORSHARED="-Wl,--export-dynamic"
9352 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009353 SunOS/5*) case $CC in
9354 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009355 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009356 then
9357 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009358 fi;;
9359 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009360 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009361fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009362echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9363echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009364
Michael W. Hudson54241132001-12-07 15:38:26 +00009365
Martin v. Löwis11437992002-04-12 09:54:03 +00009366echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9367echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009368if test ! "$LIBRARY" = "$LDLIBRARY"
9369then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009370 case $ac_sys_system in
9371 CYGWIN*)
9372 # Cygwin needs CCSHARED when building extension DLLs
9373 # but not when building the interpreter DLL.
9374 CFLAGSFORSHARED='';;
9375 *)
9376 CFLAGSFORSHARED='$(CCSHARED)'
9377 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009378fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009379echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9380echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009381
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009382# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9383# library (with --enable-shared).
9384# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009385# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9386# if it is not required, since it creates a dependency of the shared library
9387# to LIBS. This, in turn, means that applications linking the shared libpython
9388# don't need to link LIBS explicitly. The default should be only changed
9389# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009390
9391echo "$as_me:$LINENO: checking SHLIBS" >&5
9392echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9393case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009394 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009395 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009396esac
9397echo "$as_me:$LINENO: result: $SHLIBS" >&5
9398echo "${ECHO_T}$SHLIBS" >&6
9399
9400
Guido van Rossum627b2d71993-12-24 10:39:16 +00009401# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009402
9403echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9404echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9405if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9406 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009407else
Martin v. Löwis11437992002-04-12 09:54:03 +00009408 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009409LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009410cat >conftest.$ac_ext <<_ACEOF
9411#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009412#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009413
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009414/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009415#ifdef __cplusplus
9416extern "C"
9417#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009418/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009419 builtin and then its argument prototype would still apply. */
9420char dlopen ();
9421#ifdef F77_DUMMY_MAIN
9422# ifdef __cplusplus
9423 extern "C"
9424# endif
9425 int F77_DUMMY_MAIN() { return 1; }
9426#endif
9427int
9428main ()
9429{
9430dlopen ();
9431 ;
9432 return 0;
9433}
9434_ACEOF
9435rm -f conftest.$ac_objext conftest$ac_exeext
9436if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9437 (eval $ac_link) 2>&5
9438 ac_status=$?
9439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9440 (exit $ac_status); } &&
9441 { ac_try='test -s conftest$ac_exeext'
9442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9443 (eval $ac_try) 2>&5
9444 ac_status=$?
9445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9446 (exit $ac_status); }; }; then
9447 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009448else
Martin v. Löwis11437992002-04-12 09:54:03 +00009449 echo "$as_me: failed program was:" >&5
9450cat conftest.$ac_ext >&5
9451ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009452fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009453rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9454LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009455fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009456echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9457echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9458if test $ac_cv_lib_dl_dlopen = yes; then
9459 cat >>confdefs.h <<_ACEOF
9460#define HAVE_LIBDL 1
9461_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009462
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009463 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009464
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009465fi
9466 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009467
9468echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9469echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9470if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9471 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009472else
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009474LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009475cat >conftest.$ac_ext <<_ACEOF
9476#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009477#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009478
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009479/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009480#ifdef __cplusplus
9481extern "C"
9482#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009483/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009484 builtin and then its argument prototype would still apply. */
9485char shl_load ();
9486#ifdef F77_DUMMY_MAIN
9487# ifdef __cplusplus
9488 extern "C"
9489# endif
9490 int F77_DUMMY_MAIN() { return 1; }
9491#endif
9492int
9493main ()
9494{
9495shl_load ();
9496 ;
9497 return 0;
9498}
9499_ACEOF
9500rm -f conftest.$ac_objext conftest$ac_exeext
9501if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9502 (eval $ac_link) 2>&5
9503 ac_status=$?
9504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9505 (exit $ac_status); } &&
9506 { ac_try='test -s conftest$ac_exeext'
9507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9508 (eval $ac_try) 2>&5
9509 ac_status=$?
9510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9511 (exit $ac_status); }; }; then
9512 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009513else
Martin v. Löwis11437992002-04-12 09:54:03 +00009514 echo "$as_me: failed program was:" >&5
9515cat conftest.$ac_ext >&5
9516ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009517fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009518rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9519LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009520fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009521echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9522echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9523if test $ac_cv_lib_dld_shl_load = yes; then
9524 cat >>confdefs.h <<_ACEOF
9525#define HAVE_LIBDLD 1
9526_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009527
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009528 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009529
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009530fi
9531 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009532echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9533echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9534if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009535 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009536else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009537 ac_func_search_save_LIBS=$LIBS
9538ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009539cat >conftest.$ac_ext <<_ACEOF
9540#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009541#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009542
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009543/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009544#ifdef __cplusplus
9545extern "C"
9546#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009547/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009548 builtin and then its argument prototype would still apply. */
9549char sem_init ();
9550#ifdef F77_DUMMY_MAIN
9551# ifdef __cplusplus
9552 extern "C"
9553# endif
9554 int F77_DUMMY_MAIN() { return 1; }
9555#endif
9556int
9557main ()
9558{
9559sem_init ();
9560 ;
9561 return 0;
9562}
9563_ACEOF
9564rm -f conftest.$ac_objext conftest$ac_exeext
9565if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9566 (eval $ac_link) 2>&5
9567 ac_status=$?
9568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9569 (exit $ac_status); } &&
9570 { ac_try='test -s conftest$ac_exeext'
9571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9572 (eval $ac_try) 2>&5
9573 ac_status=$?
9574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9575 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009576 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009577else
Martin v. Löwis11437992002-04-12 09:54:03 +00009578 echo "$as_me: failed program was:" >&5
9579cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009580fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009581rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009582if test "$ac_cv_search_sem_init" = no; then
9583 for ac_lib in rt posix4; do
9584 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9585 cat >conftest.$ac_ext <<_ACEOF
9586#line $LINENO "configure"
9587#include "confdefs.h"
9588
9589/* Override any gcc2 internal prototype to avoid an error. */
9590#ifdef __cplusplus
9591extern "C"
9592#endif
9593/* We use char because int might match the return type of a gcc2
9594 builtin and then its argument prototype would still apply. */
9595char sem_init ();
9596#ifdef F77_DUMMY_MAIN
9597# ifdef __cplusplus
9598 extern "C"
9599# endif
9600 int F77_DUMMY_MAIN() { return 1; }
9601#endif
9602int
9603main ()
9604{
9605sem_init ();
9606 ;
9607 return 0;
9608}
Martin v. Löwis11437992002-04-12 09:54:03 +00009609_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009610rm -f conftest.$ac_objext conftest$ac_exeext
9611if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9612 (eval $ac_link) 2>&5
9613 ac_status=$?
9614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9615 (exit $ac_status); } &&
9616 { ac_try='test -s conftest$ac_exeext'
9617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9618 (eval $ac_try) 2>&5
9619 ac_status=$?
9620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9621 (exit $ac_status); }; }; then
9622 ac_cv_search_sem_init="-l$ac_lib"
9623break
9624else
9625 echo "$as_me: failed program was:" >&5
9626cat conftest.$ac_ext >&5
9627fi
9628rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9629 done
9630fi
9631LIBS=$ac_func_search_save_LIBS
9632fi
9633echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9634echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9635if test "$ac_cv_search_sem_init" != no; then
9636 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009637
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009638fi
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009639 # 'Real Time' functions on Solaris,
9640 # posix4 on Solaris 2.6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009641
9642# checks for system dependent C++ extensions support
9643case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009644 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9645echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9646 cat >conftest.$ac_ext <<_ACEOF
9647#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009648#include "confdefs.h"
9649#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009650#ifdef F77_DUMMY_MAIN
9651# ifdef __cplusplus
9652 extern "C"
9653# endif
9654 int F77_DUMMY_MAIN() { return 1; }
9655#endif
9656int
9657main ()
9658{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009659loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009660 ;
9661 return 0;
9662}
9663_ACEOF
9664rm -f conftest.$ac_objext conftest$ac_exeext
9665if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9666 (eval $ac_link) 2>&5
9667 ac_status=$?
9668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9669 (exit $ac_status); } &&
9670 { ac_try='test -s conftest$ac_exeext'
9671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9672 (eval $ac_try) 2>&5
9673 ac_status=$?
9674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9675 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009676
Martin v. Löwis11437992002-04-12 09:54:03 +00009677cat >>confdefs.h <<\_ACEOF
9678#define AIX_GENUINE_CPLUSPLUS 1
9679_ACEOF
9680
9681 echo "$as_me:$LINENO: result: yes" >&5
9682echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009683else
Martin v. Löwis11437992002-04-12 09:54:03 +00009684 echo "$as_me: failed program was:" >&5
9685cat conftest.$ac_ext >&5
9686echo "$as_me:$LINENO: result: no" >&5
9687echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009688fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009689rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009690 *) ;;
9691esac
9692
Guido van Rossum70c7f481998-03-26 18:44:10 +00009693# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9694# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009695# BeOS' sockets are stashed in libnet.
9696case "$ac_sys_system" in
9697IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009698*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009699echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9700echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9701if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9702 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009703else
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009705LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009706cat >conftest.$ac_ext <<_ACEOF
9707#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009708#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009709
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009710/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009711#ifdef __cplusplus
9712extern "C"
9713#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009714/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009715 builtin and then its argument prototype would still apply. */
9716char t_open ();
9717#ifdef F77_DUMMY_MAIN
9718# ifdef __cplusplus
9719 extern "C"
9720# endif
9721 int F77_DUMMY_MAIN() { return 1; }
9722#endif
9723int
9724main ()
9725{
9726t_open ();
9727 ;
9728 return 0;
9729}
9730_ACEOF
9731rm -f conftest.$ac_objext conftest$ac_exeext
9732if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9733 (eval $ac_link) 2>&5
9734 ac_status=$?
9735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9736 (exit $ac_status); } &&
9737 { ac_try='test -s conftest$ac_exeext'
9738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9739 (eval $ac_try) 2>&5
9740 ac_status=$?
9741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9742 (exit $ac_status); }; }; then
9743 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009744else
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 echo "$as_me: failed program was:" >&5
9746cat conftest.$ac_ext >&5
9747ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009748fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009749rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9750LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009751fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009752echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9753echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9754if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009755 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009756fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009757 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009758echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9759echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9760if test "${ac_cv_lib_socket_socket+set}" = set; then
9761 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009762else
Martin v. Löwis11437992002-04-12 09:54:03 +00009763 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009764LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009765cat >conftest.$ac_ext <<_ACEOF
9766#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009767#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009768
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009769/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009770#ifdef __cplusplus
9771extern "C"
9772#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009773/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009774 builtin and then its argument prototype would still apply. */
9775char socket ();
9776#ifdef F77_DUMMY_MAIN
9777# ifdef __cplusplus
9778 extern "C"
9779# endif
9780 int F77_DUMMY_MAIN() { return 1; }
9781#endif
9782int
9783main ()
9784{
9785socket ();
9786 ;
9787 return 0;
9788}
9789_ACEOF
9790rm -f conftest.$ac_objext conftest$ac_exeext
9791if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9792 (eval $ac_link) 2>&5
9793 ac_status=$?
9794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9795 (exit $ac_status); } &&
9796 { ac_try='test -s conftest$ac_exeext'
9797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9798 (eval $ac_try) 2>&5
9799 ac_status=$?
9800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9801 (exit $ac_status); }; }; then
9802 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009803else
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 echo "$as_me: failed program was:" >&5
9805cat conftest.$ac_ext >&5
9806ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009807fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009808rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9809LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009810fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009811echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9812echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9813if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009814 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009815fi
9816 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009817;;
9818esac
9819case "$ac_sys_system" in
9820BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009821echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9822echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9823if test "${ac_cv_lib_net_socket+set}" = set; then
9824 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009825else
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009827LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009828cat >conftest.$ac_ext <<_ACEOF
9829#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009830#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009831
Guido van Rossumad678af1998-10-02 14:42:15 +00009832/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009833#ifdef __cplusplus
9834extern "C"
9835#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009836/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009837 builtin and then its argument prototype would still apply. */
9838char socket ();
9839#ifdef F77_DUMMY_MAIN
9840# ifdef __cplusplus
9841 extern "C"
9842# endif
9843 int F77_DUMMY_MAIN() { return 1; }
9844#endif
9845int
9846main ()
9847{
9848socket ();
9849 ;
9850 return 0;
9851}
9852_ACEOF
9853rm -f conftest.$ac_objext conftest$ac_exeext
9854if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9855 (eval $ac_link) 2>&5
9856 ac_status=$?
9857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9858 (exit $ac_status); } &&
9859 { ac_try='test -s conftest$ac_exeext'
9860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9861 (eval $ac_try) 2>&5
9862 ac_status=$?
9863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9864 (exit $ac_status); }; }; then
9865 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009866else
Martin v. Löwis11437992002-04-12 09:54:03 +00009867 echo "$as_me: failed program was:" >&5
9868cat conftest.$ac_ext >&5
9869ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009870fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009871rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9872LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009873fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009874echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9875echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9876if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009877 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009878fi
9879 # BeOS
9880;;
9881esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009882
Martin v. Löwis11437992002-04-12 09:54:03 +00009883echo "$as_me:$LINENO: checking for --with-libs" >&5
9884echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9885
Guido van Rossuma68acba1996-07-31 17:36:39 +00009886# Check whether --with-libs or --without-libs was given.
9887if test "${with_libs+set}" = set; then
9888 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009889
9890echo "$as_me:$LINENO: result: $withval" >&5
9891echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009892LIBS="$withval $LIBS"
9893
9894else
Martin v. Löwis11437992002-04-12 09:54:03 +00009895 echo "$as_me:$LINENO: result: no" >&5
9896echo "${ECHO_T}no" >&6
9897fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009898
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009899# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009900
9901
Martin v. Löwis11437992002-04-12 09:54:03 +00009902echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9903echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9904
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009905# Check whether --with-signal-module or --without-signal-module was given.
9906if test "${with_signal_module+set}" = set; then
9907 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009908
Martin v. Löwis11437992002-04-12 09:54:03 +00009909fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009910
9911if test -z "$with_signal_module"
9912then with_signal_module="yes"
9913fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009914echo "$as_me:$LINENO: result: $with_signal_module" >&5
9915echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009916
9917if test "${with_signal_module}" = "yes"; then
9918 USE_SIGNAL_MODULE=""
9919 SIGNAL_OBJS=""
9920else
9921 USE_SIGNAL_MODULE="#"
9922 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9923fi
9924
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009925# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009926
Barry Warsawc0d24d82000-06-29 16:12:00 +00009927USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009928
Martin v. Löwis11437992002-04-12 09:54:03 +00009929echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9930echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9931
Guido van Rossumec2f0731997-01-22 20:54:01 +00009932
9933# Check whether --with-dec-threads or --without-dec-threads was given.
9934if test "${with_dec_threads+set}" = set; then
9935 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009936
9937echo "$as_me:$LINENO: result: $withval" >&5
9938echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009939LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009940if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009941 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009942fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009943else
Martin v. Löwis11437992002-04-12 09:54:03 +00009944 echo "$as_me:$LINENO: result: no" >&5
9945echo "${ECHO_T}no" >&6
9946fi;
9947
9948# Templates for things AC_DEFINEd more than once.
9949# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009950
9951
Martin v. Löwis11437992002-04-12 09:54:03 +00009952
9953
9954
9955
9956
9957echo "$as_me:$LINENO: checking for --with-threads" >&5
9958echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9959
Guido van Rossumec2f0731997-01-22 20:54:01 +00009960# Check whether --with-threads or --without-threads was given.
9961if test "${with_threads+set}" = set; then
9962 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009963
Martin v. Löwis11437992002-04-12 09:54:03 +00009964fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009965
Barry Warsawc0d24d82000-06-29 16:12:00 +00009966# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009967
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009968# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009969if test "${with_thread+set}" = set; then
9970 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009971 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +00009972fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +00009973
9974if test -z "$with_threads"
9975then with_threads="yes"
9976fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009977echo "$as_me:$LINENO: result: $with_threads" >&5
9978echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +00009979
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009980
Barry Warsawc0d24d82000-06-29 16:12:00 +00009981if test "$with_threads" = "no"
9982then
9983 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009984elif test "$ac_cv_pthread_is_default" = yes
9985then
Martin v. Löwis11437992002-04-12 09:54:03 +00009986 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009987#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009988_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009989
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009990 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009991 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009992#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009993_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009994
9995 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009996 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009997elif test "$ac_cv_kpthread" = "yes"
9998then
9999 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010000 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010001#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010002_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010003
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010004 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010005 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010006else
10007 if test ! -z "$with_threads" -a -d "$with_threads"
10008 then LDFLAGS="$LDFLAGS -L$with_threads"
10009 fi
10010 if test ! -z "$withval" -a -d "$withval"
10011 then LDFLAGS="$LDFLAGS -L$withval"
10012 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010013
10014 # According to the POSIX spec, a pthreads implementation must
10015 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010016 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10017echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10018 cat >conftest.$ac_ext <<_ACEOF
10019#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010020#include "confdefs.h"
10021#include <unistd.h>
10022 #ifdef _POSIX_THREADS
10023 yes
10024 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010025
10026_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010027if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10028 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010029 unistd_defines_pthreads=yes
10030else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010031 unistd_defines_pthreads=no
10032fi
10033rm -f conftest*
10034
Martin v. Löwis11437992002-04-12 09:54:03 +000010035 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10036echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010037
Martin v. Löwis11437992002-04-12 09:54:03 +000010038 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010039#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010040_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010041
Martin v. Löwis11437992002-04-12 09:54:03 +000010042 if test "${ac_cv_header_cthreads_h+set}" = set; then
10043 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10044echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10045if test "${ac_cv_header_cthreads_h+set}" = set; then
10046 echo $ECHO_N "(cached) $ECHO_C" >&6
10047fi
10048echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10049echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010050else
Martin v. Löwis11437992002-04-12 09:54:03 +000010051 # Is the header compilable?
10052echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10053echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10054cat >conftest.$ac_ext <<_ACEOF
10055#line $LINENO "configure"
10056#include "confdefs.h"
10057$ac_includes_default
10058#include <cthreads.h>
10059_ACEOF
10060rm -f conftest.$ac_objext
10061if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10062 (eval $ac_compile) 2>&5
10063 ac_status=$?
10064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10065 (exit $ac_status); } &&
10066 { ac_try='test -s conftest.$ac_objext'
10067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10068 (eval $ac_try) 2>&5
10069 ac_status=$?
10070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10071 (exit $ac_status); }; }; then
10072 ac_header_compiler=yes
10073else
10074 echo "$as_me: failed program was:" >&5
10075cat conftest.$ac_ext >&5
10076ac_header_compiler=no
10077fi
10078rm -f conftest.$ac_objext conftest.$ac_ext
10079echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10080echo "${ECHO_T}$ac_header_compiler" >&6
10081
10082# Is the header present?
10083echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10084echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10085cat >conftest.$ac_ext <<_ACEOF
10086#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010087#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010088#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010089_ACEOF
10090if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10091 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10092 ac_status=$?
10093 egrep -v '^ *\+' conftest.er1 >conftest.err
10094 rm -f conftest.er1
10095 cat conftest.err >&5
10096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10097 (exit $ac_status); } >/dev/null; then
10098 if test -s conftest.err; then
10099 ac_cpp_err=$ac_c_preproc_warn_flag
10100 else
10101 ac_cpp_err=
10102 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010103else
Martin v. Löwis11437992002-04-12 09:54:03 +000010104 ac_cpp_err=yes
10105fi
10106if test -z "$ac_cpp_err"; then
10107 ac_header_preproc=yes
10108else
10109 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010110 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010111 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010112fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010113rm -f conftest.err conftest.$ac_ext
10114echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10115echo "${ECHO_T}$ac_header_preproc" >&6
10116
10117# So? What about this header?
10118case $ac_header_compiler:$ac_header_preproc in
10119 yes:no )
10120 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10121echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10122 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10123echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10124 no:yes )
10125 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10126echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10127 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10128echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10129 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10130echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10131esac
10132echo "$as_me:$LINENO: checking for cthreads.h" >&5
10133echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10134if test "${ac_cv_header_cthreads_h+set}" = set; then
10135 echo $ECHO_N "(cached) $ECHO_C" >&6
10136else
10137 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010138fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010139echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10140echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10141
10142fi
10143if test $ac_cv_header_cthreads_h = yes; then
10144 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010145#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010146_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010147
Martin v. Löwis11437992002-04-12 09:54:03 +000010148 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010149#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010150_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010151
Martin v. Löwis11437992002-04-12 09:54:03 +000010152
10153cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010154#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010155_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010156
10157 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010158 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010159else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010160
Martin v. Löwis11437992002-04-12 09:54:03 +000010161 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10162 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10163echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10164if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10165 echo $ECHO_N "(cached) $ECHO_C" >&6
10166fi
10167echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10168echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010169else
Martin v. Löwis11437992002-04-12 09:54:03 +000010170 # Is the header compilable?
10171echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10172echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10173cat >conftest.$ac_ext <<_ACEOF
10174#line $LINENO "configure"
10175#include "confdefs.h"
10176$ac_includes_default
10177#include <mach/cthreads.h>
10178_ACEOF
10179rm -f conftest.$ac_objext
10180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10181 (eval $ac_compile) 2>&5
10182 ac_status=$?
10183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10184 (exit $ac_status); } &&
10185 { ac_try='test -s conftest.$ac_objext'
10186 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10187 (eval $ac_try) 2>&5
10188 ac_status=$?
10189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10190 (exit $ac_status); }; }; then
10191 ac_header_compiler=yes
10192else
10193 echo "$as_me: failed program was:" >&5
10194cat conftest.$ac_ext >&5
10195ac_header_compiler=no
10196fi
10197rm -f conftest.$ac_objext conftest.$ac_ext
10198echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10199echo "${ECHO_T}$ac_header_compiler" >&6
10200
10201# Is the header present?
10202echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10203echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10204cat >conftest.$ac_ext <<_ACEOF
10205#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010206#include "confdefs.h"
10207#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010208_ACEOF
10209if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10210 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10211 ac_status=$?
10212 egrep -v '^ *\+' conftest.er1 >conftest.err
10213 rm -f conftest.er1
10214 cat conftest.err >&5
10215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10216 (exit $ac_status); } >/dev/null; then
10217 if test -s conftest.err; then
10218 ac_cpp_err=$ac_c_preproc_warn_flag
10219 else
10220 ac_cpp_err=
10221 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010222else
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 ac_cpp_err=yes
10224fi
10225if test -z "$ac_cpp_err"; then
10226 ac_header_preproc=yes
10227else
10228 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010229 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010230 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010231fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010232rm -f conftest.err conftest.$ac_ext
10233echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10234echo "${ECHO_T}$ac_header_preproc" >&6
10235
10236# So? What about this header?
10237case $ac_header_compiler:$ac_header_preproc in
10238 yes:no )
10239 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10240echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10241 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10242echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10243 no:yes )
10244 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10245echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10246 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10247echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10248 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10249echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10250esac
10251echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10252echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10253if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10254 echo $ECHO_N "(cached) $ECHO_C" >&6
10255else
10256 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010257fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010258echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10259echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10260
10261fi
10262if test $ac_cv_header_mach_cthreads_h = yes; then
10263 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010264#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010265_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010266
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010268#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010269_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010270
Martin v. Löwis11437992002-04-12 09:54:03 +000010271
10272cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010273#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010274_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010275
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010276 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010277else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010278
Martin v. Löwis11437992002-04-12 09:54:03 +000010279 echo "$as_me:$LINENO: checking for --with-pth" >&5
10280echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10281
10282# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010283if test "${with_pth+set}" = set; then
10284 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010285 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010286echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010287 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010288#define WITH_THREAD 1
10289_ACEOF
10290
10291
10292cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010293#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010294_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010295
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010296 LIBS="-lpth $LIBS"
10297 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010298else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010299 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010300echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010301
10302 # Just looking for pthread_create in libpthread is not enough:
10303 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10304 # So we really have to include pthread.h, and then link.
10305 _libs=$LIBS
10306 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010307 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10308echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10309 cat >conftest.$ac_ext <<_ACEOF
10310#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010311#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010312#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010313
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010314void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010315#ifdef F77_DUMMY_MAIN
10316# ifdef __cplusplus
10317 extern "C"
10318# endif
10319 int F77_DUMMY_MAIN() { return 1; }
10320#endif
10321int
10322main ()
10323{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010324
10325pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 ;
10327 return 0;
10328}
10329_ACEOF
10330rm -f conftest.$ac_objext conftest$ac_exeext
10331if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10332 (eval $ac_link) 2>&5
10333 ac_status=$?
10334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10335 (exit $ac_status); } &&
10336 { ac_try='test -s conftest$ac_exeext'
10337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10338 (eval $ac_try) 2>&5
10339 ac_status=$?
10340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10341 (exit $ac_status); }; }; then
10342
10343 echo "$as_me:$LINENO: result: yes" >&5
10344echo "${ECHO_T}yes" >&6
10345 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010346#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010347_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010348
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010349 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010350 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010351else
Martin v. Löwis11437992002-04-12 09:54:03 +000010352 echo "$as_me: failed program was:" >&5
10353cat conftest.$ac_ext >&5
10354
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010355 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010356 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10357echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10358if test "${ac_cv_func_pthread_detach+set}" = set; then
10359 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010360else
Martin v. Löwis11437992002-04-12 09:54:03 +000010361 cat >conftest.$ac_ext <<_ACEOF
10362#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010363#include "confdefs.h"
10364/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010365 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010366#include <assert.h>
10367/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010368#ifdef __cplusplus
10369extern "C"
10370#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010371/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010372 builtin and then its argument prototype would still apply. */
10373char pthread_detach ();
10374char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010375
Martin v. Löwis11437992002-04-12 09:54:03 +000010376#ifdef F77_DUMMY_MAIN
10377# ifdef __cplusplus
10378 extern "C"
10379# endif
10380 int F77_DUMMY_MAIN() { return 1; }
10381#endif
10382int
10383main ()
10384{
Guido van Rossumad678af1998-10-02 14:42:15 +000010385/* The GNU C library defines this for functions which it implements
10386 to always fail with ENOSYS. Some functions are actually named
10387 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010388#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010389choke me
10390#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010391f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010392#endif
10393
Martin v. Löwis11437992002-04-12 09:54:03 +000010394 ;
10395 return 0;
10396}
10397_ACEOF
10398rm -f conftest.$ac_objext conftest$ac_exeext
10399if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10400 (eval $ac_link) 2>&5
10401 ac_status=$?
10402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10403 (exit $ac_status); } &&
10404 { ac_try='test -s conftest$ac_exeext'
10405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10406 (eval $ac_try) 2>&5
10407 ac_status=$?
10408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10409 (exit $ac_status); }; }; then
10410 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010411else
Martin v. Löwis11437992002-04-12 09:54:03 +000010412 echo "$as_me: failed program was:" >&5
10413cat conftest.$ac_ext >&5
10414ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010415fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010416rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010417fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010418echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10419echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10420if test $ac_cv_func_pthread_detach = yes; then
10421 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010422#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010423_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010424
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010425 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010426 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010427else
Guido van Rossumad678af1998-10-02 14:42:15 +000010428
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010429 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10430 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10431echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10432if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10433 echo $ECHO_N "(cached) $ECHO_C" >&6
10434fi
10435echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10436echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10437else
10438 # Is the header compilable?
10439echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10440echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10441cat >conftest.$ac_ext <<_ACEOF
10442#line $LINENO "configure"
10443#include "confdefs.h"
10444$ac_includes_default
10445#include <atheos/threads.h>
10446_ACEOF
10447rm -f conftest.$ac_objext
10448if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10449 (eval $ac_compile) 2>&5
10450 ac_status=$?
10451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10452 (exit $ac_status); } &&
10453 { ac_try='test -s conftest.$ac_objext'
10454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10455 (eval $ac_try) 2>&5
10456 ac_status=$?
10457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10458 (exit $ac_status); }; }; then
10459 ac_header_compiler=yes
10460else
10461 echo "$as_me: failed program was:" >&5
10462cat conftest.$ac_ext >&5
10463ac_header_compiler=no
10464fi
10465rm -f conftest.$ac_objext conftest.$ac_ext
10466echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10467echo "${ECHO_T}$ac_header_compiler" >&6
10468
10469# Is the header present?
10470echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10471echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10472cat >conftest.$ac_ext <<_ACEOF
10473#line $LINENO "configure"
10474#include "confdefs.h"
10475#include <atheos/threads.h>
10476_ACEOF
10477if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10478 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10479 ac_status=$?
10480 egrep -v '^ *\+' conftest.er1 >conftest.err
10481 rm -f conftest.er1
10482 cat conftest.err >&5
10483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10484 (exit $ac_status); } >/dev/null; then
10485 if test -s conftest.err; then
10486 ac_cpp_err=$ac_c_preproc_warn_flag
10487 else
10488 ac_cpp_err=
10489 fi
10490else
10491 ac_cpp_err=yes
10492fi
10493if test -z "$ac_cpp_err"; then
10494 ac_header_preproc=yes
10495else
10496 echo "$as_me: failed program was:" >&5
10497 cat conftest.$ac_ext >&5
10498 ac_header_preproc=no
10499fi
10500rm -f conftest.err conftest.$ac_ext
10501echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10502echo "${ECHO_T}$ac_header_preproc" >&6
10503
10504# So? What about this header?
10505case $ac_header_compiler:$ac_header_preproc in
10506 yes:no )
10507 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10508echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10509 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10510echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10511 no:yes )
10512 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10513echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10514 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10515echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10516 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10517echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10518esac
10519echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10520echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10521if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10522 echo $ECHO_N "(cached) $ECHO_C" >&6
10523else
10524 ac_cv_header_atheos_threads_h=$ac_header_preproc
10525fi
10526echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10527echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10528
10529fi
10530if test $ac_cv_header_atheos_threads_h = yes; then
10531 cat >>confdefs.h <<\_ACEOF
10532#define WITH_THREAD 1
10533_ACEOF
10534
10535
10536cat >>confdefs.h <<\_ACEOF
10537#define ATHEOS_THREADS 1
10538_ACEOF
10539
10540 THREADOBJ="Python/thread.o"
10541else
10542
Martin v. Löwis11437992002-04-12 09:54:03 +000010543 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10544 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10545echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10546if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10547 echo $ECHO_N "(cached) $ECHO_C" >&6
10548fi
10549echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10550echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010551else
Martin v. Löwis11437992002-04-12 09:54:03 +000010552 # Is the header compilable?
10553echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10554echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10555cat >conftest.$ac_ext <<_ACEOF
10556#line $LINENO "configure"
10557#include "confdefs.h"
10558$ac_includes_default
10559#include <kernel/OS.h>
10560_ACEOF
10561rm -f conftest.$ac_objext
10562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10563 (eval $ac_compile) 2>&5
10564 ac_status=$?
10565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10566 (exit $ac_status); } &&
10567 { ac_try='test -s conftest.$ac_objext'
10568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10569 (eval $ac_try) 2>&5
10570 ac_status=$?
10571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10572 (exit $ac_status); }; }; then
10573 ac_header_compiler=yes
10574else
10575 echo "$as_me: failed program was:" >&5
10576cat conftest.$ac_ext >&5
10577ac_header_compiler=no
10578fi
10579rm -f conftest.$ac_objext conftest.$ac_ext
10580echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10581echo "${ECHO_T}$ac_header_compiler" >&6
10582
10583# Is the header present?
10584echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10585echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10586cat >conftest.$ac_ext <<_ACEOF
10587#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010588#include "confdefs.h"
10589#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010590_ACEOF
10591if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10592 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10593 ac_status=$?
10594 egrep -v '^ *\+' conftest.er1 >conftest.err
10595 rm -f conftest.er1
10596 cat conftest.err >&5
10597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10598 (exit $ac_status); } >/dev/null; then
10599 if test -s conftest.err; then
10600 ac_cpp_err=$ac_c_preproc_warn_flag
10601 else
10602 ac_cpp_err=
10603 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010604else
Martin v. Löwis11437992002-04-12 09:54:03 +000010605 ac_cpp_err=yes
10606fi
10607if test -z "$ac_cpp_err"; then
10608 ac_header_preproc=yes
10609else
10610 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010611 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010612 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010613fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010614rm -f conftest.err conftest.$ac_ext
10615echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10616echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010617
Martin v. Löwis11437992002-04-12 09:54:03 +000010618# So? What about this header?
10619case $ac_header_compiler:$ac_header_preproc in
10620 yes:no )
10621 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10622echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10623 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10624echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10625 no:yes )
10626 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10627echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10628 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10629echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10630 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10631echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10632esac
10633echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10634echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10635if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10636 echo $ECHO_N "(cached) $ECHO_C" >&6
10637else
10638 ac_cv_header_kernel_OS_h=$ac_header_preproc
10639fi
10640echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10641echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10642
10643fi
10644if test $ac_cv_header_kernel_OS_h = yes; then
10645 cat >>confdefs.h <<\_ACEOF
10646#define WITH_THREAD 1
10647_ACEOF
10648
10649
10650cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010651#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010652_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010653
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010654 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010655else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010656
Martin v. Löwis11437992002-04-12 09:54:03 +000010657 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10658echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10659if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10660 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010661else
Martin v. Löwis11437992002-04-12 09:54:03 +000010662 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010663LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010664cat >conftest.$ac_ext <<_ACEOF
10665#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010666#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010667
Greg Steinadf63d62000-07-05 10:38:09 +000010668/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010669#ifdef __cplusplus
10670extern "C"
10671#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010672/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010673 builtin and then its argument prototype would still apply. */
10674char pthread_create ();
10675#ifdef F77_DUMMY_MAIN
10676# ifdef __cplusplus
10677 extern "C"
10678# endif
10679 int F77_DUMMY_MAIN() { return 1; }
10680#endif
10681int
10682main ()
10683{
10684pthread_create ();
10685 ;
10686 return 0;
10687}
10688_ACEOF
10689rm -f conftest.$ac_objext conftest$ac_exeext
10690if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10691 (eval $ac_link) 2>&5
10692 ac_status=$?
10693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10694 (exit $ac_status); } &&
10695 { ac_try='test -s conftest$ac_exeext'
10696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10697 (eval $ac_try) 2>&5
10698 ac_status=$?
10699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10700 (exit $ac_status); }; }; then
10701 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010702else
Martin v. Löwis11437992002-04-12 09:54:03 +000010703 echo "$as_me: failed program was:" >&5
10704cat conftest.$ac_ext >&5
10705ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010706fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010707rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10708LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010709fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010710echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10711echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10712if test $ac_cv_lib_pthreads_pthread_create = yes; then
10713 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010714#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010715_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010716
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010717 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010718 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010719 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010720else
Greg Steinadf63d62000-07-05 10:38:09 +000010721
Martin v. Löwis11437992002-04-12 09:54:03 +000010722 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10723echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10724if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10725 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010726else
Martin v. Löwis11437992002-04-12 09:54:03 +000010727 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010728LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010729cat >conftest.$ac_ext <<_ACEOF
10730#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010731#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010732
Guido van Rossum49545951997-12-02 19:28:29 +000010733/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010734#ifdef __cplusplus
10735extern "C"
10736#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010737/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010738 builtin and then its argument prototype would still apply. */
10739char pthread_create ();
10740#ifdef F77_DUMMY_MAIN
10741# ifdef __cplusplus
10742 extern "C"
10743# endif
10744 int F77_DUMMY_MAIN() { return 1; }
10745#endif
10746int
10747main ()
10748{
10749pthread_create ();
10750 ;
10751 return 0;
10752}
10753_ACEOF
10754rm -f conftest.$ac_objext conftest$ac_exeext
10755if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10756 (eval $ac_link) 2>&5
10757 ac_status=$?
10758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10759 (exit $ac_status); } &&
10760 { ac_try='test -s conftest$ac_exeext'
10761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10762 (eval $ac_try) 2>&5
10763 ac_status=$?
10764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10765 (exit $ac_status); }; }; then
10766 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010767else
Martin v. Löwis11437992002-04-12 09:54:03 +000010768 echo "$as_me: failed program was:" >&5
10769cat conftest.$ac_ext >&5
10770ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010771fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010772rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10773LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010774fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010775echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10776echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10777if test $ac_cv_lib_c_r_pthread_create = yes; then
10778 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010779#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010780_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010781
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010782 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010783 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010784 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010785else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010786
Martin v. Löwis11437992002-04-12 09:54:03 +000010787 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10788echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10789if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10790 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010791else
Martin v. Löwis11437992002-04-12 09:54:03 +000010792 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010793LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010794cat >conftest.$ac_ext <<_ACEOF
10795#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010796#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010797
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010798/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010799#ifdef __cplusplus
10800extern "C"
10801#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010802/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010803 builtin and then its argument prototype would still apply. */
10804char __d6_pthread_create ();
10805#ifdef F77_DUMMY_MAIN
10806# ifdef __cplusplus
10807 extern "C"
10808# endif
10809 int F77_DUMMY_MAIN() { return 1; }
10810#endif
10811int
10812main ()
10813{
10814__d6_pthread_create ();
10815 ;
10816 return 0;
10817}
10818_ACEOF
10819rm -f conftest.$ac_objext conftest$ac_exeext
10820if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10821 (eval $ac_link) 2>&5
10822 ac_status=$?
10823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10824 (exit $ac_status); } &&
10825 { ac_try='test -s conftest$ac_exeext'
10826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10827 (eval $ac_try) 2>&5
10828 ac_status=$?
10829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10830 (exit $ac_status); }; }; then
10831 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010832else
Martin v. Löwis11437992002-04-12 09:54:03 +000010833 echo "$as_me: failed program was:" >&5
10834cat conftest.$ac_ext >&5
10835ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010836fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010837rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10838LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010839fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010840echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10841echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10842if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10843 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010844#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010845_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010846
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010847 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010848 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010849 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010850else
Guido van Rossum49545951997-12-02 19:28:29 +000010851
Martin v. Löwis11437992002-04-12 09:54:03 +000010852 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10853echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10854if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10855 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010856else
Martin v. Löwis11437992002-04-12 09:54:03 +000010857 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010858LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010859cat >conftest.$ac_ext <<_ACEOF
10860#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010861#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010862
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010863/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010864#ifdef __cplusplus
10865extern "C"
10866#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010867/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010868 builtin and then its argument prototype would still apply. */
10869char __pthread_create_system ();
10870#ifdef F77_DUMMY_MAIN
10871# ifdef __cplusplus
10872 extern "C"
10873# endif
10874 int F77_DUMMY_MAIN() { return 1; }
10875#endif
10876int
10877main ()
10878{
10879__pthread_create_system ();
10880 ;
10881 return 0;
10882}
10883_ACEOF
10884rm -f conftest.$ac_objext conftest$ac_exeext
10885if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10886 (eval $ac_link) 2>&5
10887 ac_status=$?
10888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10889 (exit $ac_status); } &&
10890 { ac_try='test -s conftest$ac_exeext'
10891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10892 (eval $ac_try) 2>&5
10893 ac_status=$?
10894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10895 (exit $ac_status); }; }; then
10896 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010897else
Martin v. Löwis11437992002-04-12 09:54:03 +000010898 echo "$as_me: failed program was:" >&5
10899cat conftest.$ac_ext >&5
10900ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010901fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010902rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10903LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010904fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010905echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10906echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10907if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10908 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010909#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010910_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010911
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010912 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010913 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010914 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010915else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010916
Martin v. Löwis11437992002-04-12 09:54:03 +000010917 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10918echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10919if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10920 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010921else
Martin v. Löwis11437992002-04-12 09:54:03 +000010922 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010923LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010924cat >conftest.$ac_ext <<_ACEOF
10925#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010926#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010927
Guido van Rossumb93a8621998-05-07 13:27:32 +000010928/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010929#ifdef __cplusplus
10930extern "C"
10931#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010932/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010933 builtin and then its argument prototype would still apply. */
10934char pthread_create ();
10935#ifdef F77_DUMMY_MAIN
10936# ifdef __cplusplus
10937 extern "C"
10938# endif
10939 int F77_DUMMY_MAIN() { return 1; }
10940#endif
10941int
10942main ()
10943{
10944pthread_create ();
10945 ;
10946 return 0;
10947}
10948_ACEOF
10949rm -f conftest.$ac_objext conftest$ac_exeext
10950if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10951 (eval $ac_link) 2>&5
10952 ac_status=$?
10953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10954 (exit $ac_status); } &&
10955 { ac_try='test -s conftest$ac_exeext'
10956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10957 (eval $ac_try) 2>&5
10958 ac_status=$?
10959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10960 (exit $ac_status); }; }; then
10961 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010962else
Martin v. Löwis11437992002-04-12 09:54:03 +000010963 echo "$as_me: failed program was:" >&5
10964cat conftest.$ac_ext >&5
10965ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010966fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010967rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10968LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010969fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010970echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10971echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10972if test $ac_cv_lib_cma_pthread_create = yes; then
10973 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010974#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010975_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010976
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010977 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010978 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010979 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010980else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010981
Martin v. Löwis130fb172001-07-19 11:00:41 +000010982 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010983fi
10984
Guido van Rossum627b2d71993-12-24 10:39:16 +000010985
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010986fi
10987
Guido van Rossum0be3e491997-05-22 20:33:33 +000010988fi
10989
Guido van Rossum49545951997-12-02 19:28:29 +000010990fi
10991
Guido van Rossumb93a8621998-05-07 13:27:32 +000010992fi
10993
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010994fi
10995
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010996
Michael W. Hudson54241132001-12-07 15:38:26 +000010997fi
10998
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010999
11000fi
11001
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011002fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011003rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11004fi;
11005fi
11006
11007
11008fi
11009
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011010
Michael W. Hudson54241132001-12-07 15:38:26 +000011011
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011012 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011013 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011014
11015cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011016#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011017_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011018
11019 fi
11020
Martin v. Löwis11437992002-04-12 09:54:03 +000011021 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11022echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11023 if test "${ac_cv_pthread_system_supported+set}" = set; then
11024 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011025else
11026 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011027 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011028else
Martin v. Löwis11437992002-04-12 09:54:03 +000011029 cat >conftest.$ac_ext <<_ACEOF
11030#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011031#include "confdefs.h"
11032#include <pthread.h>
11033 void *foo(void *parm) {
11034 return NULL;
11035 }
11036 main() {
11037 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011038 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011039 if (pthread_attr_init(&attr)) exit(-1);
11040 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011041 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011042 exit(0);
11043 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011044_ACEOF
11045rm -f conftest$ac_exeext
11046if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11047 (eval $ac_link) 2>&5
11048 ac_status=$?
11049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11050 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11052 (eval $ac_try) 2>&5
11053 ac_status=$?
11054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11055 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011056 ac_cv_pthread_system_supported=yes
11057else
Martin v. Löwis11437992002-04-12 09:54:03 +000011058 echo "$as_me: program exited with status $ac_status" >&5
11059echo "$as_me: failed program was:" >&5
11060cat conftest.$ac_ext >&5
11061( exit $ac_status )
11062ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011063fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011064rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011065fi
11066
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011067fi
11068
Martin v. Löwis11437992002-04-12 09:54:03 +000011069 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11070echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011071 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011072
11073cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011074#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011075_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011076
11077 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011078
11079for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011080do
Martin v. Löwis11437992002-04-12 09:54:03 +000011081as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11082echo "$as_me:$LINENO: checking for $ac_func" >&5
11083echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11084if eval "test \"\${$as_ac_var+set}\" = set"; then
11085 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011086else
Martin v. Löwis11437992002-04-12 09:54:03 +000011087 cat >conftest.$ac_ext <<_ACEOF
11088#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011089#include "confdefs.h"
11090/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011091 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011092#include <assert.h>
11093/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011094#ifdef __cplusplus
11095extern "C"
11096#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011097/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011098 builtin and then its argument prototype would still apply. */
11099char $ac_func ();
11100char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011101
Martin v. Löwis11437992002-04-12 09:54:03 +000011102#ifdef F77_DUMMY_MAIN
11103# ifdef __cplusplus
11104 extern "C"
11105# endif
11106 int F77_DUMMY_MAIN() { return 1; }
11107#endif
11108int
11109main ()
11110{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011111/* The GNU C library defines this for functions which it implements
11112 to always fail with ENOSYS. Some functions are actually named
11113 something starting with __ and the normal name is an alias. */
11114#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11115choke me
11116#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011117f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011118#endif
11119
Martin v. Löwis11437992002-04-12 09:54:03 +000011120 ;
11121 return 0;
11122}
11123_ACEOF
11124rm -f conftest.$ac_objext conftest$ac_exeext
11125if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11126 (eval $ac_link) 2>&5
11127 ac_status=$?
11128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11129 (exit $ac_status); } &&
11130 { ac_try='test -s conftest$ac_exeext'
11131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11132 (eval $ac_try) 2>&5
11133 ac_status=$?
11134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11135 (exit $ac_status); }; }; then
11136 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011137else
Martin v. Löwis11437992002-04-12 09:54:03 +000011138 echo "$as_me: failed program was:" >&5
11139cat conftest.$ac_ext >&5
11140eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011141fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011142rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011143fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011144echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11145echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11146if test `eval echo '${'$as_ac_var'}'` = yes; then
11147 cat >>confdefs.h <<_ACEOF
11148#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11149_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011150
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011151fi
11152done
11153
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011154 fi
11155
Martin v. Löwis11437992002-04-12 09:54:03 +000011156 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11157echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11158if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11159 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011160else
Martin v. Löwis11437992002-04-12 09:54:03 +000011161 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011162LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011163cat >conftest.$ac_ext <<_ACEOF
11164#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011165#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011166
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011167/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011168#ifdef __cplusplus
11169extern "C"
11170#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011171/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011172 builtin and then its argument prototype would still apply. */
11173char usconfig ();
11174#ifdef F77_DUMMY_MAIN
11175# ifdef __cplusplus
11176 extern "C"
11177# endif
11178 int F77_DUMMY_MAIN() { return 1; }
11179#endif
11180int
11181main ()
11182{
11183usconfig ();
11184 ;
11185 return 0;
11186}
11187_ACEOF
11188rm -f conftest.$ac_objext conftest$ac_exeext
11189if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11190 (eval $ac_link) 2>&5
11191 ac_status=$?
11192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11193 (exit $ac_status); } &&
11194 { ac_try='test -s conftest$ac_exeext'
11195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11196 (eval $ac_try) 2>&5
11197 ac_status=$?
11198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11199 (exit $ac_status); }; }; then
11200 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011201else
Martin v. Löwis11437992002-04-12 09:54:03 +000011202 echo "$as_me: failed program was:" >&5
11203cat conftest.$ac_ext >&5
11204ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011205fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011206rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11207LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011208fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011209echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11210echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11211if test $ac_cv_lib_mpc_usconfig = yes; then
11212 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011213#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011214_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011215
Martin v. Löwis130fb172001-07-19 11:00:41 +000011216 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011217 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011218 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011219fi
11220
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011221
Neal Norwitza978ab02002-11-02 16:58:05 +000011222 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011223 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11224echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11225if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11226 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011227else
Martin v. Löwis11437992002-04-12 09:54:03 +000011228 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011229LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011230cat >conftest.$ac_ext <<_ACEOF
11231#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011232#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011233
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011234/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011235#ifdef __cplusplus
11236extern "C"
11237#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011238/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011239 builtin and then its argument prototype would still apply. */
11240char thr_create ();
11241#ifdef F77_DUMMY_MAIN
11242# ifdef __cplusplus
11243 extern "C"
11244# endif
11245 int F77_DUMMY_MAIN() { return 1; }
11246#endif
11247int
11248main ()
11249{
11250thr_create ();
11251 ;
11252 return 0;
11253}
11254_ACEOF
11255rm -f conftest.$ac_objext conftest$ac_exeext
11256if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11257 (eval $ac_link) 2>&5
11258 ac_status=$?
11259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11260 (exit $ac_status); } &&
11261 { ac_try='test -s conftest$ac_exeext'
11262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11263 (eval $ac_try) 2>&5
11264 ac_status=$?
11265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11266 (exit $ac_status); }; }; then
11267 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011268else
Martin v. Löwis11437992002-04-12 09:54:03 +000011269 echo "$as_me: failed program was:" >&5
11270cat conftest.$ac_ext >&5
11271ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011272fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011273rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11274LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011275fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011276echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11277echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11278if test $ac_cv_lib_thread_thr_create = yes; then
11279 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011280#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011281_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011282
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011283 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011284 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011285 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011286fi
11287
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011288 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011289
Martin v. Löwis130fb172001-07-19 11:00:41 +000011290 if test "$USE_THREAD_MODULE" != "#"
11291 then
11292 # If the above checks didn't disable threads, (at least) OSF1
11293 # needs this '-threads' argument during linking.
11294 case $ac_sys_system in
11295 OSF1) LDLAST=-threads;;
11296 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011297 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011298
11299 if test "$posix_threads" = yes -a \
11300 "$ac_sys_system" = "SunOS" -a \
11301 "$ac_sys_release" = "5.6"; then
11302
11303cat >>confdefs.h <<\_ACEOF
11304#define HAVE_PTHREAD_DESTRUCTOR 1
11305_ACEOF
11306
11307 fi
11308
Guido van Rossum627b2d71993-12-24 10:39:16 +000011309fi
11310
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011311# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011312
11313
11314echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11315echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011316# Check whether --enable-ipv6 or --disable-ipv6 was given.
11317if test "${enable_ipv6+set}" = set; then
11318 enableval="$enable_ipv6"
11319 case "$enableval" in
11320 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011321 echo "$as_me:$LINENO: result: no" >&5
11322echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011323 ipv6=no
11324 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011325 *) echo "$as_me:$LINENO: result: yes" >&5
11326echo "${ECHO_T}yes" >&6
11327 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011328#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011329_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011330
11331 ipv6=yes
11332 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011333 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011334else
Martin v. Löwis11437992002-04-12 09:54:03 +000011335
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011336 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011337 echo "$as_me:$LINENO: result: no" >&5
11338echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011339 ipv6=no
11340
11341else
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 cat >conftest.$ac_ext <<_ACEOF
11343#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011344#include "confdefs.h"
11345 /* AF_INET6 available check */
11346#include <sys/types.h>
11347#include <sys/socket.h>
11348main()
11349{
11350 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11351 exit(1);
11352 else
11353 exit(0);
11354}
11355
Martin v. Löwis11437992002-04-12 09:54:03 +000011356_ACEOF
11357rm -f conftest$ac_exeext
11358if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11359 (eval $ac_link) 2>&5
11360 ac_status=$?
11361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11362 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11364 (eval $ac_try) 2>&5
11365 ac_status=$?
11366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11367 (exit $ac_status); }; }; then
11368 echo "$as_me:$LINENO: result: yes" >&5
11369echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011370 ipv6=yes
11371else
Martin v. Löwis11437992002-04-12 09:54:03 +000011372 echo "$as_me: program exited with status $ac_status" >&5
11373echo "$as_me: failed program was:" >&5
11374cat conftest.$ac_ext >&5
11375( exit $ac_status )
11376echo "$as_me:$LINENO: result: no" >&5
11377echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011378 ipv6=no
11379fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011380rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011381fi
11382
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011383if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011384 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11385echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11386 cat >conftest.$ac_ext <<_ACEOF
11387#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011388#include "confdefs.h"
11389#include <sys/types.h>
11390#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011391#ifdef F77_DUMMY_MAIN
11392# ifdef __cplusplus
11393 extern "C"
11394# endif
11395 int F77_DUMMY_MAIN() { return 1; }
11396#endif
11397int
11398main ()
11399{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011400struct sockaddr_in6 x;
11401x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011402 ;
11403 return 0;
11404}
11405_ACEOF
11406rm -f conftest.$ac_objext
11407if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11408 (eval $ac_compile) 2>&5
11409 ac_status=$?
11410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11411 (exit $ac_status); } &&
11412 { ac_try='test -s conftest.$ac_objext'
11413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11414 (eval $ac_try) 2>&5
11415 ac_status=$?
11416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11417 (exit $ac_status); }; }; then
11418 echo "$as_me:$LINENO: result: yes" >&5
11419echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011420 ipv6=yes
11421else
Martin v. Löwis11437992002-04-12 09:54:03 +000011422 echo "$as_me: failed program was:" >&5
11423cat conftest.$ac_ext >&5
11424echo "$as_me:$LINENO: result: no" >&5
11425echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011426 ipv6=no
11427fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011428rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011429fi
11430
11431if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011432 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011433#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011434_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011435
11436fi
11437
Martin v. Löwis11437992002-04-12 09:54:03 +000011438fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011439
11440ipv6type=unknown
11441ipv6lib=none
11442ipv6trylibc=no
11443
11444if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011445 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11446echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011447 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11448 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011449 case $i in
11450 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011451 cat >conftest.$ac_ext <<_ACEOF
11452#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011453#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011454
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011455#include <netinet/in.h>
11456#ifdef IPV6_INRIA_VERSION
11457yes
11458#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011459_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011460if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11461 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011462 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011463fi
11464rm -f conftest*
11465
11466 ;;
11467 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011468 cat >conftest.$ac_ext <<_ACEOF
11469#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011470#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011471
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011472#include <netinet/in.h>
11473#ifdef __KAME__
11474yes
11475#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011476_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011477if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11478 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011479 ipv6type=$i;
11480 ipv6lib=inet6
11481 ipv6libdir=/usr/local/v6/lib
11482 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011483fi
11484rm -f conftest*
11485
11486 ;;
11487 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011488 cat >conftest.$ac_ext <<_ACEOF
11489#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011490#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011491
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011492#include <features.h>
11493#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11494yes
11495#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011496_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011497if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11498 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011499 ipv6type=$i;
11500 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011501fi
11502rm -f conftest*
11503
11504 ;;
11505 linux-inet6)
11506 if test -d /usr/inet6; then
11507 ipv6type=$i
11508 ipv6lib=inet6
11509 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011510 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011511 fi
11512 ;;
11513 solaris)
11514 if test -f /etc/netconfig; then
11515 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11516 ipv6type=$i
11517 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011518 fi
11519 fi
11520 ;;
11521 toshiba)
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 <sys/param.h>
11527#ifdef _TOSHIBA_INET6
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=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011535 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011536fi
11537rm -f conftest*
11538
11539 ;;
11540 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011541 cat >conftest.$ac_ext <<_ACEOF
11542#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011543#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011544
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011545#include </usr/local/v6/include/sys/v6config.h>
11546#ifdef __V6D__
11547yes
11548#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011549_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011550if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11551 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011552 ipv6type=$i;
11553 ipv6lib=v6;
11554 ipv6libdir=/usr/local/v6/lib;
11555 OPT="-I/usr/local/v6/include $OPT"
11556fi
11557rm -f conftest*
11558
11559 ;;
11560 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011561 cat >conftest.$ac_ext <<_ACEOF
11562#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011563#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011564
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011565#include <sys/param.h>
11566#ifdef _ZETA_MINAMI_INET6
11567yes
11568#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011569_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011570if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11571 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011572 ipv6type=$i;
11573 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011574 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011575fi
11576rm -f conftest*
11577
11578 ;;
11579 esac
11580 if test "$ipv6type" != "unknown"; then
11581 break
11582 fi
11583 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011584 echo "$as_me:$LINENO: result: $ipv6type" >&5
11585echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011586fi
11587
11588if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11589 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11590 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11591 echo "using lib$ipv6lib"
11592 else
11593 if test $ipv6trylibc = "yes"; then
11594 echo "using libc"
11595 else
11596 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11597 echo "You need to fetch lib$ipv6lib.a from appropriate"
11598 echo 'ipv6 kit and compile beforehand.'
11599 exit 1
11600 fi
11601 fi
11602fi
11603
Jack Jansen7b8c7542002-04-14 20:12:41 +000011604# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011605echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11606echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011607
11608# Check whether --with-universal-newlines or --without-universal-newlines was given.
11609if test "${with_universal_newlines+set}" = set; then
11610 withval="$with_universal_newlines"
11611
11612fi;
11613
11614if test -z "$with_universal_newlines"
11615then with_universal_newlines="yes"
11616fi
11617if test "$with_universal_newlines" != "no"
11618then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011619
11620cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011621#define WITH_UNIVERSAL_NEWLINES 1
11622_ACEOF
11623
11624fi
11625echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11626echo "${ECHO_T}$with_universal_newlines" >&6
11627
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011628# Check for --with-doc-strings
11629echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11630echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11631
11632# Check whether --with-doc-strings or --without-doc-strings was given.
11633if test "${with_doc_strings+set}" = set; then
11634 withval="$with_doc_strings"
11635
11636fi;
11637
11638if test -z "$with_doc_strings"
11639then with_doc_strings="yes"
11640fi
11641if test "$with_doc_strings" != "no"
11642then
11643
11644cat >>confdefs.h <<\_ACEOF
11645#define WITH_DOC_STRINGS 1
11646_ACEOF
11647
11648fi
11649echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11650echo "${ECHO_T}$with_doc_strings" >&6
11651
Neil Schemenauera35c6882001-02-27 04:45:05 +000011652# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011653echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11654echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11655
Neil Schemenauera35c6882001-02-27 04:45:05 +000011656# Check whether --with-pymalloc or --without-pymalloc was given.
11657if test "${with_pymalloc+set}" = set; then
11658 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011659
Martin v. Löwis11437992002-04-12 09:54:03 +000011660fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011661
Neil Schemenauer16c22972002-03-22 15:34:49 +000011662if test -z "$with_pymalloc"
11663then with_pymalloc="yes"
11664fi
11665if test "$with_pymalloc" != "no"
11666then
Martin v. Löwis11437992002-04-12 09:54:03 +000011667
11668cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011669#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011670_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011671
11672fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011673echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11674echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011675
Barry Warsawef82cd72000-06-30 16:21:01 +000011676# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011677echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11678echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11679
Barry Warsawef82cd72000-06-30 16:21:01 +000011680# Check whether --with-wctype-functions or --without-wctype-functions was given.
11681if test "${with_wctype_functions+set}" = set; then
11682 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011683
Barry Warsawef82cd72000-06-30 16:21:01 +000011684if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011685then
11686
11687cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011688#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011689_ACEOF
11690
11691 echo "$as_me:$LINENO: result: yes" >&5
11692echo "${ECHO_T}yes" >&6
11693else echo "$as_me:$LINENO: result: no" >&5
11694echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011695fi
11696else
Martin v. Löwis11437992002-04-12 09:54:03 +000011697 echo "$as_me:$LINENO: result: no" >&5
11698echo "${ECHO_T}no" >&6
11699fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011700
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011701# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011702
Guido van Rossum98935bf2001-09-05 19:13:16 +000011703DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011704
Martin v. Löwis11437992002-04-12 09:54:03 +000011705echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11706echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11707
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011708# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011709if test "${with_sgi_dl+set}" = set; then
11710 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011711
11712echo "$as_me:$LINENO: result: $withval" >&5
11713echo "${ECHO_T}$withval" >&6
11714
11715cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011716#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011717_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011718
Guido van Rossume97ee181999-12-20 21:27:22 +000011719DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011720dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011721if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011722then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011723else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11724echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11725 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011726fi
11727DLINCLDIR=${dldir}
11728LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011729else
Martin v. Löwis11437992002-04-12 09:54:03 +000011730 echo "$as_me:$LINENO: result: no" >&5
11731echo "${ECHO_T}no" >&6
11732fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011733
Martin v. Löwis11437992002-04-12 09:54:03 +000011734echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11735echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011736
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011737# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011738if test "${with_dl_dld+set}" = set; then
11739 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011740
11741echo "$as_me:$LINENO: result: $withval" >&5
11742echo "${ECHO_T}$withval" >&6
11743
11744cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011745#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011746_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011747
Guido van Rossume97ee181999-12-20 21:27:22 +000011748DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011749dldir=`echo "$withval" | sed 's/,.*//'`
11750dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011751if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011752then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011753else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
11754echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
11755 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011756fi
11757DLINCLDIR=${dldir}
11758LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011759else
Martin v. Löwis11437992002-04-12 09:54:03 +000011760 echo "$as_me:$LINENO: result: no" >&5
11761echo "${ECHO_T}no" >&6
11762fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011763
Guido van Rossume97ee181999-12-20 21:27:22 +000011764# the dlopen() function means we might want to use dynload_shlib.o. some
11765# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011766
Thomas Wouters3a584202000-08-05 23:28:51 +000011767for ac_func in dlopen
11768do
Martin v. Löwis11437992002-04-12 09:54:03 +000011769as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11770echo "$as_me:$LINENO: checking for $ac_func" >&5
11771echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11772if eval "test \"\${$as_ac_var+set}\" = set"; then
11773 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011774else
Martin v. Löwis11437992002-04-12 09:54:03 +000011775 cat >conftest.$ac_ext <<_ACEOF
11776#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011777#include "confdefs.h"
11778/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011779 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011780#include <assert.h>
11781/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011782#ifdef __cplusplus
11783extern "C"
11784#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011785/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011786 builtin and then its argument prototype would still apply. */
11787char $ac_func ();
11788char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011789
Martin v. Löwis11437992002-04-12 09:54:03 +000011790#ifdef F77_DUMMY_MAIN
11791# ifdef __cplusplus
11792 extern "C"
11793# endif
11794 int F77_DUMMY_MAIN() { return 1; }
11795#endif
11796int
11797main ()
11798{
Guido van Rossume97ee181999-12-20 21:27:22 +000011799/* The GNU C library defines this for functions which it implements
11800 to always fail with ENOSYS. Some functions are actually named
11801 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011802#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011803choke me
11804#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011805f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011806#endif
11807
Martin v. Löwis11437992002-04-12 09:54:03 +000011808 ;
11809 return 0;
11810}
11811_ACEOF
11812rm -f conftest.$ac_objext conftest$ac_exeext
11813if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11814 (eval $ac_link) 2>&5
11815 ac_status=$?
11816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11817 (exit $ac_status); } &&
11818 { ac_try='test -s conftest$ac_exeext'
11819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11820 (eval $ac_try) 2>&5
11821 ac_status=$?
11822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11823 (exit $ac_status); }; }; then
11824 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011825else
Martin v. Löwis11437992002-04-12 09:54:03 +000011826 echo "$as_me: failed program was:" >&5
11827cat conftest.$ac_ext >&5
11828eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011829fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011830rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011831fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011832echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11833echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11834if test `eval echo '${'$as_ac_var'}'` = yes; then
11835 cat >>confdefs.h <<_ACEOF
11836#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11837_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011838
Guido van Rossume97ee181999-12-20 21:27:22 +000011839fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011840done
Guido van Rossume97ee181999-12-20 21:27:22 +000011841
Michael W. Hudson54241132001-12-07 15:38:26 +000011842
Guido van Rossume97ee181999-12-20 21:27:22 +000011843# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11844# loading of modules.
11845
Martin v. Löwis11437992002-04-12 09:54:03 +000011846echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11847echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011848if test -z "$DYNLOADFILE"
11849then
11850 case $ac_sys_system/$ac_sys_release in
11851 AIX*) DYNLOADFILE="dynload_aix.o";;
11852 BeOS*) DYNLOADFILE="dynload_beos.o";;
11853 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011854 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011855 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011856 *)
11857 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11858 # out any dynamic loading
11859 if test "$ac_cv_func_dlopen" = yes
11860 then DYNLOADFILE="dynload_shlib.o"
11861 else DYNLOADFILE="dynload_stub.o"
11862 fi
11863 ;;
11864 esac
11865fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011866echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11867echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011868if test "$DYNLOADFILE" != "dynload_stub.o"
11869then
Martin v. Löwis11437992002-04-12 09:54:03 +000011870
11871cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011872#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011873_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011874
11875fi
11876
Neil Schemenauer4e425612001-06-19 15:44:15 +000011877# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11878
Michael W. Hudson54241132001-12-07 15:38:26 +000011879
Martin v. Löwis11437992002-04-12 09:54:03 +000011880echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11881echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011882if test -z "$MACHDEP_OBJS"
11883then
Jack Jansene578a632001-08-15 01:27:14 +000011884 MACHDEP_OBJS=$extra_machdep_objs
11885else
11886 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011887fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011888echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11889echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011890
Guido van Rossum627b2d71993-12-24 10:39:16 +000011891# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011892
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
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011965
Fred Drake6b3cc522002-04-15 19:20:27 +000011966
Jack Jansen0b06be72002-06-21 14:48:38 +000011967
Martin v. Löwis0cec0ff2002-07-28 16:33:45 +000011968
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011969
Martin v. Löwis244edc82001-10-04 22:44:26 +000011970for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011971 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011972 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000011973 hstrerror inet_pton kill killpg lchown link lstat mkfifo mknod mktime \
11974 mremap nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011975 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011976 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011977 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011978 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011979 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011980 truncate uname unsetenv utimes waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011981do
Martin v. Löwis11437992002-04-12 09:54:03 +000011982as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11983echo "$as_me:$LINENO: checking for $ac_func" >&5
11984echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11985if eval "test \"\${$as_ac_var+set}\" = set"; then
11986 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011987else
Martin v. Löwis11437992002-04-12 09:54:03 +000011988 cat >conftest.$ac_ext <<_ACEOF
11989#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011990#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011991/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011992 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011993#include <assert.h>
11994/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011995#ifdef __cplusplus
11996extern "C"
11997#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011998/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011999 builtin and then its argument prototype would still apply. */
12000char $ac_func ();
12001char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012002
Martin v. Löwis11437992002-04-12 09:54:03 +000012003#ifdef F77_DUMMY_MAIN
12004# ifdef __cplusplus
12005 extern "C"
12006# endif
12007 int F77_DUMMY_MAIN() { return 1; }
12008#endif
12009int
12010main ()
12011{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012012/* The GNU C library defines this for functions which it implements
12013 to always fail with ENOSYS. Some functions are actually named
12014 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012015#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012016choke me
12017#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012018f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012019#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012020
Martin v. Löwis11437992002-04-12 09:54:03 +000012021 ;
12022 return 0;
12023}
12024_ACEOF
12025rm -f conftest.$ac_objext conftest$ac_exeext
12026if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12027 (eval $ac_link) 2>&5
12028 ac_status=$?
12029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12030 (exit $ac_status); } &&
12031 { ac_try='test -s conftest$ac_exeext'
12032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12033 (eval $ac_try) 2>&5
12034 ac_status=$?
12035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12036 (exit $ac_status); }; }; then
12037 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012038else
Martin v. Löwis11437992002-04-12 09:54:03 +000012039 echo "$as_me: failed program was:" >&5
12040cat conftest.$ac_ext >&5
12041eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012042fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012043rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012044fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012045echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12046echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12047if test `eval echo '${'$as_ac_var'}'` = yes; then
12048 cat >>confdefs.h <<_ACEOF
12049#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12050_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012051
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012052fi
12053done
12054
Michael W. Hudson54241132001-12-07 15:38:26 +000012055
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012056# check for openpty and forkpty
12057
Martin v. Löwis11437992002-04-12 09:54:03 +000012058
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012059for ac_func in openpty
12060do
Martin v. Löwis11437992002-04-12 09:54:03 +000012061as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12062echo "$as_me:$LINENO: checking for $ac_func" >&5
12063echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12064if eval "test \"\${$as_ac_var+set}\" = set"; then
12065 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012066else
Martin v. Löwis11437992002-04-12 09:54:03 +000012067 cat >conftest.$ac_ext <<_ACEOF
12068#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012069#include "confdefs.h"
12070/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012071 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012072#include <assert.h>
12073/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012074#ifdef __cplusplus
12075extern "C"
12076#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012077/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012078 builtin and then its argument prototype would still apply. */
12079char $ac_func ();
12080char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012081
Martin v. Löwis11437992002-04-12 09:54:03 +000012082#ifdef F77_DUMMY_MAIN
12083# ifdef __cplusplus
12084 extern "C"
12085# endif
12086 int F77_DUMMY_MAIN() { return 1; }
12087#endif
12088int
12089main ()
12090{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012091/* The GNU C library defines this for functions which it implements
12092 to always fail with ENOSYS. Some functions are actually named
12093 something starting with __ and the normal name is an alias. */
12094#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12095choke me
12096#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012097f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012098#endif
12099
Martin v. Löwis11437992002-04-12 09:54:03 +000012100 ;
12101 return 0;
12102}
12103_ACEOF
12104rm -f conftest.$ac_objext conftest$ac_exeext
12105if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12106 (eval $ac_link) 2>&5
12107 ac_status=$?
12108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12109 (exit $ac_status); } &&
12110 { ac_try='test -s conftest$ac_exeext'
12111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12112 (eval $ac_try) 2>&5
12113 ac_status=$?
12114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12115 (exit $ac_status); }; }; then
12116 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012117else
Martin v. Löwis11437992002-04-12 09:54:03 +000012118 echo "$as_me: failed program was:" >&5
12119cat conftest.$ac_ext >&5
12120eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012121fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012122rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012123fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012124echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12125echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12126if test `eval echo '${'$as_ac_var'}'` = yes; then
12127 cat >>confdefs.h <<_ACEOF
12128#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12129_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012130
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012131else
Martin v. Löwis11437992002-04-12 09:54:03 +000012132 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
12133echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
12134if test "${ac_cv_lib_util_openpty+set}" = set; then
12135 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012136else
Martin v. Löwis11437992002-04-12 09:54:03 +000012137 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012138LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012139cat >conftest.$ac_ext <<_ACEOF
12140#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012141#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012142
Fred Drake8cef4cf2000-06-28 16:40:38 +000012143/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012144#ifdef __cplusplus
12145extern "C"
12146#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012147/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012148 builtin and then its argument prototype would still apply. */
12149char openpty ();
12150#ifdef F77_DUMMY_MAIN
12151# ifdef __cplusplus
12152 extern "C"
12153# endif
12154 int F77_DUMMY_MAIN() { return 1; }
12155#endif
12156int
12157main ()
12158{
12159openpty ();
12160 ;
12161 return 0;
12162}
12163_ACEOF
12164rm -f conftest.$ac_objext conftest$ac_exeext
12165if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12166 (eval $ac_link) 2>&5
12167 ac_status=$?
12168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12169 (exit $ac_status); } &&
12170 { ac_try='test -s conftest$ac_exeext'
12171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12172 (eval $ac_try) 2>&5
12173 ac_status=$?
12174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12175 (exit $ac_status); }; }; then
12176 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012177else
Martin v. Löwis11437992002-04-12 09:54:03 +000012178 echo "$as_me: failed program was:" >&5
12179cat conftest.$ac_ext >&5
12180ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012181fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012182rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12183LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012184fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012185echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
12186echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
12187if test $ac_cv_lib_util_openpty = yes; then
12188 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012189#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012190_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012191 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012192fi
12193
12194fi
12195done
12196
Martin v. Löwis11437992002-04-12 09:54:03 +000012197
Fred Drake8cef4cf2000-06-28 16:40:38 +000012198for ac_func in forkpty
12199do
Martin v. Löwis11437992002-04-12 09:54:03 +000012200as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12201echo "$as_me:$LINENO: checking for $ac_func" >&5
12202echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12203if eval "test \"\${$as_ac_var+set}\" = set"; then
12204 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012205else
Martin v. Löwis11437992002-04-12 09:54:03 +000012206 cat >conftest.$ac_ext <<_ACEOF
12207#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012208#include "confdefs.h"
12209/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012210 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000012211#include <assert.h>
12212/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012213#ifdef __cplusplus
12214extern "C"
12215#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012216/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012217 builtin and then its argument prototype would still apply. */
12218char $ac_func ();
12219char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000012220
Martin v. Löwis11437992002-04-12 09:54:03 +000012221#ifdef F77_DUMMY_MAIN
12222# ifdef __cplusplus
12223 extern "C"
12224# endif
12225 int F77_DUMMY_MAIN() { return 1; }
12226#endif
12227int
12228main ()
12229{
Fred Drake8cef4cf2000-06-28 16:40:38 +000012230/* The GNU C library defines this for functions which it implements
12231 to always fail with ENOSYS. Some functions are actually named
12232 something starting with __ and the normal name is an alias. */
12233#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12234choke me
12235#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012236f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000012237#endif
12238
Martin v. Löwis11437992002-04-12 09:54:03 +000012239 ;
12240 return 0;
12241}
12242_ACEOF
12243rm -f conftest.$ac_objext conftest$ac_exeext
12244if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12245 (eval $ac_link) 2>&5
12246 ac_status=$?
12247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12248 (exit $ac_status); } &&
12249 { ac_try='test -s conftest$ac_exeext'
12250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12251 (eval $ac_try) 2>&5
12252 ac_status=$?
12253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12254 (exit $ac_status); }; }; then
12255 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012256else
Martin v. Löwis11437992002-04-12 09:54:03 +000012257 echo "$as_me: failed program was:" >&5
12258cat conftest.$ac_ext >&5
12259eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012260fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012261rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012262fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012263echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12264echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12265if test `eval echo '${'$as_ac_var'}'` = yes; then
12266 cat >>confdefs.h <<_ACEOF
12267#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12268_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012269
Fred Drake8cef4cf2000-06-28 16:40:38 +000012270else
Martin v. Löwis11437992002-04-12 09:54:03 +000012271 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
12272echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
12273if test "${ac_cv_lib_util_forkpty+set}" = set; then
12274 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012275else
Martin v. Löwis11437992002-04-12 09:54:03 +000012276 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012277LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012278cat >conftest.$ac_ext <<_ACEOF
12279#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012280#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012281
Fred Drake8cef4cf2000-06-28 16:40:38 +000012282/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012283#ifdef __cplusplus
12284extern "C"
12285#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012286/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012287 builtin and then its argument prototype would still apply. */
12288char forkpty ();
12289#ifdef F77_DUMMY_MAIN
12290# ifdef __cplusplus
12291 extern "C"
12292# endif
12293 int F77_DUMMY_MAIN() { return 1; }
12294#endif
12295int
12296main ()
12297{
12298forkpty ();
12299 ;
12300 return 0;
12301}
12302_ACEOF
12303rm -f conftest.$ac_objext conftest$ac_exeext
12304if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12305 (eval $ac_link) 2>&5
12306 ac_status=$?
12307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12308 (exit $ac_status); } &&
12309 { ac_try='test -s conftest$ac_exeext'
12310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12311 (eval $ac_try) 2>&5
12312 ac_status=$?
12313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12314 (exit $ac_status); }; }; then
12315 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012316else
Martin v. Löwis11437992002-04-12 09:54:03 +000012317 echo "$as_me: failed program was:" >&5
12318cat conftest.$ac_ext >&5
12319ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012320fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012321rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12322LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012323fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012324echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
12325echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
12326if test $ac_cv_lib_util_forkpty = yes; then
12327 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012328#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012329_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012330 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012331fi
12332
12333fi
12334done
12335
Jack Jansendd19cf82001-12-06 22:36:17 +000012336
Michael W. Hudson54241132001-12-07 15:38:26 +000012337# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012338
12339
12340
12341
12342
12343
Fred Drake8cef4cf2000-06-28 16:40:38 +000012344for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
12345do
Martin v. Löwis11437992002-04-12 09:54:03 +000012346as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12347echo "$as_me:$LINENO: checking for $ac_func" >&5
12348echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12349if eval "test \"\${$as_ac_var+set}\" = set"; then
12350 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012351else
Martin v. Löwis11437992002-04-12 09:54:03 +000012352 cat >conftest.$ac_ext <<_ACEOF
12353#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012354#include "confdefs.h"
12355/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012356 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012357#include <assert.h>
12358/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012359#ifdef __cplusplus
12360extern "C"
12361#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012362/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012363 builtin and then its argument prototype would still apply. */
12364char $ac_func ();
12365char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012366
Martin v. Löwis11437992002-04-12 09:54:03 +000012367#ifdef F77_DUMMY_MAIN
12368# ifdef __cplusplus
12369 extern "C"
12370# endif
12371 int F77_DUMMY_MAIN() { return 1; }
12372#endif
12373int
12374main ()
12375{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012376/* The GNU C library defines this for functions which it implements
12377 to always fail with ENOSYS. Some functions are actually named
12378 something starting with __ and the normal name is an alias. */
12379#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12380choke me
12381#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012382f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012383#endif
12384
Martin v. Löwis11437992002-04-12 09:54:03 +000012385 ;
12386 return 0;
12387}
12388_ACEOF
12389rm -f conftest.$ac_objext conftest$ac_exeext
12390if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12391 (eval $ac_link) 2>&5
12392 ac_status=$?
12393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12394 (exit $ac_status); } &&
12395 { ac_try='test -s conftest$ac_exeext'
12396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12397 (eval $ac_try) 2>&5
12398 ac_status=$?
12399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12400 (exit $ac_status); }; }; then
12401 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012402else
Martin v. Löwis11437992002-04-12 09:54:03 +000012403 echo "$as_me: failed program was:" >&5
12404cat conftest.$ac_ext >&5
12405eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012406fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012407rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012408fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012409echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12410echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12411if test `eval echo '${'$as_ac_var'}'` = yes; then
12412 cat >>confdefs.h <<_ACEOF
12413#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12414_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012415
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012416fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012417done
12418
Michael W. Hudson54241132001-12-07 15:38:26 +000012419
Martin v. Löwis11437992002-04-12 09:54:03 +000012420
12421
12422
12423
12424
Martin v. Löwis1142de32002-03-29 16:28:31 +000012425for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000012426do
Martin v. Löwis11437992002-04-12 09:54:03 +000012427as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12428echo "$as_me:$LINENO: checking for $ac_func" >&5
12429echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12430if eval "test \"\${$as_ac_var+set}\" = set"; then
12431 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012432else
Martin v. Löwis11437992002-04-12 09:54:03 +000012433 cat >conftest.$ac_ext <<_ACEOF
12434#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012435#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012436/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012437 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012438#include <assert.h>
12439/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012440#ifdef __cplusplus
12441extern "C"
12442#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012443/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012444 builtin and then its argument prototype would still apply. */
12445char $ac_func ();
12446char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012447
Martin v. Löwis11437992002-04-12 09:54:03 +000012448#ifdef F77_DUMMY_MAIN
12449# ifdef __cplusplus
12450 extern "C"
12451# endif
12452 int F77_DUMMY_MAIN() { return 1; }
12453#endif
12454int
12455main ()
12456{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012457/* The GNU C library defines this for functions which it implements
12458 to always fail with ENOSYS. Some functions are actually named
12459 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012460#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012461choke me
12462#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012463f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012464#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012465
Martin v. Löwis11437992002-04-12 09:54:03 +000012466 ;
12467 return 0;
12468}
12469_ACEOF
12470rm -f conftest.$ac_objext conftest$ac_exeext
12471if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12472 (eval $ac_link) 2>&5
12473 ac_status=$?
12474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12475 (exit $ac_status); } &&
12476 { ac_try='test -s conftest$ac_exeext'
12477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12478 (eval $ac_try) 2>&5
12479 ac_status=$?
12480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12481 (exit $ac_status); }; }; then
12482 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012483else
Martin v. Löwis11437992002-04-12 09:54:03 +000012484 echo "$as_me: failed program was:" >&5
12485cat conftest.$ac_ext >&5
12486eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012487fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012488rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000012489fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012490echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12491echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12492if test `eval echo '${'$as_ac_var'}'` = yes; then
12493 cat >>confdefs.h <<_ACEOF
12494#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12495_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000012496
Martin v. Löwis1142de32002-03-29 16:28:31 +000012497else
Martin v. Löwis11437992002-04-12 09:54:03 +000012498 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012499fi
12500done
12501
12502
Martin v. Löwis11437992002-04-12 09:54:03 +000012503
Martin v. Löwis1142de32002-03-29 16:28:31 +000012504for ac_func in getpgrp
12505do
Martin v. Löwis11437992002-04-12 09:54:03 +000012506as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12507echo "$as_me:$LINENO: checking for $ac_func" >&5
12508echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12509if eval "test \"\${$as_ac_var+set}\" = set"; then
12510 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000012511else
Martin v. Löwis11437992002-04-12 09:54:03 +000012512 cat >conftest.$ac_ext <<_ACEOF
12513#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012514#include "confdefs.h"
12515/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012516 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000012517#include <assert.h>
12518/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012519#ifdef __cplusplus
12520extern "C"
12521#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012522/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012523 builtin and then its argument prototype would still apply. */
12524char $ac_func ();
12525char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012526
Martin v. Löwis11437992002-04-12 09:54:03 +000012527#ifdef F77_DUMMY_MAIN
12528# ifdef __cplusplus
12529 extern "C"
12530# endif
12531 int F77_DUMMY_MAIN() { return 1; }
12532#endif
12533int
12534main ()
12535{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012536/* The GNU C library defines this for functions which it implements
12537 to always fail with ENOSYS. Some functions are actually named
12538 something starting with __ and the normal name is an alias. */
12539#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12540choke me
12541#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012542f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012543#endif
12544
Martin v. Löwis11437992002-04-12 09:54:03 +000012545 ;
12546 return 0;
12547}
12548_ACEOF
12549rm -f conftest.$ac_objext conftest$ac_exeext
12550if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12551 (eval $ac_link) 2>&5
12552 ac_status=$?
12553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12554 (exit $ac_status); } &&
12555 { ac_try='test -s conftest$ac_exeext'
12556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12557 (eval $ac_try) 2>&5
12558 ac_status=$?
12559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12560 (exit $ac_status); }; }; then
12561 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012562else
Martin v. Löwis11437992002-04-12 09:54:03 +000012563 echo "$as_me: failed program was:" >&5
12564cat conftest.$ac_ext >&5
12565eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012567rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012568fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012569echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12570echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12571if test `eval echo '${'$as_ac_var'}'` = yes; then
12572 cat >>confdefs.h <<_ACEOF
12573#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12574_ACEOF
12575 cat >conftest.$ac_ext <<_ACEOF
12576#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012577#include "confdefs.h"
12578#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012579#ifdef F77_DUMMY_MAIN
12580# ifdef __cplusplus
12581 extern "C"
12582# endif
12583 int F77_DUMMY_MAIN() { return 1; }
12584#endif
12585int
12586main ()
12587{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012588getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012589 ;
12590 return 0;
12591}
12592_ACEOF
12593rm -f conftest.$ac_objext
12594if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12595 (eval $ac_compile) 2>&5
12596 ac_status=$?
12597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12598 (exit $ac_status); } &&
12599 { ac_try='test -s conftest.$ac_objext'
12600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12601 (eval $ac_try) 2>&5
12602 ac_status=$?
12603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12604 (exit $ac_status); }; }; then
12605
12606cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012607#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012608_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012609
Martin v. Löwis11437992002-04-12 09:54:03 +000012610
Guido van Rossumf78abae1997-01-21 22:02:36 +000012611else
Martin v. Löwis11437992002-04-12 09:54:03 +000012612 echo "$as_me: failed program was:" >&5
12613cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012614fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012615rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012616
Guido van Rossum627b2d71993-12-24 10:39:16 +000012617fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012618done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012619
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012620echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12621echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12622if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012623 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012624else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012625 if test "$cross_compiling" = yes; then
12626 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12627echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12628 { (exit 1); exit 1; }; }
12629else
Martin v. Löwis11437992002-04-12 09:54:03 +000012630 cat >conftest.$ac_ext <<_ACEOF
12631#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012632#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012633#if HAVE_UNISTD_H
12634# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012635#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012636
Martin v. Löwis11437992002-04-12 09:54:03 +000012637#ifdef F77_DUMMY_MAIN
12638# ifdef __cplusplus
12639 extern "C"
12640# endif
12641 int F77_DUMMY_MAIN() { return 1; }
12642#endif
12643int
12644main ()
12645{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012646/* If this system has a BSD-style setpgrp which takes arguments,
12647 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12648 exit successfully. */
12649 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012650 ;
12651 return 0;
12652}
12653_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012654rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012655if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12656 (eval $ac_link) 2>&5
12657 ac_status=$?
12658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012659 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12661 (eval $ac_try) 2>&5
12662 ac_status=$?
12663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12664 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012665 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012666else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012667 echo "$as_me: program exited with status $ac_status" >&5
12668echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012669cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012670( exit $ac_status )
12671ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012672fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012673rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012674fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012675fi
12676echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12677echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12678if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012679
12680cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012681#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012682_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012683
12684fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012685
Martin v. Löwis11437992002-04-12 09:54:03 +000012686
Thomas Wouters3a584202000-08-05 23:28:51 +000012687for ac_func in gettimeofday
12688do
Martin v. Löwis11437992002-04-12 09:54:03 +000012689as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12690echo "$as_me:$LINENO: checking for $ac_func" >&5
12691echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12692if eval "test \"\${$as_ac_var+set}\" = set"; then
12693 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012694else
Martin v. Löwis11437992002-04-12 09:54:03 +000012695 cat >conftest.$ac_ext <<_ACEOF
12696#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012697#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012698/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012699 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012700#include <assert.h>
12701/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012702#ifdef __cplusplus
12703extern "C"
12704#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012705/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012706 builtin and then its argument prototype would still apply. */
12707char $ac_func ();
12708char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012709
Martin v. Löwis11437992002-04-12 09:54:03 +000012710#ifdef F77_DUMMY_MAIN
12711# ifdef __cplusplus
12712 extern "C"
12713# endif
12714 int F77_DUMMY_MAIN() { return 1; }
12715#endif
12716int
12717main ()
12718{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012719/* The GNU C library defines this for functions which it implements
12720 to always fail with ENOSYS. Some functions are actually named
12721 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012722#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012723choke me
12724#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012725f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012726#endif
12727
Martin v. Löwis11437992002-04-12 09:54:03 +000012728 ;
12729 return 0;
12730}
12731_ACEOF
12732rm -f conftest.$ac_objext conftest$ac_exeext
12733if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12734 (eval $ac_link) 2>&5
12735 ac_status=$?
12736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12737 (exit $ac_status); } &&
12738 { ac_try='test -s conftest$ac_exeext'
12739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12740 (eval $ac_try) 2>&5
12741 ac_status=$?
12742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12743 (exit $ac_status); }; }; then
12744 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012745else
Martin v. Löwis11437992002-04-12 09:54:03 +000012746 echo "$as_me: failed program was:" >&5
12747cat conftest.$ac_ext >&5
12748eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012749fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012750rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012751fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012752echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12753echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12754if test `eval echo '${'$as_ac_var'}'` = yes; then
12755 cat >>confdefs.h <<_ACEOF
12756#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12757_ACEOF
12758 cat >conftest.$ac_ext <<_ACEOF
12759#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012760#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012761#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012762#ifdef F77_DUMMY_MAIN
12763# ifdef __cplusplus
12764 extern "C"
12765# endif
12766 int F77_DUMMY_MAIN() { return 1; }
12767#endif
12768int
12769main ()
12770{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012771gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012772 ;
12773 return 0;
12774}
12775_ACEOF
12776rm -f conftest.$ac_objext
12777if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12778 (eval $ac_compile) 2>&5
12779 ac_status=$?
12780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12781 (exit $ac_status); } &&
12782 { ac_try='test -s conftest.$ac_objext'
12783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12784 (eval $ac_try) 2>&5
12785 ac_status=$?
12786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12787 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012788 :
12789else
Martin v. Löwis11437992002-04-12 09:54:03 +000012790 echo "$as_me: failed program was:" >&5
12791cat conftest.$ac_ext >&5
12792
12793cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012794#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012795_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012796
Martin v. Löwis11437992002-04-12 09:54:03 +000012797
Guido van Rossum627b2d71993-12-24 10:39:16 +000012798fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012799rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012800
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012801fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012802done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012803
Michael W. Hudson54241132001-12-07 15:38:26 +000012804
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012805echo "$as_me:$LINENO: checking for major" >&5
12806echo $ECHO_N "checking for major... $ECHO_C" >&6
12807cat >conftest.$ac_ext <<_ACEOF
12808#line $LINENO "configure"
12809#include "confdefs.h"
12810
12811 #if defined(MAJOR_IN_MKDEV)
12812 #include <sys/mkdev.h>
12813 #elif defined(MAJOR_IN_SYSMACROS)
12814 #include <sys/sysmacros.h>
12815 #else
12816 #include <sys/types.h>
12817 #endif
12818
12819#ifdef F77_DUMMY_MAIN
12820# ifdef __cplusplus
12821 extern "C"
12822# endif
12823 int F77_DUMMY_MAIN() { return 1; }
12824#endif
12825int
12826main ()
12827{
12828
12829 makedev(major(0),minor(0));
12830
12831 ;
12832 return 0;
12833}
12834_ACEOF
12835rm -f conftest.$ac_objext
12836if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12837 (eval $ac_compile) 2>&5
12838 ac_status=$?
12839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12840 (exit $ac_status); } &&
12841 { ac_try='test -s conftest.$ac_objext'
12842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12843 (eval $ac_try) 2>&5
12844 ac_status=$?
12845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12846 (exit $ac_status); }; }; then
12847
12848
12849cat >>confdefs.h <<\_ACEOF
12850#define HAVE_DEVICE_MACROS 1
12851_ACEOF
12852
12853 echo "$as_me:$LINENO: result: yes" >&5
12854echo "${ECHO_T}yes" >&6
12855
12856else
12857 echo "$as_me: failed program was:" >&5
12858cat conftest.$ac_ext >&5
12859
12860 echo "$as_me:$LINENO: result: no" >&5
12861echo "${ECHO_T}no" >&6
12862
12863fi
12864rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012865
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012866# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012867# for [no]getaddrinfo in netdb.h.
12868echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12869echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12870cat >conftest.$ac_ext <<_ACEOF
12871#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012872#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012873
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012874#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012875#include <sys/socket.h>
12876#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012877#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012878
Martin v. Löwis11437992002-04-12 09:54:03 +000012879#ifdef F77_DUMMY_MAIN
12880# ifdef __cplusplus
12881 extern "C"
12882# endif
12883 int F77_DUMMY_MAIN() { return 1; }
12884#endif
12885int
12886main ()
12887{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012888
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012889getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012890
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 ;
12892 return 0;
12893}
12894_ACEOF
12895rm -f conftest.$ac_objext conftest$ac_exeext
12896if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12897 (eval $ac_link) 2>&5
12898 ac_status=$?
12899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12900 (exit $ac_status); } &&
12901 { ac_try='test -s conftest$ac_exeext'
12902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12903 (eval $ac_try) 2>&5
12904 ac_status=$?
12905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12906 (exit $ac_status); }; }; then
12907
12908echo "$as_me:$LINENO: result: yes" >&5
12909echo "${ECHO_T}yes" >&6
12910echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12911echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012912if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012913 echo "$as_me:$LINENO: result: buggy" >&5
12914echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012915buggygetaddrinfo=yes
12916else
Martin v. Löwis11437992002-04-12 09:54:03 +000012917 cat >conftest.$ac_ext <<_ACEOF
12918#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012919#include "confdefs.h"
12920
12921#include <sys/types.h>
12922#include <netdb.h>
12923#include <string.h>
12924#include <sys/socket.h>
12925#include <netinet/in.h>
12926
12927main()
12928{
12929 int passive, gaierr, inet4 = 0, inet6 = 0;
12930 struct addrinfo hints, *ai, *aitop;
12931 char straddr[INET6_ADDRSTRLEN], strport[16];
12932
12933 for (passive = 0; passive <= 1; passive++) {
12934 memset(&hints, 0, sizeof(hints));
12935 hints.ai_family = AF_UNSPEC;
12936 hints.ai_flags = passive ? AI_PASSIVE : 0;
12937 hints.ai_socktype = SOCK_STREAM;
12938 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12939 (void)gai_strerror(gaierr);
12940 goto bad;
12941 }
12942 for (ai = aitop; ai; ai = ai->ai_next) {
12943 if (ai->ai_addr == NULL ||
12944 ai->ai_addrlen == 0 ||
12945 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12946 straddr, sizeof(straddr), strport, sizeof(strport),
12947 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12948 goto bad;
12949 }
12950 switch (ai->ai_family) {
12951 case AF_INET:
12952 if (strcmp(strport, "54321") != 0) {
12953 goto bad;
12954 }
12955 if (passive) {
12956 if (strcmp(straddr, "0.0.0.0") != 0) {
12957 goto bad;
12958 }
12959 } else {
12960 if (strcmp(straddr, "127.0.0.1") != 0) {
12961 goto bad;
12962 }
12963 }
12964 inet4++;
12965 break;
12966 case AF_INET6:
12967 if (strcmp(strport, "54321") != 0) {
12968 goto bad;
12969 }
12970 if (passive) {
12971 if (strcmp(straddr, "::") != 0) {
12972 goto bad;
12973 }
12974 } else {
12975 if (strcmp(straddr, "::1") != 0) {
12976 goto bad;
12977 }
12978 }
12979 inet6++;
12980 break;
12981 case AF_UNSPEC:
12982 goto bad;
12983 break;
12984 default:
12985 /* another family support? */
12986 break;
12987 }
12988 }
12989 }
12990
12991 if (!(inet4 == 0 || inet4 == 2))
12992 goto bad;
12993 if (!(inet6 == 0 || inet6 == 2))
12994 goto bad;
12995
12996 if (aitop)
12997 freeaddrinfo(aitop);
12998 exit(0);
12999
13000 bad:
13001 if (aitop)
13002 freeaddrinfo(aitop);
13003 exit(1);
13004}
13005
Martin v. Löwis11437992002-04-12 09:54:03 +000013006_ACEOF
13007rm -f conftest$ac_exeext
13008if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13009 (eval $ac_link) 2>&5
13010 ac_status=$?
13011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13012 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13014 (eval $ac_try) 2>&5
13015 ac_status=$?
13016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13017 (exit $ac_status); }; }; then
13018 echo "$as_me:$LINENO: result: good" >&5
13019echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013020buggygetaddrinfo=no
13021else
Martin v. Löwis11437992002-04-12 09:54:03 +000013022 echo "$as_me: program exited with status $ac_status" >&5
13023echo "$as_me: failed program was:" >&5
13024cat conftest.$ac_ext >&5
13025( exit $ac_status )
13026echo "$as_me:$LINENO: result: buggy" >&5
13027echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013028buggygetaddrinfo=yes
13029fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013030rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013031fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013032else
Martin v. Löwis11437992002-04-12 09:54:03 +000013033 echo "$as_me: failed program was:" >&5
13034cat conftest.$ac_ext >&5
13035
13036echo "$as_me:$LINENO: result: no" >&5
13037echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013038buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013039
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013040fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013041rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013042
13043if test "$buggygetaddrinfo" = "yes"; then
13044 if test "$ipv6" = "yes"; then
13045 echo 'Fatal: You must get working getaddrinfo() function.'
13046 echo ' or you can specify "--disable-ipv6"'.
13047 exit 1
13048 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013049else
Martin v. Löwis11437992002-04-12 09:54:03 +000013050
13051cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013052#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013053_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013054
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013055fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013056
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013057for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013058do
Martin v. Löwis11437992002-04-12 09:54:03 +000013059as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13060echo "$as_me:$LINENO: checking for $ac_func" >&5
13061echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13062if eval "test \"\${$as_ac_var+set}\" = set"; then
13063 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013064else
Martin v. Löwis11437992002-04-12 09:54:03 +000013065 cat >conftest.$ac_ext <<_ACEOF
13066#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013067#include "confdefs.h"
13068/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013069 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013070#include <assert.h>
13071/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013072#ifdef __cplusplus
13073extern "C"
13074#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013075/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013076 builtin and then its argument prototype would still apply. */
13077char $ac_func ();
13078char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013079
Martin v. Löwis11437992002-04-12 09:54:03 +000013080#ifdef F77_DUMMY_MAIN
13081# ifdef __cplusplus
13082 extern "C"
13083# endif
13084 int F77_DUMMY_MAIN() { return 1; }
13085#endif
13086int
13087main ()
13088{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013089/* The GNU C library defines this for functions which it implements
13090 to always fail with ENOSYS. Some functions are actually named
13091 something starting with __ and the normal name is an alias. */
13092#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13093choke me
13094#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013095f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013096#endif
13097
Martin v. Löwis11437992002-04-12 09:54:03 +000013098 ;
13099 return 0;
13100}
13101_ACEOF
13102rm -f conftest.$ac_objext conftest$ac_exeext
13103if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13104 (eval $ac_link) 2>&5
13105 ac_status=$?
13106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13107 (exit $ac_status); } &&
13108 { ac_try='test -s conftest$ac_exeext'
13109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13110 (eval $ac_try) 2>&5
13111 ac_status=$?
13112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13113 (exit $ac_status); }; }; then
13114 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013115else
Martin v. Löwis11437992002-04-12 09:54:03 +000013116 echo "$as_me: failed program was:" >&5
13117cat conftest.$ac_ext >&5
13118eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013119fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013120rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013121fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013122echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13123echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13124if test `eval echo '${'$as_ac_var'}'` = yes; then
13125 cat >>confdefs.h <<_ACEOF
13126#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13127_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013128
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013129fi
13130done
13131
Michael W. Hudson54241132001-12-07 15:38:26 +000013132
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013133# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000013134echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13135echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13136if test "${ac_cv_header_time+set}" = set; then
13137 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013138else
Martin v. Löwis11437992002-04-12 09:54:03 +000013139 cat >conftest.$ac_ext <<_ACEOF
13140#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013141#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013142#include <sys/types.h>
13143#include <sys/time.h>
13144#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013145
13146#ifdef F77_DUMMY_MAIN
13147# ifdef __cplusplus
13148 extern "C"
13149# endif
13150 int F77_DUMMY_MAIN() { return 1; }
13151#endif
13152int
13153main ()
13154{
13155if ((struct tm *) 0)
13156return 0;
13157 ;
13158 return 0;
13159}
13160_ACEOF
13161rm -f conftest.$ac_objext
13162if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13163 (eval $ac_compile) 2>&5
13164 ac_status=$?
13165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13166 (exit $ac_status); } &&
13167 { ac_try='test -s conftest.$ac_objext'
13168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13169 (eval $ac_try) 2>&5
13170 ac_status=$?
13171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13172 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013173 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013174else
Martin v. Löwis11437992002-04-12 09:54:03 +000013175 echo "$as_me: failed program was:" >&5
13176cat conftest.$ac_ext >&5
13177ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013178fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013179rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013180fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013181echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
13182echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013183if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013184
13185cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013186#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013187_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013188
13189fi
13190
Martin v. Löwis11437992002-04-12 09:54:03 +000013191echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
13192echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
13193if test "${ac_cv_struct_tm+set}" = set; then
13194 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013195else
Martin v. Löwis11437992002-04-12 09:54:03 +000013196 cat >conftest.$ac_ext <<_ACEOF
13197#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013198#include "confdefs.h"
13199#include <sys/types.h>
13200#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013201
13202#ifdef F77_DUMMY_MAIN
13203# ifdef __cplusplus
13204 extern "C"
13205# endif
13206 int F77_DUMMY_MAIN() { return 1; }
13207#endif
13208int
13209main ()
13210{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013211struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000013212 ;
13213 return 0;
13214}
13215_ACEOF
13216rm -f conftest.$ac_objext
13217if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13218 (eval $ac_compile) 2>&5
13219 ac_status=$?
13220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13221 (exit $ac_status); } &&
13222 { ac_try='test -s conftest.$ac_objext'
13223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13224 (eval $ac_try) 2>&5
13225 ac_status=$?
13226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13227 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013228 ac_cv_struct_tm=time.h
13229else
Martin v. Löwis11437992002-04-12 09:54:03 +000013230 echo "$as_me: failed program was:" >&5
13231cat conftest.$ac_ext >&5
13232ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013233fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013234rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013235fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013236echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
13237echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013238if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013239
13240cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013241#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013242_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013243
13244fi
13245
Martin v. Löwis11437992002-04-12 09:54:03 +000013246echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13247echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
13248if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13249 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013250else
Martin v. Löwis11437992002-04-12 09:54:03 +000013251 cat >conftest.$ac_ext <<_ACEOF
13252#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013253#include "confdefs.h"
13254#include <sys/types.h>
13255#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013256
13257
13258#ifdef F77_DUMMY_MAIN
13259# ifdef __cplusplus
13260 extern "C"
13261# endif
13262 int F77_DUMMY_MAIN() { return 1; }
13263#endif
13264int
13265main ()
13266{
13267static struct tm ac_aggr;
13268if (ac_aggr.tm_zone)
13269return 0;
13270 ;
13271 return 0;
13272}
13273_ACEOF
13274rm -f conftest.$ac_objext
13275if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13276 (eval $ac_compile) 2>&5
13277 ac_status=$?
13278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13279 (exit $ac_status); } &&
13280 { ac_try='test -s conftest.$ac_objext'
13281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13282 (eval $ac_try) 2>&5
13283 ac_status=$?
13284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13285 (exit $ac_status); }; }; then
13286 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013287else
Martin v. Löwis11437992002-04-12 09:54:03 +000013288 echo "$as_me: failed program was:" >&5
13289cat conftest.$ac_ext >&5
13290ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013291fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013292rm -f conftest.$ac_objext conftest.$ac_ext
13293fi
13294echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13295echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
13296if test $ac_cv_member_struct_tm_tm_zone = yes; then
13297
13298cat >>confdefs.h <<_ACEOF
13299#define HAVE_STRUCT_TM_TM_ZONE 1
13300_ACEOF
13301
13302
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013303fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013304
Martin v. Löwis11437992002-04-12 09:54:03 +000013305if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13306
13307cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013308#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013309_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013310
13311else
Martin v. Löwis11437992002-04-12 09:54:03 +000013312 echo "$as_me:$LINENO: checking for tzname" >&5
13313echo $ECHO_N "checking for tzname... $ECHO_C" >&6
13314if test "${ac_cv_var_tzname+set}" = set; then
13315 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013316else
Martin v. Löwis11437992002-04-12 09:54:03 +000013317 cat >conftest.$ac_ext <<_ACEOF
13318#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013319#include "confdefs.h"
13320#include <time.h>
13321#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013322extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013323#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013324
13325#ifdef F77_DUMMY_MAIN
13326# ifdef __cplusplus
13327 extern "C"
13328# endif
13329 int F77_DUMMY_MAIN() { return 1; }
13330#endif
13331int
13332main ()
13333{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013334atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000013335 ;
13336 return 0;
13337}
13338_ACEOF
13339rm -f conftest.$ac_objext conftest$ac_exeext
13340if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13341 (eval $ac_link) 2>&5
13342 ac_status=$?
13343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13344 (exit $ac_status); } &&
13345 { ac_try='test -s conftest$ac_exeext'
13346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13347 (eval $ac_try) 2>&5
13348 ac_status=$?
13349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13350 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013351 ac_cv_var_tzname=yes
13352else
Martin v. Löwis11437992002-04-12 09:54:03 +000013353 echo "$as_me: failed program was:" >&5
13354cat conftest.$ac_ext >&5
13355ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013356fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013357rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013358fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013359echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13360echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013361 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013362
13363cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013364#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013365_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013366
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013367 fi
13368fi
13369
Martin v. Löwis11437992002-04-12 09:54:03 +000013370echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
13371echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
13372if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
13373 echo $ECHO_N "(cached) $ECHO_C" >&6
13374else
13375 cat >conftest.$ac_ext <<_ACEOF
13376#line $LINENO "configure"
13377#include "confdefs.h"
13378$ac_includes_default
13379#ifdef F77_DUMMY_MAIN
13380# ifdef __cplusplus
13381 extern "C"
13382# endif
13383 int F77_DUMMY_MAIN() { return 1; }
13384#endif
13385int
13386main ()
13387{
13388static struct stat ac_aggr;
13389if (ac_aggr.st_rdev)
13390return 0;
13391 ;
13392 return 0;
13393}
13394_ACEOF
13395rm -f conftest.$ac_objext
13396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13397 (eval $ac_compile) 2>&5
13398 ac_status=$?
13399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13400 (exit $ac_status); } &&
13401 { ac_try='test -s conftest.$ac_objext'
13402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13403 (eval $ac_try) 2>&5
13404 ac_status=$?
13405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13406 (exit $ac_status); }; }; then
13407 ac_cv_member_struct_stat_st_rdev=yes
13408else
13409 echo "$as_me: failed program was:" >&5
13410cat conftest.$ac_ext >&5
13411ac_cv_member_struct_stat_st_rdev=no
13412fi
13413rm -f conftest.$ac_objext conftest.$ac_ext
13414fi
13415echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
13416echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
13417if test $ac_cv_member_struct_stat_st_rdev = yes; then
13418
13419cat >>confdefs.h <<_ACEOF
13420#define HAVE_STRUCT_STAT_ST_RDEV 1
13421_ACEOF
13422
13423
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013424fi
13425
Martin v. Löwis11437992002-04-12 09:54:03 +000013426echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13427echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13428if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13429 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013430else
Martin v. Löwis11437992002-04-12 09:54:03 +000013431 cat >conftest.$ac_ext <<_ACEOF
13432#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013433#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013434$ac_includes_default
13435#ifdef F77_DUMMY_MAIN
13436# ifdef __cplusplus
13437 extern "C"
13438# endif
13439 int F77_DUMMY_MAIN() { return 1; }
13440#endif
13441int
13442main ()
13443{
13444static struct stat ac_aggr;
13445if (ac_aggr.st_blksize)
13446return 0;
13447 ;
13448 return 0;
13449}
13450_ACEOF
13451rm -f conftest.$ac_objext
13452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13453 (eval $ac_compile) 2>&5
13454 ac_status=$?
13455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13456 (exit $ac_status); } &&
13457 { ac_try='test -s conftest.$ac_objext'
13458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13459 (eval $ac_try) 2>&5
13460 ac_status=$?
13461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13462 (exit $ac_status); }; }; then
13463 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013464else
Martin v. Löwis11437992002-04-12 09:54:03 +000013465 echo "$as_me: failed program was:" >&5
13466cat conftest.$ac_ext >&5
13467ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013468fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013469rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013470fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013471echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13472echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13473if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013474
Martin v. Löwis11437992002-04-12 09:54:03 +000013475cat >>confdefs.h <<_ACEOF
13476#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13477_ACEOF
13478
13479
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013480fi
13481
Martin v. Löwis11437992002-04-12 09:54:03 +000013482echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13483echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13484if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13485 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013486else
Martin v. Löwis11437992002-04-12 09:54:03 +000013487 cat >conftest.$ac_ext <<_ACEOF
13488#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013489#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013490$ac_includes_default
13491#ifdef F77_DUMMY_MAIN
13492# ifdef __cplusplus
13493 extern "C"
13494# endif
13495 int F77_DUMMY_MAIN() { return 1; }
13496#endif
13497int
13498main ()
13499{
13500static struct stat ac_aggr;
13501if (ac_aggr.st_blocks)
13502return 0;
13503 ;
13504 return 0;
13505}
13506_ACEOF
13507rm -f conftest.$ac_objext
13508if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13509 (eval $ac_compile) 2>&5
13510 ac_status=$?
13511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13512 (exit $ac_status); } &&
13513 { ac_try='test -s conftest.$ac_objext'
13514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13515 (eval $ac_try) 2>&5
13516 ac_status=$?
13517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13518 (exit $ac_status); }; }; then
13519 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013520else
Martin v. Löwis11437992002-04-12 09:54:03 +000013521 echo "$as_me: failed program was:" >&5
13522cat conftest.$ac_ext >&5
13523ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013524fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013525rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013526fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013527echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13528echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13529if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013530
Martin v. Löwis11437992002-04-12 09:54:03 +000013531cat >>confdefs.h <<_ACEOF
13532#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13533_ACEOF
13534
13535
13536cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013537#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013538_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013539
13540else
Martin v. Löwis11437992002-04-12 09:54:03 +000013541 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013542fi
13543
Michael W. Hudson54241132001-12-07 15:38:26 +000013544
Martin v. Löwis11437992002-04-12 09:54:03 +000013545
13546echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13547echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13548if test "${ac_cv_header_time_altzone+set}" = set; then
13549 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013550else
Martin v. Löwis11437992002-04-12 09:54:03 +000013551 cat >conftest.$ac_ext <<_ACEOF
13552#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013553#include "confdefs.h"
13554#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013555#ifdef F77_DUMMY_MAIN
13556# ifdef __cplusplus
13557 extern "C"
13558# endif
13559 int F77_DUMMY_MAIN() { return 1; }
13560#endif
13561int
13562main ()
13563{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013564return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013565 ;
13566 return 0;
13567}
13568_ACEOF
13569rm -f conftest.$ac_objext
13570if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13571 (eval $ac_compile) 2>&5
13572 ac_status=$?
13573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13574 (exit $ac_status); } &&
13575 { ac_try='test -s conftest.$ac_objext'
13576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13577 (eval $ac_try) 2>&5
13578 ac_status=$?
13579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13580 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013581 ac_cv_header_time_altzone=yes
13582else
Martin v. Löwis11437992002-04-12 09:54:03 +000013583 echo "$as_me: failed program was:" >&5
13584cat conftest.$ac_ext >&5
13585ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013586fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013587rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013588fi
13589
Martin v. Löwis11437992002-04-12 09:54:03 +000013590echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13591echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013592if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013593
13594cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013595#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013596_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013597
13598fi
13599
Guido van Rossumda88dad1995-01-26 00:46:29 +000013600was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013601echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13602echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13603cat >conftest.$ac_ext <<_ACEOF
13604#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013605#include "confdefs.h"
13606
13607#include <sys/types.h>
13608#include <sys/select.h>
13609#include <sys/time.h>
13610
Martin v. Löwis11437992002-04-12 09:54:03 +000013611#ifdef F77_DUMMY_MAIN
13612# ifdef __cplusplus
13613 extern "C"
13614# endif
13615 int F77_DUMMY_MAIN() { return 1; }
13616#endif
13617int
13618main ()
13619{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013620;
Martin v. Löwis11437992002-04-12 09:54:03 +000013621 ;
13622 return 0;
13623}
13624_ACEOF
13625rm -f conftest.$ac_objext
13626if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13627 (eval $ac_compile) 2>&5
13628 ac_status=$?
13629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13630 (exit $ac_status); } &&
13631 { ac_try='test -s conftest.$ac_objext'
13632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13633 (eval $ac_try) 2>&5
13634 ac_status=$?
13635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13636 (exit $ac_status); }; }; then
13637
13638
13639cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013640#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013641_ACEOF
13642
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013643 was_it_defined=yes
13644
Guido van Rossumf78abae1997-01-21 22:02:36 +000013645else
Martin v. Löwis11437992002-04-12 09:54:03 +000013646 echo "$as_me: failed program was:" >&5
13647cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013648fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013649rm -f conftest.$ac_objext conftest.$ac_ext
13650echo "$as_me:$LINENO: result: $was_it_defined" >&5
13651echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013652
Martin v. Löwis11437992002-04-12 09:54:03 +000013653echo "$as_me:$LINENO: checking for addrinfo" >&5
13654echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13655if test "${ac_cv_struct_addrinfo+set}" = set; then
13656 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013657else
Martin v. Löwis11437992002-04-12 09:54:03 +000013658 cat >conftest.$ac_ext <<_ACEOF
13659#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013660#include "confdefs.h"
13661
13662# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013663#ifdef F77_DUMMY_MAIN
13664# ifdef __cplusplus
13665 extern "C"
13666# endif
13667 int F77_DUMMY_MAIN() { return 1; }
13668#endif
13669int
13670main ()
13671{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013672struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013673 ;
13674 return 0;
13675}
13676_ACEOF
13677rm -f conftest.$ac_objext
13678if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13679 (eval $ac_compile) 2>&5
13680 ac_status=$?
13681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13682 (exit $ac_status); } &&
13683 { ac_try='test -s conftest.$ac_objext'
13684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13685 (eval $ac_try) 2>&5
13686 ac_status=$?
13687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13688 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013689 ac_cv_struct_addrinfo=yes
13690else
Martin v. Löwis11437992002-04-12 09:54:03 +000013691 echo "$as_me: failed program was:" >&5
13692cat conftest.$ac_ext >&5
13693ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013694fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013695rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013696fi
13697
Martin v. Löwis11437992002-04-12 09:54:03 +000013698echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13699echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013700if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013701
13702cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013703#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013704_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013705
13706fi
13707
Martin v. Löwis11437992002-04-12 09:54:03 +000013708echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13709echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13710if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13711 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013712else
Martin v. Löwis11437992002-04-12 09:54:03 +000013713 cat >conftest.$ac_ext <<_ACEOF
13714#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013715#include "confdefs.h"
13716
13717# include <sys/types.h>
13718# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013719#ifdef F77_DUMMY_MAIN
13720# ifdef __cplusplus
13721 extern "C"
13722# endif
13723 int F77_DUMMY_MAIN() { return 1; }
13724#endif
13725int
13726main ()
13727{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013728struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013729 ;
13730 return 0;
13731}
13732_ACEOF
13733rm -f conftest.$ac_objext
13734if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13735 (eval $ac_compile) 2>&5
13736 ac_status=$?
13737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13738 (exit $ac_status); } &&
13739 { ac_try='test -s conftest.$ac_objext'
13740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13741 (eval $ac_try) 2>&5
13742 ac_status=$?
13743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13744 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013745 ac_cv_struct_sockaddr_storage=yes
13746else
Martin v. Löwis11437992002-04-12 09:54:03 +000013747 echo "$as_me: failed program was:" >&5
13748cat conftest.$ac_ext >&5
13749ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013750fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013751rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013752fi
13753
Martin v. Löwis11437992002-04-12 09:54:03 +000013754echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13755echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013756if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013757
13758cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013759#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013760_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013761
13762fi
13763
Guido van Rossum627b2d71993-12-24 10:39:16 +000013764# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013765
Michael W. Hudson54241132001-12-07 15:38:26 +000013766
Martin v. Löwis11437992002-04-12 09:54:03 +000013767echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13768echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13769if test "${ac_cv_c_char_unsigned+set}" = set; then
13770 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013771else
Martin v. Löwis11437992002-04-12 09:54:03 +000013772 cat >conftest.$ac_ext <<_ACEOF
13773#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013774#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013775$ac_includes_default
13776#ifdef F77_DUMMY_MAIN
13777# ifdef __cplusplus
13778 extern "C"
13779# endif
13780 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013781#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013782int
13783main ()
13784{
13785static int test_array [1 - 2 * !(((char) -1) < 0)];
13786test_array [0] = 0
13787
13788 ;
13789 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013790}
Martin v. Löwis11437992002-04-12 09:54:03 +000013791_ACEOF
13792rm -f conftest.$ac_objext
13793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13794 (eval $ac_compile) 2>&5
13795 ac_status=$?
13796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13797 (exit $ac_status); } &&
13798 { ac_try='test -s conftest.$ac_objext'
13799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13800 (eval $ac_try) 2>&5
13801 ac_status=$?
13802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13803 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013804 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013805else
13806 echo "$as_me: failed program was:" >&5
13807cat conftest.$ac_ext >&5
13808ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013809fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013810rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013811fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013812echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13813echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013814if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013815 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013816#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013817_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013818
13819fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013820
Martin v. Löwis11437992002-04-12 09:54:03 +000013821echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13822echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13823if test "${ac_cv_prog_cc_stdc+set}" = set; then
13824 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013825else
Martin v. Löwis11437992002-04-12 09:54:03 +000013826 ac_cv_prog_cc_stdc=no
13827ac_save_CC=$CC
13828cat >conftest.$ac_ext <<_ACEOF
13829#line $LINENO "configure"
13830#include "confdefs.h"
13831#include <stdarg.h>
13832#include <stdio.h>
13833#include <sys/types.h>
13834#include <sys/stat.h>
13835/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13836struct buf { int x; };
13837FILE * (*rcsopen) (struct buf *, struct stat *, int);
13838static char *e (p, i)
13839 char **p;
13840 int i;
13841{
13842 return p[i];
13843}
13844static char *f (char * (*g) (char **, int), char **p, ...)
13845{
13846 char *s;
13847 va_list v;
13848 va_start (v,p);
13849 s = g (p, va_arg (v,int));
13850 va_end (v);
13851 return s;
13852}
13853int test (int i, double x);
13854struct s1 {int (*f) (int a);};
13855struct s2 {int (*f) (double a);};
13856int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13857int argc;
13858char **argv;
13859#ifdef F77_DUMMY_MAIN
13860# ifdef __cplusplus
13861 extern "C"
13862# endif
13863 int F77_DUMMY_MAIN() { return 1; }
13864#endif
13865int
13866main ()
13867{
13868return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13869 ;
13870 return 0;
13871}
13872_ACEOF
13873# Don't try gcc -ansi; that turns off useful extensions and
13874# breaks some systems' header files.
13875# AIX -qlanglvl=ansi
13876# Ultrix and OSF/1 -std1
13877# HP-UX 10.20 and later -Ae
13878# HP-UX older versions -Aa -D_HPUX_SOURCE
13879# SVR4 -Xc -D__EXTENSIONS__
13880for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13881do
13882 CC="$ac_save_CC $ac_arg"
13883 rm -f conftest.$ac_objext
13884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13885 (eval $ac_compile) 2>&5
13886 ac_status=$?
13887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13888 (exit $ac_status); } &&
13889 { ac_try='test -s conftest.$ac_objext'
13890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13891 (eval $ac_try) 2>&5
13892 ac_status=$?
13893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13894 (exit $ac_status); }; }; then
13895 ac_cv_prog_cc_stdc=$ac_arg
13896break
13897else
13898 echo "$as_me: failed program was:" >&5
13899cat conftest.$ac_ext >&5
13900fi
13901rm -f conftest.$ac_objext
13902done
13903rm -f conftest.$ac_ext conftest.$ac_objext
13904CC=$ac_save_CC
13905
13906fi
13907
13908case "x$ac_cv_prog_cc_stdc" in
13909 x|xno)
13910 echo "$as_me:$LINENO: result: none needed" >&5
13911echo "${ECHO_T}none needed" >&6 ;;
13912 *)
13913 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13914echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13915 CC="$CC $ac_cv_prog_cc_stdc" ;;
13916esac
13917
13918echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13919echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13920if test "${ac_cv_c_const+set}" = set; then
13921 echo $ECHO_N "(cached) $ECHO_C" >&6
13922else
13923 cat >conftest.$ac_ext <<_ACEOF
13924#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013925#include "confdefs.h"
13926
Martin v. Löwis11437992002-04-12 09:54:03 +000013927#ifdef F77_DUMMY_MAIN
13928# ifdef __cplusplus
13929 extern "C"
13930# endif
13931 int F77_DUMMY_MAIN() { return 1; }
13932#endif
13933int
13934main ()
13935{
13936/* FIXME: Include the comments suggested by Paul. */
13937#ifndef __cplusplus
13938 /* Ultrix mips cc rejects this. */
13939 typedef int charset[2];
13940 const charset x;
13941 /* SunOS 4.1.1 cc rejects this. */
13942 char const *const *ccp;
13943 char **p;
13944 /* NEC SVR4.0.2 mips cc rejects this. */
13945 struct point {int x, y;};
13946 static struct point const zero = {0,0};
13947 /* AIX XL C 1.02.0.0 rejects this.
13948 It does not let you subtract one const X* pointer from another in
13949 an arm of an if-expression whose if-part is not a constant
13950 expression */
13951 const char *g = "string";
13952 ccp = &g + (g ? g-g : 0);
13953 /* HPUX 7.0 cc rejects these. */
13954 ++ccp;
13955 p = (char**) ccp;
13956 ccp = (char const *const *) p;
13957 { /* SCO 3.2v4 cc rejects this. */
13958 char *t;
13959 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013960
Martin v. Löwis11437992002-04-12 09:54:03 +000013961 *t++ = 0;
13962 }
13963 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13964 int x[] = {25, 17};
13965 const int *foo = &x[0];
13966 ++foo;
13967 }
13968 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13969 typedef const int *iptr;
13970 iptr p = 0;
13971 ++p;
13972 }
13973 { /* AIX XL C 1.02.0.0 rejects this saying
13974 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13975 struct s { int j; const int *ap[3]; };
13976 struct s *b; b->j = 5;
13977 }
13978 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13979 const int foo = 10;
13980 }
13981#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013982
Martin v. Löwis11437992002-04-12 09:54:03 +000013983 ;
13984 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013985}
Martin v. Löwis11437992002-04-12 09:54:03 +000013986_ACEOF
13987rm -f conftest.$ac_objext
13988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13989 (eval $ac_compile) 2>&5
13990 ac_status=$?
13991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13992 (exit $ac_status); } &&
13993 { ac_try='test -s conftest.$ac_objext'
13994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13995 (eval $ac_try) 2>&5
13996 ac_status=$?
13997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13998 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013999 ac_cv_c_const=yes
14000else
Martin v. Löwis11437992002-04-12 09:54:03 +000014001 echo "$as_me: failed program was:" >&5
14002cat conftest.$ac_ext >&5
14003ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014004fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014005rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014006fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014007echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14008echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014009if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014010
14011cat >>confdefs.h <<\_ACEOF
14012#define const
14013_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014014
14015fi
14016
Michael W. Hudson54241132001-12-07 15:38:26 +000014017
Guido van Rossumda88dad1995-01-26 00:46:29 +000014018works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014019echo "$as_me:$LINENO: checking for working volatile" >&5
14020echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14021cat >conftest.$ac_ext <<_ACEOF
14022#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014023#include "confdefs.h"
14024
Martin v. Löwis11437992002-04-12 09:54:03 +000014025#ifdef F77_DUMMY_MAIN
14026# ifdef __cplusplus
14027 extern "C"
14028# endif
14029 int F77_DUMMY_MAIN() { return 1; }
14030#endif
14031int
14032main ()
14033{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014034volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014035 ;
14036 return 0;
14037}
14038_ACEOF
14039rm -f conftest.$ac_objext
14040if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14041 (eval $ac_compile) 2>&5
14042 ac_status=$?
14043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14044 (exit $ac_status); } &&
14045 { ac_try='test -s conftest.$ac_objext'
14046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14047 (eval $ac_try) 2>&5
14048 ac_status=$?
14049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14050 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014051 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014052else
Martin v. Löwis11437992002-04-12 09:54:03 +000014053 echo "$as_me: failed program was:" >&5
14054cat conftest.$ac_ext >&5
14055
14056cat >>confdefs.h <<\_ACEOF
14057#define volatile
14058_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014059
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014060
Guido van Rossum627b2d71993-12-24 10:39:16 +000014061fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014062rm -f conftest.$ac_objext conftest.$ac_ext
14063echo "$as_me:$LINENO: result: $works" >&5
14064echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014065
Guido van Rossumda88dad1995-01-26 00:46:29 +000014066works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014067echo "$as_me:$LINENO: checking for working signed char" >&5
14068echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14069cat >conftest.$ac_ext <<_ACEOF
14070#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014071#include "confdefs.h"
14072
Martin v. Löwis11437992002-04-12 09:54:03 +000014073#ifdef F77_DUMMY_MAIN
14074# ifdef __cplusplus
14075 extern "C"
14076# endif
14077 int F77_DUMMY_MAIN() { return 1; }
14078#endif
14079int
14080main ()
14081{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014082signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014083 ;
14084 return 0;
14085}
14086_ACEOF
14087rm -f conftest.$ac_objext
14088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14089 (eval $ac_compile) 2>&5
14090 ac_status=$?
14091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14092 (exit $ac_status); } &&
14093 { ac_try='test -s conftest.$ac_objext'
14094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14095 (eval $ac_try) 2>&5
14096 ac_status=$?
14097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14098 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014099 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014100else
Martin v. Löwis11437992002-04-12 09:54:03 +000014101 echo "$as_me: failed program was:" >&5
14102cat conftest.$ac_ext >&5
14103
14104cat >>confdefs.h <<\_ACEOF
14105#define signed
14106_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000014107
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014108
Guido van Rossum7f43da71994-08-01 12:15:30 +000014109fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014110rm -f conftest.$ac_objext conftest.$ac_ext
14111echo "$as_me:$LINENO: result: $works" >&5
14112echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014113
Guido van Rossumda88dad1995-01-26 00:46:29 +000014114have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014115echo "$as_me:$LINENO: checking for prototypes" >&5
14116echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
14117cat >conftest.$ac_ext <<_ACEOF
14118#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014119#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014120int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014121#ifdef F77_DUMMY_MAIN
14122# ifdef __cplusplus
14123 extern "C"
14124# endif
14125 int F77_DUMMY_MAIN() { return 1; }
14126#endif
14127int
14128main ()
14129{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014130return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014131 ;
14132 return 0;
14133}
14134_ACEOF
14135rm -f conftest.$ac_objext
14136if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14137 (eval $ac_compile) 2>&5
14138 ac_status=$?
14139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14140 (exit $ac_status); } &&
14141 { ac_try='test -s conftest.$ac_objext'
14142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14143 (eval $ac_try) 2>&5
14144 ac_status=$?
14145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14146 (exit $ac_status); }; }; then
14147
14148
14149cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014150#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014151_ACEOF
14152
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014153 have_prototypes=yes
14154
Guido van Rossumf78abae1997-01-21 22:02:36 +000014155else
Martin v. Löwis11437992002-04-12 09:54:03 +000014156 echo "$as_me: failed program was:" >&5
14157cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014158fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014159rm -f conftest.$ac_objext conftest.$ac_ext
14160echo "$as_me:$LINENO: result: $have_prototypes" >&5
14161echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014162
Guido van Rossumda88dad1995-01-26 00:46:29 +000014163works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014164echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
14165echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
14166cat >conftest.$ac_ext <<_ACEOF
14167#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014168#include "confdefs.h"
14169
14170#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014171int foo(int x, ...) {
14172 va_list va;
14173 va_start(va, x);
14174 va_arg(va, int);
14175 va_arg(va, char *);
14176 va_arg(va, double);
14177 return 0;
14178}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014179
Martin v. Löwis11437992002-04-12 09:54:03 +000014180#ifdef F77_DUMMY_MAIN
14181# ifdef __cplusplus
14182 extern "C"
14183# endif
14184 int F77_DUMMY_MAIN() { return 1; }
14185#endif
14186int
14187main ()
14188{
Guido van Rossum90eea071996-08-30 20:58:57 +000014189return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014190 ;
14191 return 0;
14192}
14193_ACEOF
14194rm -f conftest.$ac_objext
14195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14196 (eval $ac_compile) 2>&5
14197 ac_status=$?
14198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14199 (exit $ac_status); } &&
14200 { ac_try='test -s conftest.$ac_objext'
14201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14202 (eval $ac_try) 2>&5
14203 ac_status=$?
14204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14205 (exit $ac_status); }; }; then
14206
14207
14208cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014209#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014210_ACEOF
14211
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014212 works=yes
14213
Guido van Rossumf78abae1997-01-21 22:02:36 +000014214else
Martin v. Löwis11437992002-04-12 09:54:03 +000014215 echo "$as_me: failed program was:" >&5
14216cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000014217fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014218rm -f conftest.$ac_objext conftest.$ac_ext
14219echo "$as_me:$LINENO: result: $works" >&5
14220echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014221
Guido van Rossumda88dad1995-01-26 00:46:29 +000014222if test "$have_prototypes" = yes; then
14223bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014224echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
14225echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
14226cat >conftest.$ac_ext <<_ACEOF
14227#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014228#include "confdefs.h"
14229#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014230#ifdef F77_DUMMY_MAIN
14231# ifdef __cplusplus
14232 extern "C"
14233# endif
14234 int F77_DUMMY_MAIN() { return 1; }
14235#endif
14236int
14237main ()
14238{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014239char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000014240 ;
14241 return 0;
14242}
14243_ACEOF
14244rm -f conftest.$ac_objext
14245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14246 (eval $ac_compile) 2>&5
14247 ac_status=$?
14248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14249 (exit $ac_status); } &&
14250 { ac_try='test -s conftest.$ac_objext'
14251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14252 (eval $ac_try) 2>&5
14253 ac_status=$?
14254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14255 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014256 :
14257else
Martin v. Löwis11437992002-04-12 09:54:03 +000014258 echo "$as_me: failed program was:" >&5
14259cat conftest.$ac_ext >&5
14260
14261cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014262#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014263_ACEOF
14264
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014265 bad_prototypes=yes
14266
Guido van Rossum627b2d71993-12-24 10:39:16 +000014267fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014268rm -f conftest.$ac_objext conftest.$ac_ext
14269echo "$as_me:$LINENO: result: $bad_prototypes" >&5
14270echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014271fi
14272
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014273# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000014274echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
14275echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
14276cat >conftest.$ac_ext <<_ACEOF
14277#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014278#include "confdefs.h"
14279#include <sys/types.h>
14280#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014281#ifdef F77_DUMMY_MAIN
14282# ifdef __cplusplus
14283 extern "C"
14284# endif
14285 int F77_DUMMY_MAIN() { return 1; }
14286#endif
14287int
14288main ()
14289{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014290struct sockaddr x;
14291x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014292 ;
14293 return 0;
14294}
14295_ACEOF
14296rm -f conftest.$ac_objext
14297if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14298 (eval $ac_compile) 2>&5
14299 ac_status=$?
14300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14301 (exit $ac_status); } &&
14302 { ac_try='test -s conftest.$ac_objext'
14303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14304 (eval $ac_try) 2>&5
14305 ac_status=$?
14306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14307 (exit $ac_status); }; }; then
14308 echo "$as_me:$LINENO: result: yes" >&5
14309echo "${ECHO_T}yes" >&6
14310
14311cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014312#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014313_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014314
14315else
Martin v. Löwis11437992002-04-12 09:54:03 +000014316 echo "$as_me: failed program was:" >&5
14317cat conftest.$ac_ext >&5
14318echo "$as_me:$LINENO: result: no" >&5
14319echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014320fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014321rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014322
Guido van Rossumda88dad1995-01-26 00:46:29 +000014323va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014324echo "$as_me:$LINENO: checking whether va_list is an array" >&5
14325echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
14326cat >conftest.$ac_ext <<_ACEOF
14327#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014328#include "confdefs.h"
14329
14330#ifdef HAVE_STDARG_PROTOTYPES
14331#include <stdarg.h>
14332#else
14333#include <varargs.h>
14334#endif
14335
Martin v. Löwis11437992002-04-12 09:54:03 +000014336#ifdef F77_DUMMY_MAIN
14337# ifdef __cplusplus
14338 extern "C"
14339# endif
14340 int F77_DUMMY_MAIN() { return 1; }
14341#endif
14342int
14343main ()
14344{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014345va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000014346 ;
14347 return 0;
14348}
14349_ACEOF
14350rm -f conftest.$ac_objext
14351if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14352 (eval $ac_compile) 2>&5
14353 ac_status=$?
14354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14355 (exit $ac_status); } &&
14356 { ac_try='test -s conftest.$ac_objext'
14357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14358 (eval $ac_try) 2>&5
14359 ac_status=$?
14360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14361 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014362 :
14363else
Martin v. Löwis11437992002-04-12 09:54:03 +000014364 echo "$as_me: failed program was:" >&5
14365cat conftest.$ac_ext >&5
14366
14367
14368cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014369#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014370_ACEOF
14371
Guido van Rossumda88dad1995-01-26 00:46:29 +000014372 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014373
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014374fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014375rm -f conftest.$ac_objext conftest.$ac_ext
14376echo "$as_me:$LINENO: result: $va_list_is_array" >&5
14377echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014378
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014379# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014380
14381
14382
14383echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
14384echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
14385if test "${ac_cv_func_gethostbyname_r+set}" = set; then
14386 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014387else
Martin v. Löwis11437992002-04-12 09:54:03 +000014388 cat >conftest.$ac_ext <<_ACEOF
14389#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014390#include "confdefs.h"
14391/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014392 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014393#include <assert.h>
14394/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014395#ifdef __cplusplus
14396extern "C"
14397#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014398/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014399 builtin and then its argument prototype would still apply. */
14400char gethostbyname_r ();
14401char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014402
Martin v. Löwis11437992002-04-12 09:54:03 +000014403#ifdef F77_DUMMY_MAIN
14404# ifdef __cplusplus
14405 extern "C"
14406# endif
14407 int F77_DUMMY_MAIN() { return 1; }
14408#endif
14409int
14410main ()
14411{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014412/* The GNU C library defines this for functions which it implements
14413 to always fail with ENOSYS. Some functions are actually named
14414 something starting with __ and the normal name is an alias. */
14415#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
14416choke me
14417#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014418f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014419#endif
14420
Martin v. Löwis11437992002-04-12 09:54:03 +000014421 ;
14422 return 0;
14423}
14424_ACEOF
14425rm -f conftest.$ac_objext conftest$ac_exeext
14426if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14427 (eval $ac_link) 2>&5
14428 ac_status=$?
14429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14430 (exit $ac_status); } &&
14431 { ac_try='test -s conftest$ac_exeext'
14432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14433 (eval $ac_try) 2>&5
14434 ac_status=$?
14435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14436 (exit $ac_status); }; }; then
14437 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014438else
Martin v. Löwis11437992002-04-12 09:54:03 +000014439 echo "$as_me: failed program was:" >&5
14440cat conftest.$ac_ext >&5
14441ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014442fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014443rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014444fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014445echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
14446echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
14447if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014448
Martin v. Löwis11437992002-04-12 09:54:03 +000014449 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014450#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014451_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014452
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
14454echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014455 OLD_CFLAGS=$CFLAGS
14456 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 cat >conftest.$ac_ext <<_ACEOF
14458#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014459#include "confdefs.h"
14460
14461# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014462
14463#ifdef F77_DUMMY_MAIN
14464# ifdef __cplusplus
14465 extern "C"
14466# endif
14467 int F77_DUMMY_MAIN() { return 1; }
14468#endif
14469int
14470main ()
14471{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014472
14473 char *name;
14474 struct hostent *he, *res;
14475 char buffer[2048];
14476 int buflen = 2048;
14477 int h_errnop;
14478
14479 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014480
14481 ;
14482 return 0;
14483}
14484_ACEOF
14485rm -f conftest.$ac_objext
14486if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14487 (eval $ac_compile) 2>&5
14488 ac_status=$?
14489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14490 (exit $ac_status); } &&
14491 { ac_try='test -s conftest.$ac_objext'
14492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14493 (eval $ac_try) 2>&5
14494 ac_status=$?
14495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14496 (exit $ac_status); }; }; then
14497
14498 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014499#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014500_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014501
Martin v. Löwis11437992002-04-12 09:54:03 +000014502
14503cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014504#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014505_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014506
Martin v. Löwis11437992002-04-12 09:54:03 +000014507 echo "$as_me:$LINENO: result: yes" >&5
14508echo "${ECHO_T}yes" >&6
14509
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014510else
Martin v. Löwis11437992002-04-12 09:54:03 +000014511 echo "$as_me: failed program was:" >&5
14512cat conftest.$ac_ext >&5
14513
14514 echo "$as_me:$LINENO: result: no" >&5
14515echo "${ECHO_T}no" >&6
14516 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14517echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14518 cat >conftest.$ac_ext <<_ACEOF
14519#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014520#include "confdefs.h"
14521
14522# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014523
14524#ifdef F77_DUMMY_MAIN
14525# ifdef __cplusplus
14526 extern "C"
14527# endif
14528 int F77_DUMMY_MAIN() { return 1; }
14529#endif
14530int
14531main ()
14532{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014533
14534 char *name;
14535 struct hostent *he;
14536 char buffer[2048];
14537 int buflen = 2048;
14538 int h_errnop;
14539
14540 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014541
14542 ;
14543 return 0;
14544}
14545_ACEOF
14546rm -f conftest.$ac_objext
14547if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14548 (eval $ac_compile) 2>&5
14549 ac_status=$?
14550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14551 (exit $ac_status); } &&
14552 { ac_try='test -s conftest.$ac_objext'
14553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14554 (eval $ac_try) 2>&5
14555 ac_status=$?
14556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14557 (exit $ac_status); }; }; then
14558
14559 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014560#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014561_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014562
Martin v. Löwis11437992002-04-12 09:54:03 +000014563
14564cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014565#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014566_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014567
Martin v. Löwis11437992002-04-12 09:54:03 +000014568 echo "$as_me:$LINENO: result: yes" >&5
14569echo "${ECHO_T}yes" >&6
14570
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014571else
Martin v. Löwis11437992002-04-12 09:54:03 +000014572 echo "$as_me: failed program was:" >&5
14573cat conftest.$ac_ext >&5
14574
14575 echo "$as_me:$LINENO: result: no" >&5
14576echo "${ECHO_T}no" >&6
14577 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14578echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14579 cat >conftest.$ac_ext <<_ACEOF
14580#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014581#include "confdefs.h"
14582
14583# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014584
14585#ifdef F77_DUMMY_MAIN
14586# ifdef __cplusplus
14587 extern "C"
14588# endif
14589 int F77_DUMMY_MAIN() { return 1; }
14590#endif
14591int
14592main ()
14593{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014594
14595 char *name;
14596 struct hostent *he;
14597 struct hostent_data data;
14598
14599 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014600
14601 ;
14602 return 0;
14603}
14604_ACEOF
14605rm -f conftest.$ac_objext
14606if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14607 (eval $ac_compile) 2>&5
14608 ac_status=$?
14609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14610 (exit $ac_status); } &&
14611 { ac_try='test -s conftest.$ac_objext'
14612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14613 (eval $ac_try) 2>&5
14614 ac_status=$?
14615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14616 (exit $ac_status); }; }; then
14617
14618 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014619#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014620_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014621
Martin v. Löwis11437992002-04-12 09:54:03 +000014622
14623cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014624#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014625_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014626
Martin v. Löwis11437992002-04-12 09:54:03 +000014627 echo "$as_me:$LINENO: result: yes" >&5
14628echo "${ECHO_T}yes" >&6
14629
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014630else
Martin v. Löwis11437992002-04-12 09:54:03 +000014631 echo "$as_me: failed program was:" >&5
14632cat conftest.$ac_ext >&5
14633
14634 echo "$as_me:$LINENO: result: no" >&5
14635echo "${ECHO_T}no" >&6
14636
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014637fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014638rm -f conftest.$ac_objext conftest.$ac_ext
14639
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014640fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014641rm -f conftest.$ac_objext conftest.$ac_ext
14642
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014643fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014644rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014645 CFLAGS=$OLD_CFLAGS
14646
14647else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014648
Martin v. Löwis11437992002-04-12 09:54:03 +000014649
14650for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014651do
Martin v. Löwis11437992002-04-12 09:54:03 +000014652as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14653echo "$as_me:$LINENO: checking for $ac_func" >&5
14654echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14655if eval "test \"\${$as_ac_var+set}\" = set"; then
14656 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014657else
Martin v. Löwis11437992002-04-12 09:54:03 +000014658 cat >conftest.$ac_ext <<_ACEOF
14659#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014660#include "confdefs.h"
14661/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014662 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014663#include <assert.h>
14664/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014665#ifdef __cplusplus
14666extern "C"
14667#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014668/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014669 builtin and then its argument prototype would still apply. */
14670char $ac_func ();
14671char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014672
Martin v. Löwis11437992002-04-12 09:54:03 +000014673#ifdef F77_DUMMY_MAIN
14674# ifdef __cplusplus
14675 extern "C"
14676# endif
14677 int F77_DUMMY_MAIN() { return 1; }
14678#endif
14679int
14680main ()
14681{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014682/* The GNU C library defines this for functions which it implements
14683 to always fail with ENOSYS. Some functions are actually named
14684 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014685#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014686choke me
14687#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014688f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014689#endif
14690
Martin v. Löwis11437992002-04-12 09:54:03 +000014691 ;
14692 return 0;
14693}
14694_ACEOF
14695rm -f conftest.$ac_objext conftest$ac_exeext
14696if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14697 (eval $ac_link) 2>&5
14698 ac_status=$?
14699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14700 (exit $ac_status); } &&
14701 { ac_try='test -s conftest$ac_exeext'
14702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14703 (eval $ac_try) 2>&5
14704 ac_status=$?
14705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14706 (exit $ac_status); }; }; then
14707 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014708else
Martin v. Löwis11437992002-04-12 09:54:03 +000014709 echo "$as_me: failed program was:" >&5
14710cat conftest.$ac_ext >&5
14711eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014712fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014713rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014714fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014715echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14716echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14717if test `eval echo '${'$as_ac_var'}'` = yes; then
14718 cat >>confdefs.h <<_ACEOF
14719#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14720_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014721
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014722fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014723done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014724
Michael W. Hudson54241132001-12-07 15:38:26 +000014725
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014726fi
14727
Michael W. Hudson54241132001-12-07 15:38:26 +000014728
14729
14730
14731
14732
14733
Guido van Rossum627b2d71993-12-24 10:39:16 +000014734# checks for system services
14735# (none yet)
14736
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014737# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014738echo "$as_me:$LINENO: checking for __fpu_control" >&5
14739echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14740if test "${ac_cv_func___fpu_control+set}" = set; then
14741 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014742else
Martin v. Löwis11437992002-04-12 09:54:03 +000014743 cat >conftest.$ac_ext <<_ACEOF
14744#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014745#include "confdefs.h"
14746/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014747 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014748#include <assert.h>
14749/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014750#ifdef __cplusplus
14751extern "C"
14752#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014753/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014754 builtin and then its argument prototype would still apply. */
14755char __fpu_control ();
14756char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014757
Martin v. Löwis11437992002-04-12 09:54:03 +000014758#ifdef F77_DUMMY_MAIN
14759# ifdef __cplusplus
14760 extern "C"
14761# endif
14762 int F77_DUMMY_MAIN() { return 1; }
14763#endif
14764int
14765main ()
14766{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014767/* The GNU C library defines this for functions which it implements
14768 to always fail with ENOSYS. Some functions are actually named
14769 something starting with __ and the normal name is an alias. */
14770#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14771choke me
14772#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014773f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014774#endif
14775
Martin v. Löwis11437992002-04-12 09:54:03 +000014776 ;
14777 return 0;
14778}
14779_ACEOF
14780rm -f conftest.$ac_objext conftest$ac_exeext
14781if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14782 (eval $ac_link) 2>&5
14783 ac_status=$?
14784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14785 (exit $ac_status); } &&
14786 { ac_try='test -s conftest$ac_exeext'
14787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14788 (eval $ac_try) 2>&5
14789 ac_status=$?
14790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14791 (exit $ac_status); }; }; then
14792 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014793else
Martin v. Löwis11437992002-04-12 09:54:03 +000014794 echo "$as_me: failed program was:" >&5
14795cat conftest.$ac_ext >&5
14796ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014797fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014798rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014799fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014800echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14801echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14802if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014803 :
14804else
Martin v. Löwis11437992002-04-12 09:54:03 +000014805
14806echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14807echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14808if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14809 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014810else
Martin v. Löwis11437992002-04-12 09:54:03 +000014811 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014812LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014813cat >conftest.$ac_ext <<_ACEOF
14814#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014815#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014816
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014817/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014818#ifdef __cplusplus
14819extern "C"
14820#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014821/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014822 builtin and then its argument prototype would still apply. */
14823char __fpu_control ();
14824#ifdef F77_DUMMY_MAIN
14825# ifdef __cplusplus
14826 extern "C"
14827# endif
14828 int F77_DUMMY_MAIN() { return 1; }
14829#endif
14830int
14831main ()
14832{
14833__fpu_control ();
14834 ;
14835 return 0;
14836}
14837_ACEOF
14838rm -f conftest.$ac_objext conftest$ac_exeext
14839if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14840 (eval $ac_link) 2>&5
14841 ac_status=$?
14842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14843 (exit $ac_status); } &&
14844 { ac_try='test -s conftest$ac_exeext'
14845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14846 (eval $ac_try) 2>&5
14847 ac_status=$?
14848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14849 (exit $ac_status); }; }; then
14850 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014851else
Martin v. Löwis11437992002-04-12 09:54:03 +000014852 echo "$as_me: failed program was:" >&5
14853cat conftest.$ac_ext >&5
14854ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014855fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014856rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14857LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014858fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014859echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14860echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14861if test $ac_cv_lib_ieee___fpu_control = yes; then
14862 cat >>confdefs.h <<_ACEOF
14863#define HAVE_LIBIEEE 1
14864_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014865
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014866 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014867
Guido van Rossum627b2d71993-12-24 10:39:16 +000014868fi
14869
Michael W. Hudson54241132001-12-07 15:38:26 +000014870
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014871fi
14872
Michael W. Hudson54241132001-12-07 15:38:26 +000014873
Guido van Rossum7f253911997-05-09 02:42:48 +000014874# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014875echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14876echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14877
Guido van Rossum7f253911997-05-09 02:42:48 +000014878# Check whether --with-fpectl or --without-fpectl was given.
14879if test "${with_fpectl+set}" = set; then
14880 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014881
Guido van Rossum7f253911997-05-09 02:42:48 +000014882if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014883then
14884
14885cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014886#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014887_ACEOF
14888
14889 echo "$as_me:$LINENO: result: yes" >&5
14890echo "${ECHO_T}yes" >&6
14891else echo "$as_me:$LINENO: result: no" >&5
14892echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014893fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014894else
Martin v. Löwis11437992002-04-12 09:54:03 +000014895 echo "$as_me:$LINENO: result: no" >&5
14896echo "${ECHO_T}no" >&6
14897fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014898
Guido van Rossum7f43da71994-08-01 12:15:30 +000014899# check for --with-libm=...
14900
Guido van Rossum563e7081996-09-10 18:20:48 +000014901case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014902Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014903BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014904*) LIBM=-lm
14905esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014906echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14907echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14908
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014909# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014910if test "${with_libm+set}" = set; then
14911 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014912
Guido van Rossum7f253911997-05-09 02:42:48 +000014913if test "$withval" = no
14914then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014915 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14916echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014917elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014918then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014919 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14920echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14921else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14922echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14923 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014924fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014925else
Martin v. Löwis11437992002-04-12 09:54:03 +000014926 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14927echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14928fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014929
14930# check for --with-libc=...
14931
Martin v. Löwis11437992002-04-12 09:54:03 +000014932echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14933echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14934
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014935# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014936if test "${with_libc+set}" = set; then
14937 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014938
Guido van Rossum7f253911997-05-09 02:42:48 +000014939if test "$withval" = no
14940then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014941 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14942echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014943elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014944then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014945 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14946echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14947else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14948echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14949 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014950fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014951else
Martin v. Löwis11437992002-04-12 09:54:03 +000014952 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14953echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14954fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014955
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014956# check for hypot() in math library
14957LIBS_SAVE=$LIBS
14958LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014959
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014960for ac_func in hypot
14961do
Martin v. Löwis11437992002-04-12 09:54:03 +000014962as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14963echo "$as_me:$LINENO: checking for $ac_func" >&5
14964echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14965if eval "test \"\${$as_ac_var+set}\" = set"; then
14966 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014967else
Martin v. Löwis11437992002-04-12 09:54:03 +000014968 cat >conftest.$ac_ext <<_ACEOF
14969#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014970#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014971/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014973#include <assert.h>
14974/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014975#ifdef __cplusplus
14976extern "C"
14977#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014978/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014979 builtin and then its argument prototype would still apply. */
14980char $ac_func ();
14981char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014982
Martin v. Löwis11437992002-04-12 09:54:03 +000014983#ifdef F77_DUMMY_MAIN
14984# ifdef __cplusplus
14985 extern "C"
14986# endif
14987 int F77_DUMMY_MAIN() { return 1; }
14988#endif
14989int
14990main ()
14991{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014992/* The GNU C library defines this for functions which it implements
14993 to always fail with ENOSYS. Some functions are actually named
14994 something starting with __ and the normal name is an alias. */
14995#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14996choke me
14997#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014998f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014999#endif
15000
Martin v. Löwis11437992002-04-12 09:54:03 +000015001 ;
15002 return 0;
15003}
15004_ACEOF
15005rm -f conftest.$ac_objext conftest$ac_exeext
15006if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15007 (eval $ac_link) 2>&5
15008 ac_status=$?
15009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15010 (exit $ac_status); } &&
15011 { ac_try='test -s conftest$ac_exeext'
15012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15013 (eval $ac_try) 2>&5
15014 ac_status=$?
15015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15016 (exit $ac_status); }; }; then
15017 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015018else
Martin v. Löwis11437992002-04-12 09:54:03 +000015019 echo "$as_me: failed program was:" >&5
15020cat conftest.$ac_ext >&5
15021eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015022fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015023rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015024fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015025echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15026echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15027if test `eval echo '${'$as_ac_var'}'` = yes; then
15028 cat >>confdefs.h <<_ACEOF
15029#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15030_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015031
Michael W. Hudson54241132001-12-07 15:38:26 +000015032else
Martin v. Löwis11437992002-04-12 09:54:03 +000015033 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015034fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015035done
15036
Michael W. Hudson54241132001-12-07 15:38:26 +000015037
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015038LIBS=$LIBS_SAVE
15039
Guido van Rossumad713701997-07-10 22:42:38 +000015040# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000015041echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
15042echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
15043if test "${ac_cv_malloc_zero+set}" = set; then
15044 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000015045else
15046 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015047 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000015048else
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 cat >conftest.$ac_ext <<_ACEOF
15050#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000015051#include "confdefs.h"
15052#include <stdio.h>
15053#ifdef HAVE_STDLIB
15054#include <stdlib.h>
15055#else
15056char *malloc(), *realloc();
15057int *free();
15058#endif
15059main() {
15060 char *p;
15061 p = malloc(0);
15062 if (p == NULL) exit(1);
15063 p = realloc(p, 0);
15064 if (p == NULL) exit(1);
15065 free(p);
15066 exit(0);
15067}
Martin v. Löwis11437992002-04-12 09:54:03 +000015068_ACEOF
15069rm -f conftest$ac_exeext
15070if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15071 (eval $ac_link) 2>&5
15072 ac_status=$?
15073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15074 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15076 (eval $ac_try) 2>&5
15077 ac_status=$?
15078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15079 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000015080 ac_cv_malloc_zero=nonnull
15081else
Martin v. Löwis11437992002-04-12 09:54:03 +000015082 echo "$as_me: program exited with status $ac_status" >&5
15083echo "$as_me: failed program was:" >&5
15084cat conftest.$ac_ext >&5
15085( exit $ac_status )
15086ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000015087fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015088rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000015089fi
Guido van Rossumad713701997-07-10 22:42:38 +000015090fi
Guido van Rossum3065c942001-09-17 04:03:14 +000015091 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000015092echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
15093echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000015094if test "$ac_cv_malloc_zero" = null
15095then
Martin v. Löwis11437992002-04-12 09:54:03 +000015096
15097cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000015098#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015099_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000015100
15101fi
15102
Guido van Rossumef2255b2000-03-10 22:30:29 +000015103# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015104if test "${ac_cv_header_wchar_h+set}" = set; then
15105 echo "$as_me:$LINENO: checking for wchar.h" >&5
15106echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15107if test "${ac_cv_header_wchar_h+set}" = set; then
15108 echo $ECHO_N "(cached) $ECHO_C" >&6
15109fi
15110echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15111echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015112else
Martin v. Löwis11437992002-04-12 09:54:03 +000015113 # Is the header compilable?
15114echo "$as_me:$LINENO: checking wchar.h usability" >&5
15115echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15116cat >conftest.$ac_ext <<_ACEOF
15117#line $LINENO "configure"
15118#include "confdefs.h"
15119$ac_includes_default
15120#include <wchar.h>
15121_ACEOF
15122rm -f conftest.$ac_objext
15123if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15124 (eval $ac_compile) 2>&5
15125 ac_status=$?
15126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15127 (exit $ac_status); } &&
15128 { ac_try='test -s conftest.$ac_objext'
15129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15130 (eval $ac_try) 2>&5
15131 ac_status=$?
15132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15133 (exit $ac_status); }; }; then
15134 ac_header_compiler=yes
15135else
15136 echo "$as_me: failed program was:" >&5
15137cat conftest.$ac_ext >&5
15138ac_header_compiler=no
15139fi
15140rm -f conftest.$ac_objext conftest.$ac_ext
15141echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15142echo "${ECHO_T}$ac_header_compiler" >&6
15143
15144# Is the header present?
15145echo "$as_me:$LINENO: checking wchar.h presence" >&5
15146echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
15147cat >conftest.$ac_ext <<_ACEOF
15148#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015149#include "confdefs.h"
15150#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015151_ACEOF
15152if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15153 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15154 ac_status=$?
15155 egrep -v '^ *\+' conftest.er1 >conftest.err
15156 rm -f conftest.er1
15157 cat conftest.err >&5
15158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15159 (exit $ac_status); } >/dev/null; then
15160 if test -s conftest.err; then
15161 ac_cpp_err=$ac_c_preproc_warn_flag
15162 else
15163 ac_cpp_err=
15164 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015165else
Martin v. Löwis11437992002-04-12 09:54:03 +000015166 ac_cpp_err=yes
15167fi
15168if test -z "$ac_cpp_err"; then
15169 ac_header_preproc=yes
15170else
15171 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000015172 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015174fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015175rm -f conftest.err conftest.$ac_ext
15176echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15177echo "${ECHO_T}$ac_header_preproc" >&6
15178
15179# So? What about this header?
15180case $ac_header_compiler:$ac_header_preproc in
15181 yes:no )
15182 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
15183echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15184 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15185echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15186 no:yes )
15187 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
15188echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
15189 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
15190echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
15191 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15192echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15193esac
15194echo "$as_me:$LINENO: checking for wchar.h" >&5
15195echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15196if test "${ac_cv_header_wchar_h+set}" = set; then
15197 echo $ECHO_N "(cached) $ECHO_C" >&6
15198else
15199 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000015200fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015201echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15202echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
15203
15204fi
15205if test $ac_cv_header_wchar_h = yes; then
15206
15207
15208cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015209#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015210_ACEOF
15211
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015212 wchar_h="yes"
15213
Guido van Rossumef2255b2000-03-10 22:30:29 +000015214else
Martin v. Löwis11437992002-04-12 09:54:03 +000015215 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015216
15217fi
15218
Michael W. Hudson54241132001-12-07 15:38:26 +000015219
Martin v. Löwis11437992002-04-12 09:54:03 +000015220
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015221# determine wchar_t size
15222if test "$wchar_h" = yes
15223then
Martin v. Löwis11437992002-04-12 09:54:03 +000015224 echo "$as_me:$LINENO: checking for wchar_t" >&5
15225echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
15226if test "${ac_cv_type_wchar_t+set}" = set; then
15227 echo $ECHO_N "(cached) $ECHO_C" >&6
15228else
15229 cat >conftest.$ac_ext <<_ACEOF
15230#line $LINENO "configure"
15231#include "confdefs.h"
15232#include <wchar.h>
15233
15234#ifdef F77_DUMMY_MAIN
15235# ifdef __cplusplus
15236 extern "C"
15237# endif
15238 int F77_DUMMY_MAIN() { return 1; }
15239#endif
15240int
15241main ()
15242{
15243if ((wchar_t *) 0)
15244 return 0;
15245if (sizeof (wchar_t))
15246 return 0;
15247 ;
15248 return 0;
15249}
15250_ACEOF
15251rm -f conftest.$ac_objext
15252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15253 (eval $ac_compile) 2>&5
15254 ac_status=$?
15255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15256 (exit $ac_status); } &&
15257 { ac_try='test -s conftest.$ac_objext'
15258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15259 (eval $ac_try) 2>&5
15260 ac_status=$?
15261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15262 (exit $ac_status); }; }; then
15263 ac_cv_type_wchar_t=yes
15264else
15265 echo "$as_me: failed program was:" >&5
15266cat conftest.$ac_ext >&5
15267ac_cv_type_wchar_t=no
15268fi
15269rm -f conftest.$ac_objext conftest.$ac_ext
15270fi
15271echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
15272echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
15273
15274echo "$as_me:$LINENO: checking size of wchar_t" >&5
15275echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
15276if test "${ac_cv_sizeof_wchar_t+set}" = set; then
15277 echo $ECHO_N "(cached) $ECHO_C" >&6
15278else
15279 if test "$ac_cv_type_wchar_t" = yes; then
15280 # The cast to unsigned long works around a bug in the HP C Compiler
15281 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15282 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15283 # This bug is HP SR number 8606223364.
15284 if test "$cross_compiling" = yes; then
15285 # Depending upon the size, compute the lo and hi bounds.
15286cat >conftest.$ac_ext <<_ACEOF
15287#line $LINENO "configure"
15288#include "confdefs.h"
15289#include <wchar.h>
15290
15291#ifdef F77_DUMMY_MAIN
15292# ifdef __cplusplus
15293 extern "C"
15294# endif
15295 int F77_DUMMY_MAIN() { return 1; }
15296#endif
15297int
15298main ()
15299{
15300static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
15301test_array [0] = 0
15302
15303 ;
15304 return 0;
15305}
15306_ACEOF
15307rm -f conftest.$ac_objext
15308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15309 (eval $ac_compile) 2>&5
15310 ac_status=$?
15311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15312 (exit $ac_status); } &&
15313 { ac_try='test -s conftest.$ac_objext'
15314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15315 (eval $ac_try) 2>&5
15316 ac_status=$?
15317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15318 (exit $ac_status); }; }; then
15319 ac_lo=0 ac_mid=0
15320 while :; do
15321 cat >conftest.$ac_ext <<_ACEOF
15322#line $LINENO "configure"
15323#include "confdefs.h"
15324#include <wchar.h>
15325
15326#ifdef F77_DUMMY_MAIN
15327# ifdef __cplusplus
15328 extern "C"
15329# endif
15330 int F77_DUMMY_MAIN() { return 1; }
15331#endif
15332int
15333main ()
15334{
15335static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15336test_array [0] = 0
15337
15338 ;
15339 return 0;
15340}
15341_ACEOF
15342rm -f conftest.$ac_objext
15343if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15344 (eval $ac_compile) 2>&5
15345 ac_status=$?
15346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15347 (exit $ac_status); } &&
15348 { ac_try='test -s conftest.$ac_objext'
15349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15350 (eval $ac_try) 2>&5
15351 ac_status=$?
15352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15353 (exit $ac_status); }; }; then
15354 ac_hi=$ac_mid; break
15355else
15356 echo "$as_me: failed program was:" >&5
15357cat conftest.$ac_ext >&5
15358ac_lo=`expr $ac_mid + 1`
15359 if test $ac_lo -le $ac_mid; then
15360 ac_lo= ac_hi=
15361 break
15362 fi
15363 ac_mid=`expr 2 '*' $ac_mid + 1`
15364fi
15365rm -f conftest.$ac_objext conftest.$ac_ext
15366 done
15367else
15368 echo "$as_me: failed program was:" >&5
15369cat conftest.$ac_ext >&5
15370cat >conftest.$ac_ext <<_ACEOF
15371#line $LINENO "configure"
15372#include "confdefs.h"
15373#include <wchar.h>
15374
15375#ifdef F77_DUMMY_MAIN
15376# ifdef __cplusplus
15377 extern "C"
15378# endif
15379 int F77_DUMMY_MAIN() { return 1; }
15380#endif
15381int
15382main ()
15383{
15384static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
15385test_array [0] = 0
15386
15387 ;
15388 return 0;
15389}
15390_ACEOF
15391rm -f conftest.$ac_objext
15392if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15393 (eval $ac_compile) 2>&5
15394 ac_status=$?
15395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15396 (exit $ac_status); } &&
15397 { ac_try='test -s conftest.$ac_objext'
15398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15399 (eval $ac_try) 2>&5
15400 ac_status=$?
15401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15402 (exit $ac_status); }; }; then
15403 ac_hi=-1 ac_mid=-1
15404 while :; do
15405 cat >conftest.$ac_ext <<_ACEOF
15406#line $LINENO "configure"
15407#include "confdefs.h"
15408#include <wchar.h>
15409
15410#ifdef F77_DUMMY_MAIN
15411# ifdef __cplusplus
15412 extern "C"
15413# endif
15414 int F77_DUMMY_MAIN() { return 1; }
15415#endif
15416int
15417main ()
15418{
15419static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
15420test_array [0] = 0
15421
15422 ;
15423 return 0;
15424}
15425_ACEOF
15426rm -f conftest.$ac_objext
15427if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15428 (eval $ac_compile) 2>&5
15429 ac_status=$?
15430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15431 (exit $ac_status); } &&
15432 { ac_try='test -s conftest.$ac_objext'
15433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15434 (eval $ac_try) 2>&5
15435 ac_status=$?
15436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15437 (exit $ac_status); }; }; then
15438 ac_lo=$ac_mid; break
15439else
15440 echo "$as_me: failed program was:" >&5
15441cat conftest.$ac_ext >&5
15442ac_hi=`expr '(' $ac_mid ')' - 1`
15443 if test $ac_mid -le $ac_hi; then
15444 ac_lo= ac_hi=
15445 break
15446 fi
15447 ac_mid=`expr 2 '*' $ac_mid`
15448fi
15449rm -f conftest.$ac_objext conftest.$ac_ext
15450 done
15451else
15452 echo "$as_me: failed program was:" >&5
15453cat conftest.$ac_ext >&5
15454ac_lo= ac_hi=
15455fi
15456rm -f conftest.$ac_objext conftest.$ac_ext
15457fi
15458rm -f conftest.$ac_objext conftest.$ac_ext
15459# Binary search between lo and hi bounds.
15460while test "x$ac_lo" != "x$ac_hi"; do
15461 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15462 cat >conftest.$ac_ext <<_ACEOF
15463#line $LINENO "configure"
15464#include "confdefs.h"
15465#include <wchar.h>
15466
15467#ifdef F77_DUMMY_MAIN
15468# ifdef __cplusplus
15469 extern "C"
15470# endif
15471 int F77_DUMMY_MAIN() { return 1; }
15472#endif
15473int
15474main ()
15475{
15476static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15477test_array [0] = 0
15478
15479 ;
15480 return 0;
15481}
15482_ACEOF
15483rm -f conftest.$ac_objext
15484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15485 (eval $ac_compile) 2>&5
15486 ac_status=$?
15487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15488 (exit $ac_status); } &&
15489 { ac_try='test -s conftest.$ac_objext'
15490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15491 (eval $ac_try) 2>&5
15492 ac_status=$?
15493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15494 (exit $ac_status); }; }; then
15495 ac_hi=$ac_mid
15496else
15497 echo "$as_me: failed program was:" >&5
15498cat conftest.$ac_ext >&5
15499ac_lo=`expr '(' $ac_mid ')' + 1`
15500fi
15501rm -f conftest.$ac_objext conftest.$ac_ext
15502done
15503case $ac_lo in
15504?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15505'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15506echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15507 { (exit 1); exit 1; }; } ;;
15508esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015509else
15510 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015511 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15512echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15513 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015514else
Martin v. Löwis11437992002-04-12 09:54:03 +000015515 cat >conftest.$ac_ext <<_ACEOF
15516#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015517#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015518#include <wchar.h>
15519
15520long longval () { return (long) (sizeof (wchar_t)); }
15521unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015522#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015523#include <stdlib.h>
15524#ifdef F77_DUMMY_MAIN
15525# ifdef __cplusplus
15526 extern "C"
15527# endif
15528 int F77_DUMMY_MAIN() { return 1; }
15529#endif
15530int
15531main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015532{
Martin v. Löwis11437992002-04-12 09:54:03 +000015533
15534 FILE *f = fopen ("conftest.val", "w");
15535 if (! f)
15536 exit (1);
15537 if (((long) (sizeof (wchar_t))) < 0)
15538 {
15539 long i = longval ();
15540 if (i != ((long) (sizeof (wchar_t))))
15541 exit (1);
15542 fprintf (f, "%ld\n", i);
15543 }
15544 else
15545 {
15546 unsigned long i = ulongval ();
15547 if (i != ((long) (sizeof (wchar_t))))
15548 exit (1);
15549 fprintf (f, "%lu\n", i);
15550 }
15551 exit (ferror (f) || fclose (f) != 0);
15552
15553 ;
15554 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015555}
Martin v. Löwis11437992002-04-12 09:54:03 +000015556_ACEOF
15557rm -f conftest$ac_exeext
15558if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15559 (eval $ac_link) 2>&5
15560 ac_status=$?
15561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15562 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15564 (eval $ac_try) 2>&5
15565 ac_status=$?
15566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15567 (exit $ac_status); }; }; then
15568 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015569else
Martin v. Löwis11437992002-04-12 09:54:03 +000015570 echo "$as_me: program exited with status $ac_status" >&5
15571echo "$as_me: failed program was:" >&5
15572cat conftest.$ac_ext >&5
15573( exit $ac_status )
15574{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15575echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15576 { (exit 1); exit 1; }; }
15577fi
15578rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15579fi
15580fi
15581rm -f conftest.val
15582else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015583 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015584fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015585fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015586echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15587echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15588cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015589#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015590_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015591
Michael W. Hudson54241132001-12-07 15:38:26 +000015592
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015593fi
15594
Martin v. Löwis11437992002-04-12 09:54:03 +000015595echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15596echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015597# Check whether --enable-unicode or --disable-unicode was given.
15598if test "${enable_unicode+set}" = set; then
15599 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015600
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015601else
15602 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015603fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015604
15605if test $enable_unicode = yes
15606then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015607 # Without any arguments, Py_UNICODE defaults to two-byte mode
15608 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015609fi
15610
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015611
15612
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015613case "$enable_unicode" in
15614ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015615 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015616#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015617_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015618
15619 ;;
15620ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015621 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015622#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015623_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015624
15625 ;;
15626esac
15627
Michael W. Hudson54241132001-12-07 15:38:26 +000015628
Martin v. Löwis11437992002-04-12 09:54:03 +000015629
15630
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015631
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015632if test "$enable_unicode" = "no"
15633then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015634 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015635 echo "$as_me:$LINENO: result: not used" >&5
15636echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015637else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015638 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015639
15640cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015641#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015642_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015643
15644 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15645 then
15646 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015647
Martin v. Löwis11437992002-04-12 09:54:03 +000015648cat >>confdefs.h <<\_ACEOF
15649#define HAVE_USABLE_WCHAR_T 1
15650_ACEOF
15651
15652 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015653#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015654_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015655
15656 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15657 then
15658 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015659 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015660#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015661_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015662
15663 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15664 then
15665 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015666 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015667#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015668_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015669
15670 else
15671 PY_UNICODE_TYPE="no type found"
15672 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015673 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15674echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015675fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015676
15677# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015678echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15679echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15680if test "${ac_cv_c_bigendian+set}" = set; then
15681 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015682else
Martin v. Löwis11437992002-04-12 09:54:03 +000015683 # See if sys/param.h defines the BYTE_ORDER macro.
15684cat >conftest.$ac_ext <<_ACEOF
15685#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015686#include "confdefs.h"
15687#include <sys/types.h>
15688#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015689
Martin v. Löwis11437992002-04-12 09:54:03 +000015690#ifdef F77_DUMMY_MAIN
15691# ifdef __cplusplus
15692 extern "C"
15693# endif
15694 int F77_DUMMY_MAIN() { return 1; }
15695#endif
15696int
15697main ()
15698{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015699#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15700 bogus endian macros
15701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015702
15703 ;
15704 return 0;
15705}
15706_ACEOF
15707rm -f conftest.$ac_objext
15708if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15709 (eval $ac_compile) 2>&5
15710 ac_status=$?
15711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15712 (exit $ac_status); } &&
15713 { ac_try='test -s conftest.$ac_objext'
15714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15715 (eval $ac_try) 2>&5
15716 ac_status=$?
15717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15718 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015719 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015720cat >conftest.$ac_ext <<_ACEOF
15721#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015722#include "confdefs.h"
15723#include <sys/types.h>
15724#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015725
Martin v. Löwis11437992002-04-12 09:54:03 +000015726#ifdef F77_DUMMY_MAIN
15727# ifdef __cplusplus
15728 extern "C"
15729# endif
15730 int F77_DUMMY_MAIN() { return 1; }
15731#endif
15732int
15733main ()
15734{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015735#if BYTE_ORDER != BIG_ENDIAN
15736 not big endian
15737#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015738
15739 ;
15740 return 0;
15741}
15742_ACEOF
15743rm -f conftest.$ac_objext
15744if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15745 (eval $ac_compile) 2>&5
15746 ac_status=$?
15747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15748 (exit $ac_status); } &&
15749 { ac_try='test -s conftest.$ac_objext'
15750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15751 (eval $ac_try) 2>&5
15752 ac_status=$?
15753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15754 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015755 ac_cv_c_bigendian=yes
15756else
Martin v. Löwis11437992002-04-12 09:54:03 +000015757 echo "$as_me: failed program was:" >&5
15758cat conftest.$ac_ext >&5
15759ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015760fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015761rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015762else
Martin v. Löwis11437992002-04-12 09:54:03 +000015763 echo "$as_me: failed program was:" >&5
15764cat conftest.$ac_ext >&5
15765# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015766if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015767 # try to guess the endianess by grep'ing values into an object file
15768 ac_cv_c_bigendian=unknown
15769 cat >conftest.$ac_ext <<_ACEOF
15770#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015771#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015772short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15773short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15774void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15775short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15776short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15777void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15778#ifdef F77_DUMMY_MAIN
15779# ifdef __cplusplus
15780 extern "C"
15781# endif
15782 int F77_DUMMY_MAIN() { return 1; }
15783#endif
15784int
15785main ()
15786{
15787 _ascii (); _ebcdic ();
15788 ;
15789 return 0;
15790}
15791_ACEOF
15792rm -f conftest.$ac_objext
15793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15794 (eval $ac_compile) 2>&5
15795 ac_status=$?
15796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15797 (exit $ac_status); } &&
15798 { ac_try='test -s conftest.$ac_objext'
15799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15800 (eval $ac_try) 2>&5
15801 ac_status=$?
15802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15803 (exit $ac_status); }; }; then
15804 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15805 ac_cv_c_bigendian=yes
15806fi
15807if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15808 if test "$ac_cv_c_bigendian" = unknown; then
15809 ac_cv_c_bigendian=no
15810 else
15811 # finding both strings is unlikely to happen, but who knows?
15812 ac_cv_c_bigendian=unknown
15813 fi
15814fi
15815else
15816 echo "$as_me: failed program was:" >&5
15817cat conftest.$ac_ext >&5
15818fi
15819rm -f conftest.$ac_objext conftest.$ac_ext
15820else
15821 cat >conftest.$ac_ext <<_ACEOF
15822#line $LINENO "configure"
15823#include "confdefs.h"
15824int
15825main ()
15826{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015827 /* Are we little or big endian? From Harbison&Steele. */
15828 union
15829 {
15830 long l;
15831 char c[sizeof (long)];
15832 } u;
15833 u.l = 1;
15834 exit (u.c[sizeof (long) - 1] == 1);
15835}
Martin v. Löwis11437992002-04-12 09:54:03 +000015836_ACEOF
15837rm -f conftest$ac_exeext
15838if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15839 (eval $ac_link) 2>&5
15840 ac_status=$?
15841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15842 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15844 (eval $ac_try) 2>&5
15845 ac_status=$?
15846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15847 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015848 ac_cv_c_bigendian=no
15849else
Martin v. Löwis11437992002-04-12 09:54:03 +000015850 echo "$as_me: program exited with status $ac_status" >&5
15851echo "$as_me: failed program was:" >&5
15852cat conftest.$ac_ext >&5
15853( exit $ac_status )
15854ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015855fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015856rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015857fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015858fi
15859rm -f conftest.$ac_objext conftest.$ac_ext
15860fi
15861echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15862echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15863case $ac_cv_c_bigendian in
15864 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015865
Martin v. Löwis11437992002-04-12 09:54:03 +000015866cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015867#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015868_ACEOF
15869 ;;
15870 no)
15871 ;;
15872 *)
15873 { { echo "$as_me:$LINENO: error: unknown endianess
15874presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15875echo "$as_me: error: unknown endianess
15876presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15877 { (exit 1); exit 1; }; } ;;
15878esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015879
Michael W. Hudson54241132001-12-07 15:38:26 +000015880
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015881# Check whether right shifting a negative integer extends the sign bit
15882# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015883echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15884echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15885if test "${ac_cv_rshift_extends_sign+set}" = set; then
15886 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015887else
Martin v. Löwis11437992002-04-12 09:54:03 +000015888
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015889if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015890 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015891else
Martin v. Löwis11437992002-04-12 09:54:03 +000015892 cat >conftest.$ac_ext <<_ACEOF
15893#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015894#include "confdefs.h"
15895
15896int main()
15897{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015898 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015899}
15900
Martin v. Löwis11437992002-04-12 09:54:03 +000015901_ACEOF
15902rm -f conftest$ac_exeext
15903if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15904 (eval $ac_link) 2>&5
15905 ac_status=$?
15906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15907 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15909 (eval $ac_try) 2>&5
15910 ac_status=$?
15911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15912 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015913 ac_cv_rshift_extends_sign=yes
15914else
Martin v. Löwis11437992002-04-12 09:54:03 +000015915 echo "$as_me: program exited with status $ac_status" >&5
15916echo "$as_me: failed program was:" >&5
15917cat conftest.$ac_ext >&5
15918( exit $ac_status )
15919ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015920fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015921rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15922fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015923fi
15924
Martin v. Löwis11437992002-04-12 09:54:03 +000015925echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15926echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015927if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015928then
Martin v. Löwis11437992002-04-12 09:54:03 +000015929
15930cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015931#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015932_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015933
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015934fi
15935
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015936# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015937echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15938echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15939if test "${ac_cv_have_getc_unlocked+set}" = set; then
15940 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015941else
Martin v. Löwis11437992002-04-12 09:54:03 +000015942
15943cat >conftest.$ac_ext <<_ACEOF
15944#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015945#include "confdefs.h"
15946#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015947#ifdef F77_DUMMY_MAIN
15948# ifdef __cplusplus
15949 extern "C"
15950# endif
15951 int F77_DUMMY_MAIN() { return 1; }
15952#endif
15953int
15954main ()
15955{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015956
15957 FILE *f = fopen("/dev/null", "r");
15958 flockfile(f);
15959 getc_unlocked(f);
15960 funlockfile(f);
15961
Martin v. Löwis11437992002-04-12 09:54:03 +000015962 ;
15963 return 0;
15964}
15965_ACEOF
15966rm -f conftest.$ac_objext conftest$ac_exeext
15967if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15968 (eval $ac_link) 2>&5
15969 ac_status=$?
15970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15971 (exit $ac_status); } &&
15972 { ac_try='test -s conftest$ac_exeext'
15973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15974 (eval $ac_try) 2>&5
15975 ac_status=$?
15976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15977 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015978 ac_cv_have_getc_unlocked=yes
15979else
Martin v. Löwis11437992002-04-12 09:54:03 +000015980 echo "$as_me: failed program was:" >&5
15981cat conftest.$ac_ext >&5
15982ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015983fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015984rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015985fi
15986
Martin v. Löwis11437992002-04-12 09:54:03 +000015987echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15988echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015989if test "$ac_cv_have_getc_unlocked" = yes
15990then
Martin v. Löwis11437992002-04-12 09:54:03 +000015991
15992cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015993#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015994_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015995
15996fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015997
Martin v. Löwis0daad592001-09-30 21:09:59 +000015998# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015999echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
16000echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
16001if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
16002 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000016003else
Martin v. Löwis11437992002-04-12 09:54:03 +000016004 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000016005LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016006cat >conftest.$ac_ext <<_ACEOF
16007#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000016008#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016009
Guido van Rossum353ae582001-07-10 16:45:32 +000016010/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016011#ifdef __cplusplus
16012extern "C"
16013#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000016014/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016015 builtin and then its argument prototype would still apply. */
16016char rl_pre_input_hook ();
16017#ifdef F77_DUMMY_MAIN
16018# ifdef __cplusplus
16019 extern "C"
16020# endif
16021 int F77_DUMMY_MAIN() { return 1; }
16022#endif
16023int
16024main ()
16025{
16026rl_pre_input_hook ();
16027 ;
16028 return 0;
16029}
16030_ACEOF
16031rm -f conftest.$ac_objext conftest$ac_exeext
16032if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16033 (eval $ac_link) 2>&5
16034 ac_status=$?
16035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16036 (exit $ac_status); } &&
16037 { ac_try='test -s conftest$ac_exeext'
16038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16039 (eval $ac_try) 2>&5
16040 ac_status=$?
16041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16042 (exit $ac_status); }; }; then
16043 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016044else
Martin v. Löwis11437992002-04-12 09:54:03 +000016045 echo "$as_me: failed program was:" >&5
16046cat conftest.$ac_ext >&5
16047ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016048fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016049rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16050LIBS=$ac_check_lib_save_LIBS
16051fi
16052echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16053echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16054if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016055
Martin v. Löwis11437992002-04-12 09:54:03 +000016056cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016057#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016058_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016059
Martin v. Löwis0daad592001-09-30 21:09:59 +000016060fi
16061
Michael W. Hudson54241132001-12-07 15:38:26 +000016062
Martin v. Löwis0daad592001-09-30 21:09:59 +000016063# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016064echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16065echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16066if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16067 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016068else
Martin v. Löwis11437992002-04-12 09:54:03 +000016069 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016070LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016071cat >conftest.$ac_ext <<_ACEOF
16072#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016073#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016074
Martin v. Löwis0daad592001-09-30 21:09:59 +000016075/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016076#ifdef __cplusplus
16077extern "C"
16078#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016079/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016080 builtin and then its argument prototype would still apply. */
16081char rl_completion_matches ();
16082#ifdef F77_DUMMY_MAIN
16083# ifdef __cplusplus
16084 extern "C"
16085# endif
16086 int F77_DUMMY_MAIN() { return 1; }
16087#endif
16088int
16089main ()
16090{
16091rl_completion_matches ();
16092 ;
16093 return 0;
16094}
16095_ACEOF
16096rm -f conftest.$ac_objext conftest$ac_exeext
16097if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16098 (eval $ac_link) 2>&5
16099 ac_status=$?
16100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16101 (exit $ac_status); } &&
16102 { ac_try='test -s conftest$ac_exeext'
16103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16104 (eval $ac_try) 2>&5
16105 ac_status=$?
16106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16107 (exit $ac_status); }; }; then
16108 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000016109else
Martin v. Löwis11437992002-04-12 09:54:03 +000016110 echo "$as_me: failed program was:" >&5
16111cat conftest.$ac_ext >&5
16112ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000016113fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016114rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16115LIBS=$ac_check_lib_save_LIBS
16116fi
16117echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
16118echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
16119if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016120
Martin v. Löwis11437992002-04-12 09:54:03 +000016121cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016122#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016123_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016124
Guido van Rossum353ae582001-07-10 16:45:32 +000016125fi
16126
Jack Jansendd19cf82001-12-06 22:36:17 +000016127
Martin v. Löwis11437992002-04-12 09:54:03 +000016128echo "$as_me:$LINENO: checking for broken nice()" >&5
16129echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
16130if test "${ac_cv_broken_nice+set}" = set; then
16131 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016132else
Martin v. Löwis11437992002-04-12 09:54:03 +000016133
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016134if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016135 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016136else
Martin v. Löwis11437992002-04-12 09:54:03 +000016137 cat >conftest.$ac_ext <<_ACEOF
16138#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016139#include "confdefs.h"
16140
16141int main()
16142{
16143 int val1 = nice(1);
16144 if (val1 != -1 && val1 == nice(2))
16145 exit(0);
16146 exit(1);
16147}
16148
Martin v. Löwis11437992002-04-12 09:54:03 +000016149_ACEOF
16150rm -f conftest$ac_exeext
16151if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16152 (eval $ac_link) 2>&5
16153 ac_status=$?
16154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16155 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16157 (eval $ac_try) 2>&5
16158 ac_status=$?
16159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16160 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016161 ac_cv_broken_nice=yes
16162else
Martin v. Löwis11437992002-04-12 09:54:03 +000016163 echo "$as_me: program exited with status $ac_status" >&5
16164echo "$as_me: failed program was:" >&5
16165cat conftest.$ac_ext >&5
16166( exit $ac_status )
16167ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016168fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016169rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16170fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016171fi
16172
Martin v. Löwis11437992002-04-12 09:54:03 +000016173echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
16174echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016175if test "$ac_cv_broken_nice" = yes
16176then
Martin v. Löwis11437992002-04-12 09:54:03 +000016177
16178cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016179#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016180_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016181
16182fi
16183
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016184# Look for subsecond timestamps in struct stat
16185echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
16186echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
16187if test "${ac_cv_stat_tv_nsec+set}" = set; then
16188 echo $ECHO_N "(cached) $ECHO_C" >&6
16189else
16190 cat >conftest.$ac_ext <<_ACEOF
16191#line $LINENO "configure"
16192#include "confdefs.h"
16193#include <sys/stat.h>
16194#ifdef F77_DUMMY_MAIN
16195# ifdef __cplusplus
16196 extern "C"
16197# endif
16198 int F77_DUMMY_MAIN() { return 1; }
16199#endif
16200int
16201main ()
16202{
16203
16204struct stat st;
16205st.st_mtim.tv_nsec = 1;
16206
16207 ;
16208 return 0;
16209}
16210_ACEOF
16211rm -f conftest.$ac_objext
16212if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16213 (eval $ac_compile) 2>&5
16214 ac_status=$?
16215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16216 (exit $ac_status); } &&
16217 { ac_try='test -s conftest.$ac_objext'
16218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16219 (eval $ac_try) 2>&5
16220 ac_status=$?
16221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16222 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016223 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016224else
16225 echo "$as_me: failed program was:" >&5
16226cat conftest.$ac_ext >&5
16227ac_cv_stat_tv_nsec=no
16228fi
16229rm -f conftest.$ac_objext conftest.$ac_ext
16230fi
16231
16232echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
16233echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
16234if test "$ac_cv_stat_tv_nsec" = yes
16235then
16236
16237cat >>confdefs.h <<\_ACEOF
16238#define HAVE_STAT_TV_NSEC 1
16239_ACEOF
16240
16241fi
16242
Jack Jansen666b1e72001-10-31 12:11:48 +000016243# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000016244echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
16245echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
16246if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
16247 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016248else
Martin v. Löwis11437992002-04-12 09:54:03 +000016249 cat >conftest.$ac_ext <<_ACEOF
16250#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016251#include "confdefs.h"
16252#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016253#ifdef F77_DUMMY_MAIN
16254# ifdef __cplusplus
16255 extern "C"
16256# endif
16257 int F77_DUMMY_MAIN() { return 1; }
16258#endif
16259int
16260main ()
16261{
Jack Jansen666b1e72001-10-31 12:11:48 +000016262
16263 int rtn;
16264 rtn = mvwdelch(0,0,0);
16265
Martin v. Löwis11437992002-04-12 09:54:03 +000016266 ;
16267 return 0;
16268}
16269_ACEOF
16270rm -f conftest.$ac_objext
16271if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16272 (eval $ac_compile) 2>&5
16273 ac_status=$?
16274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16275 (exit $ac_status); } &&
16276 { ac_try='test -s conftest.$ac_objext'
16277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16278 (eval $ac_try) 2>&5
16279 ac_status=$?
16280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16281 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016282 ac_cv_mvwdelch_is_expression=yes
16283else
Martin v. Löwis11437992002-04-12 09:54:03 +000016284 echo "$as_me: failed program was:" >&5
16285cat conftest.$ac_ext >&5
16286ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016287fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016288rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016289fi
16290
Martin v. Löwis11437992002-04-12 09:54:03 +000016291echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
16292echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016293
16294if test "$ac_cv_mvwdelch_is_expression" = yes
16295then
Martin v. Löwis11437992002-04-12 09:54:03 +000016296
16297cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016298#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016299_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016300
16301fi
16302
Martin v. Löwis11437992002-04-12 09:54:03 +000016303echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
16304echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
16305if test "${ac_cv_window_has_flags+set}" = set; then
16306 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016307else
Martin v. Löwis11437992002-04-12 09:54:03 +000016308 cat >conftest.$ac_ext <<_ACEOF
16309#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016310#include "confdefs.h"
16311#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016312#ifdef F77_DUMMY_MAIN
16313# ifdef __cplusplus
16314 extern "C"
16315# endif
16316 int F77_DUMMY_MAIN() { return 1; }
16317#endif
16318int
16319main ()
16320{
Jack Jansen666b1e72001-10-31 12:11:48 +000016321
16322 WINDOW *w;
16323 w->_flags = 0;
16324
Martin v. Löwis11437992002-04-12 09:54:03 +000016325 ;
16326 return 0;
16327}
16328_ACEOF
16329rm -f conftest.$ac_objext
16330if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16331 (eval $ac_compile) 2>&5
16332 ac_status=$?
16333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16334 (exit $ac_status); } &&
16335 { ac_try='test -s conftest.$ac_objext'
16336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16337 (eval $ac_try) 2>&5
16338 ac_status=$?
16339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16340 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016341 ac_cv_window_has_flags=yes
16342else
Martin v. Löwis11437992002-04-12 09:54:03 +000016343 echo "$as_me: failed program was:" >&5
16344cat conftest.$ac_ext >&5
16345ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016346fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016347rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016348fi
16349
Martin v. Löwis11437992002-04-12 09:54:03 +000016350echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
16351echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016352
Jack Jansen666b1e72001-10-31 12:11:48 +000016353
16354if test "$ac_cv_window_has_flags" = yes
16355then
Martin v. Löwis11437992002-04-12 09:54:03 +000016356
16357cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016358#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016359_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016360
16361fi
16362
Guido van Rossum95713eb2000-05-18 20:53:31 +000016363# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
16364# Add sys/socket.h to confdefs.h
16365cat >> confdefs.h <<\EOF
16366#ifdef HAVE_SYS_SOCKET_H
16367#include <sys/socket.h>
16368#endif
16369EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016370echo "$as_me:$LINENO: checking for socklen_t" >&5
16371echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
16372if test "${ac_cv_type_socklen_t+set}" = set; then
16373 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000016374else
Martin v. Löwis11437992002-04-12 09:54:03 +000016375 cat >conftest.$ac_ext <<_ACEOF
16376#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000016377#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016378$ac_includes_default
16379#ifdef F77_DUMMY_MAIN
16380# ifdef __cplusplus
16381 extern "C"
16382# endif
16383 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016384#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016385int
16386main ()
16387{
16388if ((socklen_t *) 0)
16389 return 0;
16390if (sizeof (socklen_t))
16391 return 0;
16392 ;
16393 return 0;
16394}
16395_ACEOF
16396rm -f conftest.$ac_objext
16397if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16398 (eval $ac_compile) 2>&5
16399 ac_status=$?
16400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16401 (exit $ac_status); } &&
16402 { ac_try='test -s conftest.$ac_objext'
16403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16404 (eval $ac_try) 2>&5
16405 ac_status=$?
16406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16407 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016408 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000016409else
Martin v. Löwis11437992002-04-12 09:54:03 +000016410 echo "$as_me: failed program was:" >&5
16411cat conftest.$ac_ext >&5
16412ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000016413fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016414rm -f conftest.$ac_objext conftest.$ac_ext
16415fi
16416echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
16417echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
16418if test $ac_cv_type_socklen_t = yes; then
16419 :
16420else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016421
Martin v. Löwis11437992002-04-12 09:54:03 +000016422cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016423#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000016424_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016425
16426fi
16427
Michael W. Hudson54241132001-12-07 15:38:26 +000016428
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016429#AC_MSG_CHECKING(for Modules/Setup)
16430#if test ! -f Modules/Setup ; then
16431# if test ! -d Modules ; then
16432# mkdir Modules
16433# fi
16434# cp "$srcdir/Modules/Setup.dist" Modules/Setup
16435# AC_MSG_RESULT(creating)
16436#else
16437# AC_MSG_RESULT(already exists)
16438#fi
16439
Michael W. Hudson54241132001-12-07 15:38:26 +000016440
16441
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016442for h in `(cd $srcdir;echo Python/thread_*.h)`
16443do
16444 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16445done
16446
Michael W. Hudson54241132001-12-07 15:38:26 +000016447
Jack Jansen0b06be72002-06-21 14:48:38 +000016448SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000016449echo "$as_me:$LINENO: checking for build directories" >&5
16450echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016451for dir in $SRCDIRS; do
16452 if test ! -d $dir; then
16453 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016454 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016455done
Martin v. Löwis11437992002-04-12 09:54:03 +000016456echo "$as_me:$LINENO: result: done" >&5
16457echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000016458
Guido van Rossum627b2d71993-12-24 10:39:16 +000016459# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000016460ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016461
Martin v. Löwis11437992002-04-12 09:54:03 +000016462cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016463# This file is a shell script that caches the results of configure
16464# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016465# scripts and configure runs, see configure's option --config-cache.
16466# It is not useful on other systems. If it contains results you don't
16467# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016468#
Martin v. Löwis11437992002-04-12 09:54:03 +000016469# config.status only pays attention to the cache file if you give it
16470# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016471#
Martin v. Löwis11437992002-04-12 09:54:03 +000016472# `ac_cv_env_foo' variables (set or unset) will be overriden when
16473# loading this file, other *unset* `ac_cv_foo' will be assigned the
16474# following values.
16475
16476_ACEOF
16477
Guido van Rossumf78abae1997-01-21 22:02:36 +000016478# The following way of writing the cache mishandles newlines in values,
16479# but we know of no workaround that is simple, portable, and efficient.
16480# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016481# Ultrix sh set writes to stderr and can't be redirected directly,
16482# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000016483{
16484 (set) 2>&1 |
16485 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16486 *ac_space=\ *)
16487 # `set' does not quote correctly, so add quotes (double-quote
16488 # substitution turns \\\\ into \\, and sed turns \\ into \).
16489 sed -n \
16490 "s/'/'\\\\''/g;
16491 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16492 ;;
16493 *)
16494 # `set' quotes correctly as required by POSIX, so do not add quotes.
16495 sed -n \
16496 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16497 ;;
16498 esac;
16499} |
16500 sed '
16501 t clear
16502 : clear
16503 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16504 t end
16505 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16506 : end' >>confcache
16507if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016508 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016509 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16510 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016511 else
16512 echo "not updating unwritable cache $cache_file"
16513 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016514fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016515rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016516
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016517test "x$prefix" = xNONE && prefix=$ac_default_prefix
16518# Let make expand exec_prefix.
16519test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016520
Martin v. Löwis11437992002-04-12 09:54:03 +000016521# VPATH may cause trouble with some makes, so we remove $(srcdir),
16522# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16523# trailing colons and then remove the whole line if VPATH becomes empty
16524# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016525if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016526 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16527s/:*\$(srcdir):*/:/;
16528s/:*\${srcdir}:*/:/;
16529s/:*@srcdir@:*/:/;
16530s/^\([^=]*=[ ]*\):*/\1/;
16531s/:*$//;
16532s/^[^=]*=[ ]*$//;
16533}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016534fi
16535
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016536DEFS=-DHAVE_CONFIG_H
16537
Martin v. Löwis11437992002-04-12 09:54:03 +000016538
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016539: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016540ac_clean_files_save=$ac_clean_files
16541ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16542{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16543echo "$as_me: creating $CONFIG_STATUS" >&6;}
16544cat >$CONFIG_STATUS <<_ACEOF
16545#! $SHELL
16546# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016547# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016548# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016549# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016550
Martin v. Löwis11437992002-04-12 09:54:03 +000016551debug=false
16552SHELL=\${CONFIG_SHELL-$SHELL}
16553_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016554
Martin v. Löwis11437992002-04-12 09:54:03 +000016555cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016556
Martin v. Löwis11437992002-04-12 09:54:03 +000016557## --------------------- ##
16558## M4sh Initialization. ##
16559## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016560
Martin v. Löwis11437992002-04-12 09:54:03 +000016561# Be Bourne compatible
16562if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16563 emulate sh
16564 NULLCMD=:
16565elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16566 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016567fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016568
Martin v. Löwis11437992002-04-12 09:54:03 +000016569# NLS nuisances.
16570# Support unset when possible.
16571if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16572 as_unset=unset
16573else
16574 as_unset=false
16575fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016576
Martin v. Löwis11437992002-04-12 09:54:03 +000016577(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16578 { $as_unset LANG || test "${LANG+set}" != set; } ||
16579 { LANG=C; export LANG; }
16580(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16581 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16582 { LC_ALL=C; export LC_ALL; }
16583(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16584 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16585 { LC_TIME=C; export LC_TIME; }
16586(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16587 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16588 { LC_CTYPE=C; export LC_CTYPE; }
16589(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16590 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16591 { LANGUAGE=C; export LANGUAGE; }
16592(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16593 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16594 { LC_COLLATE=C; export LC_COLLATE; }
16595(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16596 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16597 { LC_NUMERIC=C; export LC_NUMERIC; }
16598(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16599 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16600 { LC_MESSAGES=C; export LC_MESSAGES; }
16601
16602
16603# Name of the executable.
16604as_me=`(basename "$0") 2>/dev/null ||
16605$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16606 X"$0" : 'X\(//\)$' \| \
16607 X"$0" : 'X\(/\)$' \| \
16608 . : '\(.\)' 2>/dev/null ||
16609echo X/"$0" |
16610 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16611 /^X\/\(\/\/\)$/{ s//\1/; q; }
16612 /^X\/\(\/\).*/{ s//\1/; q; }
16613 s/.*/./; q'`
16614
16615# PATH needs CR, and LINENO needs CR and PATH.
16616# Avoid depending upon Character Ranges.
16617as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16618as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16619as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16620as_cr_digits='0123456789'
16621as_cr_alnum=$as_cr_Letters$as_cr_digits
16622
16623# The user is always right.
16624if test "${PATH_SEPARATOR+set}" != set; then
16625 echo "#! /bin/sh" >conftest.sh
16626 echo "exit 0" >>conftest.sh
16627 chmod +x conftest.sh
16628 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16629 PATH_SEPARATOR=';'
16630 else
16631 PATH_SEPARATOR=:
16632 fi
16633 rm -f conftest.sh
16634fi
16635
16636
16637 as_lineno_1=$LINENO
16638 as_lineno_2=$LINENO
16639 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16640 test "x$as_lineno_1" != "x$as_lineno_2" &&
16641 test "x$as_lineno_3" = "x$as_lineno_2" || {
16642 # Find who we are. Look in the path if we contain no path at all
16643 # relative or not.
16644 case $0 in
16645 *[\\/]* ) as_myself=$0 ;;
16646 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16647for as_dir in $PATH
16648do
16649 IFS=$as_save_IFS
16650 test -z "$as_dir" && as_dir=.
16651 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16652done
16653
16654 ;;
16655 esac
16656 # We did not find ourselves, most probably we were run as `sh COMMAND'
16657 # in which case we are not to be found in the path.
16658 if test "x$as_myself" = x; then
16659 as_myself=$0
16660 fi
16661 if test ! -f "$as_myself"; then
16662 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16663echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16664 { (exit 1); exit 1; }; }
16665 fi
16666 case $CONFIG_SHELL in
16667 '')
16668 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16669for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16670do
16671 IFS=$as_save_IFS
16672 test -z "$as_dir" && as_dir=.
16673 for as_base in sh bash ksh sh5; do
16674 case $as_dir in
16675 /*)
16676 if ("$as_dir/$as_base" -c '
16677 as_lineno_1=$LINENO
16678 as_lineno_2=$LINENO
16679 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16680 test "x$as_lineno_1" != "x$as_lineno_2" &&
16681 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16682 CONFIG_SHELL=$as_dir/$as_base
16683 export CONFIG_SHELL
16684 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16685 fi;;
16686 esac
16687 done
16688done
16689;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016690 esac
16691
Martin v. Löwis11437992002-04-12 09:54:03 +000016692 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16693 # uniformly replaced by the line number. The first 'sed' inserts a
16694 # line-number line before each line; the second 'sed' does the real
16695 # work. The second script uses 'N' to pair each line-number line
16696 # with the numbered line, and appends trailing '-' during
16697 # substitution so that $LINENO is not a special case at line end.
16698 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16699 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16700 sed '=' <$as_myself |
16701 sed '
16702 N
16703 s,$,-,
16704 : loop
16705 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16706 t loop
16707 s,-$,,
16708 s,^['$as_cr_digits']*\n,,
16709 ' >$as_me.lineno &&
16710 chmod +x $as_me.lineno ||
16711 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16712echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16713 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016714
Martin v. Löwis11437992002-04-12 09:54:03 +000016715 # Don't try to exec as it changes $[0], causing all sort of problems
16716 # (the dirname of $[0] is not the place where we might find the
16717 # original and so on. Autoconf is especially sensible to this).
16718 . ./$as_me.lineno
16719 # Exit status is that of the last command.
16720 exit
16721}
16722
16723
16724case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16725 *c*,-n*) ECHO_N= ECHO_C='
16726' ECHO_T=' ' ;;
16727 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16728 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16729esac
16730
16731if expr a : '\(a\)' >/dev/null 2>&1; then
16732 as_expr=expr
16733else
16734 as_expr=false
16735fi
16736
16737rm -f conf$$ conf$$.exe conf$$.file
16738echo >conf$$.file
16739if ln -s conf$$.file conf$$ 2>/dev/null; then
16740 # We could just check for DJGPP; but this test a) works b) is more generic
16741 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16742 if test -f conf$$.exe; then
16743 # Don't use ln at all; we don't have any links
16744 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016745 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016746 as_ln_s='ln -s'
16747 fi
16748elif ln conf$$.file conf$$ 2>/dev/null; then
16749 as_ln_s=ln
16750else
16751 as_ln_s='cp -p'
16752fi
16753rm -f conf$$ conf$$.exe conf$$.file
16754
16755as_executable_p="test -f"
16756
16757# Sed expression to map a string onto a valid CPP name.
16758as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16759
16760# Sed expression to map a string onto a valid variable name.
16761as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16762
16763
16764# IFS
16765# We need space, tab and new line, in precisely that order.
16766as_nl='
16767'
16768IFS=" $as_nl"
16769
16770# CDPATH.
16771$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16772
16773exec 6>&1
16774
16775# Open the log real soon, to keep \$[0] and so on meaningful, and to
16776# report actual input values of CONFIG_FILES etc. instead of their
16777# values after options handling. Logging --version etc. is OK.
16778exec 5>>config.log
16779{
16780 echo
16781 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16782## Running $as_me. ##
16783_ASBOX
16784} >&5
16785cat >&5 <<_CSEOF
16786
Martin v. Löwis88afe662002-10-26 13:47:44 +000016787This file was extended by python $as_me 2.3, which was
Martin v. Löwis11437992002-04-12 09:54:03 +000016788generated by GNU Autoconf 2.53. Invocation command line was
16789
16790 CONFIG_FILES = $CONFIG_FILES
16791 CONFIG_HEADERS = $CONFIG_HEADERS
16792 CONFIG_LINKS = $CONFIG_LINKS
16793 CONFIG_COMMANDS = $CONFIG_COMMANDS
16794 $ $0 $@
16795
16796_CSEOF
16797echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16798echo >&5
16799_ACEOF
16800
16801# Files that config.status was made for.
16802if test -n "$ac_config_files"; then
16803 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16804fi
16805
16806if test -n "$ac_config_headers"; then
16807 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16808fi
16809
16810if test -n "$ac_config_links"; then
16811 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16812fi
16813
16814if test -n "$ac_config_commands"; then
16815 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16816fi
16817
16818cat >>$CONFIG_STATUS <<\_ACEOF
16819
16820ac_cs_usage="\
16821\`$as_me' instantiates files from templates according to the
16822current configuration.
16823
16824Usage: $0 [OPTIONS] [FILE]...
16825
16826 -h, --help print this help, then exit
16827 -V, --version print version number, then exit
16828 -d, --debug don't remove temporary files
16829 --recheck update $as_me by reconfiguring in the same conditions
16830 --file=FILE[:TEMPLATE]
16831 instantiate the configuration file FILE
16832 --header=FILE[:TEMPLATE]
16833 instantiate the configuration header FILE
16834
16835Configuration files:
16836$config_files
16837
16838Configuration headers:
16839$config_headers
16840
16841Report bugs to <bug-autoconf@gnu.org>."
16842_ACEOF
16843
16844cat >>$CONFIG_STATUS <<_ACEOF
16845ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000016846python config.status 2.3
Martin v. Löwis11437992002-04-12 09:54:03 +000016847configured by $0, generated by GNU Autoconf 2.53,
16848 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16849
16850Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16851Free Software Foundation, Inc.
16852This config.status script is free software; the Free Software Foundation
16853gives unlimited permission to copy, distribute and modify it."
16854srcdir=$srcdir
16855INSTALL="$INSTALL"
16856_ACEOF
16857
16858cat >>$CONFIG_STATUS <<\_ACEOF
16859# If no file are specified by the user, then we need to provide default
16860# value. By we need to know if files were specified by the user.
16861ac_need_defaults=:
16862while test $# != 0
16863do
16864 case $1 in
16865 --*=*)
16866 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16867 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16868 shift
16869 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16870 shift
16871 ;;
16872 -*);;
16873 *) # This is not an option, so the user has probably given explicit
16874 # arguments.
16875 ac_need_defaults=false;;
16876 esac
16877
16878 case $1 in
16879 # Handling of the options.
16880_ACEOF
16881cat >>$CONFIG_STATUS <<_ACEOF
16882 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16883 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16884 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16885_ACEOF
16886cat >>$CONFIG_STATUS <<\_ACEOF
16887 --version | --vers* | -V )
16888 echo "$ac_cs_version"; exit 0 ;;
16889 --he | --h)
16890 # Conflict between --help and --header
16891 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16892Try \`$0 --help' for more information." >&5
16893echo "$as_me: error: ambiguous option: $1
16894Try \`$0 --help' for more information." >&2;}
16895 { (exit 1); exit 1; }; };;
16896 --help | --hel | -h )
16897 echo "$ac_cs_usage"; exit 0 ;;
16898 --debug | --d* | -d )
16899 debug=: ;;
16900 --file | --fil | --fi | --f )
16901 shift
16902 CONFIG_FILES="$CONFIG_FILES $1"
16903 ac_need_defaults=false;;
16904 --header | --heade | --head | --hea )
16905 shift
16906 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16907 ac_need_defaults=false;;
16908
16909 # This is an error.
16910 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16911Try \`$0 --help' for more information." >&5
16912echo "$as_me: error: unrecognized option: $1
16913Try \`$0 --help' for more information." >&2;}
16914 { (exit 1); exit 1; }; } ;;
16915
16916 *) ac_config_targets="$ac_config_targets $1" ;;
16917
16918 esac
16919 shift
16920done
16921
16922_ACEOF
16923
16924
16925
16926
16927
16928cat >>$CONFIG_STATUS <<\_ACEOF
16929for ac_config_target in $ac_config_targets
16930do
16931 case "$ac_config_target" in
16932 # Handling of arguments.
16933 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16934 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16935 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16936 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16937echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16938 { (exit 1); exit 1; }; };;
16939 esac
16940done
16941
16942# If the user did not use the arguments to specify the items to instantiate,
16943# then the envvar interface is used. Set only those that are not.
16944# We use the long form for the default assignment because of an extremely
16945# bizarre bug on SunOS 4.1.3.
16946if $ac_need_defaults; then
16947 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16948 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16949fi
16950
16951# Create a temporary directory, and hook for its removal unless debugging.
16952$debug ||
16953{
16954 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16955 trap '{ (exit 1); exit 1; }' 1 2 13 15
16956}
16957
16958# Create a (secure) tmp directory for tmp files.
16959: ${TMPDIR=/tmp}
16960{
16961 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16962 test -n "$tmp" && test -d "$tmp"
16963} ||
16964{
16965 tmp=$TMPDIR/cs$$-$RANDOM
16966 (umask 077 && mkdir $tmp)
16967} ||
16968{
16969 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16970 { (exit 1); exit 1; }
16971}
16972
16973_ACEOF
16974
16975cat >>$CONFIG_STATUS <<_ACEOF
16976
16977#
16978# CONFIG_FILES section.
16979#
16980
16981# No need to generate the scripts if there are no CONFIG_FILES.
16982# This happens for instance when ./config.status config.h
16983if test -n "\$CONFIG_FILES"; then
16984 # Protect against being on the right side of a sed subst in config.status.
16985 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16986 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16987s,@SHELL@,$SHELL,;t t
16988s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16989s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16990s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16991s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16992s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16993s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16994s,@exec_prefix@,$exec_prefix,;t t
16995s,@prefix@,$prefix,;t t
16996s,@program_transform_name@,$program_transform_name,;t t
16997s,@bindir@,$bindir,;t t
16998s,@sbindir@,$sbindir,;t t
16999s,@libexecdir@,$libexecdir,;t t
17000s,@datadir@,$datadir,;t t
17001s,@sysconfdir@,$sysconfdir,;t t
17002s,@sharedstatedir@,$sharedstatedir,;t t
17003s,@localstatedir@,$localstatedir,;t t
17004s,@libdir@,$libdir,;t t
17005s,@includedir@,$includedir,;t t
17006s,@oldincludedir@,$oldincludedir,;t t
17007s,@infodir@,$infodir,;t t
17008s,@mandir@,$mandir,;t t
17009s,@build_alias@,$build_alias,;t t
17010s,@host_alias@,$host_alias,;t t
17011s,@target_alias@,$target_alias,;t t
17012s,@DEFS@,$DEFS,;t t
17013s,@ECHO_C@,$ECHO_C,;t t
17014s,@ECHO_N@,$ECHO_N,;t t
17015s,@ECHO_T@,$ECHO_T,;t t
17016s,@LIBS@,$LIBS,;t t
17017s,@VERSION@,$VERSION,;t t
17018s,@SOVERSION@,$SOVERSION,;t t
17019s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
17020s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
17021s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
17022s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
17023s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
17024s,@MACHDEP@,$MACHDEP,;t t
17025s,@SGI_ABI@,$SGI_ABI,;t t
17026s,@CXX@,$CXX,;t t
17027s,@MAINOBJ@,$MAINOBJ,;t t
17028s,@EXEEXT@,$EXEEXT,;t t
17029s,@CC@,$CC,;t t
17030s,@CFLAGS@,$CFLAGS,;t t
17031s,@LDFLAGS@,$LDFLAGS,;t t
17032s,@CPPFLAGS@,$CPPFLAGS,;t t
17033s,@ac_ct_CC@,$ac_ct_CC,;t t
17034s,@OBJEXT@,$OBJEXT,;t t
17035s,@CPP@,$CPP,;t t
17036s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
17037s,@LIBRARY@,$LIBRARY,;t t
17038s,@LDLIBRARY@,$LDLIBRARY,;t t
17039s,@DLLLIBRARY@,$DLLLIBRARY,;t t
17040s,@BLDLIBRARY@,$BLDLIBRARY,;t t
17041s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
17042s,@INSTSONAME@,$INSTSONAME,;t t
17043s,@RUNSHARED@,$RUNSHARED,;t t
17044s,@LINKCC@,$LINKCC,;t t
17045s,@RANLIB@,$RANLIB,;t t
17046s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17047s,@AR@,$AR,;t t
17048s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17049s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17050s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17051s,@LN@,$LN,;t t
17052s,@OPT@,$OPT,;t t
17053s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
17054s,@SO@,$SO,;t t
17055s,@LDSHARED@,$LDSHARED,;t t
17056s,@BLDSHARED@,$BLDSHARED,;t t
17057s,@CCSHARED@,$CCSHARED,;t t
17058s,@LINKFORSHARED@,$LINKFORSHARED,;t t
17059s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017060s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017061s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
17062s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
17063s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
17064s,@LDLAST@,$LDLAST,;t t
17065s,@THREADOBJ@,$THREADOBJ,;t t
17066s,@DLINCLDIR@,$DLINCLDIR,;t t
17067s,@DYNLOADFILE@,$DYNLOADFILE,;t t
17068s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
17069s,@LIBOBJS@,$LIBOBJS,;t t
17070s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
17071s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
17072s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
17073s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
17074s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
17075s,@LIBM@,$LIBM,;t t
17076s,@LIBC@,$LIBC,;t t
17077s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
17078s,@THREADHEADERS@,$THREADHEADERS,;t t
17079s,@SRCDIRS@,$SRCDIRS,;t t
17080CEOF
17081
17082_ACEOF
17083
17084 cat >>$CONFIG_STATUS <<\_ACEOF
17085 # Split the substitutions into bite-sized pieces for seds with
17086 # small command number limits, like on Digital OSF/1 and HP-UX.
17087 ac_max_sed_lines=48
17088 ac_sed_frag=1 # Number of current file.
17089 ac_beg=1 # First line for current file.
17090 ac_end=$ac_max_sed_lines # Line after last line for current file.
17091 ac_more_lines=:
17092 ac_sed_cmds=
17093 while $ac_more_lines; do
17094 if test $ac_beg -gt 1; then
17095 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17096 else
17097 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17098 fi
17099 if test ! -s $tmp/subs.frag; then
17100 ac_more_lines=false
17101 else
17102 # The purpose of the label and of the branching condition is to
17103 # speed up the sed processing (if there are no `@' at all, there
17104 # is no need to browse any of the substitutions).
17105 # These are the two extra sed commands mentioned above.
17106 (echo ':t
17107 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17108 if test -z "$ac_sed_cmds"; then
17109 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17110 else
17111 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17112 fi
17113 ac_sed_frag=`expr $ac_sed_frag + 1`
17114 ac_beg=$ac_end
17115 ac_end=`expr $ac_end + $ac_max_sed_lines`
17116 fi
17117 done
17118 if test -z "$ac_sed_cmds"; then
17119 ac_sed_cmds=cat
17120 fi
17121fi # test -n "$CONFIG_FILES"
17122
17123_ACEOF
17124cat >>$CONFIG_STATUS <<\_ACEOF
17125for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17126 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17127 case $ac_file in
17128 - | *:- | *:-:* ) # input from stdin
17129 cat >$tmp/stdin
17130 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17131 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17132 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17133 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17134 * ) ac_file_in=$ac_file.in ;;
17135 esac
17136
17137 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17138 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17139$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17140 X"$ac_file" : 'X\(//\)[^/]' \| \
17141 X"$ac_file" : 'X\(//\)$' \| \
17142 X"$ac_file" : 'X\(/\)' \| \
17143 . : '\(.\)' 2>/dev/null ||
17144echo X"$ac_file" |
17145 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17146 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17147 /^X\(\/\/\)$/{ s//\1/; q; }
17148 /^X\(\/\).*/{ s//\1/; q; }
17149 s/.*/./; q'`
17150 { case "$ac_dir" in
17151 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17152 *) as_incr_dir=.;;
17153esac
17154as_dummy="$ac_dir"
17155for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17156 case $as_mkdir_dir in
17157 # Skip DOS drivespec
17158 ?:) as_incr_dir=$as_mkdir_dir ;;
17159 *)
17160 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17161 test -d "$as_incr_dir" ||
17162 mkdir "$as_incr_dir" ||
17163 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17164echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17165 { (exit 1); exit 1; }; }
17166 ;;
17167 esac
17168done; }
17169
17170 ac_builddir=.
17171
17172if test "$ac_dir" != .; then
17173 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17174 # A "../" for each directory in $ac_dir_suffix.
17175 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17176else
17177 ac_dir_suffix= ac_top_builddir=
17178fi
17179
17180case $srcdir in
17181 .) # No --srcdir option. We are building in place.
17182 ac_srcdir=.
17183 if test -z "$ac_top_builddir"; then
17184 ac_top_srcdir=.
17185 else
17186 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17187 fi ;;
17188 [\\/]* | ?:[\\/]* ) # Absolute path.
17189 ac_srcdir=$srcdir$ac_dir_suffix;
17190 ac_top_srcdir=$srcdir ;;
17191 *) # Relative path.
17192 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17193 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17194esac
17195# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
17196# absolute.
17197ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise4826582002-10-26 13:33:00 +000017198ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000017199ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
17200ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
17201
17202
17203 case $INSTALL in
17204 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17205 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
17206 esac
17207
17208 if test x"$ac_file" != x-; then
17209 { echo "$as_me:$LINENO: creating $ac_file" >&5
17210echo "$as_me: creating $ac_file" >&6;}
17211 rm -f "$ac_file"
17212 fi
17213 # Let's still pretend it is `configure' which instantiates (i.e., don't
17214 # use $as_me), people would be surprised to read:
17215 # /* config.h. Generated by config.status. */
17216 if test x"$ac_file" = x-; then
17217 configure_input=
17218 else
17219 configure_input="$ac_file. "
17220 fi
17221 configure_input=$configure_input"Generated from `echo $ac_file_in |
17222 sed 's,.*/,,'` by configure."
17223
17224 # First look for the input files in the build tree, otherwise in the
17225 # src tree.
17226 ac_file_inputs=`IFS=:
17227 for f in $ac_file_in; do
17228 case $f in
17229 -) echo $tmp/stdin ;;
17230 [\\/$]*)
17231 # Absolute (can't be DOS-style, as IFS=:)
17232 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17233echo "$as_me: error: cannot find input file: $f" >&2;}
17234 { (exit 1); exit 1; }; }
17235 echo $f;;
17236 *) # Relative
17237 if test -f "$f"; then
17238 # Build tree
17239 echo $f
17240 elif test -f "$srcdir/$f"; then
17241 # Source tree
17242 echo $srcdir/$f
17243 else
17244 # /dev/null tree
17245 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17246echo "$as_me: error: cannot find input file: $f" >&2;}
17247 { (exit 1); exit 1; }; }
17248 fi;;
17249 esac
17250 done` || { (exit 1); exit 1; }
17251_ACEOF
17252cat >>$CONFIG_STATUS <<_ACEOF
17253 sed "$ac_vpsub
17254$extrasub
17255_ACEOF
17256cat >>$CONFIG_STATUS <<\_ACEOF
17257:t
17258/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17259s,@configure_input@,$configure_input,;t t
17260s,@srcdir@,$ac_srcdir,;t t
17261s,@abs_srcdir@,$ac_abs_srcdir,;t t
17262s,@top_srcdir@,$ac_top_srcdir,;t t
17263s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17264s,@builddir@,$ac_builddir,;t t
17265s,@abs_builddir@,$ac_abs_builddir,;t t
17266s,@top_builddir@,$ac_top_builddir,;t t
17267s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17268s,@INSTALL@,$ac_INSTALL,;t t
17269" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17270 rm -f $tmp/stdin
17271 if test x"$ac_file" != x-; then
17272 mv $tmp/out $ac_file
17273 else
17274 cat $tmp/out
17275 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017276 fi
17277
Martin v. Löwis11437992002-04-12 09:54:03 +000017278done
17279_ACEOF
17280cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017281
Martin v. Löwis11437992002-04-12 09:54:03 +000017282#
17283# CONFIG_HEADER section.
17284#
Guido van Rossum627b2d71993-12-24 10:39:16 +000017285
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017286# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17287# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017288#
17289# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000017290ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17291ac_dB='[ ].*$,\1#\2'
17292ac_dC=' '
17293ac_dD=',;t'
17294# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17295ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17296ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017297ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000017298ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017299
Martin v. Löwis11437992002-04-12 09:54:03 +000017300for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000017301 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000017302 case $ac_file in
17303 - | *:- | *:-:* ) # input from stdin
17304 cat >$tmp/stdin
17305 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17306 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17307 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17308 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17309 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017310 esac
17311
Martin v. Löwis11437992002-04-12 09:54:03 +000017312 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17313echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017314
Martin v. Löwis11437992002-04-12 09:54:03 +000017315 # First look for the input files in the build tree, otherwise in the
17316 # src tree.
17317 ac_file_inputs=`IFS=:
17318 for f in $ac_file_in; do
17319 case $f in
17320 -) echo $tmp/stdin ;;
17321 [\\/$]*)
17322 # Absolute (can't be DOS-style, as IFS=:)
17323 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17324echo "$as_me: error: cannot find input file: $f" >&2;}
17325 { (exit 1); exit 1; }; }
17326 echo $f;;
17327 *) # Relative
17328 if test -f "$f"; then
17329 # Build tree
17330 echo $f
17331 elif test -f "$srcdir/$f"; then
17332 # Source tree
17333 echo $srcdir/$f
17334 else
17335 # /dev/null tree
17336 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17337echo "$as_me: error: cannot find input file: $f" >&2;}
17338 { (exit 1); exit 1; }; }
17339 fi;;
17340 esac
17341 done` || { (exit 1); exit 1; }
17342 # Remove the trailing spaces.
17343 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017344
Martin v. Löwis11437992002-04-12 09:54:03 +000017345_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017346
Martin v. Löwis11437992002-04-12 09:54:03 +000017347# Transform confdefs.h into two sed scripts, `conftest.defines' and
17348# `conftest.undefs', that substitutes the proper values into
17349# config.h.in to produce config.h. The first handles `#define'
17350# templates, and the second `#undef' templates.
17351# And first: Protect against being on the right side of a sed subst in
17352# config.status. Protect against being in an unquoted here document
17353# in config.status.
17354rm -f conftest.defines conftest.undefs
17355# Using a here document instead of a string reduces the quoting nightmare.
17356# Putting comments in sed scripts is not portable.
17357#
17358# `end' is used to avoid that the second main sed command (meant for
17359# 0-ary CPP macros) applies to n-ary macro definitions.
17360# See the Autoconf documentation for `clear'.
17361cat >confdef2sed.sed <<\_ACEOF
17362s/[\\&,]/\\&/g
17363s,[\\$`],\\&,g
17364t clear
17365: clear
17366s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
17367t end
17368s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
17369: end
17370_ACEOF
17371# If some macros were called several times there might be several times
17372# the same #defines, which is useless. Nevertheless, we may not want to
17373# sort them, since we want the *last* AC-DEFINE to be honored.
17374uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17375sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17376rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017377
17378# This sed command replaces #undef with comments. This is necessary, for
17379# example, in the case of _POSIX_SOURCE, which is predefined and required
17380# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017381cat >>conftest.undefs <<\_ACEOF
17382s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
17383_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017384
Martin v. Löwis11437992002-04-12 09:54:03 +000017385# Break up conftest.defines because some shells have a limit on the size
17386# of here documents, and old seds have small limits too (100 cmds).
17387echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
17388echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
17389echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17390echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017391rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000017392while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000017393do
Martin v. Löwis11437992002-04-12 09:54:03 +000017394 # Write a limited-size here document to $tmp/defines.sed.
17395 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17396 # Speed up: don't consider the non `#define' lines.
17397 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
17398 # Work around the forget-to-reset-the-flag bug.
17399 echo 't clr' >>$CONFIG_STATUS
17400 echo ': clr' >>$CONFIG_STATUS
17401 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017402 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017403 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17404 rm -f $tmp/in
17405 mv $tmp/out $tmp/in
17406' >>$CONFIG_STATUS
17407 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17408 rm -f conftest.defines
17409 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000017410done
Martin v. Löwis11437992002-04-12 09:54:03 +000017411rm -f conftest.defines
17412echo ' fi # egrep' >>$CONFIG_STATUS
17413echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017414
Martin v. Löwis11437992002-04-12 09:54:03 +000017415# Break up conftest.undefs because some shells have a limit on the size
17416# of here documents, and old seds have small limits too (100 cmds).
17417echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
17418rm -f conftest.tail
17419while grep . conftest.undefs >/dev/null
17420do
17421 # Write a limited-size here document to $tmp/undefs.sed.
17422 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17423 # Speed up: don't consider the non `#undef'
17424 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
17425 # Work around the forget-to-reset-the-flag bug.
17426 echo 't clr' >>$CONFIG_STATUS
17427 echo ': clr' >>$CONFIG_STATUS
17428 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
17429 echo 'CEOF
17430 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17431 rm -f $tmp/in
17432 mv $tmp/out $tmp/in
17433' >>$CONFIG_STATUS
17434 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17435 rm -f conftest.undefs
17436 mv conftest.tail conftest.undefs
17437done
17438rm -f conftest.undefs
17439
17440cat >>$CONFIG_STATUS <<\_ACEOF
17441 # Let's still pretend it is `configure' which instantiates (i.e., don't
17442 # use $as_me), people would be surprised to read:
17443 # /* config.h. Generated by config.status. */
17444 if test x"$ac_file" = x-; then
17445 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000017446 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017447 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000017448 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017449 cat $tmp/in >>$tmp/config.h
17450 rm -f $tmp/in
17451 if test x"$ac_file" != x-; then
17452 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17453 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17454echo "$as_me: $ac_file is unchanged" >&6;}
17455 else
17456 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17457$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17458 X"$ac_file" : 'X\(//\)[^/]' \| \
17459 X"$ac_file" : 'X\(//\)$' \| \
17460 X"$ac_file" : 'X\(/\)' \| \
17461 . : '\(.\)' 2>/dev/null ||
17462echo X"$ac_file" |
17463 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17464 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17465 /^X\(\/\/\)$/{ s//\1/; q; }
17466 /^X\(\/\).*/{ s//\1/; q; }
17467 s/.*/./; q'`
17468 { case "$ac_dir" in
17469 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17470 *) as_incr_dir=.;;
17471esac
17472as_dummy="$ac_dir"
17473for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17474 case $as_mkdir_dir in
17475 # Skip DOS drivespec
17476 ?:) as_incr_dir=$as_mkdir_dir ;;
17477 *)
17478 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17479 test -d "$as_incr_dir" ||
17480 mkdir "$as_incr_dir" ||
17481 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17482echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17483 { (exit 1); exit 1; }; }
17484 ;;
17485 esac
17486done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017487
Martin v. Löwis11437992002-04-12 09:54:03 +000017488 rm -f $ac_file
17489 mv $tmp/config.h $ac_file
17490 fi
17491 else
17492 cat $tmp/config.h
17493 rm -f $tmp/config.h
17494 fi
17495done
17496_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017497
Martin v. Löwis11437992002-04-12 09:54:03 +000017498cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017499
Martin v. Löwis11437992002-04-12 09:54:03 +000017500{ (exit 0); exit 0; }
17501_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017502chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000017503ac_clean_files=$ac_clean_files_save
17504
17505
17506# configure is writing to config.log, and then calls config.status.
17507# config.status does its own redirection, appending to config.log.
17508# Unfortunately, on DOS this fails, as config.log is still kept open
17509# by configure, so config.status won't be able to write to it; its
17510# output is simply discarded. So we exec the FD to /dev/null,
17511# effectively closing config.log, so it can be properly (re)opened and
17512# appended to by config.status. When coming back to configure, we
17513# need to make the FD available again.
17514if test "$no_create" != yes; then
17515 ac_cs_success=:
17516 exec 5>/dev/null
17517 $SHELL $CONFIG_STATUS || ac_cs_success=false
17518 exec 5>>config.log
17519 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17520 # would make configure fail if this is the last instruction.
17521 $ac_cs_success || { (exit 1); exit 1; }
17522fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017523
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017524
17525echo "creating Setup"
17526if test ! -f Modules/Setup
17527then
17528 cp $srcdir/Modules/Setup.dist Modules/Setup
17529fi
17530
17531echo "creating Setup.local"
17532if test ! -f Modules/Setup.local
17533then
17534 echo "# Edit this file for local setup changes" >Modules/Setup.local
17535fi
17536
17537echo "creating Makefile"
17538$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17539 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017540 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017541mv config.c Modules