blob: 5ef2ea21cc942f0144aac7c6468a03ec91991b60 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +00002# From configure.in Revision: 1.380 .
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`
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +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
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001240
1241
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001242VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001243
Martin v. Löwis1142de32002-03-29 16:28:31 +00001244
1245SOVERSION=1.0
1246
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001247# The later defininition of _XOPEN_SOURCE disables certain features
1248# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1249
1250cat >>confdefs.h <<\_ACEOF
1251#define _GNU_SOURCE 1
1252_ACEOF
1253
1254
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001255define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001256
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001257# Arguments passed to configure.
1258
1259CONFIG_ARGS="$ac_configure_args"
1260
Jack Jansene578a632001-08-15 01:27:14 +00001261# Check whether --enable-framework or --disable-framework was given.
1262if test "${enable_framework+set}" = set; then
1263 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001264
Jack Jansene578a632001-08-15 01:27:14 +00001265 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001267 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001268 esac
1269 case $enableval in
1270 no)
1271 PYTHONFRAMEWORK=
1272 PYTHONFRAMEWORKDIR=no-framework
1273 PYTHONFRAMEWORKPREFIX=
1274 PYTHONFRAMEWORKINSTALLDIR=
1275 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001276 ;;
1277 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001278 PYTHONFRAMEWORK=Python
1279 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001280 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001281 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1282 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001283 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001284
Guido van Rossum563e7081996-09-10 18:20:48 +00001285else
Martin v. Löwis11437992002-04-12 09:54:03 +00001286
Jack Jansene578a632001-08-15 01:27:14 +00001287 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001288 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001289 PYTHONFRAMEWORKPREFIX=
1290 PYTHONFRAMEWORKINSTALLDIR=
1291 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001292
Martin v. Löwis11437992002-04-12 09:54:03 +00001293fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001294
1295
1296
1297
Jack Jansene578a632001-08-15 01:27:14 +00001298
1299##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001300## AC_HELP_STRING(--with-dyld,
1301## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001302##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001303# Set name for machine-dependent library files
1304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305echo "$as_me:$LINENO: checking MACHDEP" >&5
1306echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001307if test -z "$MACHDEP"
1308then
Guido van Rossum563e7081996-09-10 18:20:48 +00001309 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001310 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1311 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001312 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001313 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001314 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001315 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001316 ac_md_system=`echo $ac_sys_system |
1317 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1318 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001319 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001320 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001321
Guido van Rossum07397971997-04-29 21:49:50 +00001322 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001323 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001324 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001325 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001326 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001327 esac
1328fi
Guido van Rossum91922671997-10-09 20:24:13 +00001329
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001330# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1331# disable features if it is defined, without any means to access these
1332# features as extensions. For these systems, we skip the definition of
1333# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1334# some feature, make sure there is no alternative way to access this
1335# feature. Also, when using wildcards, make sure you have verified the
1336# need for not defining _XOPEN_SOURCE on all systems matching the
1337# wildcard, and that the wildcard does not include future systems
1338# (which may remove their limitations).
1339case $ac_sys_system/$ac_sys_release in
1340 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1341 # even though select is a POSIX function. Reported by J. Ribbens.
1342 OpenBSD/2.* | OpenBSD/3.[012])
1343 define_xopen_source=no;;
1344esac
1345
1346if test $define_xopen_source = yes
1347then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001348
1349cat >>confdefs.h <<\_ACEOF
1350#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001351_ACEOF
1352
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001353
1354 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1355 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1356 # several APIs are not declared. Since this is also needed in some
1357 # cases for HP-UX, we define it globally.
1358
1359
1360cat >>confdefs.h <<\_ACEOF
1361#define _XOPEN_SOURCE_EXTENDED 1
1362_ACEOF
1363
1364
1365cat >>confdefs.h <<\_ACEOF
1366#define _POSIX_C_SOURCE 200112L
1367_ACEOF
1368
1369
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001370fi
1371
Guido van Rossum91922671997-10-09 20:24:13 +00001372#
1373# SGI compilers allow the specification of the both the ABI and the
1374# ISA on the command line. Depending on the values of these switches,
1375# different and often incompatable code will be generated.
1376#
1377# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1378# thus supply support for various ABI/ISA combinations. The MACHDEP
1379# variable is also adjusted.
1380#
1381
1382if test ! -z "$SGI_ABI"
1383then
1384 CC="cc $SGI_ABI"
1385 LDFLAGS="$SGI_ABI $LDFLAGS"
1386 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1387fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001388echo "$as_me:$LINENO: result: $MACHDEP" >&5
1389echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001390
Jack Jansen83f898c2002-12-30 22:23:40 +00001391# And add extra plat-mac for darwin
1392
1393echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1394echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1395if test -z "$EXTRAPLATDIR"
1396then
1397 case $MACHDEP in
1398 darwin) EXTRAPLATDIR="\$(PLATMACDIRS)";;
1399 *) EXTRAPLATDIR="";;
1400 esac
1401fi
1402echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1403echo "${ECHO_T}$EXTRAPLATDIR" >&6
1404
Guido van Rossum627b2d71993-12-24 10:39:16 +00001405# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001406echo "$as_me:$LINENO: checking for --without-gcc" >&5
1407echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1408
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001409# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001410if test "${with_gcc+set}" = set; then
1411 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001412
Guido van Rossum7f43da71994-08-01 12:15:30 +00001413 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001414 no) CC=cc
1415 without_gcc=yes;;
1416 yes) CC=gcc
1417 without_gcc=no;;
1418 *) CC=$withval
1419 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001420 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001421else
Martin v. Löwis11437992002-04-12 09:54:03 +00001422
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001423 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001424 AIX*) CC=cc_r
1425 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001426 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001427 case $BE_HOST_CPU in
1428 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001429 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001430 without_gcc=yes
Mark Hammond8235ea12002-07-19 06:55:41 +00001431 OPT="-O -export pragma"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001432 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001433 ;;
1434 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001435 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001436 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001437 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001438 ;;
1439 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1441echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1442 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001443 ;;
1444 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001445 AR="\$(srcdir)/Modules/ar_beos"
1446 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001447 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001448 Monterey*)
1449 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001450 without_gcc=;;
1451 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001452 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001453fi;
1454echo "$as_me:$LINENO: result: $without_gcc" >&5
1455echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001456
1457
Guido van Rossum95012191999-12-16 17:50:52 +00001458
Fred Drakea1a84e72001-03-06 05:52:16 +00001459MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001460echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1461echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1462
Guido van Rossum95012191999-12-16 17:50:52 +00001463# Check whether --with-cxx or --without-cxx was given.
1464if test "${with_cxx+set}" = set; then
1465 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001466
Martin v. Löwis22352952000-12-13 17:37:02 +00001467 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001468 case $withval in
1469 no) CXX=
1470 with_cxx=no;;
1471 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001472 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001473 with_cxx=$withval;;
1474 esac
1475else
Martin v. Löwis11437992002-04-12 09:54:03 +00001476
Guido van Rossum95012191999-12-16 17:50:52 +00001477 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001478 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001479
Martin v. Löwis11437992002-04-12 09:54:03 +00001480fi;
1481echo "$as_me:$LINENO: result: $with_cxx" >&5
1482echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001483
1484if test "$with_cxx" = "yes"
1485then
Martin v. Löwis11437992002-04-12 09:54:03 +00001486 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1487echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1488 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001489fi
1490
1491
1492
1493
Martin v. Löwis11437992002-04-12 09:54:03 +00001494if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001495then
1496 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1497do
Martin v. Löwis11437992002-04-12 09:54:03 +00001498 # 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 +00001499set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001500echo "$as_me:$LINENO: checking for $ac_word" >&5
1501echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1502if test "${ac_cv_prog_CXX+set}" = set; then
1503 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001504else
1505 if test -n "$CXX"; then
1506 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1507else
Martin v. Löwis11437992002-04-12 09:54:03 +00001508as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1509for as_dir in $PATH
1510do
1511 IFS=$as_save_IFS
1512 test -z "$as_dir" && as_dir=.
1513 for ac_exec_ext in '' $ac_executable_extensions; do
1514 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1515 ac_cv_prog_CXX="$ac_prog"
1516 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1517 break 2
1518 fi
1519done
1520done
1521
Martin v. Löwis22352952000-12-13 17:37:02 +00001522fi
1523fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001524CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001525if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001526 echo "$as_me:$LINENO: result: $CXX" >&5
1527echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001528else
Martin v. Löwis11437992002-04-12 09:54:03 +00001529 echo "$as_me:$LINENO: result: no" >&5
1530echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001531fi
1532
Martin v. Löwis11437992002-04-12 09:54:03 +00001533 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001534done
1535test -n "$CXX" || CXX="notfound"
1536
1537 if test "$CXX" = "notfound"
1538 then
1539 CXX=
1540 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001541 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001542ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001543ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1544ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1545ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1546 cat >conftest.$ac_ext <<_ACEOF
1547#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001548#include "confdefs.h"
1549
Martin v. Löwis11437992002-04-12 09:54:03 +00001550#ifdef F77_DUMMY_MAIN
1551# ifdef __cplusplus
1552 extern "C"
1553# endif
1554 int F77_DUMMY_MAIN() { return 1; }
1555#endif
1556int
1557main ()
1558{
Michael W. Hudson54241132001-12-07 15:38:26 +00001559
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 ;
1561 return 0;
1562}
1563_ACEOF
1564ac_clean_files_save=$ac_clean_files
1565ac_clean_files="$ac_clean_files a.out a.exe"
1566# Try to create an executable without -o first, disregard a.out.
1567# It will help us diagnose broken compilers, and finding out an intuition
1568# of exeext.
1569echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1570echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1571ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1572if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1573 (eval $ac_link_default) 2>&5
1574 ac_status=$?
1575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1576 (exit $ac_status); }; then
1577 # Find the output, starting from the most likely. This scheme is
1578# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1579# resort.
1580
1581# Be careful to initialize this variable, since it used to be cached.
1582# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1583ac_cv_exeext=
1584for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1585 ls a.out conftest 2>/dev/null;
1586 ls a.* conftest.* 2>/dev/null`; do
1587 case $ac_file in
1588 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1589 a.out ) # We found the default executable, but exeext='' is most
1590 # certainly right.
1591 break;;
1592 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1593 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1594 export ac_cv_exeext
1595 break;;
1596 * ) break;;
1597 esac
1598done
1599else
1600 echo "$as_me: failed program was:" >&5
1601cat conftest.$ac_ext >&5
1602{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1603echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1604 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001605fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001606
1607ac_exeext=$ac_cv_exeext
1608echo "$as_me:$LINENO: result: $ac_file" >&5
1609echo "${ECHO_T}$ac_file" >&6
1610
1611# Check the compiler produces executables we can run. If not, either
1612# the compiler is broken, or we cross compile.
1613echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1614echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1615# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1616# If not cross compiling, check that we can run a simple program.
1617if test "$cross_compiling" != yes; then
1618 if { ac_try='./$ac_file'
1619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1620 (eval $ac_try) 2>&5
1621 ac_status=$?
1622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1623 (exit $ac_status); }; }; then
1624 cross_compiling=no
1625 else
1626 if test "$cross_compiling" = maybe; then
1627 cross_compiling=yes
1628 else
1629 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1630If you meant to cross compile, use \`--host'." >&5
1631echo "$as_me: error: cannot run C++ compiled programs.
1632If you meant to cross compile, use \`--host'." >&2;}
1633 { (exit 1); exit 1; }; }
1634 fi
1635 fi
1636fi
1637echo "$as_me:$LINENO: result: yes" >&5
1638echo "${ECHO_T}yes" >&6
1639
1640rm -f a.out a.exe conftest$ac_cv_exeext
1641ac_clean_files=$ac_clean_files_save
1642# Check the compiler produces executables we can run. If not, either
1643# the compiler is broken, or we cross compile.
1644echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1645echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1646echo "$as_me:$LINENO: result: $cross_compiling" >&5
1647echo "${ECHO_T}$cross_compiling" >&6
1648
1649echo "$as_me:$LINENO: checking for suffix of executables" >&5
1650echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1651if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1652 (eval $ac_link) 2>&5
1653 ac_status=$?
1654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1655 (exit $ac_status); }; then
1656 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1657# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1658# work properly (i.e., refer to `conftest.exe'), while it won't with
1659# `rm'.
1660for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1661 case $ac_file in
1662 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1663 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1664 export ac_cv_exeext
1665 break;;
1666 * ) break;;
1667 esac
1668done
1669else
1670 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1671echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1672 { (exit 1); exit 1; }; }
1673fi
1674
1675rm -f conftest$ac_cv_exeext
1676echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1677echo "${ECHO_T}$ac_cv_exeext" >&6
1678
1679rm -f conftest.$ac_ext
1680EXEEXT=$ac_cv_exeext
1681ac_exeext=$EXEEXT
1682
1683 ac_ext=c
1684ac_cpp='$CPP $CPPFLAGS'
1685ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1686ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1687ac_compiler_gnu=$ac_cv_c_compiler_gnu
1688
1689
Martin v. Löwis22352952000-12-13 17:37:02 +00001690
1691 fi
1692fi
1693
Guido van Rossum8b131c51995-03-09 14:10:13 +00001694# If the user switches compilers, we can't believe the cache
1695if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1696then
Martin v. Löwis11437992002-04-12 09:54:03 +00001697 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1698(it is also a good idea to do 'make clean' before compiling)" >&5
1699echo "$as_me: error: cached CC is different -- throw away $cache_file
1700(it is also a good idea to do 'make clean' before compiling)" >&2;}
1701 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001702fi
1703
Martin v. Löwis11437992002-04-12 09:54:03 +00001704ac_ext=c
1705ac_cpp='$CPP $CPPFLAGS'
1706ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1707ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1708ac_compiler_gnu=$ac_cv_c_compiler_gnu
1709if test -n "$ac_tool_prefix"; then
1710 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1711set dummy ${ac_tool_prefix}gcc; ac_word=$2
1712echo "$as_me:$LINENO: checking for $ac_word" >&5
1713echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1714if test "${ac_cv_prog_CC+set}" = set; then
1715 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001716else
1717 if test -n "$CC"; then
1718 ac_cv_prog_CC="$CC" # Let the user override the test.
1719else
Martin v. Löwis11437992002-04-12 09:54:03 +00001720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1721for as_dir in $PATH
1722do
1723 IFS=$as_save_IFS
1724 test -z "$as_dir" && as_dir=.
1725 for ac_exec_ext in '' $ac_executable_extensions; do
1726 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1727 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1728 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1729 break 2
1730 fi
1731done
1732done
1733
Jack Jansendd19cf82001-12-06 22:36:17 +00001734fi
1735fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001736CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001737if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001738 echo "$as_me:$LINENO: result: $CC" >&5
1739echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001740else
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 echo "$as_me:$LINENO: result: no" >&5
1742echo "${ECHO_T}no" >&6
1743fi
1744
1745fi
1746if test -z "$ac_cv_prog_CC"; then
1747 ac_ct_CC=$CC
1748 # Extract the first word of "gcc", so it can be a program name with args.
1749set dummy gcc; ac_word=$2
1750echo "$as_me:$LINENO: checking for $ac_word" >&5
1751echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1752if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1753 echo $ECHO_N "(cached) $ECHO_C" >&6
1754else
1755 if test -n "$ac_ct_CC"; then
1756 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1757else
1758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1759for as_dir in $PATH
1760do
1761 IFS=$as_save_IFS
1762 test -z "$as_dir" && as_dir=.
1763 for ac_exec_ext in '' $ac_executable_extensions; do
1764 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1765 ac_cv_prog_ac_ct_CC="gcc"
1766 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1767 break 2
1768 fi
1769done
1770done
1771
1772fi
1773fi
1774ac_ct_CC=$ac_cv_prog_ac_ct_CC
1775if test -n "$ac_ct_CC"; then
1776 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1777echo "${ECHO_T}$ac_ct_CC" >&6
1778else
1779 echo "$as_me:$LINENO: result: no" >&5
1780echo "${ECHO_T}no" >&6
1781fi
1782
1783 CC=$ac_ct_CC
1784else
1785 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001786fi
1787
Jack Jansendd19cf82001-12-06 22:36:17 +00001788if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001789 if test -n "$ac_tool_prefix"; then
1790 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1791set dummy ${ac_tool_prefix}cc; ac_word=$2
1792echo "$as_me:$LINENO: checking for $ac_word" >&5
1793echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1794if test "${ac_cv_prog_CC+set}" = set; then
1795 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001796else
1797 if test -n "$CC"; then
1798 ac_cv_prog_CC="$CC" # Let the user override the test.
1799else
Martin v. Löwis11437992002-04-12 09:54:03 +00001800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1801for as_dir in $PATH
1802do
1803 IFS=$as_save_IFS
1804 test -z "$as_dir" && as_dir=.
1805 for ac_exec_ext in '' $ac_executable_extensions; do
1806 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1807 ac_cv_prog_CC="${ac_tool_prefix}cc"
1808 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1809 break 2
1810 fi
1811done
1812done
1813
1814fi
1815fi
1816CC=$ac_cv_prog_CC
1817if test -n "$CC"; then
1818 echo "$as_me:$LINENO: result: $CC" >&5
1819echo "${ECHO_T}$CC" >&6
1820else
1821 echo "$as_me:$LINENO: result: no" >&5
1822echo "${ECHO_T}no" >&6
1823fi
1824
1825fi
1826if test -z "$ac_cv_prog_CC"; then
1827 ac_ct_CC=$CC
1828 # Extract the first word of "cc", so it can be a program name with args.
1829set dummy cc; ac_word=$2
1830echo "$as_me:$LINENO: checking for $ac_word" >&5
1831echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1832if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1833 echo $ECHO_N "(cached) $ECHO_C" >&6
1834else
1835 if test -n "$ac_ct_CC"; then
1836 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1837else
1838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1839for as_dir in $PATH
1840do
1841 IFS=$as_save_IFS
1842 test -z "$as_dir" && as_dir=.
1843 for ac_exec_ext in '' $ac_executable_extensions; do
1844 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1845 ac_cv_prog_ac_ct_CC="cc"
1846 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1847 break 2
1848 fi
1849done
1850done
1851
1852fi
1853fi
1854ac_ct_CC=$ac_cv_prog_ac_ct_CC
1855if test -n "$ac_ct_CC"; then
1856 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1857echo "${ECHO_T}$ac_ct_CC" >&6
1858else
1859 echo "$as_me:$LINENO: result: no" >&5
1860echo "${ECHO_T}no" >&6
1861fi
1862
1863 CC=$ac_ct_CC
1864else
1865 CC="$ac_cv_prog_CC"
1866fi
1867
1868fi
1869if test -z "$CC"; then
1870 # Extract the first word of "cc", so it can be a program name with args.
1871set dummy cc; ac_word=$2
1872echo "$as_me:$LINENO: checking for $ac_word" >&5
1873echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1874if test "${ac_cv_prog_CC+set}" = set; then
1875 echo $ECHO_N "(cached) $ECHO_C" >&6
1876else
1877 if test -n "$CC"; then
1878 ac_cv_prog_CC="$CC" # Let the user override the test.
1879else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001880 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001881as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1882for as_dir in $PATH
1883do
1884 IFS=$as_save_IFS
1885 test -z "$as_dir" && as_dir=.
1886 for ac_exec_ext in '' $ac_executable_extensions; do
1887 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1888 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1889 ac_prog_rejected=yes
1890 continue
1891 fi
1892 ac_cv_prog_CC="cc"
1893 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1894 break 2
1895 fi
1896done
1897done
1898
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001899if test $ac_prog_rejected = yes; then
1900 # We found a bogon in the path, so make sure we never use it.
1901 set dummy $ac_cv_prog_CC
1902 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001903 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001904 # We chose a different compiler from the bogus one.
1905 # However, it has the same basename, so the bogon will be chosen
1906 # first if we set CC to just the basename; use the full file name.
1907 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001908 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001909 shift
1910 ac_cv_prog_CC="$@"
1911 fi
1912fi
1913fi
1914fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001915CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001916if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001917 echo "$as_me:$LINENO: result: $CC" >&5
1918echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001919else
Martin v. Löwis11437992002-04-12 09:54:03 +00001920 echo "$as_me:$LINENO: result: no" >&5
1921echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001922fi
1923
Martin v. Löwis11437992002-04-12 09:54:03 +00001924fi
1925if test -z "$CC"; then
1926 if test -n "$ac_tool_prefix"; then
1927 for ac_prog in cl
1928 do
1929 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1930set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1931echo "$as_me:$LINENO: checking for $ac_word" >&5
1932echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1933if test "${ac_cv_prog_CC+set}" = set; then
1934 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001935else
1936 if test -n "$CC"; then
1937 ac_cv_prog_CC="$CC" # Let the user override the test.
1938else
Martin v. Löwis11437992002-04-12 09:54:03 +00001939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1940for as_dir in $PATH
1941do
1942 IFS=$as_save_IFS
1943 test -z "$as_dir" && as_dir=.
1944 for ac_exec_ext in '' $ac_executable_extensions; do
1945 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1946 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1947 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1948 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001949 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001950done
1951done
1952
1953fi
1954fi
1955CC=$ac_cv_prog_CC
1956if test -n "$CC"; then
1957 echo "$as_me:$LINENO: result: $CC" >&5
1958echo "${ECHO_T}$CC" >&6
1959else
1960 echo "$as_me:$LINENO: result: no" >&5
1961echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001962fi
1963
Martin v. Löwis11437992002-04-12 09:54:03 +00001964 test -n "$CC" && break
1965 done
1966fi
1967if test -z "$CC"; then
1968 ac_ct_CC=$CC
1969 for ac_prog in cl
1970do
1971 # Extract the first word of "$ac_prog", so it can be a program name with args.
1972set dummy $ac_prog; ac_word=$2
1973echo "$as_me:$LINENO: checking for $ac_word" >&5
1974echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1975if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1976 echo $ECHO_N "(cached) $ECHO_C" >&6
1977else
1978 if test -n "$ac_ct_CC"; then
1979 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1980else
1981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1982for as_dir in $PATH
1983do
1984 IFS=$as_save_IFS
1985 test -z "$as_dir" && as_dir=.
1986 for ac_exec_ext in '' $ac_executable_extensions; do
1987 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1988 ac_cv_prog_ac_ct_CC="$ac_prog"
1989 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1990 break 2
1991 fi
1992done
1993done
Jack Jansendd19cf82001-12-06 22:36:17 +00001994
Martin v. Löwis11437992002-04-12 09:54:03 +00001995fi
1996fi
1997ac_ct_CC=$ac_cv_prog_ac_ct_CC
1998if test -n "$ac_ct_CC"; then
1999 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2000echo "${ECHO_T}$ac_ct_CC" >&6
2001else
2002 echo "$as_me:$LINENO: result: no" >&5
2003echo "${ECHO_T}no" >&6
2004fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002005
Martin v. Löwis11437992002-04-12 09:54:03 +00002006 test -n "$ac_ct_CC" && break
2007done
Michael W. Hudson54241132001-12-07 15:38:26 +00002008
Martin v. Löwis11437992002-04-12 09:54:03 +00002009 CC=$ac_ct_CC
2010fi
2011
2012fi
2013
2014
2015test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2016echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2017 { (exit 1); exit 1; }; }
2018
2019# Provide some information about the compiler.
2020echo "$as_me:$LINENO:" \
2021 "checking for C compiler version" >&5
2022ac_compiler=`set X $ac_compile; echo $2`
2023{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2024 (eval $ac_compiler --version </dev/null >&5) 2>&5
2025 ac_status=$?
2026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2027 (exit $ac_status); }
2028{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2029 (eval $ac_compiler -v </dev/null >&5) 2>&5
2030 ac_status=$?
2031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2032 (exit $ac_status); }
2033{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2034 (eval $ac_compiler -V </dev/null >&5) 2>&5
2035 ac_status=$?
2036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2037 (exit $ac_status); }
2038
2039cat >conftest.$ac_ext <<_ACEOF
2040#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002041#include "confdefs.h"
2042
Martin v. Löwis11437992002-04-12 09:54:03 +00002043#ifdef F77_DUMMY_MAIN
2044# ifdef __cplusplus
2045 extern "C"
2046# endif
2047 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002048#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002049int
2050main ()
2051{
2052
2053 ;
2054 return 0;
2055}
2056_ACEOF
2057ac_clean_files_save=$ac_clean_files
2058ac_clean_files="$ac_clean_files a.out a.exe"
2059# Try to create an executable without -o first, disregard a.out.
2060# It will help us diagnose broken compilers, and finding out an intuition
2061# of exeext.
2062echo "$as_me:$LINENO: checking for C compiler default output" >&5
2063echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2064ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2065if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2066 (eval $ac_link_default) 2>&5
2067 ac_status=$?
2068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2069 (exit $ac_status); }; then
2070 # Find the output, starting from the most likely. This scheme is
2071# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2072# resort.
2073
2074# Be careful to initialize this variable, since it used to be cached.
2075# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2076ac_cv_exeext=
2077for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2078 ls a.out conftest 2>/dev/null;
2079 ls a.* conftest.* 2>/dev/null`; do
2080 case $ac_file in
2081 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2082 a.out ) # We found the default executable, but exeext='' is most
2083 # certainly right.
2084 break;;
2085 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2086 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2087 export ac_cv_exeext
2088 break;;
2089 * ) break;;
2090 esac
2091done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002092else
Martin v. Löwis11437992002-04-12 09:54:03 +00002093 echo "$as_me: failed program was:" >&5
2094cat conftest.$ac_ext >&5
2095{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2096echo "$as_me: error: C compiler cannot create executables" >&2;}
2097 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002098fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002099
Martin v. Löwis11437992002-04-12 09:54:03 +00002100ac_exeext=$ac_cv_exeext
2101echo "$as_me:$LINENO: result: $ac_file" >&5
2102echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002103
Martin v. Löwis11437992002-04-12 09:54:03 +00002104# Check the compiler produces executables we can run. If not, either
2105# the compiler is broken, or we cross compile.
2106echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2107echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2108# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2109# If not cross compiling, check that we can run a simple program.
2110if test "$cross_compiling" != yes; then
2111 if { ac_try='./$ac_file'
2112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2113 (eval $ac_try) 2>&5
2114 ac_status=$?
2115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2116 (exit $ac_status); }; }; then
2117 cross_compiling=no
2118 else
2119 if test "$cross_compiling" = maybe; then
2120 cross_compiling=yes
2121 else
2122 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2123If you meant to cross compile, use \`--host'." >&5
2124echo "$as_me: error: cannot run C compiled programs.
2125If you meant to cross compile, use \`--host'." >&2;}
2126 { (exit 1); exit 1; }; }
2127 fi
2128 fi
2129fi
2130echo "$as_me:$LINENO: result: yes" >&5
2131echo "${ECHO_T}yes" >&6
2132
2133rm -f a.out a.exe conftest$ac_cv_exeext
2134ac_clean_files=$ac_clean_files_save
2135# Check the compiler produces executables we can run. If not, either
2136# the compiler is broken, or we cross compile.
2137echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2138echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2139echo "$as_me:$LINENO: result: $cross_compiling" >&5
2140echo "${ECHO_T}$cross_compiling" >&6
2141
2142echo "$as_me:$LINENO: checking for suffix of executables" >&5
2143echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2144if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2145 (eval $ac_link) 2>&5
2146 ac_status=$?
2147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2148 (exit $ac_status); }; then
2149 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2150# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2151# work properly (i.e., refer to `conftest.exe'), while it won't with
2152# `rm'.
2153for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2154 case $ac_file in
2155 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2156 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2157 export ac_cv_exeext
2158 break;;
2159 * ) break;;
2160 esac
2161done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002162else
Martin v. Löwis11437992002-04-12 09:54:03 +00002163 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2164echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2165 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002166fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002167
Martin v. Löwis11437992002-04-12 09:54:03 +00002168rm -f conftest$ac_cv_exeext
2169echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2170echo "${ECHO_T}$ac_cv_exeext" >&6
2171
2172rm -f conftest.$ac_ext
2173EXEEXT=$ac_cv_exeext
2174ac_exeext=$EXEEXT
2175echo "$as_me:$LINENO: checking for suffix of object files" >&5
2176echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2177if test "${ac_cv_objext+set}" = set; then
2178 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002179else
Martin v. Löwis11437992002-04-12 09:54:03 +00002180 cat >conftest.$ac_ext <<_ACEOF
2181#line $LINENO "configure"
2182#include "confdefs.h"
2183
2184#ifdef F77_DUMMY_MAIN
2185# ifdef __cplusplus
2186 extern "C"
2187# endif
2188 int F77_DUMMY_MAIN() { return 1; }
2189#endif
2190int
2191main ()
2192{
2193
2194 ;
2195 return 0;
2196}
2197_ACEOF
2198rm -f conftest.o conftest.obj
2199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2200 (eval $ac_compile) 2>&5
2201 ac_status=$?
2202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2203 (exit $ac_status); }; then
2204 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2205 case $ac_file in
2206 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2207 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2208 break;;
2209 esac
2210done
2211else
2212 echo "$as_me: failed program was:" >&5
2213cat conftest.$ac_ext >&5
2214{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2215echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2216 { (exit 1); exit 1; }; }
2217fi
2218
2219rm -f conftest.$ac_cv_objext conftest.$ac_ext
2220fi
2221echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2222echo "${ECHO_T}$ac_cv_objext" >&6
2223OBJEXT=$ac_cv_objext
2224ac_objext=$OBJEXT
2225echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2226echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2227if test "${ac_cv_c_compiler_gnu+set}" = set; then
2228 echo $ECHO_N "(cached) $ECHO_C" >&6
2229else
2230 cat >conftest.$ac_ext <<_ACEOF
2231#line $LINENO "configure"
2232#include "confdefs.h"
2233
2234#ifdef F77_DUMMY_MAIN
2235# ifdef __cplusplus
2236 extern "C"
2237# endif
2238 int F77_DUMMY_MAIN() { return 1; }
2239#endif
2240int
2241main ()
2242{
2243#ifndef __GNUC__
2244 choke me
2245#endif
2246
2247 ;
2248 return 0;
2249}
2250_ACEOF
2251rm -f conftest.$ac_objext
2252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2253 (eval $ac_compile) 2>&5
2254 ac_status=$?
2255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2256 (exit $ac_status); } &&
2257 { ac_try='test -s conftest.$ac_objext'
2258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2259 (eval $ac_try) 2>&5
2260 ac_status=$?
2261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2262 (exit $ac_status); }; }; then
2263 ac_compiler_gnu=yes
2264else
2265 echo "$as_me: failed program was:" >&5
2266cat conftest.$ac_ext >&5
2267ac_compiler_gnu=no
2268fi
2269rm -f conftest.$ac_objext conftest.$ac_ext
2270ac_cv_c_compiler_gnu=$ac_compiler_gnu
2271
2272fi
2273echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2274echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2275GCC=`test $ac_compiler_gnu = yes && echo yes`
2276ac_test_CFLAGS=${CFLAGS+set}
2277ac_save_CFLAGS=$CFLAGS
2278CFLAGS="-g"
2279echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2280echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2281if test "${ac_cv_prog_cc_g+set}" = set; then
2282 echo $ECHO_N "(cached) $ECHO_C" >&6
2283else
2284 cat >conftest.$ac_ext <<_ACEOF
2285#line $LINENO "configure"
2286#include "confdefs.h"
2287
2288#ifdef F77_DUMMY_MAIN
2289# ifdef __cplusplus
2290 extern "C"
2291# endif
2292 int F77_DUMMY_MAIN() { return 1; }
2293#endif
2294int
2295main ()
2296{
2297
2298 ;
2299 return 0;
2300}
2301_ACEOF
2302rm -f conftest.$ac_objext
2303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2304 (eval $ac_compile) 2>&5
2305 ac_status=$?
2306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2307 (exit $ac_status); } &&
2308 { ac_try='test -s conftest.$ac_objext'
2309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2310 (eval $ac_try) 2>&5
2311 ac_status=$?
2312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2313 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002314 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002315else
Martin v. Löwis11437992002-04-12 09:54:03 +00002316 echo "$as_me: failed program was:" >&5
2317cat conftest.$ac_ext >&5
2318ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002319fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002320rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002321fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002322echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2323echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002324if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002325 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002326elif test $ac_cv_prog_cc_g = yes; then
2327 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002328 CFLAGS="-g -O2"
2329 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002330 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002331 fi
2332else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002333 if test "$GCC" = yes; then
2334 CFLAGS="-O2"
2335 else
2336 CFLAGS=
2337 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002338fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002339# Some people use a C++ compiler to compile C. Since we use `exit',
2340# in C++ we need to declare it. In case someone uses the same compiler
2341# for both compiling C and C++ we need to have the C++ compiler decide
2342# the declaration of exit, since it's the most demanding environment.
2343cat >conftest.$ac_ext <<_ACEOF
2344#ifndef __cplusplus
2345 choke me
2346#endif
2347_ACEOF
2348rm -f conftest.$ac_objext
2349if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2350 (eval $ac_compile) 2>&5
2351 ac_status=$?
2352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2353 (exit $ac_status); } &&
2354 { ac_try='test -s conftest.$ac_objext'
2355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2356 (eval $ac_try) 2>&5
2357 ac_status=$?
2358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2359 (exit $ac_status); }; }; then
2360 for ac_declaration in \
2361 ''\
2362 '#include <stdlib.h>' \
2363 'extern "C" void std::exit (int) throw (); using std::exit;' \
2364 'extern "C" void std::exit (int); using std::exit;' \
2365 'extern "C" void exit (int) throw ();' \
2366 'extern "C" void exit (int);' \
2367 'void exit (int);'
2368do
2369 cat >conftest.$ac_ext <<_ACEOF
2370#line $LINENO "configure"
2371#include "confdefs.h"
2372#include <stdlib.h>
2373$ac_declaration
2374#ifdef F77_DUMMY_MAIN
2375# ifdef __cplusplus
2376 extern "C"
2377# endif
2378 int F77_DUMMY_MAIN() { return 1; }
2379#endif
2380int
2381main ()
2382{
2383exit (42);
2384 ;
2385 return 0;
2386}
2387_ACEOF
2388rm -f conftest.$ac_objext
2389if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2390 (eval $ac_compile) 2>&5
2391 ac_status=$?
2392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2393 (exit $ac_status); } &&
2394 { ac_try='test -s conftest.$ac_objext'
2395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2396 (eval $ac_try) 2>&5
2397 ac_status=$?
2398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2399 (exit $ac_status); }; }; then
2400 :
2401else
2402 echo "$as_me: failed program was:" >&5
2403cat conftest.$ac_ext >&5
2404continue
2405fi
2406rm -f conftest.$ac_objext conftest.$ac_ext
2407 cat >conftest.$ac_ext <<_ACEOF
2408#line $LINENO "configure"
2409#include "confdefs.h"
2410$ac_declaration
2411#ifdef F77_DUMMY_MAIN
2412# ifdef __cplusplus
2413 extern "C"
2414# endif
2415 int F77_DUMMY_MAIN() { return 1; }
2416#endif
2417int
2418main ()
2419{
2420exit (42);
2421 ;
2422 return 0;
2423}
2424_ACEOF
2425rm -f conftest.$ac_objext
2426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2427 (eval $ac_compile) 2>&5
2428 ac_status=$?
2429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2430 (exit $ac_status); } &&
2431 { ac_try='test -s conftest.$ac_objext'
2432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2433 (eval $ac_try) 2>&5
2434 ac_status=$?
2435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2436 (exit $ac_status); }; }; then
2437 break
2438else
2439 echo "$as_me: failed program was:" >&5
2440cat conftest.$ac_ext >&5
2441fi
2442rm -f conftest.$ac_objext conftest.$ac_ext
2443done
2444rm -f conftest*
2445if test -n "$ac_declaration"; then
2446 echo '#ifdef __cplusplus' >>confdefs.h
2447 echo $ac_declaration >>confdefs.h
2448 echo '#endif' >>confdefs.h
2449fi
2450
2451else
2452 echo "$as_me: failed program was:" >&5
2453cat conftest.$ac_ext >&5
2454fi
2455rm -f conftest.$ac_objext conftest.$ac_ext
2456ac_ext=c
2457ac_cpp='$CPP $CPPFLAGS'
2458ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2459ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2460ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002461
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002462
2463# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002464
2465ac_ext=c
2466ac_cpp='$CPP $CPPFLAGS'
2467ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2468ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2469ac_compiler_gnu=$ac_cv_c_compiler_gnu
2470echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2471echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002472# On Suns, sometimes $CPP names a directory.
2473if test -n "$CPP" && test -d "$CPP"; then
2474 CPP=
2475fi
2476if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 if test "${ac_cv_prog_CPP+set}" = set; then
2478 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002479else
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 # Double quotes because CPP needs to be expanded
2481 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2482 do
2483 ac_preproc_ok=false
2484for ac_c_preproc_warn_flag in '' yes
2485do
2486 # Use a header file that comes with gcc, so configuring glibc
2487 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002488 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 # not just through cpp. "Syntax error" is here to catch this case.
2490 cat >conftest.$ac_ext <<_ACEOF
2491#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002492#include "confdefs.h"
2493#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002494 Syntax error
2495_ACEOF
2496if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2497 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2498 ac_status=$?
2499 egrep -v '^ *\+' conftest.er1 >conftest.err
2500 rm -f conftest.er1
2501 cat conftest.err >&5
2502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2503 (exit $ac_status); } >/dev/null; then
2504 if test -s conftest.err; then
2505 ac_cpp_err=$ac_c_preproc_warn_flag
2506 else
2507 ac_cpp_err=
2508 fi
2509else
2510 ac_cpp_err=yes
2511fi
2512if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002513 :
2514else
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002516 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 # Broken: fails on valid input.
2518continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002519fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002520rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002521
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 # OK, works on sane cases. Now check whether non-existent headers
2523 # can be detected and how.
2524 cat >conftest.$ac_ext <<_ACEOF
2525#line $LINENO "configure"
2526#include "confdefs.h"
2527#include <ac_nonexistent.h>
2528_ACEOF
2529if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2530 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2531 ac_status=$?
2532 egrep -v '^ *\+' conftest.er1 >conftest.err
2533 rm -f conftest.er1
2534 cat conftest.err >&5
2535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2536 (exit $ac_status); } >/dev/null; then
2537 if test -s conftest.err; then
2538 ac_cpp_err=$ac_c_preproc_warn_flag
2539 else
2540 ac_cpp_err=
2541 fi
2542else
2543 ac_cpp_err=yes
2544fi
2545if test -z "$ac_cpp_err"; then
2546 # Broken: success on invalid input.
2547continue
2548else
2549 echo "$as_me: failed program was:" >&5
2550 cat conftest.$ac_ext >&5
2551 # Passes both tests.
2552ac_preproc_ok=:
2553break
2554fi
2555rm -f conftest.err conftest.$ac_ext
2556
2557done
2558# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2559rm -f conftest.err conftest.$ac_ext
2560if $ac_preproc_ok; then
2561 break
2562fi
2563
2564 done
2565 ac_cv_prog_CPP=$CPP
2566
2567fi
2568 CPP=$ac_cv_prog_CPP
2569else
2570 ac_cv_prog_CPP=$CPP
2571fi
2572echo "$as_me:$LINENO: result: $CPP" >&5
2573echo "${ECHO_T}$CPP" >&6
2574ac_preproc_ok=false
2575for ac_c_preproc_warn_flag in '' yes
2576do
2577 # Use a header file that comes with gcc, so configuring glibc
2578 # with a fresh cross-compiler works.
2579 # On the NeXT, cc -E runs the code through the compiler's parser,
2580 # not just through cpp. "Syntax error" is here to catch this case.
2581 cat >conftest.$ac_ext <<_ACEOF
2582#line $LINENO "configure"
2583#include "confdefs.h"
2584#include <assert.h>
2585 Syntax error
2586_ACEOF
2587if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2588 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2589 ac_status=$?
2590 egrep -v '^ *\+' conftest.er1 >conftest.err
2591 rm -f conftest.er1
2592 cat conftest.err >&5
2593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2594 (exit $ac_status); } >/dev/null; then
2595 if test -s conftest.err; then
2596 ac_cpp_err=$ac_c_preproc_warn_flag
2597 else
2598 ac_cpp_err=
2599 fi
2600else
2601 ac_cpp_err=yes
2602fi
2603if test -z "$ac_cpp_err"; then
2604 :
2605else
2606 echo "$as_me: failed program was:" >&5
2607 cat conftest.$ac_ext >&5
2608 # Broken: fails on valid input.
2609continue
2610fi
2611rm -f conftest.err conftest.$ac_ext
2612
2613 # OK, works on sane cases. Now check whether non-existent headers
2614 # can be detected and how.
2615 cat >conftest.$ac_ext <<_ACEOF
2616#line $LINENO "configure"
2617#include "confdefs.h"
2618#include <ac_nonexistent.h>
2619_ACEOF
2620if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2621 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2622 ac_status=$?
2623 egrep -v '^ *\+' conftest.er1 >conftest.err
2624 rm -f conftest.er1
2625 cat conftest.err >&5
2626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2627 (exit $ac_status); } >/dev/null; then
2628 if test -s conftest.err; then
2629 ac_cpp_err=$ac_c_preproc_warn_flag
2630 else
2631 ac_cpp_err=
2632 fi
2633else
2634 ac_cpp_err=yes
2635fi
2636if test -z "$ac_cpp_err"; then
2637 # Broken: success on invalid input.
2638continue
2639else
2640 echo "$as_me: failed program was:" >&5
2641 cat conftest.$ac_ext >&5
2642 # Passes both tests.
2643ac_preproc_ok=:
2644break
2645fi
2646rm -f conftest.err conftest.$ac_ext
2647
2648done
2649# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2650rm -f conftest.err conftest.$ac_ext
2651if $ac_preproc_ok; then
2652 :
2653else
2654 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2655echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2656 { (exit 1); exit 1; }; }
2657fi
2658
2659ac_ext=c
2660ac_cpp='$CPP $CPPFLAGS'
2661ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2662ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2663ac_compiler_gnu=$ac_cv_c_compiler_gnu
2664
2665
2666
2667echo "$as_me:$LINENO: checking for AIX" >&5
2668echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2669cat >conftest.$ac_ext <<_ACEOF
2670#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002671#include "confdefs.h"
2672#ifdef _AIX
2673 yes
2674#endif
2675
Martin v. Löwis11437992002-04-12 09:54:03 +00002676_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002677if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2678 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002679 echo "$as_me:$LINENO: result: yes" >&5
2680echo "${ECHO_T}yes" >&6
2681cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002682#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002683_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002684
2685else
Martin v. Löwis11437992002-04-12 09:54:03 +00002686 echo "$as_me:$LINENO: result: no" >&5
2687echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002688fi
2689rm -f conftest*
2690
Michael W. Hudson54241132001-12-07 15:38:26 +00002691
Martin v. Löwis11437992002-04-12 09:54:03 +00002692echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2693echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2694if test "${ac_cv_header_stdc+set}" = set; then
2695 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002696else
Martin v. Löwis11437992002-04-12 09:54:03 +00002697 cat >conftest.$ac_ext <<_ACEOF
2698#line $LINENO "configure"
2699#include "confdefs.h"
2700#include <stdlib.h>
2701#include <stdarg.h>
2702#include <string.h>
2703#include <float.h>
2704
2705_ACEOF
2706if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2707 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2708 ac_status=$?
2709 egrep -v '^ *\+' conftest.er1 >conftest.err
2710 rm -f conftest.er1
2711 cat conftest.err >&5
2712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2713 (exit $ac_status); } >/dev/null; then
2714 if test -s conftest.err; then
2715 ac_cpp_err=$ac_c_preproc_warn_flag
2716 else
2717 ac_cpp_err=
2718 fi
2719else
2720 ac_cpp_err=yes
2721fi
2722if test -z "$ac_cpp_err"; then
2723 ac_cv_header_stdc=yes
2724else
2725 echo "$as_me: failed program was:" >&5
2726 cat conftest.$ac_ext >&5
2727 ac_cv_header_stdc=no
2728fi
2729rm -f conftest.err conftest.$ac_ext
2730
2731if test $ac_cv_header_stdc = yes; then
2732 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2733 cat >conftest.$ac_ext <<_ACEOF
2734#line $LINENO "configure"
2735#include "confdefs.h"
2736#include <string.h>
2737
2738_ACEOF
2739if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2740 egrep "memchr" >/dev/null 2>&1; then
2741 :
2742else
2743 ac_cv_header_stdc=no
2744fi
2745rm -f conftest*
2746
2747fi
2748
2749if test $ac_cv_header_stdc = yes; then
2750 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2751 cat >conftest.$ac_ext <<_ACEOF
2752#line $LINENO "configure"
2753#include "confdefs.h"
2754#include <stdlib.h>
2755
2756_ACEOF
2757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2758 egrep "free" >/dev/null 2>&1; then
2759 :
2760else
2761 ac_cv_header_stdc=no
2762fi
2763rm -f conftest*
2764
2765fi
2766
2767if test $ac_cv_header_stdc = yes; then
2768 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2769 if test "$cross_compiling" = yes; then
2770 :
2771else
2772 cat >conftest.$ac_ext <<_ACEOF
2773#line $LINENO "configure"
2774#include "confdefs.h"
2775#include <ctype.h>
2776#if ((' ' & 0x0FF) == 0x020)
2777# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2778# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2779#else
2780# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2781 || ('j' <= (c) && (c) <= 'r') \
2782 || ('s' <= (c) && (c) <= 'z'))
2783# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2784#endif
2785
2786#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2787int
2788main ()
2789{
2790 int i;
2791 for (i = 0; i < 256; i++)
2792 if (XOR (islower (i), ISLOWER (i))
2793 || toupper (i) != TOUPPER (i))
2794 exit(2);
2795 exit (0);
2796}
2797_ACEOF
2798rm -f conftest$ac_exeext
2799if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2800 (eval $ac_link) 2>&5
2801 ac_status=$?
2802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2803 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2805 (eval $ac_try) 2>&5
2806 ac_status=$?
2807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2808 (exit $ac_status); }; }; then
2809 :
2810else
2811 echo "$as_me: program exited with status $ac_status" >&5
2812echo "$as_me: failed program was:" >&5
2813cat conftest.$ac_ext >&5
2814( exit $ac_status )
2815ac_cv_header_stdc=no
2816fi
2817rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2818fi
2819fi
2820fi
2821echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2822echo "${ECHO_T}$ac_cv_header_stdc" >&6
2823if test $ac_cv_header_stdc = yes; then
2824
2825cat >>confdefs.h <<\_ACEOF
2826#define STDC_HEADERS 1
2827_ACEOF
2828
2829fi
2830
2831# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2842 inttypes.h stdint.h unistd.h
2843do
2844as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2845echo "$as_me:$LINENO: checking for $ac_header" >&5
2846echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2847if eval "test \"\${$as_ac_Header+set}\" = set"; then
2848 echo $ECHO_N "(cached) $ECHO_C" >&6
2849else
2850 cat >conftest.$ac_ext <<_ACEOF
2851#line $LINENO "configure"
2852#include "confdefs.h"
2853$ac_includes_default
2854
2855#include <$ac_header>
2856_ACEOF
2857rm -f conftest.$ac_objext
2858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2859 (eval $ac_compile) 2>&5
2860 ac_status=$?
2861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2862 (exit $ac_status); } &&
2863 { ac_try='test -s conftest.$ac_objext'
2864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2865 (eval $ac_try) 2>&5
2866 ac_status=$?
2867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2868 (exit $ac_status); }; }; then
2869 eval "$as_ac_Header=yes"
2870else
2871 echo "$as_me: failed program was:" >&5
2872cat conftest.$ac_ext >&5
2873eval "$as_ac_Header=no"
2874fi
2875rm -f conftest.$ac_objext conftest.$ac_ext
2876fi
2877echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2878echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2879if test `eval echo '${'$as_ac_Header'}'` = yes; then
2880 cat >>confdefs.h <<_ACEOF
2881#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2882_ACEOF
2883
2884fi
2885
2886done
2887
2888
2889if test "${ac_cv_header_minix_config_h+set}" = set; then
2890 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2891echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2892if test "${ac_cv_header_minix_config_h+set}" = set; then
2893 echo $ECHO_N "(cached) $ECHO_C" >&6
2894fi
2895echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2896echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2897else
2898 # Is the header compilable?
2899echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2900echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2901cat >conftest.$ac_ext <<_ACEOF
2902#line $LINENO "configure"
2903#include "confdefs.h"
2904$ac_includes_default
2905#include <minix/config.h>
2906_ACEOF
2907rm -f conftest.$ac_objext
2908if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2909 (eval $ac_compile) 2>&5
2910 ac_status=$?
2911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2912 (exit $ac_status); } &&
2913 { ac_try='test -s conftest.$ac_objext'
2914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2915 (eval $ac_try) 2>&5
2916 ac_status=$?
2917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2918 (exit $ac_status); }; }; then
2919 ac_header_compiler=yes
2920else
2921 echo "$as_me: failed program was:" >&5
2922cat conftest.$ac_ext >&5
2923ac_header_compiler=no
2924fi
2925rm -f conftest.$ac_objext conftest.$ac_ext
2926echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2927echo "${ECHO_T}$ac_header_compiler" >&6
2928
2929# Is the header present?
2930echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2931echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2932cat >conftest.$ac_ext <<_ACEOF
2933#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002934#include "confdefs.h"
2935#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002936_ACEOF
2937if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2938 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2939 ac_status=$?
2940 egrep -v '^ *\+' conftest.er1 >conftest.err
2941 rm -f conftest.er1
2942 cat conftest.err >&5
2943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2944 (exit $ac_status); } >/dev/null; then
2945 if test -s conftest.err; then
2946 ac_cpp_err=$ac_c_preproc_warn_flag
2947 else
2948 ac_cpp_err=
2949 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002950else
Martin v. Löwis11437992002-04-12 09:54:03 +00002951 ac_cpp_err=yes
2952fi
2953if test -z "$ac_cpp_err"; then
2954 ac_header_preproc=yes
2955else
2956 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002957 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002958 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002959fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002960rm -f conftest.err conftest.$ac_ext
2961echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2962echo "${ECHO_T}$ac_header_preproc" >&6
2963
2964# So? What about this header?
2965case $ac_header_compiler:$ac_header_preproc in
2966 yes:no )
2967 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2968echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2969 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2970echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2971 no:yes )
2972 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2973echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2974 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2975echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2976 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2977echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2978esac
2979echo "$as_me:$LINENO: checking for minix/config.h" >&5
2980echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2981if test "${ac_cv_header_minix_config_h+set}" = set; then
2982 echo $ECHO_N "(cached) $ECHO_C" >&6
2983else
2984 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002985fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002986echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2987echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2988
2989fi
2990if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002991 MINIX=yes
2992else
Martin v. Löwis11437992002-04-12 09:54:03 +00002993 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002994fi
2995
Martin v. Löwis11437992002-04-12 09:54:03 +00002996
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002997if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002998
2999cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003000#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003001_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003002
Martin v. Löwis11437992002-04-12 09:54:03 +00003003
3004cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003005#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00003006_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003007
Martin v. Löwis11437992002-04-12 09:54:03 +00003008
3009cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003010#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003011_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003012
3013fi
3014
3015
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003016# Check for unsupported systems
3017case $ac_sys_system/$ac_sys_release in
3018SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3019 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3020 echo See README for details.
3021 exit 1;;
3022esac
3023
3024if test "$MINIX" = yes; then
3025 echo This system \(MINIX\) is no longer supported.
3026 echo Read README for details.
3027 exit 1
3028fi
3029
Michael W. Hudson54241132001-12-07 15:38:26 +00003030
Martin v. Löwis11437992002-04-12 09:54:03 +00003031echo "$as_me:$LINENO: checking for --with-suffix" >&5
3032echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003033
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003034# Check whether --with-suffix or --without-suffix was given.
3035if test "${with_suffix+set}" = set; then
3036 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003037
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003038 case $withval in
3039 no) EXEEXT=;;
3040 yes) EXEEXT=.exe;;
3041 *) EXEEXT=$withval;;
3042 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003043fi;
3044echo "$as_me:$LINENO: result: $EXEEXT" >&5
3045echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003046
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003047# Test whether we're running on a non-case-sensitive system, in which
3048# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003049
Martin v. Löwis11437992002-04-12 09:54:03 +00003050echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3051echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003052if test ! -d CaseSensitiveTestDir; then
3053mkdir CaseSensitiveTestDir
3054fi
3055
3056if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003057then
Martin v. Löwis11437992002-04-12 09:54:03 +00003058 echo "$as_me:$LINENO: result: yes" >&5
3059echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003060 BUILDEXEEXT=.exe
3061else
Martin v. Löwis11437992002-04-12 09:54:03 +00003062 echo "$as_me:$LINENO: result: no" >&5
3063echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003064 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003065fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003066rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003067
Guido van Rossumdd997f71998-10-07 19:58:26 +00003068case $MACHDEP in
3069bsdos*)
3070 case $CC in
3071 gcc) CC="$CC -D_HAVE_BSDI";;
3072 esac;;
3073esac
3074
Guido van Rossum24b1e751997-08-21 02:29:16 +00003075case $ac_sys_system in
3076hp*|HP*)
3077 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003078 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003079 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003080Monterey*)
3081 case $CC in
3082 cc) CC="$CC -Wl,-Bexport";;
3083 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003084SunOS*)
3085 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003086
3087cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003088#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003089_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003090
3091 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003092esac
3093
Michael W. Hudson54241132001-12-07 15:38:26 +00003094
3095
Martin v. Löwis11437992002-04-12 09:54:03 +00003096echo "$as_me:$LINENO: checking LIBRARY" >&5
3097echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003098if test -z "$LIBRARY"
3099then
3100 LIBRARY='libpython$(VERSION).a'
3101fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003102echo "$as_me:$LINENO: result: $LIBRARY" >&5
3103echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003104
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003105# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003106# name of the library into which to insert object files). BLDLIBRARY is also
3107# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3108# is blank as the main program is not linked directly against LDLIBRARY.
3109# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3110# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3111# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3112# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003113#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003114# RUNSHARED is used to run shared python without installed libraries
3115#
3116# INSTSONAME is the name of the shared library that will be use to install
3117# on the system - some systems like version suffix, others don't
3118
3119
Michael W. Hudson54241132001-12-07 15:38:26 +00003120
3121
3122
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003123
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003124LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003125BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003126INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003127DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003128LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003129RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003130
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003131# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003132# If CXX is set, and if it is needed to link a main function that was
3133# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3134# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003135# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003136# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003137
Martin v. Löwis11437992002-04-12 09:54:03 +00003138echo "$as_me:$LINENO: checking LINKCC" >&5
3139echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003140if test -z "$LINKCC"
3141then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003142 if test -z "$CXX"; then
3143 LINKCC="\$(PURIFY) \$(CC)"
3144 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003145 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003146 $CXX -c conftest.$ac_ext 2>&5
3147 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3148 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3149 then
3150 LINKCC="\$(PURIFY) \$(CC)"
3151 else
3152 LINKCC="\$(PURIFY) \$(CXX)"
3153 fi
3154 rm -fr conftest*
3155 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003156 case $ac_sys_system in
3157 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003158 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003159 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003160 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003161 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003162 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003163 esac
3164fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003165echo "$as_me:$LINENO: result: $LINKCC" >&5
3166echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003167
Martin v. Löwis11437992002-04-12 09:54:03 +00003168echo "$as_me:$LINENO: checking for --enable-shared" >&5
3169echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003170# Check whether --enable-shared or --disable-shared was given.
3171if test "${enable_shared+set}" = set; then
3172 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003173
Martin v. Löwis11437992002-04-12 09:54:03 +00003174fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003175
3176if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003177then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003178 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003179 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003180 enable_shared="yes";;
3181 *)
3182 enable_shared="no";;
3183 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003184fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003185echo "$as_me:$LINENO: result: $enable_shared" >&5
3186echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003187
3188
Martin v. Löwis11437992002-04-12 09:54:03 +00003189echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3190echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003191
Guido van Rossumb8552162001-09-05 14:58:11 +00003192# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3193# library that we build, but we do not want to link against it (we
3194# will find it with a -framework option). For this reason there is an
3195# extra variable BLDLIBRARY against which Python and the extension
3196# modules are linked, BLDLIBRARY. This is normally the same as
3197# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003198if test "$enable_framework"
3199then
3200 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3201 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3202 BLDLIBRARY=''
3203else
3204 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003205fi
Jack Jansene578a632001-08-15 01:27:14 +00003206
Martin v. Löwis1142de32002-03-29 16:28:31 +00003207# Other platforms follow
3208if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003209
3210cat >>confdefs.h <<\_ACEOF
3211#define Py_ENABLE_SHARED 1
3212_ACEOF
3213
Martin v. Löwis1142de32002-03-29 16:28:31 +00003214 case $ac_sys_system in
3215 BeOS*)
3216 LDLIBRARY='libpython$(VERSION).so'
3217 ;;
3218 CYGWIN*)
3219 LDLIBRARY='libpython$(VERSION).dll.a'
3220 DLLLIBRARY='libpython$(VERSION).dll'
3221 ;;
3222 SunOS*)
3223 LDLIBRARY='libpython$(VERSION).so'
3224 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3225 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3226 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003227 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003228 LDLIBRARY='libpython$(VERSION).so'
3229 BLDLIBRARY='-L. -lpython$(VERSION)'
3230 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3231 INSTSONAME="$LDLIBRARY".$SOVERSION
3232 ;;
3233 hp*|HP*)
3234 LDLIBRARY='libpython$(VERSION).sl'
3235 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3236 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3237 ;;
3238 OSF*)
3239 LDLIBRARY='libpython$(VERSION).so'
3240 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3241 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3242 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003243 atheos*)
3244 LDLIBRARY='libpython$(VERSION).so'
3245 BLDLIBRARY='-L. -lpython$(VERSION)'
3246 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3247 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003248 esac
3249 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3250 case $MACHDEP in
3251 dguxR4)
3252 LDLIBRARY='libpython$(VERSION).so'
3253 OPT="$OPT -pic"
3254 ;;
3255 esac
3256fi
3257
Martin v. Löwis11437992002-04-12 09:54:03 +00003258echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3259echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003260
Martin v. Löwis11437992002-04-12 09:54:03 +00003261if test -n "$ac_tool_prefix"; then
3262 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3263set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3264echo "$as_me:$LINENO: checking for $ac_word" >&5
3265echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3266if test "${ac_cv_prog_RANLIB+set}" = set; then
3267 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003268else
3269 if test -n "$RANLIB"; then
3270 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3271else
Martin v. Löwis11437992002-04-12 09:54:03 +00003272as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3273for as_dir in $PATH
3274do
3275 IFS=$as_save_IFS
3276 test -z "$as_dir" && as_dir=.
3277 for ac_exec_ext in '' $ac_executable_extensions; do
3278 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3279 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3280 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3281 break 2
3282 fi
3283done
3284done
3285
Guido van Rossum627b2d71993-12-24 10:39:16 +00003286fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003287fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003288RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003289if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003290 echo "$as_me:$LINENO: result: $RANLIB" >&5
3291echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003292else
Martin v. Löwis11437992002-04-12 09:54:03 +00003293 echo "$as_me:$LINENO: result: no" >&5
3294echo "${ECHO_T}no" >&6
3295fi
3296
3297fi
3298if test -z "$ac_cv_prog_RANLIB"; then
3299 ac_ct_RANLIB=$RANLIB
3300 # Extract the first word of "ranlib", so it can be a program name with args.
3301set dummy ranlib; ac_word=$2
3302echo "$as_me:$LINENO: checking for $ac_word" >&5
3303echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3304if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3305 echo $ECHO_N "(cached) $ECHO_C" >&6
3306else
3307 if test -n "$ac_ct_RANLIB"; then
3308 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3309else
3310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3311for as_dir in $PATH
3312do
3313 IFS=$as_save_IFS
3314 test -z "$as_dir" && as_dir=.
3315 for ac_exec_ext in '' $ac_executable_extensions; do
3316 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3317 ac_cv_prog_ac_ct_RANLIB="ranlib"
3318 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3319 break 2
3320 fi
3321done
3322done
3323
3324 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3325fi
3326fi
3327ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3328if test -n "$ac_ct_RANLIB"; then
3329 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3330echo "${ECHO_T}$ac_ct_RANLIB" >&6
3331else
3332 echo "$as_me:$LINENO: result: no" >&5
3333echo "${ECHO_T}no" >&6
3334fi
3335
3336 RANLIB=$ac_ct_RANLIB
3337else
3338 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003339fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003340
3341
Guido van Rossum7f43da71994-08-01 12:15:30 +00003342for ac_prog in ar aal
3343do
Martin v. Löwis11437992002-04-12 09:54:03 +00003344 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003345set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003346echo "$as_me:$LINENO: checking for $ac_word" >&5
3347echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3348if test "${ac_cv_prog_AR+set}" = set; then
3349 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003350else
3351 if test -n "$AR"; then
3352 ac_cv_prog_AR="$AR" # Let the user override the test.
3353else
Martin v. Löwis11437992002-04-12 09:54:03 +00003354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3355for as_dir in $PATH
3356do
3357 IFS=$as_save_IFS
3358 test -z "$as_dir" && as_dir=.
3359 for ac_exec_ext in '' $ac_executable_extensions; do
3360 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3361 ac_cv_prog_AR="$ac_prog"
3362 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3363 break 2
3364 fi
3365done
3366done
3367
Guido van Rossum7f43da71994-08-01 12:15:30 +00003368fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003369fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003370AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003371if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003372 echo "$as_me:$LINENO: result: $AR" >&5
3373echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003374else
Martin v. Löwis11437992002-04-12 09:54:03 +00003375 echo "$as_me:$LINENO: result: no" >&5
3376echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003377fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003378
Martin v. Löwis11437992002-04-12 09:54:03 +00003379 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003380done
3381test -n "$AR" || AR="ar"
3382
Michael W. Hudson54241132001-12-07 15:38:26 +00003383
Neil Schemenauera42c8272001-03-31 00:01:55 +00003384case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003385bsdos*|hp*|HP*)
3386 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003387 if test -z "$INSTALL"
3388 then
3389 INSTALL="${srcdir}/install-sh -c"
3390 fi
3391esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003392ac_aux_dir=
3393for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3394 if test -f $ac_dir/install-sh; then
3395 ac_aux_dir=$ac_dir
3396 ac_install_sh="$ac_aux_dir/install-sh -c"
3397 break
3398 elif test -f $ac_dir/install.sh; then
3399 ac_aux_dir=$ac_dir
3400 ac_install_sh="$ac_aux_dir/install.sh -c"
3401 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003402 elif test -f $ac_dir/shtool; then
3403 ac_aux_dir=$ac_dir
3404 ac_install_sh="$ac_aux_dir/shtool install -c"
3405 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003406 fi
3407done
3408if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003409 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3410echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3411 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003412fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003413ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3414ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3415ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003416
3417# Find a good install program. We prefer a C program (faster),
3418# so one script is as good as another. But avoid the broken or
3419# incompatible versions:
3420# SysV /etc/install, /usr/sbin/install
3421# SunOS /usr/etc/install
3422# IRIX /sbin/install
3423# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003424# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003425# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3426# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3427# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3428# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003429echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3430echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003431if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003432if test "${ac_cv_path_install+set}" = set; then
3433 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003434else
Martin v. Löwis11437992002-04-12 09:54:03 +00003435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3436for as_dir in $PATH
3437do
3438 IFS=$as_save_IFS
3439 test -z "$as_dir" && as_dir=.
3440 # Account for people who put trailing slashes in PATH elements.
3441case $as_dir/ in
3442 ./ | .// | /cC/* | \
3443 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3444 /usr/ucb/* ) ;;
3445 *)
3446 # OSF1 and SCO ODT 3.0 have their own names for install.
3447 # Don't use installbsd from OSF since it installs stuff as root
3448 # by default.
3449 for ac_prog in ginstall scoinst install; do
3450 for ac_exec_ext in '' $ac_executable_extensions; do
3451 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3452 if test $ac_prog = install &&
3453 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3454 # AIX install. It has an incompatible calling convention.
3455 :
3456 elif test $ac_prog = install &&
3457 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3458 # program-specific install script used by HP pwplus--don't use.
3459 :
3460 else
3461 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3462 break 3
3463 fi
3464 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003465 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003466 done
3467 ;;
3468esac
3469done
3470
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003471
3472fi
3473 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003474 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003475 else
3476 # As a last resort, use the slow shell script. We don't cache a
3477 # path for INSTALL within a source directory, because that will
3478 # break other packages using the cache if that directory is
3479 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003480 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003481 fi
3482fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003483echo "$as_me:$LINENO: result: $INSTALL" >&5
3484echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003485
3486# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3487# It thinks the first close brace ends the variable substitution.
3488test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3489
Martin v. Löwis11437992002-04-12 09:54:03 +00003490test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003491
3492test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3493
Michael W. Hudson54241132001-12-07 15:38:26 +00003494
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003495# Not every filesystem supports hard links
3496
3497if test -z "$LN" ; then
3498 case $ac_sys_system in
3499 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003500 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003501 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003502 *) LN=ln;;
3503 esac
3504fi
3505
Fred Drake109d9862001-07-11 06:27:56 +00003506# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003507echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3508echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3509
Fred Drake109d9862001-07-11 06:27:56 +00003510# Check whether --with-pydebug or --without-pydebug was given.
3511if test "${with_pydebug+set}" = set; then
3512 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003513
Fred Drake109d9862001-07-11 06:27:56 +00003514if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003515then
3516
3517cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003518#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003519_ACEOF
3520
3521 echo "$as_me:$LINENO: result: yes" >&5
3522echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003523 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003524else echo "$as_me:$LINENO: result: no" >&5
3525echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003526fi
3527else
Martin v. Löwis11437992002-04-12 09:54:03 +00003528 echo "$as_me:$LINENO: result: no" >&5
3529echo "${ECHO_T}no" >&6
3530fi;
Fred Drake109d9862001-07-11 06:27:56 +00003531
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003532# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003533
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003534if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003535then
Neal Norwitzd957f392002-09-25 21:26:19 +00003536 case $GCC in
Guido van Rossumedca74a1997-07-18 23:29:40 +00003537 yes)
3538 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003539 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003540 if test "$Py_DEBUG" = 'true' ; then
3541 # Optimization messes up debuggers, so turn it off for
3542 # debug builds.
3543 OPT="-g -Wall -Wstrict-prototypes"
3544 else
3545 OPT="-g -O3 -Wall -Wstrict-prototypes"
3546 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003547 *)
Fred Drake109d9862001-07-11 06:27:56 +00003548 OPT="-O3 -Wall -Wstrict-prototypes";;
3549 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003550 case $ac_sys_system in
3551 SCO_SV*) OPT="$OPT -m486 -DSCO5";;
3552 esac
Fred Drake109d9862001-07-11 06:27:56 +00003553 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003554 *)
3555 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003556 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003557 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003558 SCO_SV*)
3559 CFLAGS="$CFLAGS -belf"
3560 OPT="-belf -O -Ki486 -DSCO5";;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003561 *)
3562 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003563 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003564 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003565 case $ac_sys_system in
3566 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003567 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003568 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003569fi
3570
Fred Drakee1ceaa02001-12-04 20:55:47 +00003571if test "$Py_DEBUG" = 'true'; then
3572 :
3573else
3574 OPT="-DNDEBUG $OPT"
3575fi
3576
Trent Mick635f6fb2000-08-23 21:33:05 +00003577# The current (beta) Monterey compiler dies with optimizations
3578case $ac_sys_system in
3579Monterey*) OPT="";;
3580esac
3581
Guido van Rossum563e7081996-09-10 18:20:48 +00003582if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003583then
3584 OPT="$OPT $ac_arch_flags"
3585fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003586
Martin v. Löwis11437992002-04-12 09:54:03 +00003587echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3588echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3589if test "${ac_cv_opt_olimit_ok+set}" = set; then
3590 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003591else
3592 ac_save_cc="$CC"
3593CC="$CC -OPT:Olimit=0"
3594if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003595 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003596else
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 cat >conftest.$ac_ext <<_ACEOF
3598#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003599#include "confdefs.h"
3600int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003601_ACEOF
3602rm -f conftest$ac_exeext
3603if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3604 (eval $ac_link) 2>&5
3605 ac_status=$?
3606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3607 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3609 (eval $ac_try) 2>&5
3610 ac_status=$?
3611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3612 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003613 ac_cv_opt_olimit_ok=yes
3614else
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 echo "$as_me: program exited with status $ac_status" >&5
3616echo "$as_me: failed program was:" >&5
3617cat conftest.$ac_ext >&5
3618( exit $ac_status )
3619ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003620fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003621rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003622fi
Guido van Rossum91922671997-10-09 20:24:13 +00003623CC="$ac_save_cc"
3624fi
3625
Martin v. Löwis11437992002-04-12 09:54:03 +00003626echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3627echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003628if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003629 case $ac_sys_system in
3630 Darwin*) OPT="$OPT" ;;
3631 *) OPT="$OPT -OPT:Olimit=0";;
3632 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003633else
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3635echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3636 if test "${ac_cv_olimit_ok+set}" = set; then
3637 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003638else
3639 ac_save_cc="$CC"
3640 CC="$CC -Olimit 1500"
3641 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003642 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003643else
Martin v. Löwis11437992002-04-12 09:54:03 +00003644 cat >conftest.$ac_ext <<_ACEOF
3645#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003646#include "confdefs.h"
3647int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003648_ACEOF
3649rm -f conftest$ac_exeext
3650if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3651 (eval $ac_link) 2>&5
3652 ac_status=$?
3653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3654 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3656 (eval $ac_try) 2>&5
3657 ac_status=$?
3658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3659 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003660 ac_cv_olimit_ok=yes
3661else
Martin v. Löwis11437992002-04-12 09:54:03 +00003662 echo "$as_me: program exited with status $ac_status" >&5
3663echo "$as_me: failed program was:" >&5
3664cat conftest.$ac_ext >&5
3665( exit $ac_status )
3666ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003667fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003668rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003669fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003670 CC="$ac_save_cc"
3671fi
3672
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3674echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003675 if test $ac_cv_olimit_ok = yes; then
3676 OPT="$OPT -Olimit 1500"
3677 fi
3678fi
3679
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003680# On some compilers, pthreads are available without further options
3681# (e.g. MacOS X). On some of these systems, the compiler will not
3682# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3683# So we have to see first whether pthreads are available without
3684# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003685echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3686echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3687if test "${ac_cv_pthread_is_default+set}" = set; then
3688 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003689else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003690 if test "$cross_compiling" = yes; then
3691 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003692else
Martin v. Löwis11437992002-04-12 09:54:03 +00003693 cat >conftest.$ac_ext <<_ACEOF
3694#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003695#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003696
Martin v. Löwis130fb172001-07-19 11:00:41 +00003697#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003698
3699void* routine(void* p){return NULL;}
3700
3701int main(){
3702 pthread_t p;
3703 if(pthread_create(&p,NULL,routine,NULL)!=0)
3704 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003705 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003706 return 0;
3707}
3708
Martin v. Löwis11437992002-04-12 09:54:03 +00003709_ACEOF
3710rm -f conftest$ac_exeext
3711if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3712 (eval $ac_link) 2>&5
3713 ac_status=$?
3714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3715 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3717 (eval $ac_try) 2>&5
3718 ac_status=$?
3719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3720 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003721 ac_cv_pthread_is_default=yes
3722else
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 echo "$as_me: program exited with status $ac_status" >&5
3724echo "$as_me: failed program was:" >&5
3725cat conftest.$ac_ext >&5
3726( exit $ac_status )
3727ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003728fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003729rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003730fi
3731
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003732fi
3733
Martin v. Löwis11437992002-04-12 09:54:03 +00003734echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3735echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003736
Michael W. Hudson54241132001-12-07 15:38:26 +00003737
Martin v. Löwis11437992002-04-12 09:54:03 +00003738if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003739then
3740 ac_cv_kpthread=no
3741else
3742# -Kpthread, if available, provides the right #defines
3743# and linker options to make pthread_create available
3744# Some compilers won't report that they do not support -Kpthread,
3745# so we need to run a program to see whether it really made the
3746# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003747echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3748echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3749if test "${ac_cv_kpthread+set}" = set; then
3750 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003751else
3752 ac_save_cc="$CC"
3753CC="$CC -Kpthread"
3754if test "$cross_compiling" = yes; then
3755 ac_cv_kpthread=no
3756else
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 cat >conftest.$ac_ext <<_ACEOF
3758#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003759#include "confdefs.h"
3760
3761#include <pthread.h>
3762
3763void* routine(void* p){return NULL;}
3764
3765int main(){
3766 pthread_t p;
3767 if(pthread_create(&p,NULL,routine,NULL)!=0)
3768 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003769 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003770 return 0;
3771}
3772
Martin v. Löwis11437992002-04-12 09:54:03 +00003773_ACEOF
3774rm -f conftest$ac_exeext
3775if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3776 (eval $ac_link) 2>&5
3777 ac_status=$?
3778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3779 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3781 (eval $ac_try) 2>&5
3782 ac_status=$?
3783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3784 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003785 ac_cv_kpthread=yes
3786else
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 echo "$as_me: program exited with status $ac_status" >&5
3788echo "$as_me: failed program was:" >&5
3789cat conftest.$ac_ext >&5
3790( exit $ac_status )
3791ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003792fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003793rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003794fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003795CC="$ac_save_cc"
3796fi
3797
Martin v. Löwis11437992002-04-12 09:54:03 +00003798echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3799echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003800fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003801
Michael W. Hudson54241132001-12-07 15:38:26 +00003802
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003803# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003804echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3805echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3806if test "${ac_cv_header_stdc+set}" = set; then
3807 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003808else
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 cat >conftest.$ac_ext <<_ACEOF
3810#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003811#include "confdefs.h"
3812#include <stdlib.h>
3813#include <stdarg.h>
3814#include <string.h>
3815#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003816
3817_ACEOF
3818if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3819 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3820 ac_status=$?
3821 egrep -v '^ *\+' conftest.er1 >conftest.err
3822 rm -f conftest.er1
3823 cat conftest.err >&5
3824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3825 (exit $ac_status); } >/dev/null; then
3826 if test -s conftest.err; then
3827 ac_cpp_err=$ac_c_preproc_warn_flag
3828 else
3829 ac_cpp_err=
3830 fi
3831else
3832 ac_cpp_err=yes
3833fi
3834if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003835 ac_cv_header_stdc=yes
3836else
Martin v. Löwis11437992002-04-12 09:54:03 +00003837 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003838 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003839 ac_cv_header_stdc=no
3840fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003841rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003842
3843if test $ac_cv_header_stdc = yes; then
3844 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003845 cat >conftest.$ac_ext <<_ACEOF
3846#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003847#include "confdefs.h"
3848#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003849
3850_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003851if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3852 egrep "memchr" >/dev/null 2>&1; then
3853 :
3854else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003855 ac_cv_header_stdc=no
3856fi
3857rm -f conftest*
3858
3859fi
3860
3861if test $ac_cv_header_stdc = yes; then
3862 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003863 cat >conftest.$ac_ext <<_ACEOF
3864#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003865#include "confdefs.h"
3866#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003867
3868_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3870 egrep "free" >/dev/null 2>&1; then
3871 :
3872else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003873 ac_cv_header_stdc=no
3874fi
3875rm -f conftest*
3876
3877fi
3878
3879if test $ac_cv_header_stdc = yes; then
3880 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003881 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003882 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003883else
Martin v. Löwis11437992002-04-12 09:54:03 +00003884 cat >conftest.$ac_ext <<_ACEOF
3885#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003886#include "confdefs.h"
3887#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003888#if ((' ' & 0x0FF) == 0x020)
3889# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3890# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3891#else
3892# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3893 || ('j' <= (c) && (c) <= 'r') \
3894 || ('s' <= (c) && (c) <= 'z'))
3895# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3896#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003897
Martin v. Löwis11437992002-04-12 09:54:03 +00003898#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3899int
3900main ()
3901{
3902 int i;
3903 for (i = 0; i < 256; i++)
3904 if (XOR (islower (i), ISLOWER (i))
3905 || toupper (i) != TOUPPER (i))
3906 exit(2);
3907 exit (0);
3908}
3909_ACEOF
3910rm -f conftest$ac_exeext
3911if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3912 (eval $ac_link) 2>&5
3913 ac_status=$?
3914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3915 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3917 (eval $ac_try) 2>&5
3918 ac_status=$?
3919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3920 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003921 :
3922else
Martin v. Löwis11437992002-04-12 09:54:03 +00003923 echo "$as_me: program exited with status $ac_status" >&5
3924echo "$as_me: failed program was:" >&5
3925cat conftest.$ac_ext >&5
3926( exit $ac_status )
3927ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003928fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003929rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003930fi
3931fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003932fi
3933echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3934echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003935if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003936
3937cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003938#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003939_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003940
3941fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003942
Martin v. Löwis11437992002-04-12 09:54:03 +00003943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
Martin v. Löwis11437992002-04-12 09:54:03 +00003980for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003981libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003982signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003983sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003984sys/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 +00003985sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003986sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003987do
Martin v. Löwis11437992002-04-12 09:54:03 +00003988as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3989if eval "test \"\${$as_ac_Header+set}\" = set"; then
3990 echo "$as_me:$LINENO: checking for $ac_header" >&5
3991echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3992if eval "test \"\${$as_ac_Header+set}\" = set"; then
3993 echo $ECHO_N "(cached) $ECHO_C" >&6
3994fi
3995echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3996echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003997else
Martin v. Löwis11437992002-04-12 09:54:03 +00003998 # Is the header compilable?
3999echo "$as_me:$LINENO: checking $ac_header usability" >&5
4000echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4001cat >conftest.$ac_ext <<_ACEOF
4002#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004003#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004004$ac_includes_default
4005#include <$ac_header>
4006_ACEOF
4007rm -f conftest.$ac_objext
4008if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4009 (eval $ac_compile) 2>&5
4010 ac_status=$?
4011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4012 (exit $ac_status); } &&
4013 { ac_try='test -s conftest.$ac_objext'
4014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4015 (eval $ac_try) 2>&5
4016 ac_status=$?
4017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4018 (exit $ac_status); }; }; then
4019 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004020else
Martin v. Löwis11437992002-04-12 09:54:03 +00004021 echo "$as_me: failed program was:" >&5
4022cat conftest.$ac_ext >&5
4023ac_header_compiler=no
4024fi
4025rm -f conftest.$ac_objext conftest.$ac_ext
4026echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4027echo "${ECHO_T}$ac_header_compiler" >&6
4028
4029# Is the header present?
4030echo "$as_me:$LINENO: checking $ac_header presence" >&5
4031echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4032cat >conftest.$ac_ext <<_ACEOF
4033#line $LINENO "configure"
4034#include "confdefs.h"
4035#include <$ac_header>
4036_ACEOF
4037if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4038 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4039 ac_status=$?
4040 egrep -v '^ *\+' conftest.er1 >conftest.err
4041 rm -f conftest.er1
4042 cat conftest.err >&5
4043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4044 (exit $ac_status); } >/dev/null; then
4045 if test -s conftest.err; then
4046 ac_cpp_err=$ac_c_preproc_warn_flag
4047 else
4048 ac_cpp_err=
4049 fi
4050else
4051 ac_cpp_err=yes
4052fi
4053if test -z "$ac_cpp_err"; then
4054 ac_header_preproc=yes
4055else
4056 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004057 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004058 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004059fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004060rm -f conftest.err conftest.$ac_ext
4061echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4062echo "${ECHO_T}$ac_header_preproc" >&6
4063
4064# So? What about this header?
4065case $ac_header_compiler:$ac_header_preproc in
4066 yes:no )
4067 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4068echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4069 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4070echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4071 no:yes )
4072 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4073echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4074 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4075echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4076 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4077echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4078esac
4079echo "$as_me:$LINENO: checking for $ac_header" >&5
4080echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4081if eval "test \"\${$as_ac_Header+set}\" = set"; then
4082 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004083else
Martin v. Löwis11437992002-04-12 09:54:03 +00004084 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004085fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004086echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4087echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4088
4089fi
4090if test `eval echo '${'$as_ac_Header'}'` = yes; then
4091 cat >>confdefs.h <<_ACEOF
4092#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4093_ACEOF
4094
4095fi
4096
Guido van Rossum627b2d71993-12-24 10:39:16 +00004097done
4098
Martin v. Löwis11437992002-04-12 09:54:03 +00004099
4100
4101
4102
4103
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004104ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004105for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4106 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4107echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4108echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4109if eval "test \"\${$as_ac_Header+set}\" = set"; then
4110 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004111else
Martin v. Löwis11437992002-04-12 09:54:03 +00004112 cat >conftest.$ac_ext <<_ACEOF
4113#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004114#include "confdefs.h"
4115#include <sys/types.h>
4116#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004117
4118#ifdef F77_DUMMY_MAIN
4119# ifdef __cplusplus
4120 extern "C"
4121# endif
4122 int F77_DUMMY_MAIN() { return 1; }
4123#endif
4124int
4125main ()
4126{
4127if ((DIR *) 0)
4128return 0;
4129 ;
4130 return 0;
4131}
4132_ACEOF
4133rm -f conftest.$ac_objext
4134if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4135 (eval $ac_compile) 2>&5
4136 ac_status=$?
4137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4138 (exit $ac_status); } &&
4139 { ac_try='test -s conftest.$ac_objext'
4140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4141 (eval $ac_try) 2>&5
4142 ac_status=$?
4143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4144 (exit $ac_status); }; }; then
4145 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004146else
Martin v. Löwis11437992002-04-12 09:54:03 +00004147 echo "$as_me: failed program was:" >&5
4148cat conftest.$ac_ext >&5
4149eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004150fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004151rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004152fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004153echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4154echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4155if test `eval echo '${'$as_ac_Header'}'` = yes; then
4156 cat >>confdefs.h <<_ACEOF
4157#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4158_ACEOF
4159
4160ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004161fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004162
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004163done
4164# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4165if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004166 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4167echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4168if test "${ac_cv_search_opendir+set}" = set; then
4169 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004170else
Martin v. Löwis11437992002-04-12 09:54:03 +00004171 ac_func_search_save_LIBS=$LIBS
4172ac_cv_search_opendir=no
4173cat >conftest.$ac_ext <<_ACEOF
4174#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004175#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004176
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004177/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004178#ifdef __cplusplus
4179extern "C"
4180#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004181/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004182 builtin and then its argument prototype would still apply. */
4183char opendir ();
4184#ifdef F77_DUMMY_MAIN
4185# ifdef __cplusplus
4186 extern "C"
4187# endif
4188 int F77_DUMMY_MAIN() { return 1; }
4189#endif
4190int
4191main ()
4192{
4193opendir ();
4194 ;
4195 return 0;
4196}
4197_ACEOF
4198rm -f conftest.$ac_objext conftest$ac_exeext
4199if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4200 (eval $ac_link) 2>&5
4201 ac_status=$?
4202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4203 (exit $ac_status); } &&
4204 { ac_try='test -s conftest$ac_exeext'
4205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4206 (eval $ac_try) 2>&5
4207 ac_status=$?
4208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4209 (exit $ac_status); }; }; then
4210 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004211else
Martin v. Löwis11437992002-04-12 09:54:03 +00004212 echo "$as_me: failed program was:" >&5
4213cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004214fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004215rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4216if test "$ac_cv_search_opendir" = no; then
4217 for ac_lib in dir; do
4218 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4219 cat >conftest.$ac_ext <<_ACEOF
4220#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004221#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004222
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004223/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004224#ifdef __cplusplus
4225extern "C"
4226#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004227/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004228 builtin and then its argument prototype would still apply. */
4229char opendir ();
4230#ifdef F77_DUMMY_MAIN
4231# ifdef __cplusplus
4232 extern "C"
4233# endif
4234 int F77_DUMMY_MAIN() { return 1; }
4235#endif
4236int
4237main ()
4238{
4239opendir ();
4240 ;
4241 return 0;
4242}
4243_ACEOF
4244rm -f conftest.$ac_objext conftest$ac_exeext
4245if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4246 (eval $ac_link) 2>&5
4247 ac_status=$?
4248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4249 (exit $ac_status); } &&
4250 { ac_try='test -s conftest$ac_exeext'
4251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4252 (eval $ac_try) 2>&5
4253 ac_status=$?
4254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4255 (exit $ac_status); }; }; then
4256 ac_cv_search_opendir="-l$ac_lib"
4257break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004258else
Martin v. Löwis11437992002-04-12 09:54:03 +00004259 echo "$as_me: failed program was:" >&5
4260cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004261fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004262rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4263 done
4264fi
4265LIBS=$ac_func_search_save_LIBS
4266fi
4267echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4268echo "${ECHO_T}$ac_cv_search_opendir" >&6
4269if test "$ac_cv_search_opendir" != no; then
4270 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004271
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004272fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004273
Michael W. Hudson54241132001-12-07 15:38:26 +00004274else
Martin v. Löwis11437992002-04-12 09:54:03 +00004275 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4276echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4277if test "${ac_cv_search_opendir+set}" = set; then
4278 echo $ECHO_N "(cached) $ECHO_C" >&6
4279else
4280 ac_func_search_save_LIBS=$LIBS
4281ac_cv_search_opendir=no
4282cat >conftest.$ac_ext <<_ACEOF
4283#line $LINENO "configure"
4284#include "confdefs.h"
4285
4286/* Override any gcc2 internal prototype to avoid an error. */
4287#ifdef __cplusplus
4288extern "C"
4289#endif
4290/* We use char because int might match the return type of a gcc2
4291 builtin and then its argument prototype would still apply. */
4292char opendir ();
4293#ifdef F77_DUMMY_MAIN
4294# ifdef __cplusplus
4295 extern "C"
4296# endif
4297 int F77_DUMMY_MAIN() { return 1; }
4298#endif
4299int
4300main ()
4301{
4302opendir ();
4303 ;
4304 return 0;
4305}
4306_ACEOF
4307rm -f conftest.$ac_objext conftest$ac_exeext
4308if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4309 (eval $ac_link) 2>&5
4310 ac_status=$?
4311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4312 (exit $ac_status); } &&
4313 { ac_try='test -s conftest$ac_exeext'
4314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4315 (eval $ac_try) 2>&5
4316 ac_status=$?
4317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4318 (exit $ac_status); }; }; then
4319 ac_cv_search_opendir="none required"
4320else
4321 echo "$as_me: failed program was:" >&5
4322cat conftest.$ac_ext >&5
4323fi
4324rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4325if test "$ac_cv_search_opendir" = no; then
4326 for ac_lib in x; do
4327 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4328 cat >conftest.$ac_ext <<_ACEOF
4329#line $LINENO "configure"
4330#include "confdefs.h"
4331
4332/* Override any gcc2 internal prototype to avoid an error. */
4333#ifdef __cplusplus
4334extern "C"
4335#endif
4336/* We use char because int might match the return type of a gcc2
4337 builtin and then its argument prototype would still apply. */
4338char opendir ();
4339#ifdef F77_DUMMY_MAIN
4340# ifdef __cplusplus
4341 extern "C"
4342# endif
4343 int F77_DUMMY_MAIN() { return 1; }
4344#endif
4345int
4346main ()
4347{
4348opendir ();
4349 ;
4350 return 0;
4351}
4352_ACEOF
4353rm -f conftest.$ac_objext conftest$ac_exeext
4354if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4355 (eval $ac_link) 2>&5
4356 ac_status=$?
4357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4358 (exit $ac_status); } &&
4359 { ac_try='test -s conftest$ac_exeext'
4360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4361 (eval $ac_try) 2>&5
4362 ac_status=$?
4363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4364 (exit $ac_status); }; }; then
4365 ac_cv_search_opendir="-l$ac_lib"
4366break
4367else
4368 echo "$as_me: failed program was:" >&5
4369cat conftest.$ac_ext >&5
4370fi
4371rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4372 done
4373fi
4374LIBS=$ac_func_search_save_LIBS
4375fi
4376echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4377echo "${ECHO_T}$ac_cv_search_opendir" >&6
4378if test "$ac_cv_search_opendir" != no; then
4379 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4380
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004381fi
4382
4383fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004384
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004385echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4386echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4387if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4388 echo $ECHO_N "(cached) $ECHO_C" >&6
4389else
4390 cat >conftest.$ac_ext <<_ACEOF
4391#line $LINENO "configure"
4392#include "confdefs.h"
4393#include <sys/types.h>
4394#ifdef F77_DUMMY_MAIN
4395# ifdef __cplusplus
4396 extern "C"
4397# endif
4398 int F77_DUMMY_MAIN() { return 1; }
4399#endif
4400int
4401main ()
4402{
4403return makedev(0, 0);
4404 ;
4405 return 0;
4406}
4407_ACEOF
4408rm -f conftest.$ac_objext conftest$ac_exeext
4409if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4410 (eval $ac_link) 2>&5
4411 ac_status=$?
4412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4413 (exit $ac_status); } &&
4414 { ac_try='test -s conftest$ac_exeext'
4415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4416 (eval $ac_try) 2>&5
4417 ac_status=$?
4418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4419 (exit $ac_status); }; }; then
4420 ac_cv_header_sys_types_h_makedev=yes
4421else
4422 echo "$as_me: failed program was:" >&5
4423cat conftest.$ac_ext >&5
4424ac_cv_header_sys_types_h_makedev=no
4425fi
4426rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4427
4428fi
4429echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4430echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4431
4432if test $ac_cv_header_sys_types_h_makedev = no; then
4433if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4434 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4435echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4436if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4437 echo $ECHO_N "(cached) $ECHO_C" >&6
4438fi
4439echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4440echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4441else
4442 # Is the header compilable?
4443echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4444echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4445cat >conftest.$ac_ext <<_ACEOF
4446#line $LINENO "configure"
4447#include "confdefs.h"
4448$ac_includes_default
4449#include <sys/mkdev.h>
4450_ACEOF
4451rm -f conftest.$ac_objext
4452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4453 (eval $ac_compile) 2>&5
4454 ac_status=$?
4455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4456 (exit $ac_status); } &&
4457 { ac_try='test -s conftest.$ac_objext'
4458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4459 (eval $ac_try) 2>&5
4460 ac_status=$?
4461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4462 (exit $ac_status); }; }; then
4463 ac_header_compiler=yes
4464else
4465 echo "$as_me: failed program was:" >&5
4466cat conftest.$ac_ext >&5
4467ac_header_compiler=no
4468fi
4469rm -f conftest.$ac_objext conftest.$ac_ext
4470echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4471echo "${ECHO_T}$ac_header_compiler" >&6
4472
4473# Is the header present?
4474echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4475echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4476cat >conftest.$ac_ext <<_ACEOF
4477#line $LINENO "configure"
4478#include "confdefs.h"
4479#include <sys/mkdev.h>
4480_ACEOF
4481if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4482 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4483 ac_status=$?
4484 egrep -v '^ *\+' conftest.er1 >conftest.err
4485 rm -f conftest.er1
4486 cat conftest.err >&5
4487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4488 (exit $ac_status); } >/dev/null; then
4489 if test -s conftest.err; then
4490 ac_cpp_err=$ac_c_preproc_warn_flag
4491 else
4492 ac_cpp_err=
4493 fi
4494else
4495 ac_cpp_err=yes
4496fi
4497if test -z "$ac_cpp_err"; then
4498 ac_header_preproc=yes
4499else
4500 echo "$as_me: failed program was:" >&5
4501 cat conftest.$ac_ext >&5
4502 ac_header_preproc=no
4503fi
4504rm -f conftest.err conftest.$ac_ext
4505echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4506echo "${ECHO_T}$ac_header_preproc" >&6
4507
4508# So? What about this header?
4509case $ac_header_compiler:$ac_header_preproc in
4510 yes:no )
4511 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4512echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4513 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4514echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4515 no:yes )
4516 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4517echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4518 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4519echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4520 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4521echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4522esac
4523echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4524echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4525if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4526 echo $ECHO_N "(cached) $ECHO_C" >&6
4527else
4528 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4529fi
4530echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4531echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4532
4533fi
4534if test $ac_cv_header_sys_mkdev_h = yes; then
4535
4536cat >>confdefs.h <<\_ACEOF
4537#define MAJOR_IN_MKDEV 1
4538_ACEOF
4539
4540fi
4541
4542
4543
4544 if test $ac_cv_header_sys_mkdev_h = no; then
4545 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4546 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4547echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4548if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4549 echo $ECHO_N "(cached) $ECHO_C" >&6
4550fi
4551echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4552echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4553else
4554 # Is the header compilable?
4555echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4556echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4557cat >conftest.$ac_ext <<_ACEOF
4558#line $LINENO "configure"
4559#include "confdefs.h"
4560$ac_includes_default
4561#include <sys/sysmacros.h>
4562_ACEOF
4563rm -f conftest.$ac_objext
4564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4565 (eval $ac_compile) 2>&5
4566 ac_status=$?
4567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4568 (exit $ac_status); } &&
4569 { ac_try='test -s conftest.$ac_objext'
4570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4571 (eval $ac_try) 2>&5
4572 ac_status=$?
4573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4574 (exit $ac_status); }; }; then
4575 ac_header_compiler=yes
4576else
4577 echo "$as_me: failed program was:" >&5
4578cat conftest.$ac_ext >&5
4579ac_header_compiler=no
4580fi
4581rm -f conftest.$ac_objext conftest.$ac_ext
4582echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4583echo "${ECHO_T}$ac_header_compiler" >&6
4584
4585# Is the header present?
4586echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4587echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4588cat >conftest.$ac_ext <<_ACEOF
4589#line $LINENO "configure"
4590#include "confdefs.h"
4591#include <sys/sysmacros.h>
4592_ACEOF
4593if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4594 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4595 ac_status=$?
4596 egrep -v '^ *\+' conftest.er1 >conftest.err
4597 rm -f conftest.er1
4598 cat conftest.err >&5
4599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4600 (exit $ac_status); } >/dev/null; then
4601 if test -s conftest.err; then
4602 ac_cpp_err=$ac_c_preproc_warn_flag
4603 else
4604 ac_cpp_err=
4605 fi
4606else
4607 ac_cpp_err=yes
4608fi
4609if test -z "$ac_cpp_err"; then
4610 ac_header_preproc=yes
4611else
4612 echo "$as_me: failed program was:" >&5
4613 cat conftest.$ac_ext >&5
4614 ac_header_preproc=no
4615fi
4616rm -f conftest.err conftest.$ac_ext
4617echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4618echo "${ECHO_T}$ac_header_preproc" >&6
4619
4620# So? What about this header?
4621case $ac_header_compiler:$ac_header_preproc in
4622 yes:no )
4623 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4624echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4625 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4626echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4627 no:yes )
4628 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4629echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4630 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4631echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4632 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4633echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4634esac
4635echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4636echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4637if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4638 echo $ECHO_N "(cached) $ECHO_C" >&6
4639else
4640 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4641fi
4642echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4643echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4644
4645fi
4646if test $ac_cv_header_sys_sysmacros_h = yes; then
4647
4648cat >>confdefs.h <<\_ACEOF
4649#define MAJOR_IN_SYSMACROS 1
4650_ACEOF
4651
4652fi
4653
4654
4655 fi
4656fi
4657
Michael W. Hudson54241132001-12-07 15:38:26 +00004658
Guido van Rossum627b2d71993-12-24 10:39:16 +00004659# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004660was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004661echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4662echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4663cat >conftest.$ac_ext <<_ACEOF
4664#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004665#include "confdefs.h"
4666#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004667
4668_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004669if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4670 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004671 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004672else
Martin v. Löwis11437992002-04-12 09:54:03 +00004673
4674
4675cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004676#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004677_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004678
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004679
Guido van Rossum627b2d71993-12-24 10:39:16 +00004680fi
4681rm -f conftest*
4682
Martin v. Löwis11437992002-04-12 09:54:03 +00004683echo "$as_me:$LINENO: result: $was_it_defined" >&5
4684echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004685
Neal Norwitz11690112002-07-30 01:08:28 +00004686# Check whether using makedev requires defining _OSF_SOURCE
4687echo "$as_me:$LINENO: checking for makedev" >&5
4688echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4689cat >conftest.$ac_ext <<_ACEOF
4690#line $LINENO "configure"
4691#include "confdefs.h"
4692 #include <sys/types.h>
4693#ifdef F77_DUMMY_MAIN
4694# ifdef __cplusplus
4695 extern "C"
4696# endif
4697 int F77_DUMMY_MAIN() { return 1; }
4698#endif
4699int
4700main ()
4701{
4702 makedev(0, 0)
4703 ;
4704 return 0;
4705}
4706_ACEOF
4707rm -f conftest.$ac_objext conftest$ac_exeext
4708if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4709 (eval $ac_link) 2>&5
4710 ac_status=$?
4711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4712 (exit $ac_status); } &&
4713 { ac_try='test -s conftest$ac_exeext'
4714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4715 (eval $ac_try) 2>&5
4716 ac_status=$?
4717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4718 (exit $ac_status); }; }; then
4719 ac_cv_has_makedev=yes
4720else
4721 echo "$as_me: failed program was:" >&5
4722cat conftest.$ac_ext >&5
4723ac_cv_has_makedev=no
4724fi
4725rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4726if test "$ac_cv_has_makedev" = "no"; then
4727 # we didn't link, try if _OSF_SOURCE will allow us to link
4728 cat >conftest.$ac_ext <<_ACEOF
4729#line $LINENO "configure"
4730#include "confdefs.h"
4731
4732 #define _OSF_SOURCE 1
4733 #include <sys/types.h>
4734
4735#ifdef F77_DUMMY_MAIN
4736# ifdef __cplusplus
4737 extern "C"
4738# endif
4739 int F77_DUMMY_MAIN() { return 1; }
4740#endif
4741int
4742main ()
4743{
4744 makedev(0, 0)
4745 ;
4746 return 0;
4747}
4748_ACEOF
4749rm -f conftest.$ac_objext conftest$ac_exeext
4750if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4751 (eval $ac_link) 2>&5
4752 ac_status=$?
4753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4754 (exit $ac_status); } &&
4755 { ac_try='test -s conftest$ac_exeext'
4756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4757 (eval $ac_try) 2>&5
4758 ac_status=$?
4759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4760 (exit $ac_status); }; }; then
4761 ac_cv_has_makedev=yes
4762else
4763 echo "$as_me: failed program was:" >&5
4764cat conftest.$ac_ext >&5
4765ac_cv_has_makedev=no
4766fi
4767rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4768 if test "$ac_cv_has_makedev" = "yes"; then
4769
4770cat >>confdefs.h <<\_ACEOF
4771#define _OSF_SOURCE 1
4772_ACEOF
4773
4774 fi
4775fi
4776echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4777echo "${ECHO_T}$ac_cv_has_makedev" >&6
4778if test "$ac_cv_has_makedev" = "yes"; then
4779
4780cat >>confdefs.h <<\_ACEOF
4781#define HAVE_MAKEDEV 1
4782_ACEOF
4783
4784fi
4785
Martin v. Löwis399a6892002-10-04 10:22:02 +00004786# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4787# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4788# defined, but the compiler does not support pragma redefine_extname,
4789# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4790# structures (such as rlimit64) without declaring them. As a
4791# work-around, disable LFS on such configurations
4792
4793use_lfs=yes
4794echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4795echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4796cat >conftest.$ac_ext <<_ACEOF
4797#line $LINENO "configure"
4798#include "confdefs.h"
4799
4800#define _LARGEFILE_SOURCE 1
4801#define _FILE_OFFSET_BITS 64
4802#include <sys/resource.h>
4803
4804#ifdef F77_DUMMY_MAIN
4805# ifdef __cplusplus
4806 extern "C"
4807# endif
4808 int F77_DUMMY_MAIN() { return 1; }
4809#endif
4810int
4811main ()
4812{
4813struct rlimit foo;
4814 ;
4815 return 0;
4816}
4817_ACEOF
4818rm -f conftest.$ac_objext
4819if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4820 (eval $ac_compile) 2>&5
4821 ac_status=$?
4822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4823 (exit $ac_status); } &&
4824 { ac_try='test -s conftest.$ac_objext'
4825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4826 (eval $ac_try) 2>&5
4827 ac_status=$?
4828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4829 (exit $ac_status); }; }; then
4830 sol_lfs_bug=no
4831else
4832 echo "$as_me: failed program was:" >&5
4833cat conftest.$ac_ext >&5
4834sol_lfs_bug=yes
4835fi
4836rm -f conftest.$ac_objext conftest.$ac_ext
4837echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4838echo "${ECHO_T}$sol_lfs_bug" >&6
4839if test "$sol_lfs_bug" = "yes"; then
4840 use_lfs=no
4841fi
4842
4843if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004844# Two defines needed to enable largefile support on various platforms
4845# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004846
Martin v. Löwis11437992002-04-12 09:54:03 +00004847cat >>confdefs.h <<\_ACEOF
4848#define _LARGEFILE_SOURCE 1
4849_ACEOF
4850
4851
4852cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004853#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004854_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004855
Martin v. Löwis399a6892002-10-04 10:22:02 +00004856fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004857
Guido van Rossum84e7b241996-08-19 21:59:00 +00004858# Add some code to confdefs.h so that the test for off_t works on SCO
4859cat >> confdefs.h <<\EOF
4860#if defined(SCO_DS)
4861#undef _OFF_T
4862#endif
4863EOF
4864
Guido van Rossumef2255b2000-03-10 22:30:29 +00004865# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004866echo "$as_me:$LINENO: checking for mode_t" >&5
4867echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4868if test "${ac_cv_type_mode_t+set}" = set; then
4869 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004870else
Martin v. Löwis11437992002-04-12 09:54:03 +00004871 cat >conftest.$ac_ext <<_ACEOF
4872#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004873#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004874$ac_includes_default
4875#ifdef F77_DUMMY_MAIN
4876# ifdef __cplusplus
4877 extern "C"
4878# endif
4879 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004880#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004881int
4882main ()
4883{
4884if ((mode_t *) 0)
4885 return 0;
4886if (sizeof (mode_t))
4887 return 0;
4888 ;
4889 return 0;
4890}
4891_ACEOF
4892rm -f conftest.$ac_objext
4893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4894 (eval $ac_compile) 2>&5
4895 ac_status=$?
4896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4897 (exit $ac_status); } &&
4898 { ac_try='test -s conftest.$ac_objext'
4899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4900 (eval $ac_try) 2>&5
4901 ac_status=$?
4902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4903 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004904 ac_cv_type_mode_t=yes
4905else
Martin v. Löwis11437992002-04-12 09:54:03 +00004906 echo "$as_me: failed program was:" >&5
4907cat conftest.$ac_ext >&5
4908ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004909fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004910rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004911fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004912echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4913echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4914if test $ac_cv_type_mode_t = yes; then
4915 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004916else
Martin v. Löwis11437992002-04-12 09:54:03 +00004917
4918cat >>confdefs.h <<_ACEOF
4919#define mode_t int
4920_ACEOF
4921
4922fi
4923
4924echo "$as_me:$LINENO: checking for off_t" >&5
4925echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4926if test "${ac_cv_type_off_t+set}" = set; then
4927 echo $ECHO_N "(cached) $ECHO_C" >&6
4928else
4929 cat >conftest.$ac_ext <<_ACEOF
4930#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004931#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004932$ac_includes_default
4933#ifdef F77_DUMMY_MAIN
4934# ifdef __cplusplus
4935 extern "C"
4936# endif
4937 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004938#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004939int
4940main ()
4941{
4942if ((off_t *) 0)
4943 return 0;
4944if (sizeof (off_t))
4945 return 0;
4946 ;
4947 return 0;
4948}
4949_ACEOF
4950rm -f conftest.$ac_objext
4951if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4952 (eval $ac_compile) 2>&5
4953 ac_status=$?
4954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4955 (exit $ac_status); } &&
4956 { ac_try='test -s conftest.$ac_objext'
4957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4958 (eval $ac_try) 2>&5
4959 ac_status=$?
4960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4961 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004962 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004963else
Martin v. Löwis11437992002-04-12 09:54:03 +00004964 echo "$as_me: failed program was:" >&5
4965cat conftest.$ac_ext >&5
4966ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004967fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004968rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004969fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004970echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4971echo "${ECHO_T}$ac_cv_type_off_t" >&6
4972if test $ac_cv_type_off_t = yes; then
4973 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004974else
Martin v. Löwis11437992002-04-12 09:54:03 +00004975
4976cat >>confdefs.h <<_ACEOF
4977#define off_t long
4978_ACEOF
4979
4980fi
4981
4982echo "$as_me:$LINENO: checking for pid_t" >&5
4983echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4984if test "${ac_cv_type_pid_t+set}" = set; then
4985 echo $ECHO_N "(cached) $ECHO_C" >&6
4986else
4987 cat >conftest.$ac_ext <<_ACEOF
4988#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004989#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004990$ac_includes_default
4991#ifdef F77_DUMMY_MAIN
4992# ifdef __cplusplus
4993 extern "C"
4994# endif
4995 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004996#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004997int
4998main ()
4999{
5000if ((pid_t *) 0)
5001 return 0;
5002if (sizeof (pid_t))
5003 return 0;
5004 ;
5005 return 0;
5006}
5007_ACEOF
5008rm -f conftest.$ac_objext
5009if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5010 (eval $ac_compile) 2>&5
5011 ac_status=$?
5012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5013 (exit $ac_status); } &&
5014 { ac_try='test -s conftest.$ac_objext'
5015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5016 (eval $ac_try) 2>&5
5017 ac_status=$?
5018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5019 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005020 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005021else
Martin v. Löwis11437992002-04-12 09:54:03 +00005022 echo "$as_me: failed program was:" >&5
5023cat conftest.$ac_ext >&5
5024ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005025fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005026rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005027fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005028echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5029echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5030if test $ac_cv_type_pid_t = yes; then
5031 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005032else
Martin v. Löwis11437992002-04-12 09:54:03 +00005033
5034cat >>confdefs.h <<_ACEOF
5035#define pid_t int
5036_ACEOF
5037
5038fi
5039
5040echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5041echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5042if test "${ac_cv_type_signal+set}" = set; then
5043 echo $ECHO_N "(cached) $ECHO_C" >&6
5044else
5045 cat >conftest.$ac_ext <<_ACEOF
5046#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005047#include "confdefs.h"
5048#include <sys/types.h>
5049#include <signal.h>
5050#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005051# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005052#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005053#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005054extern "C" void (*signal (int, void (*)(int)))(int);
5055#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005056void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005057#endif
5058
Martin v. Löwis11437992002-04-12 09:54:03 +00005059#ifdef F77_DUMMY_MAIN
5060# ifdef __cplusplus
5061 extern "C"
5062# endif
5063 int F77_DUMMY_MAIN() { return 1; }
5064#endif
5065int
5066main ()
5067{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005068int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005069 ;
5070 return 0;
5071}
5072_ACEOF
5073rm -f conftest.$ac_objext
5074if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5075 (eval $ac_compile) 2>&5
5076 ac_status=$?
5077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5078 (exit $ac_status); } &&
5079 { ac_try='test -s conftest.$ac_objext'
5080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5081 (eval $ac_try) 2>&5
5082 ac_status=$?
5083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5084 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005085 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005086else
Martin v. Löwis11437992002-04-12 09:54:03 +00005087 echo "$as_me: failed program was:" >&5
5088cat conftest.$ac_ext >&5
5089ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005090fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005091rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005092fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005093echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5094echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005095
Martin v. Löwis11437992002-04-12 09:54:03 +00005096cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005097#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005098_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005099
Michael W. Hudson54241132001-12-07 15:38:26 +00005100
Martin v. Löwis11437992002-04-12 09:54:03 +00005101echo "$as_me:$LINENO: checking for size_t" >&5
5102echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5103if test "${ac_cv_type_size_t+set}" = set; then
5104 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005105else
Martin v. Löwis11437992002-04-12 09:54:03 +00005106 cat >conftest.$ac_ext <<_ACEOF
5107#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005108#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005109$ac_includes_default
5110#ifdef F77_DUMMY_MAIN
5111# ifdef __cplusplus
5112 extern "C"
5113# endif
5114 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005115#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005116int
5117main ()
5118{
5119if ((size_t *) 0)
5120 return 0;
5121if (sizeof (size_t))
5122 return 0;
5123 ;
5124 return 0;
5125}
5126_ACEOF
5127rm -f conftest.$ac_objext
5128if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5129 (eval $ac_compile) 2>&5
5130 ac_status=$?
5131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5132 (exit $ac_status); } &&
5133 { ac_try='test -s conftest.$ac_objext'
5134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5135 (eval $ac_try) 2>&5
5136 ac_status=$?
5137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5138 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005139 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005140else
Martin v. Löwis11437992002-04-12 09:54:03 +00005141 echo "$as_me: failed program was:" >&5
5142cat conftest.$ac_ext >&5
5143ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005144fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005145rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005146fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005147echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5148echo "${ECHO_T}$ac_cv_type_size_t" >&6
5149if test $ac_cv_type_size_t = yes; then
5150 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005151else
Martin v. Löwis11437992002-04-12 09:54:03 +00005152
5153cat >>confdefs.h <<_ACEOF
5154#define size_t unsigned
5155_ACEOF
5156
5157fi
5158
5159echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5160echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5161if test "${ac_cv_type_uid_t+set}" = set; then
5162 echo $ECHO_N "(cached) $ECHO_C" >&6
5163else
5164 cat >conftest.$ac_ext <<_ACEOF
5165#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005166#include "confdefs.h"
5167#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005168
5169_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005170if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5171 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005172 ac_cv_type_uid_t=yes
5173else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005174 ac_cv_type_uid_t=no
5175fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005176rm -f conftest*
5177
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005178fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005179echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5180echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005181if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005182
Martin v. Löwis11437992002-04-12 09:54:03 +00005183cat >>confdefs.h <<\_ACEOF
5184#define uid_t int
5185_ACEOF
5186
5187
5188cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005189#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005190_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005191
5192fi
5193
Jack Jansendd19cf82001-12-06 22:36:17 +00005194
Michael W. Hudson54241132001-12-07 15:38:26 +00005195# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005196echo "$as_me:$LINENO: checking for int" >&5
5197echo $ECHO_N "checking for int... $ECHO_C" >&6
5198if test "${ac_cv_type_int+set}" = set; then
5199 echo $ECHO_N "(cached) $ECHO_C" >&6
5200else
5201 cat >conftest.$ac_ext <<_ACEOF
5202#line $LINENO "configure"
5203#include "confdefs.h"
5204$ac_includes_default
5205#ifdef F77_DUMMY_MAIN
5206# ifdef __cplusplus
5207 extern "C"
5208# endif
5209 int F77_DUMMY_MAIN() { return 1; }
5210#endif
5211int
5212main ()
5213{
5214if ((int *) 0)
5215 return 0;
5216if (sizeof (int))
5217 return 0;
5218 ;
5219 return 0;
5220}
5221_ACEOF
5222rm -f conftest.$ac_objext
5223if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5224 (eval $ac_compile) 2>&5
5225 ac_status=$?
5226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5227 (exit $ac_status); } &&
5228 { ac_try='test -s conftest.$ac_objext'
5229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5230 (eval $ac_try) 2>&5
5231 ac_status=$?
5232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5233 (exit $ac_status); }; }; then
5234 ac_cv_type_int=yes
5235else
5236 echo "$as_me: failed program was:" >&5
5237cat conftest.$ac_ext >&5
5238ac_cv_type_int=no
5239fi
5240rm -f conftest.$ac_objext conftest.$ac_ext
5241fi
5242echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5243echo "${ECHO_T}$ac_cv_type_int" >&6
5244
5245echo "$as_me:$LINENO: checking size of int" >&5
5246echo $ECHO_N "checking size of int... $ECHO_C" >&6
5247if test "${ac_cv_sizeof_int+set}" = set; then
5248 echo $ECHO_N "(cached) $ECHO_C" >&6
5249else
5250 if test "$ac_cv_type_int" = yes; then
5251 # The cast to unsigned long works around a bug in the HP C Compiler
5252 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5253 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5254 # This bug is HP SR number 8606223364.
5255 if test "$cross_compiling" = yes; then
5256 # Depending upon the size, compute the lo and hi bounds.
5257cat >conftest.$ac_ext <<_ACEOF
5258#line $LINENO "configure"
5259#include "confdefs.h"
5260$ac_includes_default
5261#ifdef F77_DUMMY_MAIN
5262# ifdef __cplusplus
5263 extern "C"
5264# endif
5265 int F77_DUMMY_MAIN() { return 1; }
5266#endif
5267int
5268main ()
5269{
5270static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5271test_array [0] = 0
5272
5273 ;
5274 return 0;
5275}
5276_ACEOF
5277rm -f conftest.$ac_objext
5278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5279 (eval $ac_compile) 2>&5
5280 ac_status=$?
5281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5282 (exit $ac_status); } &&
5283 { ac_try='test -s conftest.$ac_objext'
5284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5285 (eval $ac_try) 2>&5
5286 ac_status=$?
5287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5288 (exit $ac_status); }; }; then
5289 ac_lo=0 ac_mid=0
5290 while :; do
5291 cat >conftest.$ac_ext <<_ACEOF
5292#line $LINENO "configure"
5293#include "confdefs.h"
5294$ac_includes_default
5295#ifdef F77_DUMMY_MAIN
5296# ifdef __cplusplus
5297 extern "C"
5298# endif
5299 int F77_DUMMY_MAIN() { return 1; }
5300#endif
5301int
5302main ()
5303{
5304static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5305test_array [0] = 0
5306
5307 ;
5308 return 0;
5309}
5310_ACEOF
5311rm -f conftest.$ac_objext
5312if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5313 (eval $ac_compile) 2>&5
5314 ac_status=$?
5315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5316 (exit $ac_status); } &&
5317 { ac_try='test -s conftest.$ac_objext'
5318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5319 (eval $ac_try) 2>&5
5320 ac_status=$?
5321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5322 (exit $ac_status); }; }; then
5323 ac_hi=$ac_mid; break
5324else
5325 echo "$as_me: failed program was:" >&5
5326cat conftest.$ac_ext >&5
5327ac_lo=`expr $ac_mid + 1`
5328 if test $ac_lo -le $ac_mid; then
5329 ac_lo= ac_hi=
5330 break
5331 fi
5332 ac_mid=`expr 2 '*' $ac_mid + 1`
5333fi
5334rm -f conftest.$ac_objext conftest.$ac_ext
5335 done
5336else
5337 echo "$as_me: failed program was:" >&5
5338cat conftest.$ac_ext >&5
5339cat >conftest.$ac_ext <<_ACEOF
5340#line $LINENO "configure"
5341#include "confdefs.h"
5342$ac_includes_default
5343#ifdef F77_DUMMY_MAIN
5344# ifdef __cplusplus
5345 extern "C"
5346# endif
5347 int F77_DUMMY_MAIN() { return 1; }
5348#endif
5349int
5350main ()
5351{
5352static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5353test_array [0] = 0
5354
5355 ;
5356 return 0;
5357}
5358_ACEOF
5359rm -f conftest.$ac_objext
5360if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5361 (eval $ac_compile) 2>&5
5362 ac_status=$?
5363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5364 (exit $ac_status); } &&
5365 { ac_try='test -s conftest.$ac_objext'
5366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5367 (eval $ac_try) 2>&5
5368 ac_status=$?
5369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5370 (exit $ac_status); }; }; then
5371 ac_hi=-1 ac_mid=-1
5372 while :; do
5373 cat >conftest.$ac_ext <<_ACEOF
5374#line $LINENO "configure"
5375#include "confdefs.h"
5376$ac_includes_default
5377#ifdef F77_DUMMY_MAIN
5378# ifdef __cplusplus
5379 extern "C"
5380# endif
5381 int F77_DUMMY_MAIN() { return 1; }
5382#endif
5383int
5384main ()
5385{
5386static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5387test_array [0] = 0
5388
5389 ;
5390 return 0;
5391}
5392_ACEOF
5393rm -f conftest.$ac_objext
5394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5395 (eval $ac_compile) 2>&5
5396 ac_status=$?
5397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5398 (exit $ac_status); } &&
5399 { ac_try='test -s conftest.$ac_objext'
5400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5401 (eval $ac_try) 2>&5
5402 ac_status=$?
5403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5404 (exit $ac_status); }; }; then
5405 ac_lo=$ac_mid; break
5406else
5407 echo "$as_me: failed program was:" >&5
5408cat conftest.$ac_ext >&5
5409ac_hi=`expr '(' $ac_mid ')' - 1`
5410 if test $ac_mid -le $ac_hi; then
5411 ac_lo= ac_hi=
5412 break
5413 fi
5414 ac_mid=`expr 2 '*' $ac_mid`
5415fi
5416rm -f conftest.$ac_objext conftest.$ac_ext
5417 done
5418else
5419 echo "$as_me: failed program was:" >&5
5420cat conftest.$ac_ext >&5
5421ac_lo= ac_hi=
5422fi
5423rm -f conftest.$ac_objext conftest.$ac_ext
5424fi
5425rm -f conftest.$ac_objext conftest.$ac_ext
5426# Binary search between lo and hi bounds.
5427while test "x$ac_lo" != "x$ac_hi"; do
5428 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5429 cat >conftest.$ac_ext <<_ACEOF
5430#line $LINENO "configure"
5431#include "confdefs.h"
5432$ac_includes_default
5433#ifdef F77_DUMMY_MAIN
5434# ifdef __cplusplus
5435 extern "C"
5436# endif
5437 int F77_DUMMY_MAIN() { return 1; }
5438#endif
5439int
5440main ()
5441{
5442static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5443test_array [0] = 0
5444
5445 ;
5446 return 0;
5447}
5448_ACEOF
5449rm -f conftest.$ac_objext
5450if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5451 (eval $ac_compile) 2>&5
5452 ac_status=$?
5453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5454 (exit $ac_status); } &&
5455 { ac_try='test -s conftest.$ac_objext'
5456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5457 (eval $ac_try) 2>&5
5458 ac_status=$?
5459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5460 (exit $ac_status); }; }; then
5461 ac_hi=$ac_mid
5462else
5463 echo "$as_me: failed program was:" >&5
5464cat conftest.$ac_ext >&5
5465ac_lo=`expr '(' $ac_mid ')' + 1`
5466fi
5467rm -f conftest.$ac_objext conftest.$ac_ext
5468done
5469case $ac_lo in
5470?*) ac_cv_sizeof_int=$ac_lo;;
5471'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5472echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5473 { (exit 1); exit 1; }; } ;;
5474esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005475else
5476 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005477 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5478echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5479 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005480else
Martin v. Löwis11437992002-04-12 09:54:03 +00005481 cat >conftest.$ac_ext <<_ACEOF
5482#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005483#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005484$ac_includes_default
5485long longval () { return (long) (sizeof (int)); }
5486unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005487#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005488#include <stdlib.h>
5489#ifdef F77_DUMMY_MAIN
5490# ifdef __cplusplus
5491 extern "C"
5492# endif
5493 int F77_DUMMY_MAIN() { return 1; }
5494#endif
5495int
5496main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005497{
Martin v. Löwis11437992002-04-12 09:54:03 +00005498
5499 FILE *f = fopen ("conftest.val", "w");
5500 if (! f)
5501 exit (1);
5502 if (((long) (sizeof (int))) < 0)
5503 {
5504 long i = longval ();
5505 if (i != ((long) (sizeof (int))))
5506 exit (1);
5507 fprintf (f, "%ld\n", i);
5508 }
5509 else
5510 {
5511 unsigned long i = ulongval ();
5512 if (i != ((long) (sizeof (int))))
5513 exit (1);
5514 fprintf (f, "%lu\n", i);
5515 }
5516 exit (ferror (f) || fclose (f) != 0);
5517
5518 ;
5519 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005520}
Martin v. Löwis11437992002-04-12 09:54:03 +00005521_ACEOF
5522rm -f conftest$ac_exeext
5523if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5524 (eval $ac_link) 2>&5
5525 ac_status=$?
5526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5527 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5529 (eval $ac_try) 2>&5
5530 ac_status=$?
5531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5532 (exit $ac_status); }; }; then
5533 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005534else
Martin v. Löwis11437992002-04-12 09:54:03 +00005535 echo "$as_me: program exited with status $ac_status" >&5
5536echo "$as_me: failed program was:" >&5
5537cat conftest.$ac_ext >&5
5538( exit $ac_status )
5539{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5540echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5541 { (exit 1); exit 1; }; }
5542fi
5543rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5544fi
5545fi
5546rm -f conftest.val
5547else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005548 ac_cv_sizeof_int=0
5549fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005550fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005551echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5552echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5553cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005554#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005555_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005556
5557
Martin v. Löwis11437992002-04-12 09:54:03 +00005558echo "$as_me:$LINENO: checking for long" >&5
5559echo $ECHO_N "checking for long... $ECHO_C" >&6
5560if test "${ac_cv_type_long+set}" = set; then
5561 echo $ECHO_N "(cached) $ECHO_C" >&6
5562else
5563 cat >conftest.$ac_ext <<_ACEOF
5564#line $LINENO "configure"
5565#include "confdefs.h"
5566$ac_includes_default
5567#ifdef F77_DUMMY_MAIN
5568# ifdef __cplusplus
5569 extern "C"
5570# endif
5571 int F77_DUMMY_MAIN() { return 1; }
5572#endif
5573int
5574main ()
5575{
5576if ((long *) 0)
5577 return 0;
5578if (sizeof (long))
5579 return 0;
5580 ;
5581 return 0;
5582}
5583_ACEOF
5584rm -f conftest.$ac_objext
5585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5586 (eval $ac_compile) 2>&5
5587 ac_status=$?
5588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5589 (exit $ac_status); } &&
5590 { ac_try='test -s conftest.$ac_objext'
5591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5592 (eval $ac_try) 2>&5
5593 ac_status=$?
5594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5595 (exit $ac_status); }; }; then
5596 ac_cv_type_long=yes
5597else
5598 echo "$as_me: failed program was:" >&5
5599cat conftest.$ac_ext >&5
5600ac_cv_type_long=no
5601fi
5602rm -f conftest.$ac_objext conftest.$ac_ext
5603fi
5604echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5605echo "${ECHO_T}$ac_cv_type_long" >&6
5606
5607echo "$as_me:$LINENO: checking size of long" >&5
5608echo $ECHO_N "checking size of long... $ECHO_C" >&6
5609if test "${ac_cv_sizeof_long+set}" = set; then
5610 echo $ECHO_N "(cached) $ECHO_C" >&6
5611else
5612 if test "$ac_cv_type_long" = yes; then
5613 # The cast to unsigned long works around a bug in the HP C Compiler
5614 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5615 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5616 # This bug is HP SR number 8606223364.
5617 if test "$cross_compiling" = yes; then
5618 # Depending upon the size, compute the lo and hi bounds.
5619cat >conftest.$ac_ext <<_ACEOF
5620#line $LINENO "configure"
5621#include "confdefs.h"
5622$ac_includes_default
5623#ifdef F77_DUMMY_MAIN
5624# ifdef __cplusplus
5625 extern "C"
5626# endif
5627 int F77_DUMMY_MAIN() { return 1; }
5628#endif
5629int
5630main ()
5631{
5632static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5633test_array [0] = 0
5634
5635 ;
5636 return 0;
5637}
5638_ACEOF
5639rm -f conftest.$ac_objext
5640if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5641 (eval $ac_compile) 2>&5
5642 ac_status=$?
5643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5644 (exit $ac_status); } &&
5645 { ac_try='test -s conftest.$ac_objext'
5646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5647 (eval $ac_try) 2>&5
5648 ac_status=$?
5649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5650 (exit $ac_status); }; }; then
5651 ac_lo=0 ac_mid=0
5652 while :; do
5653 cat >conftest.$ac_ext <<_ACEOF
5654#line $LINENO "configure"
5655#include "confdefs.h"
5656$ac_includes_default
5657#ifdef F77_DUMMY_MAIN
5658# ifdef __cplusplus
5659 extern "C"
5660# endif
5661 int F77_DUMMY_MAIN() { return 1; }
5662#endif
5663int
5664main ()
5665{
5666static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5667test_array [0] = 0
5668
5669 ;
5670 return 0;
5671}
5672_ACEOF
5673rm -f conftest.$ac_objext
5674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5675 (eval $ac_compile) 2>&5
5676 ac_status=$?
5677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5678 (exit $ac_status); } &&
5679 { ac_try='test -s conftest.$ac_objext'
5680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5681 (eval $ac_try) 2>&5
5682 ac_status=$?
5683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5684 (exit $ac_status); }; }; then
5685 ac_hi=$ac_mid; break
5686else
5687 echo "$as_me: failed program was:" >&5
5688cat conftest.$ac_ext >&5
5689ac_lo=`expr $ac_mid + 1`
5690 if test $ac_lo -le $ac_mid; then
5691 ac_lo= ac_hi=
5692 break
5693 fi
5694 ac_mid=`expr 2 '*' $ac_mid + 1`
5695fi
5696rm -f conftest.$ac_objext conftest.$ac_ext
5697 done
5698else
5699 echo "$as_me: failed program was:" >&5
5700cat conftest.$ac_ext >&5
5701cat >conftest.$ac_ext <<_ACEOF
5702#line $LINENO "configure"
5703#include "confdefs.h"
5704$ac_includes_default
5705#ifdef F77_DUMMY_MAIN
5706# ifdef __cplusplus
5707 extern "C"
5708# endif
5709 int F77_DUMMY_MAIN() { return 1; }
5710#endif
5711int
5712main ()
5713{
5714static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5715test_array [0] = 0
5716
5717 ;
5718 return 0;
5719}
5720_ACEOF
5721rm -f conftest.$ac_objext
5722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5723 (eval $ac_compile) 2>&5
5724 ac_status=$?
5725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5726 (exit $ac_status); } &&
5727 { ac_try='test -s conftest.$ac_objext'
5728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5729 (eval $ac_try) 2>&5
5730 ac_status=$?
5731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5732 (exit $ac_status); }; }; then
5733 ac_hi=-1 ac_mid=-1
5734 while :; do
5735 cat >conftest.$ac_ext <<_ACEOF
5736#line $LINENO "configure"
5737#include "confdefs.h"
5738$ac_includes_default
5739#ifdef F77_DUMMY_MAIN
5740# ifdef __cplusplus
5741 extern "C"
5742# endif
5743 int F77_DUMMY_MAIN() { return 1; }
5744#endif
5745int
5746main ()
5747{
5748static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5749test_array [0] = 0
5750
5751 ;
5752 return 0;
5753}
5754_ACEOF
5755rm -f conftest.$ac_objext
5756if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5757 (eval $ac_compile) 2>&5
5758 ac_status=$?
5759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5760 (exit $ac_status); } &&
5761 { ac_try='test -s conftest.$ac_objext'
5762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5763 (eval $ac_try) 2>&5
5764 ac_status=$?
5765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5766 (exit $ac_status); }; }; then
5767 ac_lo=$ac_mid; break
5768else
5769 echo "$as_me: failed program was:" >&5
5770cat conftest.$ac_ext >&5
5771ac_hi=`expr '(' $ac_mid ')' - 1`
5772 if test $ac_mid -le $ac_hi; then
5773 ac_lo= ac_hi=
5774 break
5775 fi
5776 ac_mid=`expr 2 '*' $ac_mid`
5777fi
5778rm -f conftest.$ac_objext conftest.$ac_ext
5779 done
5780else
5781 echo "$as_me: failed program was:" >&5
5782cat conftest.$ac_ext >&5
5783ac_lo= ac_hi=
5784fi
5785rm -f conftest.$ac_objext conftest.$ac_ext
5786fi
5787rm -f conftest.$ac_objext conftest.$ac_ext
5788# Binary search between lo and hi bounds.
5789while test "x$ac_lo" != "x$ac_hi"; do
5790 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5791 cat >conftest.$ac_ext <<_ACEOF
5792#line $LINENO "configure"
5793#include "confdefs.h"
5794$ac_includes_default
5795#ifdef F77_DUMMY_MAIN
5796# ifdef __cplusplus
5797 extern "C"
5798# endif
5799 int F77_DUMMY_MAIN() { return 1; }
5800#endif
5801int
5802main ()
5803{
5804static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5805test_array [0] = 0
5806
5807 ;
5808 return 0;
5809}
5810_ACEOF
5811rm -f conftest.$ac_objext
5812if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5813 (eval $ac_compile) 2>&5
5814 ac_status=$?
5815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5816 (exit $ac_status); } &&
5817 { ac_try='test -s conftest.$ac_objext'
5818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5819 (eval $ac_try) 2>&5
5820 ac_status=$?
5821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5822 (exit $ac_status); }; }; then
5823 ac_hi=$ac_mid
5824else
5825 echo "$as_me: failed program was:" >&5
5826cat conftest.$ac_ext >&5
5827ac_lo=`expr '(' $ac_mid ')' + 1`
5828fi
5829rm -f conftest.$ac_objext conftest.$ac_ext
5830done
5831case $ac_lo in
5832?*) ac_cv_sizeof_long=$ac_lo;;
5833'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5834echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5835 { (exit 1); exit 1; }; } ;;
5836esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005837else
5838 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005839 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5840echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5841 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005842else
Martin v. Löwis11437992002-04-12 09:54:03 +00005843 cat >conftest.$ac_ext <<_ACEOF
5844#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005845#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005846$ac_includes_default
5847long longval () { return (long) (sizeof (long)); }
5848unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005849#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005850#include <stdlib.h>
5851#ifdef F77_DUMMY_MAIN
5852# ifdef __cplusplus
5853 extern "C"
5854# endif
5855 int F77_DUMMY_MAIN() { return 1; }
5856#endif
5857int
5858main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005859{
Martin v. Löwis11437992002-04-12 09:54:03 +00005860
5861 FILE *f = fopen ("conftest.val", "w");
5862 if (! f)
5863 exit (1);
5864 if (((long) (sizeof (long))) < 0)
5865 {
5866 long i = longval ();
5867 if (i != ((long) (sizeof (long))))
5868 exit (1);
5869 fprintf (f, "%ld\n", i);
5870 }
5871 else
5872 {
5873 unsigned long i = ulongval ();
5874 if (i != ((long) (sizeof (long))))
5875 exit (1);
5876 fprintf (f, "%lu\n", i);
5877 }
5878 exit (ferror (f) || fclose (f) != 0);
5879
5880 ;
5881 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005882}
Martin v. Löwis11437992002-04-12 09:54:03 +00005883_ACEOF
5884rm -f conftest$ac_exeext
5885if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5886 (eval $ac_link) 2>&5
5887 ac_status=$?
5888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5889 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5891 (eval $ac_try) 2>&5
5892 ac_status=$?
5893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5894 (exit $ac_status); }; }; then
5895 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005896else
Martin v. Löwis11437992002-04-12 09:54:03 +00005897 echo "$as_me: program exited with status $ac_status" >&5
5898echo "$as_me: failed program was:" >&5
5899cat conftest.$ac_ext >&5
5900( exit $ac_status )
5901{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5902echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5903 { (exit 1); exit 1; }; }
5904fi
5905rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5906fi
5907fi
5908rm -f conftest.val
5909else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005910 ac_cv_sizeof_long=0
5911fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005912fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005913echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5914echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5915cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005916#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005917_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005918
5919
Martin v. Löwis11437992002-04-12 09:54:03 +00005920echo "$as_me:$LINENO: checking for void *" >&5
5921echo $ECHO_N "checking for void *... $ECHO_C" >&6
5922if test "${ac_cv_type_void_p+set}" = set; then
5923 echo $ECHO_N "(cached) $ECHO_C" >&6
5924else
5925 cat >conftest.$ac_ext <<_ACEOF
5926#line $LINENO "configure"
5927#include "confdefs.h"
5928$ac_includes_default
5929#ifdef F77_DUMMY_MAIN
5930# ifdef __cplusplus
5931 extern "C"
5932# endif
5933 int F77_DUMMY_MAIN() { return 1; }
5934#endif
5935int
5936main ()
5937{
5938if ((void * *) 0)
5939 return 0;
5940if (sizeof (void *))
5941 return 0;
5942 ;
5943 return 0;
5944}
5945_ACEOF
5946rm -f conftest.$ac_objext
5947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5948 (eval $ac_compile) 2>&5
5949 ac_status=$?
5950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5951 (exit $ac_status); } &&
5952 { ac_try='test -s conftest.$ac_objext'
5953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5954 (eval $ac_try) 2>&5
5955 ac_status=$?
5956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5957 (exit $ac_status); }; }; then
5958 ac_cv_type_void_p=yes
5959else
5960 echo "$as_me: failed program was:" >&5
5961cat conftest.$ac_ext >&5
5962ac_cv_type_void_p=no
5963fi
5964rm -f conftest.$ac_objext conftest.$ac_ext
5965fi
5966echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5967echo "${ECHO_T}$ac_cv_type_void_p" >&6
5968
5969echo "$as_me:$LINENO: checking size of void *" >&5
5970echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5971if test "${ac_cv_sizeof_void_p+set}" = set; then
5972 echo $ECHO_N "(cached) $ECHO_C" >&6
5973else
5974 if test "$ac_cv_type_void_p" = yes; then
5975 # The cast to unsigned long works around a bug in the HP C Compiler
5976 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5977 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5978 # This bug is HP SR number 8606223364.
5979 if test "$cross_compiling" = yes; then
5980 # Depending upon the size, compute the lo and hi bounds.
5981cat >conftest.$ac_ext <<_ACEOF
5982#line $LINENO "configure"
5983#include "confdefs.h"
5984$ac_includes_default
5985#ifdef F77_DUMMY_MAIN
5986# ifdef __cplusplus
5987 extern "C"
5988# endif
5989 int F77_DUMMY_MAIN() { return 1; }
5990#endif
5991int
5992main ()
5993{
5994static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5995test_array [0] = 0
5996
5997 ;
5998 return 0;
5999}
6000_ACEOF
6001rm -f conftest.$ac_objext
6002if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6003 (eval $ac_compile) 2>&5
6004 ac_status=$?
6005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6006 (exit $ac_status); } &&
6007 { ac_try='test -s conftest.$ac_objext'
6008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6009 (eval $ac_try) 2>&5
6010 ac_status=$?
6011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6012 (exit $ac_status); }; }; then
6013 ac_lo=0 ac_mid=0
6014 while :; do
6015 cat >conftest.$ac_ext <<_ACEOF
6016#line $LINENO "configure"
6017#include "confdefs.h"
6018$ac_includes_default
6019#ifdef F77_DUMMY_MAIN
6020# ifdef __cplusplus
6021 extern "C"
6022# endif
6023 int F77_DUMMY_MAIN() { return 1; }
6024#endif
6025int
6026main ()
6027{
6028static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6029test_array [0] = 0
6030
6031 ;
6032 return 0;
6033}
6034_ACEOF
6035rm -f conftest.$ac_objext
6036if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6037 (eval $ac_compile) 2>&5
6038 ac_status=$?
6039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6040 (exit $ac_status); } &&
6041 { ac_try='test -s conftest.$ac_objext'
6042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6043 (eval $ac_try) 2>&5
6044 ac_status=$?
6045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6046 (exit $ac_status); }; }; then
6047 ac_hi=$ac_mid; break
6048else
6049 echo "$as_me: failed program was:" >&5
6050cat conftest.$ac_ext >&5
6051ac_lo=`expr $ac_mid + 1`
6052 if test $ac_lo -le $ac_mid; then
6053 ac_lo= ac_hi=
6054 break
6055 fi
6056 ac_mid=`expr 2 '*' $ac_mid + 1`
6057fi
6058rm -f conftest.$ac_objext conftest.$ac_ext
6059 done
6060else
6061 echo "$as_me: failed program was:" >&5
6062cat conftest.$ac_ext >&5
6063cat >conftest.$ac_ext <<_ACEOF
6064#line $LINENO "configure"
6065#include "confdefs.h"
6066$ac_includes_default
6067#ifdef F77_DUMMY_MAIN
6068# ifdef __cplusplus
6069 extern "C"
6070# endif
6071 int F77_DUMMY_MAIN() { return 1; }
6072#endif
6073int
6074main ()
6075{
6076static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6077test_array [0] = 0
6078
6079 ;
6080 return 0;
6081}
6082_ACEOF
6083rm -f conftest.$ac_objext
6084if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6085 (eval $ac_compile) 2>&5
6086 ac_status=$?
6087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6088 (exit $ac_status); } &&
6089 { ac_try='test -s conftest.$ac_objext'
6090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6091 (eval $ac_try) 2>&5
6092 ac_status=$?
6093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6094 (exit $ac_status); }; }; then
6095 ac_hi=-1 ac_mid=-1
6096 while :; do
6097 cat >conftest.$ac_ext <<_ACEOF
6098#line $LINENO "configure"
6099#include "confdefs.h"
6100$ac_includes_default
6101#ifdef F77_DUMMY_MAIN
6102# ifdef __cplusplus
6103 extern "C"
6104# endif
6105 int F77_DUMMY_MAIN() { return 1; }
6106#endif
6107int
6108main ()
6109{
6110static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6111test_array [0] = 0
6112
6113 ;
6114 return 0;
6115}
6116_ACEOF
6117rm -f conftest.$ac_objext
6118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6119 (eval $ac_compile) 2>&5
6120 ac_status=$?
6121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6122 (exit $ac_status); } &&
6123 { ac_try='test -s conftest.$ac_objext'
6124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6125 (eval $ac_try) 2>&5
6126 ac_status=$?
6127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6128 (exit $ac_status); }; }; then
6129 ac_lo=$ac_mid; break
6130else
6131 echo "$as_me: failed program was:" >&5
6132cat conftest.$ac_ext >&5
6133ac_hi=`expr '(' $ac_mid ')' - 1`
6134 if test $ac_mid -le $ac_hi; then
6135 ac_lo= ac_hi=
6136 break
6137 fi
6138 ac_mid=`expr 2 '*' $ac_mid`
6139fi
6140rm -f conftest.$ac_objext conftest.$ac_ext
6141 done
6142else
6143 echo "$as_me: failed program was:" >&5
6144cat conftest.$ac_ext >&5
6145ac_lo= ac_hi=
6146fi
6147rm -f conftest.$ac_objext conftest.$ac_ext
6148fi
6149rm -f conftest.$ac_objext conftest.$ac_ext
6150# Binary search between lo and hi bounds.
6151while test "x$ac_lo" != "x$ac_hi"; do
6152 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6153 cat >conftest.$ac_ext <<_ACEOF
6154#line $LINENO "configure"
6155#include "confdefs.h"
6156$ac_includes_default
6157#ifdef F77_DUMMY_MAIN
6158# ifdef __cplusplus
6159 extern "C"
6160# endif
6161 int F77_DUMMY_MAIN() { return 1; }
6162#endif
6163int
6164main ()
6165{
6166static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6167test_array [0] = 0
6168
6169 ;
6170 return 0;
6171}
6172_ACEOF
6173rm -f conftest.$ac_objext
6174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6175 (eval $ac_compile) 2>&5
6176 ac_status=$?
6177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6178 (exit $ac_status); } &&
6179 { ac_try='test -s conftest.$ac_objext'
6180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6181 (eval $ac_try) 2>&5
6182 ac_status=$?
6183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6184 (exit $ac_status); }; }; then
6185 ac_hi=$ac_mid
6186else
6187 echo "$as_me: failed program was:" >&5
6188cat conftest.$ac_ext >&5
6189ac_lo=`expr '(' $ac_mid ')' + 1`
6190fi
6191rm -f conftest.$ac_objext conftest.$ac_ext
6192done
6193case $ac_lo in
6194?*) ac_cv_sizeof_void_p=$ac_lo;;
6195'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6196echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6197 { (exit 1); exit 1; }; } ;;
6198esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006199else
6200 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006201 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6202echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6203 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006204else
Martin v. Löwis11437992002-04-12 09:54:03 +00006205 cat >conftest.$ac_ext <<_ACEOF
6206#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006207#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006208$ac_includes_default
6209long longval () { return (long) (sizeof (void *)); }
6210unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006211#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006212#include <stdlib.h>
6213#ifdef F77_DUMMY_MAIN
6214# ifdef __cplusplus
6215 extern "C"
6216# endif
6217 int F77_DUMMY_MAIN() { return 1; }
6218#endif
6219int
6220main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006221{
Martin v. Löwis11437992002-04-12 09:54:03 +00006222
6223 FILE *f = fopen ("conftest.val", "w");
6224 if (! f)
6225 exit (1);
6226 if (((long) (sizeof (void *))) < 0)
6227 {
6228 long i = longval ();
6229 if (i != ((long) (sizeof (void *))))
6230 exit (1);
6231 fprintf (f, "%ld\n", i);
6232 }
6233 else
6234 {
6235 unsigned long i = ulongval ();
6236 if (i != ((long) (sizeof (void *))))
6237 exit (1);
6238 fprintf (f, "%lu\n", i);
6239 }
6240 exit (ferror (f) || fclose (f) != 0);
6241
6242 ;
6243 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006244}
Martin v. Löwis11437992002-04-12 09:54:03 +00006245_ACEOF
6246rm -f conftest$ac_exeext
6247if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6248 (eval $ac_link) 2>&5
6249 ac_status=$?
6250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6251 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6253 (eval $ac_try) 2>&5
6254 ac_status=$?
6255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6256 (exit $ac_status); }; }; then
6257 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006258else
Martin v. Löwis11437992002-04-12 09:54:03 +00006259 echo "$as_me: program exited with status $ac_status" >&5
6260echo "$as_me: failed program was:" >&5
6261cat conftest.$ac_ext >&5
6262( exit $ac_status )
6263{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6264echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6265 { (exit 1); exit 1; }; }
6266fi
6267rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6268fi
6269fi
6270rm -f conftest.val
6271else
Guido van Rossumad678af1998-10-02 14:42:15 +00006272 ac_cv_sizeof_void_p=0
6273fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006274fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006275echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6276echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6277cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006278#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006279_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006280
6281
Martin v. Löwis11437992002-04-12 09:54:03 +00006282echo "$as_me:$LINENO: checking for char" >&5
6283echo $ECHO_N "checking for char... $ECHO_C" >&6
6284if test "${ac_cv_type_char+set}" = set; then
6285 echo $ECHO_N "(cached) $ECHO_C" >&6
6286else
6287 cat >conftest.$ac_ext <<_ACEOF
6288#line $LINENO "configure"
6289#include "confdefs.h"
6290$ac_includes_default
6291#ifdef F77_DUMMY_MAIN
6292# ifdef __cplusplus
6293 extern "C"
6294# endif
6295 int F77_DUMMY_MAIN() { return 1; }
6296#endif
6297int
6298main ()
6299{
6300if ((char *) 0)
6301 return 0;
6302if (sizeof (char))
6303 return 0;
6304 ;
6305 return 0;
6306}
6307_ACEOF
6308rm -f conftest.$ac_objext
6309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6310 (eval $ac_compile) 2>&5
6311 ac_status=$?
6312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6313 (exit $ac_status); } &&
6314 { ac_try='test -s conftest.$ac_objext'
6315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6316 (eval $ac_try) 2>&5
6317 ac_status=$?
6318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6319 (exit $ac_status); }; }; then
6320 ac_cv_type_char=yes
6321else
6322 echo "$as_me: failed program was:" >&5
6323cat conftest.$ac_ext >&5
6324ac_cv_type_char=no
6325fi
6326rm -f conftest.$ac_objext conftest.$ac_ext
6327fi
6328echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6329echo "${ECHO_T}$ac_cv_type_char" >&6
6330
6331echo "$as_me:$LINENO: checking size of char" >&5
6332echo $ECHO_N "checking size of char... $ECHO_C" >&6
6333if test "${ac_cv_sizeof_char+set}" = set; then
6334 echo $ECHO_N "(cached) $ECHO_C" >&6
6335else
6336 if test "$ac_cv_type_char" = yes; then
6337 # The cast to unsigned long works around a bug in the HP C Compiler
6338 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6339 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6340 # This bug is HP SR number 8606223364.
6341 if test "$cross_compiling" = yes; then
6342 # Depending upon the size, compute the lo and hi bounds.
6343cat >conftest.$ac_ext <<_ACEOF
6344#line $LINENO "configure"
6345#include "confdefs.h"
6346$ac_includes_default
6347#ifdef F77_DUMMY_MAIN
6348# ifdef __cplusplus
6349 extern "C"
6350# endif
6351 int F77_DUMMY_MAIN() { return 1; }
6352#endif
6353int
6354main ()
6355{
6356static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6357test_array [0] = 0
6358
6359 ;
6360 return 0;
6361}
6362_ACEOF
6363rm -f conftest.$ac_objext
6364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6365 (eval $ac_compile) 2>&5
6366 ac_status=$?
6367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6368 (exit $ac_status); } &&
6369 { ac_try='test -s conftest.$ac_objext'
6370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6371 (eval $ac_try) 2>&5
6372 ac_status=$?
6373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6374 (exit $ac_status); }; }; then
6375 ac_lo=0 ac_mid=0
6376 while :; do
6377 cat >conftest.$ac_ext <<_ACEOF
6378#line $LINENO "configure"
6379#include "confdefs.h"
6380$ac_includes_default
6381#ifdef F77_DUMMY_MAIN
6382# ifdef __cplusplus
6383 extern "C"
6384# endif
6385 int F77_DUMMY_MAIN() { return 1; }
6386#endif
6387int
6388main ()
6389{
6390static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6391test_array [0] = 0
6392
6393 ;
6394 return 0;
6395}
6396_ACEOF
6397rm -f conftest.$ac_objext
6398if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6399 (eval $ac_compile) 2>&5
6400 ac_status=$?
6401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6402 (exit $ac_status); } &&
6403 { ac_try='test -s conftest.$ac_objext'
6404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6405 (eval $ac_try) 2>&5
6406 ac_status=$?
6407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6408 (exit $ac_status); }; }; then
6409 ac_hi=$ac_mid; break
6410else
6411 echo "$as_me: failed program was:" >&5
6412cat conftest.$ac_ext >&5
6413ac_lo=`expr $ac_mid + 1`
6414 if test $ac_lo -le $ac_mid; then
6415 ac_lo= ac_hi=
6416 break
6417 fi
6418 ac_mid=`expr 2 '*' $ac_mid + 1`
6419fi
6420rm -f conftest.$ac_objext conftest.$ac_ext
6421 done
6422else
6423 echo "$as_me: failed program was:" >&5
6424cat conftest.$ac_ext >&5
6425cat >conftest.$ac_ext <<_ACEOF
6426#line $LINENO "configure"
6427#include "confdefs.h"
6428$ac_includes_default
6429#ifdef F77_DUMMY_MAIN
6430# ifdef __cplusplus
6431 extern "C"
6432# endif
6433 int F77_DUMMY_MAIN() { return 1; }
6434#endif
6435int
6436main ()
6437{
6438static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6439test_array [0] = 0
6440
6441 ;
6442 return 0;
6443}
6444_ACEOF
6445rm -f conftest.$ac_objext
6446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6447 (eval $ac_compile) 2>&5
6448 ac_status=$?
6449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6450 (exit $ac_status); } &&
6451 { ac_try='test -s conftest.$ac_objext'
6452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6453 (eval $ac_try) 2>&5
6454 ac_status=$?
6455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6456 (exit $ac_status); }; }; then
6457 ac_hi=-1 ac_mid=-1
6458 while :; do
6459 cat >conftest.$ac_ext <<_ACEOF
6460#line $LINENO "configure"
6461#include "confdefs.h"
6462$ac_includes_default
6463#ifdef F77_DUMMY_MAIN
6464# ifdef __cplusplus
6465 extern "C"
6466# endif
6467 int F77_DUMMY_MAIN() { return 1; }
6468#endif
6469int
6470main ()
6471{
6472static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6473test_array [0] = 0
6474
6475 ;
6476 return 0;
6477}
6478_ACEOF
6479rm -f conftest.$ac_objext
6480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6481 (eval $ac_compile) 2>&5
6482 ac_status=$?
6483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6484 (exit $ac_status); } &&
6485 { ac_try='test -s conftest.$ac_objext'
6486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6487 (eval $ac_try) 2>&5
6488 ac_status=$?
6489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6490 (exit $ac_status); }; }; then
6491 ac_lo=$ac_mid; break
6492else
6493 echo "$as_me: failed program was:" >&5
6494cat conftest.$ac_ext >&5
6495ac_hi=`expr '(' $ac_mid ')' - 1`
6496 if test $ac_mid -le $ac_hi; then
6497 ac_lo= ac_hi=
6498 break
6499 fi
6500 ac_mid=`expr 2 '*' $ac_mid`
6501fi
6502rm -f conftest.$ac_objext conftest.$ac_ext
6503 done
6504else
6505 echo "$as_me: failed program was:" >&5
6506cat conftest.$ac_ext >&5
6507ac_lo= ac_hi=
6508fi
6509rm -f conftest.$ac_objext conftest.$ac_ext
6510fi
6511rm -f conftest.$ac_objext conftest.$ac_ext
6512# Binary search between lo and hi bounds.
6513while test "x$ac_lo" != "x$ac_hi"; do
6514 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6515 cat >conftest.$ac_ext <<_ACEOF
6516#line $LINENO "configure"
6517#include "confdefs.h"
6518$ac_includes_default
6519#ifdef F77_DUMMY_MAIN
6520# ifdef __cplusplus
6521 extern "C"
6522# endif
6523 int F77_DUMMY_MAIN() { return 1; }
6524#endif
6525int
6526main ()
6527{
6528static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6529test_array [0] = 0
6530
6531 ;
6532 return 0;
6533}
6534_ACEOF
6535rm -f conftest.$ac_objext
6536if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6537 (eval $ac_compile) 2>&5
6538 ac_status=$?
6539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6540 (exit $ac_status); } &&
6541 { ac_try='test -s conftest.$ac_objext'
6542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6543 (eval $ac_try) 2>&5
6544 ac_status=$?
6545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6546 (exit $ac_status); }; }; then
6547 ac_hi=$ac_mid
6548else
6549 echo "$as_me: failed program was:" >&5
6550cat conftest.$ac_ext >&5
6551ac_lo=`expr '(' $ac_mid ')' + 1`
6552fi
6553rm -f conftest.$ac_objext conftest.$ac_ext
6554done
6555case $ac_lo in
6556?*) ac_cv_sizeof_char=$ac_lo;;
6557'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6558echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6559 { (exit 1); exit 1; }; } ;;
6560esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006561else
6562 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006563 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6564echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6565 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006566else
Martin v. Löwis11437992002-04-12 09:54:03 +00006567 cat >conftest.$ac_ext <<_ACEOF
6568#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006569#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006570$ac_includes_default
6571long longval () { return (long) (sizeof (char)); }
6572unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006573#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006574#include <stdlib.h>
6575#ifdef F77_DUMMY_MAIN
6576# ifdef __cplusplus
6577 extern "C"
6578# endif
6579 int F77_DUMMY_MAIN() { return 1; }
6580#endif
6581int
6582main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006583{
Martin v. Löwis11437992002-04-12 09:54:03 +00006584
6585 FILE *f = fopen ("conftest.val", "w");
6586 if (! f)
6587 exit (1);
6588 if (((long) (sizeof (char))) < 0)
6589 {
6590 long i = longval ();
6591 if (i != ((long) (sizeof (char))))
6592 exit (1);
6593 fprintf (f, "%ld\n", i);
6594 }
6595 else
6596 {
6597 unsigned long i = ulongval ();
6598 if (i != ((long) (sizeof (char))))
6599 exit (1);
6600 fprintf (f, "%lu\n", i);
6601 }
6602 exit (ferror (f) || fclose (f) != 0);
6603
6604 ;
6605 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006606}
Martin v. Löwis11437992002-04-12 09:54:03 +00006607_ACEOF
6608rm -f conftest$ac_exeext
6609if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6610 (eval $ac_link) 2>&5
6611 ac_status=$?
6612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6613 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6615 (eval $ac_try) 2>&5
6616 ac_status=$?
6617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6618 (exit $ac_status); }; }; then
6619 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006620else
Martin v. Löwis11437992002-04-12 09:54:03 +00006621 echo "$as_me: program exited with status $ac_status" >&5
6622echo "$as_me: failed program was:" >&5
6623cat conftest.$ac_ext >&5
6624( exit $ac_status )
6625{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6626echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6627 { (exit 1); exit 1; }; }
6628fi
6629rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6630fi
6631fi
6632rm -f conftest.val
6633else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006634 ac_cv_sizeof_char=0
6635fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006636fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006637echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6638echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6639cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006640#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006641_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006642
6643
Martin v. Löwis11437992002-04-12 09:54:03 +00006644echo "$as_me:$LINENO: checking for short" >&5
6645echo $ECHO_N "checking for short... $ECHO_C" >&6
6646if test "${ac_cv_type_short+set}" = set; then
6647 echo $ECHO_N "(cached) $ECHO_C" >&6
6648else
6649 cat >conftest.$ac_ext <<_ACEOF
6650#line $LINENO "configure"
6651#include "confdefs.h"
6652$ac_includes_default
6653#ifdef F77_DUMMY_MAIN
6654# ifdef __cplusplus
6655 extern "C"
6656# endif
6657 int F77_DUMMY_MAIN() { return 1; }
6658#endif
6659int
6660main ()
6661{
6662if ((short *) 0)
6663 return 0;
6664if (sizeof (short))
6665 return 0;
6666 ;
6667 return 0;
6668}
6669_ACEOF
6670rm -f conftest.$ac_objext
6671if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6672 (eval $ac_compile) 2>&5
6673 ac_status=$?
6674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6675 (exit $ac_status); } &&
6676 { ac_try='test -s conftest.$ac_objext'
6677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6678 (eval $ac_try) 2>&5
6679 ac_status=$?
6680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6681 (exit $ac_status); }; }; then
6682 ac_cv_type_short=yes
6683else
6684 echo "$as_me: failed program was:" >&5
6685cat conftest.$ac_ext >&5
6686ac_cv_type_short=no
6687fi
6688rm -f conftest.$ac_objext conftest.$ac_ext
6689fi
6690echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6691echo "${ECHO_T}$ac_cv_type_short" >&6
6692
6693echo "$as_me:$LINENO: checking size of short" >&5
6694echo $ECHO_N "checking size of short... $ECHO_C" >&6
6695if test "${ac_cv_sizeof_short+set}" = set; then
6696 echo $ECHO_N "(cached) $ECHO_C" >&6
6697else
6698 if test "$ac_cv_type_short" = yes; then
6699 # The cast to unsigned long works around a bug in the HP C Compiler
6700 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6701 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6702 # This bug is HP SR number 8606223364.
6703 if test "$cross_compiling" = yes; then
6704 # Depending upon the size, compute the lo and hi bounds.
6705cat >conftest.$ac_ext <<_ACEOF
6706#line $LINENO "configure"
6707#include "confdefs.h"
6708$ac_includes_default
6709#ifdef F77_DUMMY_MAIN
6710# ifdef __cplusplus
6711 extern "C"
6712# endif
6713 int F77_DUMMY_MAIN() { return 1; }
6714#endif
6715int
6716main ()
6717{
6718static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6719test_array [0] = 0
6720
6721 ;
6722 return 0;
6723}
6724_ACEOF
6725rm -f conftest.$ac_objext
6726if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6727 (eval $ac_compile) 2>&5
6728 ac_status=$?
6729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6730 (exit $ac_status); } &&
6731 { ac_try='test -s conftest.$ac_objext'
6732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6733 (eval $ac_try) 2>&5
6734 ac_status=$?
6735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6736 (exit $ac_status); }; }; then
6737 ac_lo=0 ac_mid=0
6738 while :; do
6739 cat >conftest.$ac_ext <<_ACEOF
6740#line $LINENO "configure"
6741#include "confdefs.h"
6742$ac_includes_default
6743#ifdef F77_DUMMY_MAIN
6744# ifdef __cplusplus
6745 extern "C"
6746# endif
6747 int F77_DUMMY_MAIN() { return 1; }
6748#endif
6749int
6750main ()
6751{
6752static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6753test_array [0] = 0
6754
6755 ;
6756 return 0;
6757}
6758_ACEOF
6759rm -f conftest.$ac_objext
6760if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6761 (eval $ac_compile) 2>&5
6762 ac_status=$?
6763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6764 (exit $ac_status); } &&
6765 { ac_try='test -s conftest.$ac_objext'
6766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6767 (eval $ac_try) 2>&5
6768 ac_status=$?
6769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6770 (exit $ac_status); }; }; then
6771 ac_hi=$ac_mid; break
6772else
6773 echo "$as_me: failed program was:" >&5
6774cat conftest.$ac_ext >&5
6775ac_lo=`expr $ac_mid + 1`
6776 if test $ac_lo -le $ac_mid; then
6777 ac_lo= ac_hi=
6778 break
6779 fi
6780 ac_mid=`expr 2 '*' $ac_mid + 1`
6781fi
6782rm -f conftest.$ac_objext conftest.$ac_ext
6783 done
6784else
6785 echo "$as_me: failed program was:" >&5
6786cat conftest.$ac_ext >&5
6787cat >conftest.$ac_ext <<_ACEOF
6788#line $LINENO "configure"
6789#include "confdefs.h"
6790$ac_includes_default
6791#ifdef F77_DUMMY_MAIN
6792# ifdef __cplusplus
6793 extern "C"
6794# endif
6795 int F77_DUMMY_MAIN() { return 1; }
6796#endif
6797int
6798main ()
6799{
6800static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6801test_array [0] = 0
6802
6803 ;
6804 return 0;
6805}
6806_ACEOF
6807rm -f conftest.$ac_objext
6808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6809 (eval $ac_compile) 2>&5
6810 ac_status=$?
6811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6812 (exit $ac_status); } &&
6813 { ac_try='test -s conftest.$ac_objext'
6814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6815 (eval $ac_try) 2>&5
6816 ac_status=$?
6817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6818 (exit $ac_status); }; }; then
6819 ac_hi=-1 ac_mid=-1
6820 while :; do
6821 cat >conftest.$ac_ext <<_ACEOF
6822#line $LINENO "configure"
6823#include "confdefs.h"
6824$ac_includes_default
6825#ifdef F77_DUMMY_MAIN
6826# ifdef __cplusplus
6827 extern "C"
6828# endif
6829 int F77_DUMMY_MAIN() { return 1; }
6830#endif
6831int
6832main ()
6833{
6834static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6835test_array [0] = 0
6836
6837 ;
6838 return 0;
6839}
6840_ACEOF
6841rm -f conftest.$ac_objext
6842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6843 (eval $ac_compile) 2>&5
6844 ac_status=$?
6845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6846 (exit $ac_status); } &&
6847 { ac_try='test -s conftest.$ac_objext'
6848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6849 (eval $ac_try) 2>&5
6850 ac_status=$?
6851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6852 (exit $ac_status); }; }; then
6853 ac_lo=$ac_mid; break
6854else
6855 echo "$as_me: failed program was:" >&5
6856cat conftest.$ac_ext >&5
6857ac_hi=`expr '(' $ac_mid ')' - 1`
6858 if test $ac_mid -le $ac_hi; then
6859 ac_lo= ac_hi=
6860 break
6861 fi
6862 ac_mid=`expr 2 '*' $ac_mid`
6863fi
6864rm -f conftest.$ac_objext conftest.$ac_ext
6865 done
6866else
6867 echo "$as_me: failed program was:" >&5
6868cat conftest.$ac_ext >&5
6869ac_lo= ac_hi=
6870fi
6871rm -f conftest.$ac_objext conftest.$ac_ext
6872fi
6873rm -f conftest.$ac_objext conftest.$ac_ext
6874# Binary search between lo and hi bounds.
6875while test "x$ac_lo" != "x$ac_hi"; do
6876 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6877 cat >conftest.$ac_ext <<_ACEOF
6878#line $LINENO "configure"
6879#include "confdefs.h"
6880$ac_includes_default
6881#ifdef F77_DUMMY_MAIN
6882# ifdef __cplusplus
6883 extern "C"
6884# endif
6885 int F77_DUMMY_MAIN() { return 1; }
6886#endif
6887int
6888main ()
6889{
6890static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6891test_array [0] = 0
6892
6893 ;
6894 return 0;
6895}
6896_ACEOF
6897rm -f conftest.$ac_objext
6898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6899 (eval $ac_compile) 2>&5
6900 ac_status=$?
6901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6902 (exit $ac_status); } &&
6903 { ac_try='test -s conftest.$ac_objext'
6904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6905 (eval $ac_try) 2>&5
6906 ac_status=$?
6907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6908 (exit $ac_status); }; }; then
6909 ac_hi=$ac_mid
6910else
6911 echo "$as_me: failed program was:" >&5
6912cat conftest.$ac_ext >&5
6913ac_lo=`expr '(' $ac_mid ')' + 1`
6914fi
6915rm -f conftest.$ac_objext conftest.$ac_ext
6916done
6917case $ac_lo in
6918?*) ac_cv_sizeof_short=$ac_lo;;
6919'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6920echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6921 { (exit 1); exit 1; }; } ;;
6922esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006923else
6924 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006925 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6926echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6927 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006928else
Martin v. Löwis11437992002-04-12 09:54:03 +00006929 cat >conftest.$ac_ext <<_ACEOF
6930#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006931#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006932$ac_includes_default
6933long longval () { return (long) (sizeof (short)); }
6934unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006935#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006936#include <stdlib.h>
6937#ifdef F77_DUMMY_MAIN
6938# ifdef __cplusplus
6939 extern "C"
6940# endif
6941 int F77_DUMMY_MAIN() { return 1; }
6942#endif
6943int
6944main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006945{
Martin v. Löwis11437992002-04-12 09:54:03 +00006946
6947 FILE *f = fopen ("conftest.val", "w");
6948 if (! f)
6949 exit (1);
6950 if (((long) (sizeof (short))) < 0)
6951 {
6952 long i = longval ();
6953 if (i != ((long) (sizeof (short))))
6954 exit (1);
6955 fprintf (f, "%ld\n", i);
6956 }
6957 else
6958 {
6959 unsigned long i = ulongval ();
6960 if (i != ((long) (sizeof (short))))
6961 exit (1);
6962 fprintf (f, "%lu\n", i);
6963 }
6964 exit (ferror (f) || fclose (f) != 0);
6965
6966 ;
6967 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006968}
Martin v. Löwis11437992002-04-12 09:54:03 +00006969_ACEOF
6970rm -f conftest$ac_exeext
6971if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6972 (eval $ac_link) 2>&5
6973 ac_status=$?
6974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6975 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6977 (eval $ac_try) 2>&5
6978 ac_status=$?
6979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6980 (exit $ac_status); }; }; then
6981 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006982else
Martin v. Löwis11437992002-04-12 09:54:03 +00006983 echo "$as_me: program exited with status $ac_status" >&5
6984echo "$as_me: failed program was:" >&5
6985cat conftest.$ac_ext >&5
6986( exit $ac_status )
6987{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6988echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6989 { (exit 1); exit 1; }; }
6990fi
6991rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6992fi
6993fi
6994rm -f conftest.val
6995else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006996 ac_cv_sizeof_short=0
6997fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006998fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006999echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7000echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7001cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007002#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007003_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007004
7005
Martin v. Löwis11437992002-04-12 09:54:03 +00007006echo "$as_me:$LINENO: checking for float" >&5
7007echo $ECHO_N "checking for float... $ECHO_C" >&6
7008if test "${ac_cv_type_float+set}" = set; then
7009 echo $ECHO_N "(cached) $ECHO_C" >&6
7010else
7011 cat >conftest.$ac_ext <<_ACEOF
7012#line $LINENO "configure"
7013#include "confdefs.h"
7014$ac_includes_default
7015#ifdef F77_DUMMY_MAIN
7016# ifdef __cplusplus
7017 extern "C"
7018# endif
7019 int F77_DUMMY_MAIN() { return 1; }
7020#endif
7021int
7022main ()
7023{
7024if ((float *) 0)
7025 return 0;
7026if (sizeof (float))
7027 return 0;
7028 ;
7029 return 0;
7030}
7031_ACEOF
7032rm -f conftest.$ac_objext
7033if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7034 (eval $ac_compile) 2>&5
7035 ac_status=$?
7036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7037 (exit $ac_status); } &&
7038 { ac_try='test -s conftest.$ac_objext'
7039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7040 (eval $ac_try) 2>&5
7041 ac_status=$?
7042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7043 (exit $ac_status); }; }; then
7044 ac_cv_type_float=yes
7045else
7046 echo "$as_me: failed program was:" >&5
7047cat conftest.$ac_ext >&5
7048ac_cv_type_float=no
7049fi
7050rm -f conftest.$ac_objext conftest.$ac_ext
7051fi
7052echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7053echo "${ECHO_T}$ac_cv_type_float" >&6
7054
7055echo "$as_me:$LINENO: checking size of float" >&5
7056echo $ECHO_N "checking size of float... $ECHO_C" >&6
7057if test "${ac_cv_sizeof_float+set}" = set; then
7058 echo $ECHO_N "(cached) $ECHO_C" >&6
7059else
7060 if test "$ac_cv_type_float" = yes; then
7061 # The cast to unsigned long works around a bug in the HP C Compiler
7062 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7063 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7064 # This bug is HP SR number 8606223364.
7065 if test "$cross_compiling" = yes; then
7066 # Depending upon the size, compute the lo and hi bounds.
7067cat >conftest.$ac_ext <<_ACEOF
7068#line $LINENO "configure"
7069#include "confdefs.h"
7070$ac_includes_default
7071#ifdef F77_DUMMY_MAIN
7072# ifdef __cplusplus
7073 extern "C"
7074# endif
7075 int F77_DUMMY_MAIN() { return 1; }
7076#endif
7077int
7078main ()
7079{
7080static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7081test_array [0] = 0
7082
7083 ;
7084 return 0;
7085}
7086_ACEOF
7087rm -f conftest.$ac_objext
7088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7089 (eval $ac_compile) 2>&5
7090 ac_status=$?
7091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7092 (exit $ac_status); } &&
7093 { ac_try='test -s conftest.$ac_objext'
7094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7095 (eval $ac_try) 2>&5
7096 ac_status=$?
7097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7098 (exit $ac_status); }; }; then
7099 ac_lo=0 ac_mid=0
7100 while :; do
7101 cat >conftest.$ac_ext <<_ACEOF
7102#line $LINENO "configure"
7103#include "confdefs.h"
7104$ac_includes_default
7105#ifdef F77_DUMMY_MAIN
7106# ifdef __cplusplus
7107 extern "C"
7108# endif
7109 int F77_DUMMY_MAIN() { return 1; }
7110#endif
7111int
7112main ()
7113{
7114static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7115test_array [0] = 0
7116
7117 ;
7118 return 0;
7119}
7120_ACEOF
7121rm -f conftest.$ac_objext
7122if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7123 (eval $ac_compile) 2>&5
7124 ac_status=$?
7125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7126 (exit $ac_status); } &&
7127 { ac_try='test -s conftest.$ac_objext'
7128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7129 (eval $ac_try) 2>&5
7130 ac_status=$?
7131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7132 (exit $ac_status); }; }; then
7133 ac_hi=$ac_mid; break
7134else
7135 echo "$as_me: failed program was:" >&5
7136cat conftest.$ac_ext >&5
7137ac_lo=`expr $ac_mid + 1`
7138 if test $ac_lo -le $ac_mid; then
7139 ac_lo= ac_hi=
7140 break
7141 fi
7142 ac_mid=`expr 2 '*' $ac_mid + 1`
7143fi
7144rm -f conftest.$ac_objext conftest.$ac_ext
7145 done
7146else
7147 echo "$as_me: failed program was:" >&5
7148cat conftest.$ac_ext >&5
7149cat >conftest.$ac_ext <<_ACEOF
7150#line $LINENO "configure"
7151#include "confdefs.h"
7152$ac_includes_default
7153#ifdef F77_DUMMY_MAIN
7154# ifdef __cplusplus
7155 extern "C"
7156# endif
7157 int F77_DUMMY_MAIN() { return 1; }
7158#endif
7159int
7160main ()
7161{
7162static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7163test_array [0] = 0
7164
7165 ;
7166 return 0;
7167}
7168_ACEOF
7169rm -f conftest.$ac_objext
7170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7171 (eval $ac_compile) 2>&5
7172 ac_status=$?
7173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7174 (exit $ac_status); } &&
7175 { ac_try='test -s conftest.$ac_objext'
7176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7177 (eval $ac_try) 2>&5
7178 ac_status=$?
7179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7180 (exit $ac_status); }; }; then
7181 ac_hi=-1 ac_mid=-1
7182 while :; do
7183 cat >conftest.$ac_ext <<_ACEOF
7184#line $LINENO "configure"
7185#include "confdefs.h"
7186$ac_includes_default
7187#ifdef F77_DUMMY_MAIN
7188# ifdef __cplusplus
7189 extern "C"
7190# endif
7191 int F77_DUMMY_MAIN() { return 1; }
7192#endif
7193int
7194main ()
7195{
7196static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7197test_array [0] = 0
7198
7199 ;
7200 return 0;
7201}
7202_ACEOF
7203rm -f conftest.$ac_objext
7204if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7205 (eval $ac_compile) 2>&5
7206 ac_status=$?
7207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7208 (exit $ac_status); } &&
7209 { ac_try='test -s conftest.$ac_objext'
7210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7211 (eval $ac_try) 2>&5
7212 ac_status=$?
7213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7214 (exit $ac_status); }; }; then
7215 ac_lo=$ac_mid; break
7216else
7217 echo "$as_me: failed program was:" >&5
7218cat conftest.$ac_ext >&5
7219ac_hi=`expr '(' $ac_mid ')' - 1`
7220 if test $ac_mid -le $ac_hi; then
7221 ac_lo= ac_hi=
7222 break
7223 fi
7224 ac_mid=`expr 2 '*' $ac_mid`
7225fi
7226rm -f conftest.$ac_objext conftest.$ac_ext
7227 done
7228else
7229 echo "$as_me: failed program was:" >&5
7230cat conftest.$ac_ext >&5
7231ac_lo= ac_hi=
7232fi
7233rm -f conftest.$ac_objext conftest.$ac_ext
7234fi
7235rm -f conftest.$ac_objext conftest.$ac_ext
7236# Binary search between lo and hi bounds.
7237while test "x$ac_lo" != "x$ac_hi"; do
7238 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7239 cat >conftest.$ac_ext <<_ACEOF
7240#line $LINENO "configure"
7241#include "confdefs.h"
7242$ac_includes_default
7243#ifdef F77_DUMMY_MAIN
7244# ifdef __cplusplus
7245 extern "C"
7246# endif
7247 int F77_DUMMY_MAIN() { return 1; }
7248#endif
7249int
7250main ()
7251{
7252static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7253test_array [0] = 0
7254
7255 ;
7256 return 0;
7257}
7258_ACEOF
7259rm -f conftest.$ac_objext
7260if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7261 (eval $ac_compile) 2>&5
7262 ac_status=$?
7263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7264 (exit $ac_status); } &&
7265 { ac_try='test -s conftest.$ac_objext'
7266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7267 (eval $ac_try) 2>&5
7268 ac_status=$?
7269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7270 (exit $ac_status); }; }; then
7271 ac_hi=$ac_mid
7272else
7273 echo "$as_me: failed program was:" >&5
7274cat conftest.$ac_ext >&5
7275ac_lo=`expr '(' $ac_mid ')' + 1`
7276fi
7277rm -f conftest.$ac_objext conftest.$ac_ext
7278done
7279case $ac_lo in
7280?*) ac_cv_sizeof_float=$ac_lo;;
7281'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7282echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7283 { (exit 1); exit 1; }; } ;;
7284esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007285else
7286 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007287 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7288echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7289 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007290else
Martin v. Löwis11437992002-04-12 09:54:03 +00007291 cat >conftest.$ac_ext <<_ACEOF
7292#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007293#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007294$ac_includes_default
7295long longval () { return (long) (sizeof (float)); }
7296unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007297#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007298#include <stdlib.h>
7299#ifdef F77_DUMMY_MAIN
7300# ifdef __cplusplus
7301 extern "C"
7302# endif
7303 int F77_DUMMY_MAIN() { return 1; }
7304#endif
7305int
7306main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007307{
Martin v. Löwis11437992002-04-12 09:54:03 +00007308
7309 FILE *f = fopen ("conftest.val", "w");
7310 if (! f)
7311 exit (1);
7312 if (((long) (sizeof (float))) < 0)
7313 {
7314 long i = longval ();
7315 if (i != ((long) (sizeof (float))))
7316 exit (1);
7317 fprintf (f, "%ld\n", i);
7318 }
7319 else
7320 {
7321 unsigned long i = ulongval ();
7322 if (i != ((long) (sizeof (float))))
7323 exit (1);
7324 fprintf (f, "%lu\n", i);
7325 }
7326 exit (ferror (f) || fclose (f) != 0);
7327
7328 ;
7329 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007330}
Martin v. Löwis11437992002-04-12 09:54:03 +00007331_ACEOF
7332rm -f conftest$ac_exeext
7333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7334 (eval $ac_link) 2>&5
7335 ac_status=$?
7336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7337 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7339 (eval $ac_try) 2>&5
7340 ac_status=$?
7341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7342 (exit $ac_status); }; }; then
7343 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007344else
Martin v. Löwis11437992002-04-12 09:54:03 +00007345 echo "$as_me: program exited with status $ac_status" >&5
7346echo "$as_me: failed program was:" >&5
7347cat conftest.$ac_ext >&5
7348( exit $ac_status )
7349{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7350echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7351 { (exit 1); exit 1; }; }
7352fi
7353rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7354fi
7355fi
7356rm -f conftest.val
7357else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007358 ac_cv_sizeof_float=0
7359fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007360fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007361echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7362echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7363cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007364#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007365_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007366
7367
Martin v. Löwis11437992002-04-12 09:54:03 +00007368echo "$as_me:$LINENO: checking for double" >&5
7369echo $ECHO_N "checking for double... $ECHO_C" >&6
7370if test "${ac_cv_type_double+set}" = set; then
7371 echo $ECHO_N "(cached) $ECHO_C" >&6
7372else
7373 cat >conftest.$ac_ext <<_ACEOF
7374#line $LINENO "configure"
7375#include "confdefs.h"
7376$ac_includes_default
7377#ifdef F77_DUMMY_MAIN
7378# ifdef __cplusplus
7379 extern "C"
7380# endif
7381 int F77_DUMMY_MAIN() { return 1; }
7382#endif
7383int
7384main ()
7385{
7386if ((double *) 0)
7387 return 0;
7388if (sizeof (double))
7389 return 0;
7390 ;
7391 return 0;
7392}
7393_ACEOF
7394rm -f conftest.$ac_objext
7395if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7396 (eval $ac_compile) 2>&5
7397 ac_status=$?
7398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7399 (exit $ac_status); } &&
7400 { ac_try='test -s conftest.$ac_objext'
7401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7402 (eval $ac_try) 2>&5
7403 ac_status=$?
7404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7405 (exit $ac_status); }; }; then
7406 ac_cv_type_double=yes
7407else
7408 echo "$as_me: failed program was:" >&5
7409cat conftest.$ac_ext >&5
7410ac_cv_type_double=no
7411fi
7412rm -f conftest.$ac_objext conftest.$ac_ext
7413fi
7414echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7415echo "${ECHO_T}$ac_cv_type_double" >&6
7416
7417echo "$as_me:$LINENO: checking size of double" >&5
7418echo $ECHO_N "checking size of double... $ECHO_C" >&6
7419if test "${ac_cv_sizeof_double+set}" = set; then
7420 echo $ECHO_N "(cached) $ECHO_C" >&6
7421else
7422 if test "$ac_cv_type_double" = yes; then
7423 # The cast to unsigned long works around a bug in the HP C Compiler
7424 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7425 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7426 # This bug is HP SR number 8606223364.
7427 if test "$cross_compiling" = yes; then
7428 # Depending upon the size, compute the lo and hi bounds.
7429cat >conftest.$ac_ext <<_ACEOF
7430#line $LINENO "configure"
7431#include "confdefs.h"
7432$ac_includes_default
7433#ifdef F77_DUMMY_MAIN
7434# ifdef __cplusplus
7435 extern "C"
7436# endif
7437 int F77_DUMMY_MAIN() { return 1; }
7438#endif
7439int
7440main ()
7441{
7442static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7443test_array [0] = 0
7444
7445 ;
7446 return 0;
7447}
7448_ACEOF
7449rm -f conftest.$ac_objext
7450if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7451 (eval $ac_compile) 2>&5
7452 ac_status=$?
7453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7454 (exit $ac_status); } &&
7455 { ac_try='test -s conftest.$ac_objext'
7456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7457 (eval $ac_try) 2>&5
7458 ac_status=$?
7459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7460 (exit $ac_status); }; }; then
7461 ac_lo=0 ac_mid=0
7462 while :; do
7463 cat >conftest.$ac_ext <<_ACEOF
7464#line $LINENO "configure"
7465#include "confdefs.h"
7466$ac_includes_default
7467#ifdef F77_DUMMY_MAIN
7468# ifdef __cplusplus
7469 extern "C"
7470# endif
7471 int F77_DUMMY_MAIN() { return 1; }
7472#endif
7473int
7474main ()
7475{
7476static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7477test_array [0] = 0
7478
7479 ;
7480 return 0;
7481}
7482_ACEOF
7483rm -f conftest.$ac_objext
7484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7485 (eval $ac_compile) 2>&5
7486 ac_status=$?
7487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7488 (exit $ac_status); } &&
7489 { ac_try='test -s conftest.$ac_objext'
7490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7491 (eval $ac_try) 2>&5
7492 ac_status=$?
7493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7494 (exit $ac_status); }; }; then
7495 ac_hi=$ac_mid; break
7496else
7497 echo "$as_me: failed program was:" >&5
7498cat conftest.$ac_ext >&5
7499ac_lo=`expr $ac_mid + 1`
7500 if test $ac_lo -le $ac_mid; then
7501 ac_lo= ac_hi=
7502 break
7503 fi
7504 ac_mid=`expr 2 '*' $ac_mid + 1`
7505fi
7506rm -f conftest.$ac_objext conftest.$ac_ext
7507 done
7508else
7509 echo "$as_me: failed program was:" >&5
7510cat conftest.$ac_ext >&5
7511cat >conftest.$ac_ext <<_ACEOF
7512#line $LINENO "configure"
7513#include "confdefs.h"
7514$ac_includes_default
7515#ifdef F77_DUMMY_MAIN
7516# ifdef __cplusplus
7517 extern "C"
7518# endif
7519 int F77_DUMMY_MAIN() { return 1; }
7520#endif
7521int
7522main ()
7523{
7524static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7525test_array [0] = 0
7526
7527 ;
7528 return 0;
7529}
7530_ACEOF
7531rm -f conftest.$ac_objext
7532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7533 (eval $ac_compile) 2>&5
7534 ac_status=$?
7535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7536 (exit $ac_status); } &&
7537 { ac_try='test -s conftest.$ac_objext'
7538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7539 (eval $ac_try) 2>&5
7540 ac_status=$?
7541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7542 (exit $ac_status); }; }; then
7543 ac_hi=-1 ac_mid=-1
7544 while :; do
7545 cat >conftest.$ac_ext <<_ACEOF
7546#line $LINENO "configure"
7547#include "confdefs.h"
7548$ac_includes_default
7549#ifdef F77_DUMMY_MAIN
7550# ifdef __cplusplus
7551 extern "C"
7552# endif
7553 int F77_DUMMY_MAIN() { return 1; }
7554#endif
7555int
7556main ()
7557{
7558static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7559test_array [0] = 0
7560
7561 ;
7562 return 0;
7563}
7564_ACEOF
7565rm -f conftest.$ac_objext
7566if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7567 (eval $ac_compile) 2>&5
7568 ac_status=$?
7569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7570 (exit $ac_status); } &&
7571 { ac_try='test -s conftest.$ac_objext'
7572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7573 (eval $ac_try) 2>&5
7574 ac_status=$?
7575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7576 (exit $ac_status); }; }; then
7577 ac_lo=$ac_mid; break
7578else
7579 echo "$as_me: failed program was:" >&5
7580cat conftest.$ac_ext >&5
7581ac_hi=`expr '(' $ac_mid ')' - 1`
7582 if test $ac_mid -le $ac_hi; then
7583 ac_lo= ac_hi=
7584 break
7585 fi
7586 ac_mid=`expr 2 '*' $ac_mid`
7587fi
7588rm -f conftest.$ac_objext conftest.$ac_ext
7589 done
7590else
7591 echo "$as_me: failed program was:" >&5
7592cat conftest.$ac_ext >&5
7593ac_lo= ac_hi=
7594fi
7595rm -f conftest.$ac_objext conftest.$ac_ext
7596fi
7597rm -f conftest.$ac_objext conftest.$ac_ext
7598# Binary search between lo and hi bounds.
7599while test "x$ac_lo" != "x$ac_hi"; do
7600 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7601 cat >conftest.$ac_ext <<_ACEOF
7602#line $LINENO "configure"
7603#include "confdefs.h"
7604$ac_includes_default
7605#ifdef F77_DUMMY_MAIN
7606# ifdef __cplusplus
7607 extern "C"
7608# endif
7609 int F77_DUMMY_MAIN() { return 1; }
7610#endif
7611int
7612main ()
7613{
7614static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7615test_array [0] = 0
7616
7617 ;
7618 return 0;
7619}
7620_ACEOF
7621rm -f conftest.$ac_objext
7622if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7623 (eval $ac_compile) 2>&5
7624 ac_status=$?
7625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7626 (exit $ac_status); } &&
7627 { ac_try='test -s conftest.$ac_objext'
7628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7629 (eval $ac_try) 2>&5
7630 ac_status=$?
7631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7632 (exit $ac_status); }; }; then
7633 ac_hi=$ac_mid
7634else
7635 echo "$as_me: failed program was:" >&5
7636cat conftest.$ac_ext >&5
7637ac_lo=`expr '(' $ac_mid ')' + 1`
7638fi
7639rm -f conftest.$ac_objext conftest.$ac_ext
7640done
7641case $ac_lo in
7642?*) ac_cv_sizeof_double=$ac_lo;;
7643'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7644echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7645 { (exit 1); exit 1; }; } ;;
7646esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007647else
7648 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007649 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7650echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7651 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007652else
Martin v. Löwis11437992002-04-12 09:54:03 +00007653 cat >conftest.$ac_ext <<_ACEOF
7654#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007655#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007656$ac_includes_default
7657long longval () { return (long) (sizeof (double)); }
7658unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007659#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007660#include <stdlib.h>
7661#ifdef F77_DUMMY_MAIN
7662# ifdef __cplusplus
7663 extern "C"
7664# endif
7665 int F77_DUMMY_MAIN() { return 1; }
7666#endif
7667int
7668main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007669{
Martin v. Löwis11437992002-04-12 09:54:03 +00007670
7671 FILE *f = fopen ("conftest.val", "w");
7672 if (! f)
7673 exit (1);
7674 if (((long) (sizeof (double))) < 0)
7675 {
7676 long i = longval ();
7677 if (i != ((long) (sizeof (double))))
7678 exit (1);
7679 fprintf (f, "%ld\n", i);
7680 }
7681 else
7682 {
7683 unsigned long i = ulongval ();
7684 if (i != ((long) (sizeof (double))))
7685 exit (1);
7686 fprintf (f, "%lu\n", i);
7687 }
7688 exit (ferror (f) || fclose (f) != 0);
7689
7690 ;
7691 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007692}
Martin v. Löwis11437992002-04-12 09:54:03 +00007693_ACEOF
7694rm -f conftest$ac_exeext
7695if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7696 (eval $ac_link) 2>&5
7697 ac_status=$?
7698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7699 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7701 (eval $ac_try) 2>&5
7702 ac_status=$?
7703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7704 (exit $ac_status); }; }; then
7705 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007706else
Martin v. Löwis11437992002-04-12 09:54:03 +00007707 echo "$as_me: program exited with status $ac_status" >&5
7708echo "$as_me: failed program was:" >&5
7709cat conftest.$ac_ext >&5
7710( exit $ac_status )
7711{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7712echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7713 { (exit 1); exit 1; }; }
7714fi
7715rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7716fi
7717fi
7718rm -f conftest.val
7719else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007720 ac_cv_sizeof_double=0
7721fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007722fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007723echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7724echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7725cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007726#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007727_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007728
7729
Martin v. Löwis11437992002-04-12 09:54:03 +00007730echo "$as_me:$LINENO: checking for fpos_t" >&5
7731echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7732if test "${ac_cv_type_fpos_t+set}" = set; then
7733 echo $ECHO_N "(cached) $ECHO_C" >&6
7734else
7735 cat >conftest.$ac_ext <<_ACEOF
7736#line $LINENO "configure"
7737#include "confdefs.h"
7738$ac_includes_default
7739#ifdef F77_DUMMY_MAIN
7740# ifdef __cplusplus
7741 extern "C"
7742# endif
7743 int F77_DUMMY_MAIN() { return 1; }
7744#endif
7745int
7746main ()
7747{
7748if ((fpos_t *) 0)
7749 return 0;
7750if (sizeof (fpos_t))
7751 return 0;
7752 ;
7753 return 0;
7754}
7755_ACEOF
7756rm -f conftest.$ac_objext
7757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7758 (eval $ac_compile) 2>&5
7759 ac_status=$?
7760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7761 (exit $ac_status); } &&
7762 { ac_try='test -s conftest.$ac_objext'
7763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7764 (eval $ac_try) 2>&5
7765 ac_status=$?
7766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7767 (exit $ac_status); }; }; then
7768 ac_cv_type_fpos_t=yes
7769else
7770 echo "$as_me: failed program was:" >&5
7771cat conftest.$ac_ext >&5
7772ac_cv_type_fpos_t=no
7773fi
7774rm -f conftest.$ac_objext conftest.$ac_ext
7775fi
7776echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7777echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7778
7779echo "$as_me:$LINENO: checking size of fpos_t" >&5
7780echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7781if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7782 echo $ECHO_N "(cached) $ECHO_C" >&6
7783else
7784 if test "$ac_cv_type_fpos_t" = yes; then
7785 # The cast to unsigned long works around a bug in the HP C Compiler
7786 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7787 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7788 # This bug is HP SR number 8606223364.
7789 if test "$cross_compiling" = yes; then
7790 # Depending upon the size, compute the lo and hi bounds.
7791cat >conftest.$ac_ext <<_ACEOF
7792#line $LINENO "configure"
7793#include "confdefs.h"
7794$ac_includes_default
7795#ifdef F77_DUMMY_MAIN
7796# ifdef __cplusplus
7797 extern "C"
7798# endif
7799 int F77_DUMMY_MAIN() { return 1; }
7800#endif
7801int
7802main ()
7803{
7804static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7805test_array [0] = 0
7806
7807 ;
7808 return 0;
7809}
7810_ACEOF
7811rm -f conftest.$ac_objext
7812if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7813 (eval $ac_compile) 2>&5
7814 ac_status=$?
7815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7816 (exit $ac_status); } &&
7817 { ac_try='test -s conftest.$ac_objext'
7818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7819 (eval $ac_try) 2>&5
7820 ac_status=$?
7821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7822 (exit $ac_status); }; }; then
7823 ac_lo=0 ac_mid=0
7824 while :; do
7825 cat >conftest.$ac_ext <<_ACEOF
7826#line $LINENO "configure"
7827#include "confdefs.h"
7828$ac_includes_default
7829#ifdef F77_DUMMY_MAIN
7830# ifdef __cplusplus
7831 extern "C"
7832# endif
7833 int F77_DUMMY_MAIN() { return 1; }
7834#endif
7835int
7836main ()
7837{
7838static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7839test_array [0] = 0
7840
7841 ;
7842 return 0;
7843}
7844_ACEOF
7845rm -f conftest.$ac_objext
7846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7847 (eval $ac_compile) 2>&5
7848 ac_status=$?
7849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7850 (exit $ac_status); } &&
7851 { ac_try='test -s conftest.$ac_objext'
7852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7853 (eval $ac_try) 2>&5
7854 ac_status=$?
7855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7856 (exit $ac_status); }; }; then
7857 ac_hi=$ac_mid; break
7858else
7859 echo "$as_me: failed program was:" >&5
7860cat conftest.$ac_ext >&5
7861ac_lo=`expr $ac_mid + 1`
7862 if test $ac_lo -le $ac_mid; then
7863 ac_lo= ac_hi=
7864 break
7865 fi
7866 ac_mid=`expr 2 '*' $ac_mid + 1`
7867fi
7868rm -f conftest.$ac_objext conftest.$ac_ext
7869 done
7870else
7871 echo "$as_me: failed program was:" >&5
7872cat conftest.$ac_ext >&5
7873cat >conftest.$ac_ext <<_ACEOF
7874#line $LINENO "configure"
7875#include "confdefs.h"
7876$ac_includes_default
7877#ifdef F77_DUMMY_MAIN
7878# ifdef __cplusplus
7879 extern "C"
7880# endif
7881 int F77_DUMMY_MAIN() { return 1; }
7882#endif
7883int
7884main ()
7885{
7886static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7887test_array [0] = 0
7888
7889 ;
7890 return 0;
7891}
7892_ACEOF
7893rm -f conftest.$ac_objext
7894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7895 (eval $ac_compile) 2>&5
7896 ac_status=$?
7897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7898 (exit $ac_status); } &&
7899 { ac_try='test -s conftest.$ac_objext'
7900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7901 (eval $ac_try) 2>&5
7902 ac_status=$?
7903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7904 (exit $ac_status); }; }; then
7905 ac_hi=-1 ac_mid=-1
7906 while :; do
7907 cat >conftest.$ac_ext <<_ACEOF
7908#line $LINENO "configure"
7909#include "confdefs.h"
7910$ac_includes_default
7911#ifdef F77_DUMMY_MAIN
7912# ifdef __cplusplus
7913 extern "C"
7914# endif
7915 int F77_DUMMY_MAIN() { return 1; }
7916#endif
7917int
7918main ()
7919{
7920static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7921test_array [0] = 0
7922
7923 ;
7924 return 0;
7925}
7926_ACEOF
7927rm -f conftest.$ac_objext
7928if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7929 (eval $ac_compile) 2>&5
7930 ac_status=$?
7931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7932 (exit $ac_status); } &&
7933 { ac_try='test -s conftest.$ac_objext'
7934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7935 (eval $ac_try) 2>&5
7936 ac_status=$?
7937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7938 (exit $ac_status); }; }; then
7939 ac_lo=$ac_mid; break
7940else
7941 echo "$as_me: failed program was:" >&5
7942cat conftest.$ac_ext >&5
7943ac_hi=`expr '(' $ac_mid ')' - 1`
7944 if test $ac_mid -le $ac_hi; then
7945 ac_lo= ac_hi=
7946 break
7947 fi
7948 ac_mid=`expr 2 '*' $ac_mid`
7949fi
7950rm -f conftest.$ac_objext conftest.$ac_ext
7951 done
7952else
7953 echo "$as_me: failed program was:" >&5
7954cat conftest.$ac_ext >&5
7955ac_lo= ac_hi=
7956fi
7957rm -f conftest.$ac_objext conftest.$ac_ext
7958fi
7959rm -f conftest.$ac_objext conftest.$ac_ext
7960# Binary search between lo and hi bounds.
7961while test "x$ac_lo" != "x$ac_hi"; do
7962 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7963 cat >conftest.$ac_ext <<_ACEOF
7964#line $LINENO "configure"
7965#include "confdefs.h"
7966$ac_includes_default
7967#ifdef F77_DUMMY_MAIN
7968# ifdef __cplusplus
7969 extern "C"
7970# endif
7971 int F77_DUMMY_MAIN() { return 1; }
7972#endif
7973int
7974main ()
7975{
7976static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7977test_array [0] = 0
7978
7979 ;
7980 return 0;
7981}
7982_ACEOF
7983rm -f conftest.$ac_objext
7984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7985 (eval $ac_compile) 2>&5
7986 ac_status=$?
7987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7988 (exit $ac_status); } &&
7989 { ac_try='test -s conftest.$ac_objext'
7990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7991 (eval $ac_try) 2>&5
7992 ac_status=$?
7993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7994 (exit $ac_status); }; }; then
7995 ac_hi=$ac_mid
7996else
7997 echo "$as_me: failed program was:" >&5
7998cat conftest.$ac_ext >&5
7999ac_lo=`expr '(' $ac_mid ')' + 1`
8000fi
8001rm -f conftest.$ac_objext conftest.$ac_ext
8002done
8003case $ac_lo in
8004?*) ac_cv_sizeof_fpos_t=$ac_lo;;
8005'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8006echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8007 { (exit 1); exit 1; }; } ;;
8008esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008009else
8010 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008011 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8012echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8013 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008014else
Martin v. Löwis11437992002-04-12 09:54:03 +00008015 cat >conftest.$ac_ext <<_ACEOF
8016#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008017#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008018$ac_includes_default
8019long longval () { return (long) (sizeof (fpos_t)); }
8020unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008021#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008022#include <stdlib.h>
8023#ifdef F77_DUMMY_MAIN
8024# ifdef __cplusplus
8025 extern "C"
8026# endif
8027 int F77_DUMMY_MAIN() { return 1; }
8028#endif
8029int
8030main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008031{
Martin v. Löwis11437992002-04-12 09:54:03 +00008032
8033 FILE *f = fopen ("conftest.val", "w");
8034 if (! f)
8035 exit (1);
8036 if (((long) (sizeof (fpos_t))) < 0)
8037 {
8038 long i = longval ();
8039 if (i != ((long) (sizeof (fpos_t))))
8040 exit (1);
8041 fprintf (f, "%ld\n", i);
8042 }
8043 else
8044 {
8045 unsigned long i = ulongval ();
8046 if (i != ((long) (sizeof (fpos_t))))
8047 exit (1);
8048 fprintf (f, "%lu\n", i);
8049 }
8050 exit (ferror (f) || fclose (f) != 0);
8051
8052 ;
8053 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008054}
Martin v. Löwis11437992002-04-12 09:54:03 +00008055_ACEOF
8056rm -f conftest$ac_exeext
8057if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8058 (eval $ac_link) 2>&5
8059 ac_status=$?
8060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8061 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8063 (eval $ac_try) 2>&5
8064 ac_status=$?
8065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8066 (exit $ac_status); }; }; then
8067 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008068else
Martin v. Löwis11437992002-04-12 09:54:03 +00008069 echo "$as_me: program exited with status $ac_status" >&5
8070echo "$as_me: failed program was:" >&5
8071cat conftest.$ac_ext >&5
8072( exit $ac_status )
8073{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8074echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8075 { (exit 1); exit 1; }; }
8076fi
8077rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8078fi
8079fi
8080rm -f conftest.val
8081else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008082 ac_cv_sizeof_fpos_t=0
8083fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008084fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008085echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8086echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8087cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008088#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008089_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008090
Michael W. Hudson54241132001-12-07 15:38:26 +00008091
8092
Martin v. Löwis11437992002-04-12 09:54:03 +00008093echo "$as_me:$LINENO: checking for long long support" >&5
8094echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008095have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008096cat >conftest.$ac_ext <<_ACEOF
8097#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008098#include "confdefs.h"
8099
Martin v. Löwis11437992002-04-12 09:54:03 +00008100#ifdef F77_DUMMY_MAIN
8101# ifdef __cplusplus
8102 extern "C"
8103# endif
8104 int F77_DUMMY_MAIN() { return 1; }
8105#endif
8106int
8107main ()
8108{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008109long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008110 ;
8111 return 0;
8112}
8113_ACEOF
8114rm -f conftest.$ac_objext
8115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8116 (eval $ac_compile) 2>&5
8117 ac_status=$?
8118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8119 (exit $ac_status); } &&
8120 { ac_try='test -s conftest.$ac_objext'
8121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8122 (eval $ac_try) 2>&5
8123 ac_status=$?
8124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8125 (exit $ac_status); }; }; then
8126
8127
8128cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008129#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008130_ACEOF
8131
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008132 have_long_long=yes
8133
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008134else
Martin v. Löwis11437992002-04-12 09:54:03 +00008135 echo "$as_me: failed program was:" >&5
8136cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008137fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008138rm -f conftest.$ac_objext conftest.$ac_ext
8139echo "$as_me:$LINENO: result: $have_long_long" >&5
8140echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008141if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008142echo "$as_me:$LINENO: checking for long long" >&5
8143echo $ECHO_N "checking for long long... $ECHO_C" >&6
8144if test "${ac_cv_type_long_long+set}" = set; then
8145 echo $ECHO_N "(cached) $ECHO_C" >&6
8146else
8147 cat >conftest.$ac_ext <<_ACEOF
8148#line $LINENO "configure"
8149#include "confdefs.h"
8150$ac_includes_default
8151#ifdef F77_DUMMY_MAIN
8152# ifdef __cplusplus
8153 extern "C"
8154# endif
8155 int F77_DUMMY_MAIN() { return 1; }
8156#endif
8157int
8158main ()
8159{
8160if ((long long *) 0)
8161 return 0;
8162if (sizeof (long long))
8163 return 0;
8164 ;
8165 return 0;
8166}
8167_ACEOF
8168rm -f conftest.$ac_objext
8169if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8170 (eval $ac_compile) 2>&5
8171 ac_status=$?
8172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8173 (exit $ac_status); } &&
8174 { ac_try='test -s conftest.$ac_objext'
8175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8176 (eval $ac_try) 2>&5
8177 ac_status=$?
8178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8179 (exit $ac_status); }; }; then
8180 ac_cv_type_long_long=yes
8181else
8182 echo "$as_me: failed program was:" >&5
8183cat conftest.$ac_ext >&5
8184ac_cv_type_long_long=no
8185fi
8186rm -f conftest.$ac_objext conftest.$ac_ext
8187fi
8188echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8189echo "${ECHO_T}$ac_cv_type_long_long" >&6
8190
8191echo "$as_me:$LINENO: checking size of long long" >&5
8192echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8193if test "${ac_cv_sizeof_long_long+set}" = set; then
8194 echo $ECHO_N "(cached) $ECHO_C" >&6
8195else
8196 if test "$ac_cv_type_long_long" = yes; then
8197 # The cast to unsigned long works around a bug in the HP C Compiler
8198 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8199 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8200 # This bug is HP SR number 8606223364.
8201 if test "$cross_compiling" = yes; then
8202 # Depending upon the size, compute the lo and hi bounds.
8203cat >conftest.$ac_ext <<_ACEOF
8204#line $LINENO "configure"
8205#include "confdefs.h"
8206$ac_includes_default
8207#ifdef F77_DUMMY_MAIN
8208# ifdef __cplusplus
8209 extern "C"
8210# endif
8211 int F77_DUMMY_MAIN() { return 1; }
8212#endif
8213int
8214main ()
8215{
8216static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8217test_array [0] = 0
8218
8219 ;
8220 return 0;
8221}
8222_ACEOF
8223rm -f conftest.$ac_objext
8224if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8225 (eval $ac_compile) 2>&5
8226 ac_status=$?
8227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8228 (exit $ac_status); } &&
8229 { ac_try='test -s conftest.$ac_objext'
8230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8231 (eval $ac_try) 2>&5
8232 ac_status=$?
8233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8234 (exit $ac_status); }; }; then
8235 ac_lo=0 ac_mid=0
8236 while :; do
8237 cat >conftest.$ac_ext <<_ACEOF
8238#line $LINENO "configure"
8239#include "confdefs.h"
8240$ac_includes_default
8241#ifdef F77_DUMMY_MAIN
8242# ifdef __cplusplus
8243 extern "C"
8244# endif
8245 int F77_DUMMY_MAIN() { return 1; }
8246#endif
8247int
8248main ()
8249{
8250static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8251test_array [0] = 0
8252
8253 ;
8254 return 0;
8255}
8256_ACEOF
8257rm -f conftest.$ac_objext
8258if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8259 (eval $ac_compile) 2>&5
8260 ac_status=$?
8261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8262 (exit $ac_status); } &&
8263 { ac_try='test -s conftest.$ac_objext'
8264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8265 (eval $ac_try) 2>&5
8266 ac_status=$?
8267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8268 (exit $ac_status); }; }; then
8269 ac_hi=$ac_mid; break
8270else
8271 echo "$as_me: failed program was:" >&5
8272cat conftest.$ac_ext >&5
8273ac_lo=`expr $ac_mid + 1`
8274 if test $ac_lo -le $ac_mid; then
8275 ac_lo= ac_hi=
8276 break
8277 fi
8278 ac_mid=`expr 2 '*' $ac_mid + 1`
8279fi
8280rm -f conftest.$ac_objext conftest.$ac_ext
8281 done
8282else
8283 echo "$as_me: failed program was:" >&5
8284cat conftest.$ac_ext >&5
8285cat >conftest.$ac_ext <<_ACEOF
8286#line $LINENO "configure"
8287#include "confdefs.h"
8288$ac_includes_default
8289#ifdef F77_DUMMY_MAIN
8290# ifdef __cplusplus
8291 extern "C"
8292# endif
8293 int F77_DUMMY_MAIN() { return 1; }
8294#endif
8295int
8296main ()
8297{
8298static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8299test_array [0] = 0
8300
8301 ;
8302 return 0;
8303}
8304_ACEOF
8305rm -f conftest.$ac_objext
8306if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8307 (eval $ac_compile) 2>&5
8308 ac_status=$?
8309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8310 (exit $ac_status); } &&
8311 { ac_try='test -s conftest.$ac_objext'
8312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8313 (eval $ac_try) 2>&5
8314 ac_status=$?
8315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8316 (exit $ac_status); }; }; then
8317 ac_hi=-1 ac_mid=-1
8318 while :; do
8319 cat >conftest.$ac_ext <<_ACEOF
8320#line $LINENO "configure"
8321#include "confdefs.h"
8322$ac_includes_default
8323#ifdef F77_DUMMY_MAIN
8324# ifdef __cplusplus
8325 extern "C"
8326# endif
8327 int F77_DUMMY_MAIN() { return 1; }
8328#endif
8329int
8330main ()
8331{
8332static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8333test_array [0] = 0
8334
8335 ;
8336 return 0;
8337}
8338_ACEOF
8339rm -f conftest.$ac_objext
8340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8341 (eval $ac_compile) 2>&5
8342 ac_status=$?
8343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8344 (exit $ac_status); } &&
8345 { ac_try='test -s conftest.$ac_objext'
8346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8347 (eval $ac_try) 2>&5
8348 ac_status=$?
8349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8350 (exit $ac_status); }; }; then
8351 ac_lo=$ac_mid; break
8352else
8353 echo "$as_me: failed program was:" >&5
8354cat conftest.$ac_ext >&5
8355ac_hi=`expr '(' $ac_mid ')' - 1`
8356 if test $ac_mid -le $ac_hi; then
8357 ac_lo= ac_hi=
8358 break
8359 fi
8360 ac_mid=`expr 2 '*' $ac_mid`
8361fi
8362rm -f conftest.$ac_objext conftest.$ac_ext
8363 done
8364else
8365 echo "$as_me: failed program was:" >&5
8366cat conftest.$ac_ext >&5
8367ac_lo= ac_hi=
8368fi
8369rm -f conftest.$ac_objext conftest.$ac_ext
8370fi
8371rm -f conftest.$ac_objext conftest.$ac_ext
8372# Binary search between lo and hi bounds.
8373while test "x$ac_lo" != "x$ac_hi"; do
8374 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8375 cat >conftest.$ac_ext <<_ACEOF
8376#line $LINENO "configure"
8377#include "confdefs.h"
8378$ac_includes_default
8379#ifdef F77_DUMMY_MAIN
8380# ifdef __cplusplus
8381 extern "C"
8382# endif
8383 int F77_DUMMY_MAIN() { return 1; }
8384#endif
8385int
8386main ()
8387{
8388static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8389test_array [0] = 0
8390
8391 ;
8392 return 0;
8393}
8394_ACEOF
8395rm -f conftest.$ac_objext
8396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8397 (eval $ac_compile) 2>&5
8398 ac_status=$?
8399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8400 (exit $ac_status); } &&
8401 { ac_try='test -s conftest.$ac_objext'
8402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8403 (eval $ac_try) 2>&5
8404 ac_status=$?
8405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8406 (exit $ac_status); }; }; then
8407 ac_hi=$ac_mid
8408else
8409 echo "$as_me: failed program was:" >&5
8410cat conftest.$ac_ext >&5
8411ac_lo=`expr '(' $ac_mid ')' + 1`
8412fi
8413rm -f conftest.$ac_objext conftest.$ac_ext
8414done
8415case $ac_lo in
8416?*) ac_cv_sizeof_long_long=$ac_lo;;
8417'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8418echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8419 { (exit 1); exit 1; }; } ;;
8420esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008421else
8422 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008423 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8424echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8425 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008426else
Martin v. Löwis11437992002-04-12 09:54:03 +00008427 cat >conftest.$ac_ext <<_ACEOF
8428#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008429#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008430$ac_includes_default
8431long longval () { return (long) (sizeof (long long)); }
8432unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008433#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008434#include <stdlib.h>
8435#ifdef F77_DUMMY_MAIN
8436# ifdef __cplusplus
8437 extern "C"
8438# endif
8439 int F77_DUMMY_MAIN() { return 1; }
8440#endif
8441int
8442main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008443{
Martin v. Löwis11437992002-04-12 09:54:03 +00008444
8445 FILE *f = fopen ("conftest.val", "w");
8446 if (! f)
8447 exit (1);
8448 if (((long) (sizeof (long long))) < 0)
8449 {
8450 long i = longval ();
8451 if (i != ((long) (sizeof (long long))))
8452 exit (1);
8453 fprintf (f, "%ld\n", i);
8454 }
8455 else
8456 {
8457 unsigned long i = ulongval ();
8458 if (i != ((long) (sizeof (long long))))
8459 exit (1);
8460 fprintf (f, "%lu\n", i);
8461 }
8462 exit (ferror (f) || fclose (f) != 0);
8463
8464 ;
8465 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008466}
Martin v. Löwis11437992002-04-12 09:54:03 +00008467_ACEOF
8468rm -f conftest$ac_exeext
8469if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8470 (eval $ac_link) 2>&5
8471 ac_status=$?
8472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8473 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8475 (eval $ac_try) 2>&5
8476 ac_status=$?
8477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8478 (exit $ac_status); }; }; then
8479 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008480else
Martin v. Löwis11437992002-04-12 09:54:03 +00008481 echo "$as_me: program exited with status $ac_status" >&5
8482echo "$as_me: failed program was:" >&5
8483cat conftest.$ac_ext >&5
8484( exit $ac_status )
8485{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8486echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8487 { (exit 1); exit 1; }; }
8488fi
8489rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8490fi
8491fi
8492rm -f conftest.val
8493else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008494 ac_cv_sizeof_long_long=0
8495fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008496fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008497echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8498echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8499cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008500#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008501_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008502
Michael W. Hudson54241132001-12-07 15:38:26 +00008503
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008504fi
8505
Martin v. Löwis11437992002-04-12 09:54:03 +00008506echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8507echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008508have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008509cat >conftest.$ac_ext <<_ACEOF
8510#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008511#include "confdefs.h"
8512
Martin v. Löwis11437992002-04-12 09:54:03 +00008513#ifdef F77_DUMMY_MAIN
8514# ifdef __cplusplus
8515 extern "C"
8516# endif
8517 int F77_DUMMY_MAIN() { return 1; }
8518#endif
8519int
8520main ()
8521{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008522uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008523 ;
8524 return 0;
8525}
8526_ACEOF
8527rm -f conftest.$ac_objext
8528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8529 (eval $ac_compile) 2>&5
8530 ac_status=$?
8531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8532 (exit $ac_status); } &&
8533 { ac_try='test -s conftest.$ac_objext'
8534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8535 (eval $ac_try) 2>&5
8536 ac_status=$?
8537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8538 (exit $ac_status); }; }; then
8539
8540
8541cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008542#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008543_ACEOF
8544
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008545 have_uintptr_t=yes
8546
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008547else
Martin v. Löwis11437992002-04-12 09:54:03 +00008548 echo "$as_me: failed program was:" >&5
8549cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008550fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008551rm -f conftest.$ac_objext conftest.$ac_ext
8552echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8553echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008554if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008555echo "$as_me:$LINENO: checking for uintptr_t" >&5
8556echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8557if test "${ac_cv_type_uintptr_t+set}" = set; then
8558 echo $ECHO_N "(cached) $ECHO_C" >&6
8559else
8560 cat >conftest.$ac_ext <<_ACEOF
8561#line $LINENO "configure"
8562#include "confdefs.h"
8563$ac_includes_default
8564#ifdef F77_DUMMY_MAIN
8565# ifdef __cplusplus
8566 extern "C"
8567# endif
8568 int F77_DUMMY_MAIN() { return 1; }
8569#endif
8570int
8571main ()
8572{
8573if ((uintptr_t *) 0)
8574 return 0;
8575if (sizeof (uintptr_t))
8576 return 0;
8577 ;
8578 return 0;
8579}
8580_ACEOF
8581rm -f conftest.$ac_objext
8582if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8583 (eval $ac_compile) 2>&5
8584 ac_status=$?
8585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8586 (exit $ac_status); } &&
8587 { ac_try='test -s conftest.$ac_objext'
8588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8589 (eval $ac_try) 2>&5
8590 ac_status=$?
8591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8592 (exit $ac_status); }; }; then
8593 ac_cv_type_uintptr_t=yes
8594else
8595 echo "$as_me: failed program was:" >&5
8596cat conftest.$ac_ext >&5
8597ac_cv_type_uintptr_t=no
8598fi
8599rm -f conftest.$ac_objext conftest.$ac_ext
8600fi
8601echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8602echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8603
8604echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8605echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8606if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8607 echo $ECHO_N "(cached) $ECHO_C" >&6
8608else
8609 if test "$ac_cv_type_uintptr_t" = yes; then
8610 # The cast to unsigned long works around a bug in the HP C Compiler
8611 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8612 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8613 # This bug is HP SR number 8606223364.
8614 if test "$cross_compiling" = yes; then
8615 # Depending upon the size, compute the lo and hi bounds.
8616cat >conftest.$ac_ext <<_ACEOF
8617#line $LINENO "configure"
8618#include "confdefs.h"
8619$ac_includes_default
8620#ifdef F77_DUMMY_MAIN
8621# ifdef __cplusplus
8622 extern "C"
8623# endif
8624 int F77_DUMMY_MAIN() { return 1; }
8625#endif
8626int
8627main ()
8628{
8629static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8630test_array [0] = 0
8631
8632 ;
8633 return 0;
8634}
8635_ACEOF
8636rm -f conftest.$ac_objext
8637if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8638 (eval $ac_compile) 2>&5
8639 ac_status=$?
8640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8641 (exit $ac_status); } &&
8642 { ac_try='test -s conftest.$ac_objext'
8643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8644 (eval $ac_try) 2>&5
8645 ac_status=$?
8646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8647 (exit $ac_status); }; }; then
8648 ac_lo=0 ac_mid=0
8649 while :; do
8650 cat >conftest.$ac_ext <<_ACEOF
8651#line $LINENO "configure"
8652#include "confdefs.h"
8653$ac_includes_default
8654#ifdef F77_DUMMY_MAIN
8655# ifdef __cplusplus
8656 extern "C"
8657# endif
8658 int F77_DUMMY_MAIN() { return 1; }
8659#endif
8660int
8661main ()
8662{
8663static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8664test_array [0] = 0
8665
8666 ;
8667 return 0;
8668}
8669_ACEOF
8670rm -f conftest.$ac_objext
8671if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8672 (eval $ac_compile) 2>&5
8673 ac_status=$?
8674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8675 (exit $ac_status); } &&
8676 { ac_try='test -s conftest.$ac_objext'
8677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8678 (eval $ac_try) 2>&5
8679 ac_status=$?
8680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8681 (exit $ac_status); }; }; then
8682 ac_hi=$ac_mid; break
8683else
8684 echo "$as_me: failed program was:" >&5
8685cat conftest.$ac_ext >&5
8686ac_lo=`expr $ac_mid + 1`
8687 if test $ac_lo -le $ac_mid; then
8688 ac_lo= ac_hi=
8689 break
8690 fi
8691 ac_mid=`expr 2 '*' $ac_mid + 1`
8692fi
8693rm -f conftest.$ac_objext conftest.$ac_ext
8694 done
8695else
8696 echo "$as_me: failed program was:" >&5
8697cat conftest.$ac_ext >&5
8698cat >conftest.$ac_ext <<_ACEOF
8699#line $LINENO "configure"
8700#include "confdefs.h"
8701$ac_includes_default
8702#ifdef F77_DUMMY_MAIN
8703# ifdef __cplusplus
8704 extern "C"
8705# endif
8706 int F77_DUMMY_MAIN() { return 1; }
8707#endif
8708int
8709main ()
8710{
8711static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8712test_array [0] = 0
8713
8714 ;
8715 return 0;
8716}
8717_ACEOF
8718rm -f conftest.$ac_objext
8719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8720 (eval $ac_compile) 2>&5
8721 ac_status=$?
8722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8723 (exit $ac_status); } &&
8724 { ac_try='test -s conftest.$ac_objext'
8725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8726 (eval $ac_try) 2>&5
8727 ac_status=$?
8728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8729 (exit $ac_status); }; }; then
8730 ac_hi=-1 ac_mid=-1
8731 while :; do
8732 cat >conftest.$ac_ext <<_ACEOF
8733#line $LINENO "configure"
8734#include "confdefs.h"
8735$ac_includes_default
8736#ifdef F77_DUMMY_MAIN
8737# ifdef __cplusplus
8738 extern "C"
8739# endif
8740 int F77_DUMMY_MAIN() { return 1; }
8741#endif
8742int
8743main ()
8744{
8745static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8746test_array [0] = 0
8747
8748 ;
8749 return 0;
8750}
8751_ACEOF
8752rm -f conftest.$ac_objext
8753if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8754 (eval $ac_compile) 2>&5
8755 ac_status=$?
8756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8757 (exit $ac_status); } &&
8758 { ac_try='test -s conftest.$ac_objext'
8759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8760 (eval $ac_try) 2>&5
8761 ac_status=$?
8762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8763 (exit $ac_status); }; }; then
8764 ac_lo=$ac_mid; break
8765else
8766 echo "$as_me: failed program was:" >&5
8767cat conftest.$ac_ext >&5
8768ac_hi=`expr '(' $ac_mid ')' - 1`
8769 if test $ac_mid -le $ac_hi; then
8770 ac_lo= ac_hi=
8771 break
8772 fi
8773 ac_mid=`expr 2 '*' $ac_mid`
8774fi
8775rm -f conftest.$ac_objext conftest.$ac_ext
8776 done
8777else
8778 echo "$as_me: failed program was:" >&5
8779cat conftest.$ac_ext >&5
8780ac_lo= ac_hi=
8781fi
8782rm -f conftest.$ac_objext conftest.$ac_ext
8783fi
8784rm -f conftest.$ac_objext conftest.$ac_ext
8785# Binary search between lo and hi bounds.
8786while test "x$ac_lo" != "x$ac_hi"; do
8787 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8788 cat >conftest.$ac_ext <<_ACEOF
8789#line $LINENO "configure"
8790#include "confdefs.h"
8791$ac_includes_default
8792#ifdef F77_DUMMY_MAIN
8793# ifdef __cplusplus
8794 extern "C"
8795# endif
8796 int F77_DUMMY_MAIN() { return 1; }
8797#endif
8798int
8799main ()
8800{
8801static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8802test_array [0] = 0
8803
8804 ;
8805 return 0;
8806}
8807_ACEOF
8808rm -f conftest.$ac_objext
8809if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8810 (eval $ac_compile) 2>&5
8811 ac_status=$?
8812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8813 (exit $ac_status); } &&
8814 { ac_try='test -s conftest.$ac_objext'
8815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8816 (eval $ac_try) 2>&5
8817 ac_status=$?
8818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8819 (exit $ac_status); }; }; then
8820 ac_hi=$ac_mid
8821else
8822 echo "$as_me: failed program was:" >&5
8823cat conftest.$ac_ext >&5
8824ac_lo=`expr '(' $ac_mid ')' + 1`
8825fi
8826rm -f conftest.$ac_objext conftest.$ac_ext
8827done
8828case $ac_lo in
8829?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8830'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8831echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8832 { (exit 1); exit 1; }; } ;;
8833esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008834else
8835 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008836 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8837echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8838 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008839else
Martin v. Löwis11437992002-04-12 09:54:03 +00008840 cat >conftest.$ac_ext <<_ACEOF
8841#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008842#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008843$ac_includes_default
8844long longval () { return (long) (sizeof (uintptr_t)); }
8845unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008846#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008847#include <stdlib.h>
8848#ifdef F77_DUMMY_MAIN
8849# ifdef __cplusplus
8850 extern "C"
8851# endif
8852 int F77_DUMMY_MAIN() { return 1; }
8853#endif
8854int
8855main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008856{
Martin v. Löwis11437992002-04-12 09:54:03 +00008857
8858 FILE *f = fopen ("conftest.val", "w");
8859 if (! f)
8860 exit (1);
8861 if (((long) (sizeof (uintptr_t))) < 0)
8862 {
8863 long i = longval ();
8864 if (i != ((long) (sizeof (uintptr_t))))
8865 exit (1);
8866 fprintf (f, "%ld\n", i);
8867 }
8868 else
8869 {
8870 unsigned long i = ulongval ();
8871 if (i != ((long) (sizeof (uintptr_t))))
8872 exit (1);
8873 fprintf (f, "%lu\n", i);
8874 }
8875 exit (ferror (f) || fclose (f) != 0);
8876
8877 ;
8878 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008879}
Martin v. Löwis11437992002-04-12 09:54:03 +00008880_ACEOF
8881rm -f conftest$ac_exeext
8882if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8883 (eval $ac_link) 2>&5
8884 ac_status=$?
8885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8886 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8888 (eval $ac_try) 2>&5
8889 ac_status=$?
8890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8891 (exit $ac_status); }; }; then
8892 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008893else
Martin v. Löwis11437992002-04-12 09:54:03 +00008894 echo "$as_me: program exited with status $ac_status" >&5
8895echo "$as_me: failed program was:" >&5
8896cat conftest.$ac_ext >&5
8897( exit $ac_status )
8898{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8899echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8900 { (exit 1); exit 1; }; }
8901fi
8902rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8903fi
8904fi
8905rm -f conftest.val
8906else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008907 ac_cv_sizeof_uintptr_t=0
8908fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008909fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008910echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8911echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8912cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008913#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008914_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008915
Michael W. Hudson54241132001-12-07 15:38:26 +00008916
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008917fi
8918
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008919# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008920echo "$as_me:$LINENO: checking size of off_t" >&5
8921echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8922if test "${ac_cv_sizeof_off_t+set}" = set; then
8923 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008924else
8925 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008926 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008927else
Martin v. Löwis11437992002-04-12 09:54:03 +00008928 cat >conftest.$ac_ext <<_ACEOF
8929#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008930#include "confdefs.h"
8931#include <stdio.h>
8932#include <sys/types.h>
8933main()
8934{
8935 FILE *f=fopen("conftestval", "w");
8936 if (!f) exit(1);
8937 fprintf(f, "%d\n", sizeof(off_t));
8938 exit(0);
8939}
Martin v. Löwis11437992002-04-12 09:54:03 +00008940_ACEOF
8941rm -f conftest$ac_exeext
8942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8943 (eval $ac_link) 2>&5
8944 ac_status=$?
8945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8946 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8948 (eval $ac_try) 2>&5
8949 ac_status=$?
8950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8951 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008952 ac_cv_sizeof_off_t=`cat conftestval`
8953else
Martin v. Löwis11437992002-04-12 09:54:03 +00008954 echo "$as_me: program exited with status $ac_status" >&5
8955echo "$as_me: failed program was:" >&5
8956cat conftest.$ac_ext >&5
8957( exit $ac_status )
8958ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008959fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008960rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008961fi
8962
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008963fi
8964
Martin v. Löwis11437992002-04-12 09:54:03 +00008965echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8966echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8967
8968cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008969#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008970_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008971
Michael W. Hudson54241132001-12-07 15:38:26 +00008972
Martin v. Löwis11437992002-04-12 09:54:03 +00008973echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8974echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008975if test "$have_long_long" = yes -a \
8976 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8977 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008978
Martin v. Löwis11437992002-04-12 09:54:03 +00008979cat >>confdefs.h <<\_ACEOF
8980#define HAVE_LARGEFILE_SUPPORT 1
8981_ACEOF
8982
8983 echo "$as_me:$LINENO: result: yes" >&5
8984echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008985else
Martin v. Löwis11437992002-04-12 09:54:03 +00008986 echo "$as_me:$LINENO: result: no" >&5
8987echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008988fi
8989
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008990# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008991echo "$as_me:$LINENO: checking size of time_t" >&5
8992echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8993if test "${ac_cv_sizeof_time_t+set}" = set; then
8994 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008995else
8996 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008997 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008998else
Martin v. Löwis11437992002-04-12 09:54:03 +00008999 cat >conftest.$ac_ext <<_ACEOF
9000#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009001#include "confdefs.h"
9002#include <stdio.h>
9003#include <time.h>
9004main()
9005{
9006 FILE *f=fopen("conftestval", "w");
9007 if (!f) exit(1);
9008 fprintf(f, "%d\n", sizeof(time_t));
9009 exit(0);
9010}
Martin v. Löwis11437992002-04-12 09:54:03 +00009011_ACEOF
9012rm -f conftest$ac_exeext
9013if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9014 (eval $ac_link) 2>&5
9015 ac_status=$?
9016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9017 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9019 (eval $ac_try) 2>&5
9020 ac_status=$?
9021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9022 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009023 ac_cv_sizeof_time_t=`cat conftestval`
9024else
Martin v. Löwis11437992002-04-12 09:54:03 +00009025 echo "$as_me: program exited with status $ac_status" >&5
9026echo "$as_me: failed program was:" >&5
9027cat conftest.$ac_ext >&5
9028( exit $ac_status )
9029ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009030fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009031rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009032fi
9033
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009034fi
9035
Martin v. Löwis11437992002-04-12 09:54:03 +00009036echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9037echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9038
9039cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009040#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009041_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009042
Michael W. Hudson54241132001-12-07 15:38:26 +00009043
9044
Trent Mick635f6fb2000-08-23 21:33:05 +00009045# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009046ac_save_cc="$CC"
9047if test "$ac_cv_kpthread" = "yes"
9048then CC="$CC -Kpthread"
9049fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009050echo "$as_me:$LINENO: checking for pthread_t" >&5
9051echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009052have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009053cat >conftest.$ac_ext <<_ACEOF
9054#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009055#include "confdefs.h"
9056#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009057#ifdef F77_DUMMY_MAIN
9058# ifdef __cplusplus
9059 extern "C"
9060# endif
9061 int F77_DUMMY_MAIN() { return 1; }
9062#endif
9063int
9064main ()
9065{
Guido van Rossum12580492000-09-24 16:47:19 +00009066pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009067 ;
9068 return 0;
9069}
9070_ACEOF
9071rm -f conftest.$ac_objext
9072if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9073 (eval $ac_compile) 2>&5
9074 ac_status=$?
9075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9076 (exit $ac_status); } &&
9077 { ac_try='test -s conftest.$ac_objext'
9078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9079 (eval $ac_try) 2>&5
9080 ac_status=$?
9081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9082 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009083 have_pthread_t=yes
9084else
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 echo "$as_me: failed program was:" >&5
9086cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009087fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009088rm -f conftest.$ac_objext conftest.$ac_ext
9089echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9090echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009091if test "$have_pthread_t" = yes ; then
9092 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009093 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9094echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9095 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9096 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009097else
9098 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009099 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009100else
Martin v. Löwis11437992002-04-12 09:54:03 +00009101 cat >conftest.$ac_ext <<_ACEOF
9102#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009103#include "confdefs.h"
9104#include <stdio.h>
9105 #include <pthread.h>
9106 main()
9107 {
9108 FILE *f=fopen("conftestval", "w");
9109 if (!f) exit(1);
9110 fprintf(f, "%d\n", sizeof(pthread_t));
9111 exit(0);
9112 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009113_ACEOF
9114rm -f conftest$ac_exeext
9115if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9116 (eval $ac_link) 2>&5
9117 ac_status=$?
9118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9119 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9121 (eval $ac_try) 2>&5
9122 ac_status=$?
9123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9124 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009125 ac_cv_sizeof_pthread_t=`cat conftestval`
9126else
Martin v. Löwis11437992002-04-12 09:54:03 +00009127 echo "$as_me: program exited with status $ac_status" >&5
9128echo "$as_me: failed program was:" >&5
9129cat conftest.$ac_ext >&5
9130( exit $ac_status )
9131ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009132fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009133rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009134fi
9135
Trent Mick635f6fb2000-08-23 21:33:05 +00009136fi
9137
Martin v. Löwis11437992002-04-12 09:54:03 +00009138 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9139echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9140
9141cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009142#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009143_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009144
9145fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009146CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009147
Martin v. Löwis11437992002-04-12 09:54:03 +00009148echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9149echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009150# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9151if test "${enable_toolbox_glue+set}" = set; then
9152 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009153
Martin v. Löwis11437992002-04-12 09:54:03 +00009154fi;
Jack Jansene578a632001-08-15 01:27:14 +00009155
9156if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009157then
Jack Jansene578a632001-08-15 01:27:14 +00009158 case $ac_sys_system/$ac_sys_release in
9159 Darwin/*)
9160 enable_toolbox_glue="yes";;
9161 *)
9162 enable_toolbox_glue="no";;
9163 esac
9164fi
9165case "$enable_toolbox_glue" in
9166yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009167 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009168 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009169 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009170
9171cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009172#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009173_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009174
9175 ;;
9176*)
9177 extra_frameworks=""
9178 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009179 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009180 ;;
9181esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009182echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9183echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009184
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009185
9186case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009187 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009188 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009189 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009190 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9191 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009192 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009193 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009194 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009195 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9196 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009197esac
9198
Martin v. Löwis11437992002-04-12 09:54:03 +00009199echo "$as_me:$LINENO: checking for --enable-framework" >&5
9200echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009201if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009202then
Jack Jansenca06bc62001-08-03 15:32:23 +00009203 OPT="$OPT -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009204 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009205 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009206 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009207
Martin v. Löwis11437992002-04-12 09:54:03 +00009208cat >>confdefs.h <<\_ACEOF
9209#define WITH_NEXT_FRAMEWORK 1
9210_ACEOF
9211
9212 echo "$as_me:$LINENO: result: yes" >&5
9213echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009214else
Martin v. Löwis11437992002-04-12 09:54:03 +00009215 echo "$as_me:$LINENO: result: no" >&5
9216echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009217fi
9218
Martin v. Löwis11437992002-04-12 09:54:03 +00009219echo "$as_me:$LINENO: checking for dyld" >&5
9220echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009221case $ac_sys_system/$ac_sys_release in
9222 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009223
Martin v. Löwis11437992002-04-12 09:54:03 +00009224cat >>confdefs.h <<\_ACEOF
9225#define WITH_DYLD 1
9226_ACEOF
9227
9228 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9229echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009230 ;;
9231 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009232 echo "$as_me:$LINENO: result: no" >&5
9233echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009234 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009235esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009236
Guido van Rossum0a516c91994-09-12 10:58:40 +00009237# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009238
Michael W. Hudson54241132001-12-07 15:38:26 +00009239
9240
9241
9242
Guido van Rossum0a516c91994-09-12 10:58:40 +00009243# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009244# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009245echo "$as_me:$LINENO: checking SO" >&5
9246echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009247if test -z "$SO"
9248then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009249 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009250 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009251 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009252 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009253 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009254fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009255echo "$as_me:$LINENO: result: $SO" >&5
9256echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009257# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009258# -- "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 +00009259# (Shared libraries in this instance are shared modules to be loaded into
9260# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009261echo "$as_me:$LINENO: checking LDSHARED" >&5
9262echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009263if test -z "$LDSHARED"
9264then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009265 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009266 AIX*)
9267 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009268 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009269 ;;
9270 BeOS*)
9271 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009272 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009273 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009274 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009275 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009276 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009277 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00009278 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009279 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009280 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +00009281 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009282 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009283 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9284 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009285 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009286 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9287 if test "$enable_framework" ; then
9288 # Link against the framework. All externals should be defined.
9289 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9290 else
9291 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009292 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009293 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009294 Darwin/*)
9295 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9296 if test "$enable_framework" ; then
9297 # Link against the framework. All externals should be defined.
9298 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9299 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009300 # No framework, use the Python app as bundle-loader
9301 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9302 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009303 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009304 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009305 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009306 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009307 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009308 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009309 then
9310 LDSHARED="cc -shared ${LDFLAGS}"
9311 else
9312 LDSHARED="ld -Bshareable ${LDFLAGS}"
9313 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009314 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009315 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009316 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009317 then LDSHARED='$(CC) -shared'
9318 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009319 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009320 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009321 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009322 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009323 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009324 *) LDSHARED="ld";;
9325 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009326fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009327echo "$as_me:$LINENO: result: $LDSHARED" >&5
9328echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009329BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009330# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009331# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009332echo "$as_me:$LINENO: checking CCSHARED" >&5
9333echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009334if test -z "$CCSHARED"
9335then
Guido van Rossum07397971997-04-29 21:49:50 +00009336 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009337 SunOS*) if test "$GCC" = yes;
9338 then CCSHARED="-fPIC";
9339 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009340 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009341 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009342 else CCSHARED="+z";
9343 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009344 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009345 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009346 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009347 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009348 if test "$GCC" = "yes"
9349 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009350 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009351 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009352 SCO_SV*)
9353 if test "$GCC" = "yes"
9354 then CCSHARED="-fPIC"
9355 else CCSHARED="-Kpic -belf"
9356 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009357 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009358 IRIX*/6*) case $CC in
9359 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009360 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009361 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009362 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009363 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009364fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009365echo "$as_me:$LINENO: result: $CCSHARED" >&5
9366echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009367# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009368# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009369echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9370echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009371if test -z "$LINKFORSHARED"
9372then
Guido van Rossum07397971997-04-29 21:49:50 +00009373 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009374 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009375 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009376 LINKFORSHARED="-Wl,-E -Wl,+s";;
9377# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009378 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009379 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009380 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009381 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009382 # -u __dummy makes the linker aware of the objc runtime
9383 # in System.framework; otherwise, __objcInit (referenced in
9384 # crt1.o) gets erroneously defined as common, which breaks dynamic
9385 # loading of any modules which reference it in System.framework.
9386 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9387 # not used by the core itself but which needs to be in the core so
9388 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00009389 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009390 if test "$enable_framework"
9391 then
9392 LINKFORSHARED="$LINKFORSHARED -framework Python"
9393 fi
9394 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009395 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009396 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009397 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009398 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009399 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9400 then
9401 LINKFORSHARED="-Wl,--export-dynamic"
9402 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009403 SunOS/5*) case $CC in
9404 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009405 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009406 then
9407 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009408 fi;;
9409 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009410 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009411fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009412echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9413echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009414
Michael W. Hudson54241132001-12-07 15:38:26 +00009415
Martin v. Löwis11437992002-04-12 09:54:03 +00009416echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9417echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009418if test ! "$LIBRARY" = "$LDLIBRARY"
9419then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009420 case $ac_sys_system in
9421 CYGWIN*)
9422 # Cygwin needs CCSHARED when building extension DLLs
9423 # but not when building the interpreter DLL.
9424 CFLAGSFORSHARED='';;
9425 *)
9426 CFLAGSFORSHARED='$(CCSHARED)'
9427 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009428fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009429echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9430echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009431
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009432# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9433# library (with --enable-shared).
9434# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009435# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9436# if it is not required, since it creates a dependency of the shared library
9437# to LIBS. This, in turn, means that applications linking the shared libpython
9438# don't need to link LIBS explicitly. The default should be only changed
9439# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009440
9441echo "$as_me:$LINENO: checking SHLIBS" >&5
9442echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9443case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009444 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009445 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009446esac
9447echo "$as_me:$LINENO: result: $SHLIBS" >&5
9448echo "${ECHO_T}$SHLIBS" >&6
9449
9450
Guido van Rossum627b2d71993-12-24 10:39:16 +00009451# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009452
9453echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9454echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9455if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9456 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009457else
Martin v. Löwis11437992002-04-12 09:54:03 +00009458 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009459LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009460cat >conftest.$ac_ext <<_ACEOF
9461#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009462#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009463
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009464/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009465#ifdef __cplusplus
9466extern "C"
9467#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009468/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009469 builtin and then its argument prototype would still apply. */
9470char dlopen ();
9471#ifdef F77_DUMMY_MAIN
9472# ifdef __cplusplus
9473 extern "C"
9474# endif
9475 int F77_DUMMY_MAIN() { return 1; }
9476#endif
9477int
9478main ()
9479{
9480dlopen ();
9481 ;
9482 return 0;
9483}
9484_ACEOF
9485rm -f conftest.$ac_objext conftest$ac_exeext
9486if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9487 (eval $ac_link) 2>&5
9488 ac_status=$?
9489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9490 (exit $ac_status); } &&
9491 { ac_try='test -s conftest$ac_exeext'
9492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9493 (eval $ac_try) 2>&5
9494 ac_status=$?
9495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9496 (exit $ac_status); }; }; then
9497 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009498else
Martin v. Löwis11437992002-04-12 09:54:03 +00009499 echo "$as_me: failed program was:" >&5
9500cat conftest.$ac_ext >&5
9501ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009502fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009503rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9504LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009505fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009506echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9507echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9508if test $ac_cv_lib_dl_dlopen = yes; then
9509 cat >>confdefs.h <<_ACEOF
9510#define HAVE_LIBDL 1
9511_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009512
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009513 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009514
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009515fi
9516 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009517
9518echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9519echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9520if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9521 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009522else
Martin v. Löwis11437992002-04-12 09:54:03 +00009523 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009524LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009525cat >conftest.$ac_ext <<_ACEOF
9526#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009527#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009528
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009529/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009530#ifdef __cplusplus
9531extern "C"
9532#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009533/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009534 builtin and then its argument prototype would still apply. */
9535char shl_load ();
9536#ifdef F77_DUMMY_MAIN
9537# ifdef __cplusplus
9538 extern "C"
9539# endif
9540 int F77_DUMMY_MAIN() { return 1; }
9541#endif
9542int
9543main ()
9544{
9545shl_load ();
9546 ;
9547 return 0;
9548}
9549_ACEOF
9550rm -f conftest.$ac_objext conftest$ac_exeext
9551if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9552 (eval $ac_link) 2>&5
9553 ac_status=$?
9554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9555 (exit $ac_status); } &&
9556 { ac_try='test -s conftest$ac_exeext'
9557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9558 (eval $ac_try) 2>&5
9559 ac_status=$?
9560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9561 (exit $ac_status); }; }; then
9562 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009563else
Martin v. Löwis11437992002-04-12 09:54:03 +00009564 echo "$as_me: failed program was:" >&5
9565cat conftest.$ac_ext >&5
9566ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009567fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009568rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9569LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009570fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009571echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9572echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9573if test $ac_cv_lib_dld_shl_load = yes; then
9574 cat >>confdefs.h <<_ACEOF
9575#define HAVE_LIBDLD 1
9576_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009577
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009578 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009579
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009580fi
9581 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009582echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9583echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9584if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009585 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009586else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009587 ac_func_search_save_LIBS=$LIBS
9588ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009589cat >conftest.$ac_ext <<_ACEOF
9590#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009591#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009592
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009593/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009594#ifdef __cplusplus
9595extern "C"
9596#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009597/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009598 builtin and then its argument prototype would still apply. */
9599char sem_init ();
9600#ifdef F77_DUMMY_MAIN
9601# ifdef __cplusplus
9602 extern "C"
9603# endif
9604 int F77_DUMMY_MAIN() { return 1; }
9605#endif
9606int
9607main ()
9608{
9609sem_init ();
9610 ;
9611 return 0;
9612}
9613_ACEOF
9614rm -f conftest.$ac_objext conftest$ac_exeext
9615if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9616 (eval $ac_link) 2>&5
9617 ac_status=$?
9618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9619 (exit $ac_status); } &&
9620 { ac_try='test -s conftest$ac_exeext'
9621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9622 (eval $ac_try) 2>&5
9623 ac_status=$?
9624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9625 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009626 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009627else
Martin v. Löwis11437992002-04-12 09:54:03 +00009628 echo "$as_me: failed program was:" >&5
9629cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009630fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009631rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009632if test "$ac_cv_search_sem_init" = no; then
9633 for ac_lib in rt posix4; do
9634 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9635 cat >conftest.$ac_ext <<_ACEOF
9636#line $LINENO "configure"
9637#include "confdefs.h"
9638
9639/* Override any gcc2 internal prototype to avoid an error. */
9640#ifdef __cplusplus
9641extern "C"
9642#endif
9643/* We use char because int might match the return type of a gcc2
9644 builtin and then its argument prototype would still apply. */
9645char sem_init ();
9646#ifdef F77_DUMMY_MAIN
9647# ifdef __cplusplus
9648 extern "C"
9649# endif
9650 int F77_DUMMY_MAIN() { return 1; }
9651#endif
9652int
9653main ()
9654{
9655sem_init ();
9656 ;
9657 return 0;
9658}
Martin v. Löwis11437992002-04-12 09:54:03 +00009659_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009660rm -f conftest.$ac_objext conftest$ac_exeext
9661if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9662 (eval $ac_link) 2>&5
9663 ac_status=$?
9664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9665 (exit $ac_status); } &&
9666 { ac_try='test -s conftest$ac_exeext'
9667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9668 (eval $ac_try) 2>&5
9669 ac_status=$?
9670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9671 (exit $ac_status); }; }; then
9672 ac_cv_search_sem_init="-l$ac_lib"
9673break
9674else
9675 echo "$as_me: failed program was:" >&5
9676cat conftest.$ac_ext >&5
9677fi
9678rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9679 done
9680fi
9681LIBS=$ac_func_search_save_LIBS
9682fi
9683echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9684echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9685if test "$ac_cv_search_sem_init" != no; then
9686 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009687
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009688fi
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009689 # 'Real Time' functions on Solaris,
9690 # posix4 on Solaris 2.6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009691
9692# checks for system dependent C++ extensions support
9693case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9695echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9696 cat >conftest.$ac_ext <<_ACEOF
9697#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009698#include "confdefs.h"
9699#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009700#ifdef F77_DUMMY_MAIN
9701# ifdef __cplusplus
9702 extern "C"
9703# endif
9704 int F77_DUMMY_MAIN() { return 1; }
9705#endif
9706int
9707main ()
9708{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009709loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009710 ;
9711 return 0;
9712}
9713_ACEOF
9714rm -f conftest.$ac_objext conftest$ac_exeext
9715if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9716 (eval $ac_link) 2>&5
9717 ac_status=$?
9718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9719 (exit $ac_status); } &&
9720 { ac_try='test -s conftest$ac_exeext'
9721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9722 (eval $ac_try) 2>&5
9723 ac_status=$?
9724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9725 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009726
Martin v. Löwis11437992002-04-12 09:54:03 +00009727cat >>confdefs.h <<\_ACEOF
9728#define AIX_GENUINE_CPLUSPLUS 1
9729_ACEOF
9730
9731 echo "$as_me:$LINENO: result: yes" >&5
9732echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009733else
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 echo "$as_me: failed program was:" >&5
9735cat conftest.$ac_ext >&5
9736echo "$as_me:$LINENO: result: no" >&5
9737echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009738fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009739rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009740 *) ;;
9741esac
9742
Guido van Rossum70c7f481998-03-26 18:44:10 +00009743# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009744# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009745# BeOS' sockets are stashed in libnet.
9746case "$ac_sys_system" in
9747IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009748*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009749echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9750echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9751if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9752 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009753else
Martin v. Löwis11437992002-04-12 09:54:03 +00009754 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009755LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009756cat >conftest.$ac_ext <<_ACEOF
9757#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009758#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009759
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009760/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009761#ifdef __cplusplus
9762extern "C"
9763#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009764/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009765 builtin and then its argument prototype would still apply. */
9766char t_open ();
9767#ifdef F77_DUMMY_MAIN
9768# ifdef __cplusplus
9769 extern "C"
9770# endif
9771 int F77_DUMMY_MAIN() { return 1; }
9772#endif
9773int
9774main ()
9775{
9776t_open ();
9777 ;
9778 return 0;
9779}
9780_ACEOF
9781rm -f conftest.$ac_objext conftest$ac_exeext
9782if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9783 (eval $ac_link) 2>&5
9784 ac_status=$?
9785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9786 (exit $ac_status); } &&
9787 { ac_try='test -s conftest$ac_exeext'
9788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9789 (eval $ac_try) 2>&5
9790 ac_status=$?
9791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9792 (exit $ac_status); }; }; then
9793 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009794else
Martin v. Löwis11437992002-04-12 09:54:03 +00009795 echo "$as_me: failed program was:" >&5
9796cat conftest.$ac_ext >&5
9797ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009798fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009799rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9800LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009801fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009802echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9803echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9804if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009805 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009806fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009807 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009808echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9809echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9810if test "${ac_cv_lib_socket_socket+set}" = set; then
9811 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009812else
Martin v. Löwis11437992002-04-12 09:54:03 +00009813 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009814LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009815cat >conftest.$ac_ext <<_ACEOF
9816#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009817#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009818
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009819/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009820#ifdef __cplusplus
9821extern "C"
9822#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009823/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009824 builtin and then its argument prototype would still apply. */
9825char socket ();
9826#ifdef F77_DUMMY_MAIN
9827# ifdef __cplusplus
9828 extern "C"
9829# endif
9830 int F77_DUMMY_MAIN() { return 1; }
9831#endif
9832int
9833main ()
9834{
9835socket ();
9836 ;
9837 return 0;
9838}
9839_ACEOF
9840rm -f conftest.$ac_objext conftest$ac_exeext
9841if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9842 (eval $ac_link) 2>&5
9843 ac_status=$?
9844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9845 (exit $ac_status); } &&
9846 { ac_try='test -s conftest$ac_exeext'
9847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9848 (eval $ac_try) 2>&5
9849 ac_status=$?
9850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9851 (exit $ac_status); }; }; then
9852 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009853else
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 echo "$as_me: failed program was:" >&5
9855cat conftest.$ac_ext >&5
9856ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009857fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009858rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9859LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009860fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009861echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9862echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9863if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009864 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009865fi
9866 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009867;;
9868esac
9869case "$ac_sys_system" in
9870BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009871echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9872echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9873if test "${ac_cv_lib_net_socket+set}" = set; then
9874 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009875else
Martin v. Löwis11437992002-04-12 09:54:03 +00009876 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009877LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009878cat >conftest.$ac_ext <<_ACEOF
9879#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009880#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009881
Guido van Rossumad678af1998-10-02 14:42:15 +00009882/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009883#ifdef __cplusplus
9884extern "C"
9885#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009886/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 builtin and then its argument prototype would still apply. */
9888char socket ();
9889#ifdef F77_DUMMY_MAIN
9890# ifdef __cplusplus
9891 extern "C"
9892# endif
9893 int F77_DUMMY_MAIN() { return 1; }
9894#endif
9895int
9896main ()
9897{
9898socket ();
9899 ;
9900 return 0;
9901}
9902_ACEOF
9903rm -f conftest.$ac_objext conftest$ac_exeext
9904if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9905 (eval $ac_link) 2>&5
9906 ac_status=$?
9907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9908 (exit $ac_status); } &&
9909 { ac_try='test -s conftest$ac_exeext'
9910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9911 (eval $ac_try) 2>&5
9912 ac_status=$?
9913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9914 (exit $ac_status); }; }; then
9915 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009916else
Martin v. Löwis11437992002-04-12 09:54:03 +00009917 echo "$as_me: failed program was:" >&5
9918cat conftest.$ac_ext >&5
9919ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009920fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009921rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9922LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009923fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009924echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9925echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9926if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009927 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009928fi
9929 # BeOS
9930;;
9931esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009932
Martin v. Löwis11437992002-04-12 09:54:03 +00009933echo "$as_me:$LINENO: checking for --with-libs" >&5
9934echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9935
Guido van Rossuma68acba1996-07-31 17:36:39 +00009936# Check whether --with-libs or --without-libs was given.
9937if test "${with_libs+set}" = set; then
9938 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009939
9940echo "$as_me:$LINENO: result: $withval" >&5
9941echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009942LIBS="$withval $LIBS"
9943
9944else
Martin v. Löwis11437992002-04-12 09:54:03 +00009945 echo "$as_me:$LINENO: result: no" >&5
9946echo "${ECHO_T}no" >&6
9947fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009948
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009949# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009950
9951
Martin v. Löwis11437992002-04-12 09:54:03 +00009952echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9953echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9954
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009955# Check whether --with-signal-module or --without-signal-module was given.
9956if test "${with_signal_module+set}" = set; then
9957 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009958
Martin v. Löwis11437992002-04-12 09:54:03 +00009959fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009960
9961if test -z "$with_signal_module"
9962then with_signal_module="yes"
9963fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009964echo "$as_me:$LINENO: result: $with_signal_module" >&5
9965echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009966
9967if test "${with_signal_module}" = "yes"; then
9968 USE_SIGNAL_MODULE=""
9969 SIGNAL_OBJS=""
9970else
9971 USE_SIGNAL_MODULE="#"
9972 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9973fi
9974
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009975# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009976
Barry Warsawc0d24d82000-06-29 16:12:00 +00009977USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009978
Martin v. Löwis11437992002-04-12 09:54:03 +00009979echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9980echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9981
Guido van Rossumec2f0731997-01-22 20:54:01 +00009982
9983# Check whether --with-dec-threads or --without-dec-threads was given.
9984if test "${with_dec_threads+set}" = set; then
9985 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009986
9987echo "$as_me:$LINENO: result: $withval" >&5
9988echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009989LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009990if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009991 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009992fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009993else
Martin v. Löwis11437992002-04-12 09:54:03 +00009994 echo "$as_me:$LINENO: result: no" >&5
9995echo "${ECHO_T}no" >&6
9996fi;
9997
9998# Templates for things AC_DEFINEd more than once.
9999# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010000
10001
Martin v. Löwis11437992002-04-12 09:54:03 +000010002
10003
10004
10005
10006
10007echo "$as_me:$LINENO: checking for --with-threads" >&5
10008echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10009
Guido van Rossumec2f0731997-01-22 20:54:01 +000010010# Check whether --with-threads or --without-threads was given.
10011if test "${with_threads+set}" = set; then
10012 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010013
Martin v. Löwis11437992002-04-12 09:54:03 +000010014fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010015
Barry Warsawc0d24d82000-06-29 16:12:00 +000010016# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010017
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010018# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010019if test "${with_thread+set}" = set; then
10020 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010021 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010022fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +000010023
10024if test -z "$with_threads"
10025then with_threads="yes"
10026fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010027echo "$as_me:$LINENO: result: $with_threads" >&5
10028echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +000010029
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010030
Barry Warsawc0d24d82000-06-29 16:12:00 +000010031if test "$with_threads" = "no"
10032then
10033 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010034elif test "$ac_cv_pthread_is_default" = yes
10035then
Martin v. Löwis11437992002-04-12 09:54:03 +000010036 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010037#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010038_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010039
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010040 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010041 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010042#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010043_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010044
10045 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010046 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010047elif test "$ac_cv_kpthread" = "yes"
10048then
10049 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010050 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010051#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010052_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010053
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010054 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010055 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010056else
10057 if test ! -z "$with_threads" -a -d "$with_threads"
10058 then LDFLAGS="$LDFLAGS -L$with_threads"
10059 fi
10060 if test ! -z "$withval" -a -d "$withval"
10061 then LDFLAGS="$LDFLAGS -L$withval"
10062 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010063
10064 # According to the POSIX spec, a pthreads implementation must
10065 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010066 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10067echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10068 cat >conftest.$ac_ext <<_ACEOF
10069#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010070#include "confdefs.h"
10071#include <unistd.h>
10072 #ifdef _POSIX_THREADS
10073 yes
10074 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010075
10076_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010077if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10078 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010079 unistd_defines_pthreads=yes
10080else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010081 unistd_defines_pthreads=no
10082fi
10083rm -f conftest*
10084
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10086echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010087
Martin v. Löwis11437992002-04-12 09:54:03 +000010088 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010089#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010090_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010091
Martin v. Löwis11437992002-04-12 09:54:03 +000010092 if test "${ac_cv_header_cthreads_h+set}" = set; then
10093 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10094echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10095if test "${ac_cv_header_cthreads_h+set}" = set; then
10096 echo $ECHO_N "(cached) $ECHO_C" >&6
10097fi
10098echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10099echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010100else
Martin v. Löwis11437992002-04-12 09:54:03 +000010101 # Is the header compilable?
10102echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10103echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10104cat >conftest.$ac_ext <<_ACEOF
10105#line $LINENO "configure"
10106#include "confdefs.h"
10107$ac_includes_default
10108#include <cthreads.h>
10109_ACEOF
10110rm -f conftest.$ac_objext
10111if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10112 (eval $ac_compile) 2>&5
10113 ac_status=$?
10114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10115 (exit $ac_status); } &&
10116 { ac_try='test -s conftest.$ac_objext'
10117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10118 (eval $ac_try) 2>&5
10119 ac_status=$?
10120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10121 (exit $ac_status); }; }; then
10122 ac_header_compiler=yes
10123else
10124 echo "$as_me: failed program was:" >&5
10125cat conftest.$ac_ext >&5
10126ac_header_compiler=no
10127fi
10128rm -f conftest.$ac_objext conftest.$ac_ext
10129echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10130echo "${ECHO_T}$ac_header_compiler" >&6
10131
10132# Is the header present?
10133echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10134echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10135cat >conftest.$ac_ext <<_ACEOF
10136#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010137#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010138#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010139_ACEOF
10140if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10141 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10142 ac_status=$?
10143 egrep -v '^ *\+' conftest.er1 >conftest.err
10144 rm -f conftest.er1
10145 cat conftest.err >&5
10146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10147 (exit $ac_status); } >/dev/null; then
10148 if test -s conftest.err; then
10149 ac_cpp_err=$ac_c_preproc_warn_flag
10150 else
10151 ac_cpp_err=
10152 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010153else
Martin v. Löwis11437992002-04-12 09:54:03 +000010154 ac_cpp_err=yes
10155fi
10156if test -z "$ac_cpp_err"; then
10157 ac_header_preproc=yes
10158else
10159 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010160 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010161 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010162fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010163rm -f conftest.err conftest.$ac_ext
10164echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10165echo "${ECHO_T}$ac_header_preproc" >&6
10166
10167# So? What about this header?
10168case $ac_header_compiler:$ac_header_preproc in
10169 yes:no )
10170 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10171echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10172 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10173echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10174 no:yes )
10175 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10176echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10177 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10178echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10179 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10180echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10181esac
10182echo "$as_me:$LINENO: checking for cthreads.h" >&5
10183echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10184if test "${ac_cv_header_cthreads_h+set}" = set; then
10185 echo $ECHO_N "(cached) $ECHO_C" >&6
10186else
10187 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010188fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010189echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10190echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10191
10192fi
10193if test $ac_cv_header_cthreads_h = yes; then
10194 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010195#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010196_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010197
Martin v. Löwis11437992002-04-12 09:54:03 +000010198 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010199#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010200_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010201
Martin v. Löwis11437992002-04-12 09:54:03 +000010202
10203cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010204#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010205_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010206
10207 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010208 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010209else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010210
Martin v. Löwis11437992002-04-12 09:54:03 +000010211 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10212 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10213echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10214if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10215 echo $ECHO_N "(cached) $ECHO_C" >&6
10216fi
10217echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10218echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010219else
Martin v. Löwis11437992002-04-12 09:54:03 +000010220 # Is the header compilable?
10221echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10222echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10223cat >conftest.$ac_ext <<_ACEOF
10224#line $LINENO "configure"
10225#include "confdefs.h"
10226$ac_includes_default
10227#include <mach/cthreads.h>
10228_ACEOF
10229rm -f conftest.$ac_objext
10230if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10231 (eval $ac_compile) 2>&5
10232 ac_status=$?
10233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10234 (exit $ac_status); } &&
10235 { ac_try='test -s conftest.$ac_objext'
10236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10237 (eval $ac_try) 2>&5
10238 ac_status=$?
10239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10240 (exit $ac_status); }; }; then
10241 ac_header_compiler=yes
10242else
10243 echo "$as_me: failed program was:" >&5
10244cat conftest.$ac_ext >&5
10245ac_header_compiler=no
10246fi
10247rm -f conftest.$ac_objext conftest.$ac_ext
10248echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10249echo "${ECHO_T}$ac_header_compiler" >&6
10250
10251# Is the header present?
10252echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10253echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10254cat >conftest.$ac_ext <<_ACEOF
10255#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010256#include "confdefs.h"
10257#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010258_ACEOF
10259if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10260 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10261 ac_status=$?
10262 egrep -v '^ *\+' conftest.er1 >conftest.err
10263 rm -f conftest.er1
10264 cat conftest.err >&5
10265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10266 (exit $ac_status); } >/dev/null; then
10267 if test -s conftest.err; then
10268 ac_cpp_err=$ac_c_preproc_warn_flag
10269 else
10270 ac_cpp_err=
10271 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010272else
Martin v. Löwis11437992002-04-12 09:54:03 +000010273 ac_cpp_err=yes
10274fi
10275if test -z "$ac_cpp_err"; then
10276 ac_header_preproc=yes
10277else
10278 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010279 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010280 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010281fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010282rm -f conftest.err conftest.$ac_ext
10283echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10284echo "${ECHO_T}$ac_header_preproc" >&6
10285
10286# So? What about this header?
10287case $ac_header_compiler:$ac_header_preproc in
10288 yes:no )
10289 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10290echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10291 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10292echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10293 no:yes )
10294 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10295echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10296 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10297echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10298 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10299echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10300esac
10301echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10302echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10303if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10304 echo $ECHO_N "(cached) $ECHO_C" >&6
10305else
10306 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010307fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010308echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10309echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10310
10311fi
10312if test $ac_cv_header_mach_cthreads_h = yes; then
10313 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010314#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010315_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010316
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010318#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010319_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010320
Martin v. Löwis11437992002-04-12 09:54:03 +000010321
10322cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010323#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010324_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010325
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010326 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010327else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010328
Martin v. Löwis11437992002-04-12 09:54:03 +000010329 echo "$as_me:$LINENO: checking for --with-pth" >&5
10330echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10331
10332# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010333if test "${with_pth+set}" = set; then
10334 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010335 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010336echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010337 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010338#define WITH_THREAD 1
10339_ACEOF
10340
10341
10342cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010343#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010344_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010345
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010346 LIBS="-lpth $LIBS"
10347 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010348else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010349 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010350echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010351
10352 # Just looking for pthread_create in libpthread is not enough:
10353 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10354 # So we really have to include pthread.h, and then link.
10355 _libs=$LIBS
10356 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010357 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10358echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10359 cat >conftest.$ac_ext <<_ACEOF
10360#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010361#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010362#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010363
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010364void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010365#ifdef F77_DUMMY_MAIN
10366# ifdef __cplusplus
10367 extern "C"
10368# endif
10369 int F77_DUMMY_MAIN() { return 1; }
10370#endif
10371int
10372main ()
10373{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010374
10375pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010376 ;
10377 return 0;
10378}
10379_ACEOF
10380rm -f conftest.$ac_objext conftest$ac_exeext
10381if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10382 (eval $ac_link) 2>&5
10383 ac_status=$?
10384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10385 (exit $ac_status); } &&
10386 { ac_try='test -s conftest$ac_exeext'
10387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10388 (eval $ac_try) 2>&5
10389 ac_status=$?
10390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10391 (exit $ac_status); }; }; then
10392
10393 echo "$as_me:$LINENO: result: yes" >&5
10394echo "${ECHO_T}yes" >&6
10395 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010396#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010397_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010398
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010399 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010400 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010401else
Martin v. Löwis11437992002-04-12 09:54:03 +000010402 echo "$as_me: failed program was:" >&5
10403cat conftest.$ac_ext >&5
10404
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010405 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010406 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10407echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10408if test "${ac_cv_func_pthread_detach+set}" = set; then
10409 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010410else
Martin v. Löwis11437992002-04-12 09:54:03 +000010411 cat >conftest.$ac_ext <<_ACEOF
10412#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010413#include "confdefs.h"
10414/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010415 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010416#include <assert.h>
10417/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010418#ifdef __cplusplus
10419extern "C"
10420#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010421/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010422 builtin and then its argument prototype would still apply. */
10423char pthread_detach ();
10424char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010425
Martin v. Löwis11437992002-04-12 09:54:03 +000010426#ifdef F77_DUMMY_MAIN
10427# ifdef __cplusplus
10428 extern "C"
10429# endif
10430 int F77_DUMMY_MAIN() { return 1; }
10431#endif
10432int
10433main ()
10434{
Guido van Rossumad678af1998-10-02 14:42:15 +000010435/* The GNU C library defines this for functions which it implements
10436 to always fail with ENOSYS. Some functions are actually named
10437 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010438#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010439choke me
10440#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010441f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010442#endif
10443
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 ;
10445 return 0;
10446}
10447_ACEOF
10448rm -f conftest.$ac_objext conftest$ac_exeext
10449if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10450 (eval $ac_link) 2>&5
10451 ac_status=$?
10452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10453 (exit $ac_status); } &&
10454 { ac_try='test -s conftest$ac_exeext'
10455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10456 (eval $ac_try) 2>&5
10457 ac_status=$?
10458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10459 (exit $ac_status); }; }; then
10460 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010461else
Martin v. Löwis11437992002-04-12 09:54:03 +000010462 echo "$as_me: failed program was:" >&5
10463cat conftest.$ac_ext >&5
10464ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010465fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010466rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010467fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010468echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10469echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10470if test $ac_cv_func_pthread_detach = yes; then
10471 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010472#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010473_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010474
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010475 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010476 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010477else
Guido van Rossumad678af1998-10-02 14:42:15 +000010478
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010479 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10480 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10481echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10482if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10483 echo $ECHO_N "(cached) $ECHO_C" >&6
10484fi
10485echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10486echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10487else
10488 # Is the header compilable?
10489echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10490echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10491cat >conftest.$ac_ext <<_ACEOF
10492#line $LINENO "configure"
10493#include "confdefs.h"
10494$ac_includes_default
10495#include <atheos/threads.h>
10496_ACEOF
10497rm -f conftest.$ac_objext
10498if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10499 (eval $ac_compile) 2>&5
10500 ac_status=$?
10501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10502 (exit $ac_status); } &&
10503 { ac_try='test -s conftest.$ac_objext'
10504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10505 (eval $ac_try) 2>&5
10506 ac_status=$?
10507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10508 (exit $ac_status); }; }; then
10509 ac_header_compiler=yes
10510else
10511 echo "$as_me: failed program was:" >&5
10512cat conftest.$ac_ext >&5
10513ac_header_compiler=no
10514fi
10515rm -f conftest.$ac_objext conftest.$ac_ext
10516echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10517echo "${ECHO_T}$ac_header_compiler" >&6
10518
10519# Is the header present?
10520echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10521echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10522cat >conftest.$ac_ext <<_ACEOF
10523#line $LINENO "configure"
10524#include "confdefs.h"
10525#include <atheos/threads.h>
10526_ACEOF
10527if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10528 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10529 ac_status=$?
10530 egrep -v '^ *\+' conftest.er1 >conftest.err
10531 rm -f conftest.er1
10532 cat conftest.err >&5
10533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10534 (exit $ac_status); } >/dev/null; then
10535 if test -s conftest.err; then
10536 ac_cpp_err=$ac_c_preproc_warn_flag
10537 else
10538 ac_cpp_err=
10539 fi
10540else
10541 ac_cpp_err=yes
10542fi
10543if test -z "$ac_cpp_err"; then
10544 ac_header_preproc=yes
10545else
10546 echo "$as_me: failed program was:" >&5
10547 cat conftest.$ac_ext >&5
10548 ac_header_preproc=no
10549fi
10550rm -f conftest.err conftest.$ac_ext
10551echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10552echo "${ECHO_T}$ac_header_preproc" >&6
10553
10554# So? What about this header?
10555case $ac_header_compiler:$ac_header_preproc in
10556 yes:no )
10557 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10558echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10559 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10560echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10561 no:yes )
10562 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10563echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10564 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10565echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10566 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10567echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10568esac
10569echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10570echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10571if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10572 echo $ECHO_N "(cached) $ECHO_C" >&6
10573else
10574 ac_cv_header_atheos_threads_h=$ac_header_preproc
10575fi
10576echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10577echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10578
10579fi
10580if test $ac_cv_header_atheos_threads_h = yes; then
10581 cat >>confdefs.h <<\_ACEOF
10582#define WITH_THREAD 1
10583_ACEOF
10584
10585
10586cat >>confdefs.h <<\_ACEOF
10587#define ATHEOS_THREADS 1
10588_ACEOF
10589
10590 THREADOBJ="Python/thread.o"
10591else
10592
Martin v. Löwis11437992002-04-12 09:54:03 +000010593 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10594 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10595echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10596if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10597 echo $ECHO_N "(cached) $ECHO_C" >&6
10598fi
10599echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10600echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010601else
Martin v. Löwis11437992002-04-12 09:54:03 +000010602 # Is the header compilable?
10603echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10604echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10605cat >conftest.$ac_ext <<_ACEOF
10606#line $LINENO "configure"
10607#include "confdefs.h"
10608$ac_includes_default
10609#include <kernel/OS.h>
10610_ACEOF
10611rm -f conftest.$ac_objext
10612if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10613 (eval $ac_compile) 2>&5
10614 ac_status=$?
10615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10616 (exit $ac_status); } &&
10617 { ac_try='test -s conftest.$ac_objext'
10618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10619 (eval $ac_try) 2>&5
10620 ac_status=$?
10621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10622 (exit $ac_status); }; }; then
10623 ac_header_compiler=yes
10624else
10625 echo "$as_me: failed program was:" >&5
10626cat conftest.$ac_ext >&5
10627ac_header_compiler=no
10628fi
10629rm -f conftest.$ac_objext conftest.$ac_ext
10630echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10631echo "${ECHO_T}$ac_header_compiler" >&6
10632
10633# Is the header present?
10634echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10635echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10636cat >conftest.$ac_ext <<_ACEOF
10637#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010638#include "confdefs.h"
10639#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010640_ACEOF
10641if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10642 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10643 ac_status=$?
10644 egrep -v '^ *\+' conftest.er1 >conftest.err
10645 rm -f conftest.er1
10646 cat conftest.err >&5
10647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10648 (exit $ac_status); } >/dev/null; then
10649 if test -s conftest.err; then
10650 ac_cpp_err=$ac_c_preproc_warn_flag
10651 else
10652 ac_cpp_err=
10653 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010654else
Martin v. Löwis11437992002-04-12 09:54:03 +000010655 ac_cpp_err=yes
10656fi
10657if test -z "$ac_cpp_err"; then
10658 ac_header_preproc=yes
10659else
10660 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010661 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010662 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010663fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010664rm -f conftest.err conftest.$ac_ext
10665echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10666echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010667
Martin v. Löwis11437992002-04-12 09:54:03 +000010668# So? What about this header?
10669case $ac_header_compiler:$ac_header_preproc in
10670 yes:no )
10671 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10672echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10673 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10674echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10675 no:yes )
10676 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10677echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10678 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10679echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10680 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10681echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10682esac
10683echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10684echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10685if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10686 echo $ECHO_N "(cached) $ECHO_C" >&6
10687else
10688 ac_cv_header_kernel_OS_h=$ac_header_preproc
10689fi
10690echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10691echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10692
10693fi
10694if test $ac_cv_header_kernel_OS_h = yes; then
10695 cat >>confdefs.h <<\_ACEOF
10696#define WITH_THREAD 1
10697_ACEOF
10698
10699
10700cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010701#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010702_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010703
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010704 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010705else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010706
Martin v. Löwis11437992002-04-12 09:54:03 +000010707 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10708echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10709if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10710 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010711else
Martin v. Löwis11437992002-04-12 09:54:03 +000010712 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010713LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010714cat >conftest.$ac_ext <<_ACEOF
10715#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010716#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010717
Greg Steinadf63d62000-07-05 10:38:09 +000010718/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010719#ifdef __cplusplus
10720extern "C"
10721#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010722/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010723 builtin and then its argument prototype would still apply. */
10724char pthread_create ();
10725#ifdef F77_DUMMY_MAIN
10726# ifdef __cplusplus
10727 extern "C"
10728# endif
10729 int F77_DUMMY_MAIN() { return 1; }
10730#endif
10731int
10732main ()
10733{
10734pthread_create ();
10735 ;
10736 return 0;
10737}
10738_ACEOF
10739rm -f conftest.$ac_objext conftest$ac_exeext
10740if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10741 (eval $ac_link) 2>&5
10742 ac_status=$?
10743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10744 (exit $ac_status); } &&
10745 { ac_try='test -s conftest$ac_exeext'
10746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10747 (eval $ac_try) 2>&5
10748 ac_status=$?
10749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10750 (exit $ac_status); }; }; then
10751 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010752else
Martin v. Löwis11437992002-04-12 09:54:03 +000010753 echo "$as_me: failed program was:" >&5
10754cat conftest.$ac_ext >&5
10755ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010756fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010757rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10758LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010759fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010760echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10761echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10762if test $ac_cv_lib_pthreads_pthread_create = yes; then
10763 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010764#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010765_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010766
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010767 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010768 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010769 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010770else
Greg Steinadf63d62000-07-05 10:38:09 +000010771
Martin v. Löwis11437992002-04-12 09:54:03 +000010772 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10773echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10774if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10775 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010776else
Martin v. Löwis11437992002-04-12 09:54:03 +000010777 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010778LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010779cat >conftest.$ac_ext <<_ACEOF
10780#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010781#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010782
Guido van Rossum49545951997-12-02 19:28:29 +000010783/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010784#ifdef __cplusplus
10785extern "C"
10786#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010787/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010788 builtin and then its argument prototype would still apply. */
10789char pthread_create ();
10790#ifdef F77_DUMMY_MAIN
10791# ifdef __cplusplus
10792 extern "C"
10793# endif
10794 int F77_DUMMY_MAIN() { return 1; }
10795#endif
10796int
10797main ()
10798{
10799pthread_create ();
10800 ;
10801 return 0;
10802}
10803_ACEOF
10804rm -f conftest.$ac_objext conftest$ac_exeext
10805if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10806 (eval $ac_link) 2>&5
10807 ac_status=$?
10808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10809 (exit $ac_status); } &&
10810 { ac_try='test -s conftest$ac_exeext'
10811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10812 (eval $ac_try) 2>&5
10813 ac_status=$?
10814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10815 (exit $ac_status); }; }; then
10816 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010817else
Martin v. Löwis11437992002-04-12 09:54:03 +000010818 echo "$as_me: failed program was:" >&5
10819cat conftest.$ac_ext >&5
10820ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010821fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010822rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10823LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010824fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010825echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10826echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10827if test $ac_cv_lib_c_r_pthread_create = yes; then
10828 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010829#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010830_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010831
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010832 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010833 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010834 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010835else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010836
Martin v. Löwis11437992002-04-12 09:54:03 +000010837 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10838echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10839if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10840 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010841else
Martin v. Löwis11437992002-04-12 09:54:03 +000010842 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010843LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010844cat >conftest.$ac_ext <<_ACEOF
10845#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010846#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010847
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010848/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010849#ifdef __cplusplus
10850extern "C"
10851#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010852/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010853 builtin and then its argument prototype would still apply. */
10854char __d6_pthread_create ();
10855#ifdef F77_DUMMY_MAIN
10856# ifdef __cplusplus
10857 extern "C"
10858# endif
10859 int F77_DUMMY_MAIN() { return 1; }
10860#endif
10861int
10862main ()
10863{
10864__d6_pthread_create ();
10865 ;
10866 return 0;
10867}
10868_ACEOF
10869rm -f conftest.$ac_objext conftest$ac_exeext
10870if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10871 (eval $ac_link) 2>&5
10872 ac_status=$?
10873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10874 (exit $ac_status); } &&
10875 { ac_try='test -s conftest$ac_exeext'
10876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10877 (eval $ac_try) 2>&5
10878 ac_status=$?
10879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10880 (exit $ac_status); }; }; then
10881 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010882else
Martin v. Löwis11437992002-04-12 09:54:03 +000010883 echo "$as_me: failed program was:" >&5
10884cat conftest.$ac_ext >&5
10885ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010886fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010887rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10888LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010889fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010890echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10891echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10892if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10893 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010894#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010895_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010896
Martin v. Löwis779ffc02002-12-02 22:17:01 +000010897 echo Systems with __d6_pthread_create are not supported anymore.
10898 echo See README
10899 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010900 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010901 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010902 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010903else
Guido van Rossum49545951997-12-02 19:28:29 +000010904
Martin v. Löwis11437992002-04-12 09:54:03 +000010905 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10906echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10907if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10908 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010909else
Martin v. Löwis11437992002-04-12 09:54:03 +000010910 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010911LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010912cat >conftest.$ac_ext <<_ACEOF
10913#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010914#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010915
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010916/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010917#ifdef __cplusplus
10918extern "C"
10919#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010920/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010921 builtin and then its argument prototype would still apply. */
10922char __pthread_create_system ();
10923#ifdef F77_DUMMY_MAIN
10924# ifdef __cplusplus
10925 extern "C"
10926# endif
10927 int F77_DUMMY_MAIN() { return 1; }
10928#endif
10929int
10930main ()
10931{
10932__pthread_create_system ();
10933 ;
10934 return 0;
10935}
10936_ACEOF
10937rm -f conftest.$ac_objext conftest$ac_exeext
10938if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10939 (eval $ac_link) 2>&5
10940 ac_status=$?
10941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10942 (exit $ac_status); } &&
10943 { ac_try='test -s conftest$ac_exeext'
10944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10945 (eval $ac_try) 2>&5
10946 ac_status=$?
10947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10948 (exit $ac_status); }; }; then
10949 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010950else
Martin v. Löwis11437992002-04-12 09:54:03 +000010951 echo "$as_me: failed program was:" >&5
10952cat conftest.$ac_ext >&5
10953ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010954fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010955rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10956LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010957fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010958echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10959echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10960if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10961 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010962#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010963_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010964
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010965 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010966 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010967 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010968else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010969
Martin v. Löwis11437992002-04-12 09:54:03 +000010970 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10971echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10972if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10973 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010974else
Martin v. Löwis11437992002-04-12 09:54:03 +000010975 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010976LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010977cat >conftest.$ac_ext <<_ACEOF
10978#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010979#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010980
Guido van Rossumb93a8621998-05-07 13:27:32 +000010981/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010982#ifdef __cplusplus
10983extern "C"
10984#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010985/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010986 builtin and then its argument prototype would still apply. */
10987char pthread_create ();
10988#ifdef F77_DUMMY_MAIN
10989# ifdef __cplusplus
10990 extern "C"
10991# endif
10992 int F77_DUMMY_MAIN() { return 1; }
10993#endif
10994int
10995main ()
10996{
10997pthread_create ();
10998 ;
10999 return 0;
11000}
11001_ACEOF
11002rm -f conftest.$ac_objext conftest$ac_exeext
11003if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11004 (eval $ac_link) 2>&5
11005 ac_status=$?
11006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11007 (exit $ac_status); } &&
11008 { ac_try='test -s conftest$ac_exeext'
11009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11010 (eval $ac_try) 2>&5
11011 ac_status=$?
11012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11013 (exit $ac_status); }; }; then
11014 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011015else
Martin v. Löwis11437992002-04-12 09:54:03 +000011016 echo "$as_me: failed program was:" >&5
11017cat conftest.$ac_ext >&5
11018ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011019fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011020rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11021LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011022fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011023echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11024echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11025if test $ac_cv_lib_cma_pthread_create = yes; then
11026 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011027#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011028_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011029
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011030 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011031 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011032 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011033else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011034
Martin v. Löwis130fb172001-07-19 11:00:41 +000011035 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011036fi
11037
Guido van Rossum627b2d71993-12-24 10:39:16 +000011038
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011039fi
11040
Guido van Rossum0be3e491997-05-22 20:33:33 +000011041fi
11042
Guido van Rossum49545951997-12-02 19:28:29 +000011043fi
11044
Guido van Rossumb93a8621998-05-07 13:27:32 +000011045fi
11046
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011047fi
11048
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011049
Michael W. Hudson54241132001-12-07 15:38:26 +000011050fi
11051
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011052
11053fi
11054
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011055fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011056rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11057fi;
11058fi
11059
11060
11061fi
11062
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011063
Michael W. Hudson54241132001-12-07 15:38:26 +000011064
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011065 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011066 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011067
11068cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011069#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011070_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011071
11072 fi
11073
Martin v. Löwis11437992002-04-12 09:54:03 +000011074 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11075echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11076 if test "${ac_cv_pthread_system_supported+set}" = set; then
11077 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011078else
11079 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011080 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011081else
Martin v. Löwis11437992002-04-12 09:54:03 +000011082 cat >conftest.$ac_ext <<_ACEOF
11083#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011084#include "confdefs.h"
11085#include <pthread.h>
11086 void *foo(void *parm) {
11087 return NULL;
11088 }
11089 main() {
11090 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011091 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011092 if (pthread_attr_init(&attr)) exit(-1);
11093 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011094 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011095 exit(0);
11096 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011097_ACEOF
11098rm -f conftest$ac_exeext
11099if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11100 (eval $ac_link) 2>&5
11101 ac_status=$?
11102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11103 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11105 (eval $ac_try) 2>&5
11106 ac_status=$?
11107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11108 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011109 ac_cv_pthread_system_supported=yes
11110else
Martin v. Löwis11437992002-04-12 09:54:03 +000011111 echo "$as_me: program exited with status $ac_status" >&5
11112echo "$as_me: failed program was:" >&5
11113cat conftest.$ac_ext >&5
11114( exit $ac_status )
11115ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011116fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011117rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011118fi
11119
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011120fi
11121
Martin v. Löwis11437992002-04-12 09:54:03 +000011122 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11123echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011124 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011125
11126cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011127#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011128_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011129
11130 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011131
11132for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011133do
Martin v. Löwis11437992002-04-12 09:54:03 +000011134as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11135echo "$as_me:$LINENO: checking for $ac_func" >&5
11136echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11137if eval "test \"\${$as_ac_var+set}\" = set"; then
11138 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011139else
Martin v. Löwis11437992002-04-12 09:54:03 +000011140 cat >conftest.$ac_ext <<_ACEOF
11141#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011142#include "confdefs.h"
11143/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011144 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011145#include <assert.h>
11146/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011147#ifdef __cplusplus
11148extern "C"
11149#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011150/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011151 builtin and then its argument prototype would still apply. */
11152char $ac_func ();
11153char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011154
Martin v. Löwis11437992002-04-12 09:54:03 +000011155#ifdef F77_DUMMY_MAIN
11156# ifdef __cplusplus
11157 extern "C"
11158# endif
11159 int F77_DUMMY_MAIN() { return 1; }
11160#endif
11161int
11162main ()
11163{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011164/* The GNU C library defines this for functions which it implements
11165 to always fail with ENOSYS. Some functions are actually named
11166 something starting with __ and the normal name is an alias. */
11167#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11168choke me
11169#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011170f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011171#endif
11172
Martin v. Löwis11437992002-04-12 09:54:03 +000011173 ;
11174 return 0;
11175}
11176_ACEOF
11177rm -f conftest.$ac_objext conftest$ac_exeext
11178if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11179 (eval $ac_link) 2>&5
11180 ac_status=$?
11181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11182 (exit $ac_status); } &&
11183 { ac_try='test -s conftest$ac_exeext'
11184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11185 (eval $ac_try) 2>&5
11186 ac_status=$?
11187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11188 (exit $ac_status); }; }; then
11189 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011190else
Martin v. Löwis11437992002-04-12 09:54:03 +000011191 echo "$as_me: failed program was:" >&5
11192cat conftest.$ac_ext >&5
11193eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011194fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011195rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011196fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011197echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11198echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11199if test `eval echo '${'$as_ac_var'}'` = yes; then
11200 cat >>confdefs.h <<_ACEOF
11201#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11202_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011203
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011204fi
11205done
11206
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011207 fi
11208
Martin v. Löwis11437992002-04-12 09:54:03 +000011209 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11210echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11211if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11212 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011213else
Martin v. Löwis11437992002-04-12 09:54:03 +000011214 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011215LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011216cat >conftest.$ac_ext <<_ACEOF
11217#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011218#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011219
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011220/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011221#ifdef __cplusplus
11222extern "C"
11223#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011224/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011225 builtin and then its argument prototype would still apply. */
11226char usconfig ();
11227#ifdef F77_DUMMY_MAIN
11228# ifdef __cplusplus
11229 extern "C"
11230# endif
11231 int F77_DUMMY_MAIN() { return 1; }
11232#endif
11233int
11234main ()
11235{
11236usconfig ();
11237 ;
11238 return 0;
11239}
11240_ACEOF
11241rm -f conftest.$ac_objext conftest$ac_exeext
11242if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11243 (eval $ac_link) 2>&5
11244 ac_status=$?
11245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11246 (exit $ac_status); } &&
11247 { ac_try='test -s conftest$ac_exeext'
11248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11249 (eval $ac_try) 2>&5
11250 ac_status=$?
11251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11252 (exit $ac_status); }; }; then
11253 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011254else
Martin v. Löwis11437992002-04-12 09:54:03 +000011255 echo "$as_me: failed program was:" >&5
11256cat conftest.$ac_ext >&5
11257ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011258fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011259rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11260LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011261fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011262echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11263echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11264if test $ac_cv_lib_mpc_usconfig = yes; then
11265 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011266#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011267_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011268
Martin v. Löwis130fb172001-07-19 11:00:41 +000011269 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011270 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011271 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011272fi
11273
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011274
Neal Norwitza978ab02002-11-02 16:58:05 +000011275 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011276 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11277echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11278if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11279 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011280else
Martin v. Löwis11437992002-04-12 09:54:03 +000011281 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011282LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011283cat >conftest.$ac_ext <<_ACEOF
11284#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011285#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011286
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011287/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011288#ifdef __cplusplus
11289extern "C"
11290#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011291/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011292 builtin and then its argument prototype would still apply. */
11293char thr_create ();
11294#ifdef F77_DUMMY_MAIN
11295# ifdef __cplusplus
11296 extern "C"
11297# endif
11298 int F77_DUMMY_MAIN() { return 1; }
11299#endif
11300int
11301main ()
11302{
11303thr_create ();
11304 ;
11305 return 0;
11306}
11307_ACEOF
11308rm -f conftest.$ac_objext conftest$ac_exeext
11309if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11310 (eval $ac_link) 2>&5
11311 ac_status=$?
11312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11313 (exit $ac_status); } &&
11314 { ac_try='test -s conftest$ac_exeext'
11315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11316 (eval $ac_try) 2>&5
11317 ac_status=$?
11318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11319 (exit $ac_status); }; }; then
11320 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011321else
Martin v. Löwis11437992002-04-12 09:54:03 +000011322 echo "$as_me: failed program was:" >&5
11323cat conftest.$ac_ext >&5
11324ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011325fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011326rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11327LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011328fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011329echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11330echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11331if test $ac_cv_lib_thread_thr_create = yes; then
11332 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011333#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011334_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011335
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011336 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011337 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011338 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011339fi
11340
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011341 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011342
Martin v. Löwis130fb172001-07-19 11:00:41 +000011343 if test "$USE_THREAD_MODULE" != "#"
11344 then
11345 # If the above checks didn't disable threads, (at least) OSF1
11346 # needs this '-threads' argument during linking.
11347 case $ac_sys_system in
11348 OSF1) LDLAST=-threads;;
11349 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011350 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011351
11352 if test "$posix_threads" = yes -a \
11353 "$ac_sys_system" = "SunOS" -a \
11354 "$ac_sys_release" = "5.6"; then
11355
11356cat >>confdefs.h <<\_ACEOF
11357#define HAVE_PTHREAD_DESTRUCTOR 1
11358_ACEOF
11359
11360 fi
11361
Guido van Rossum627b2d71993-12-24 10:39:16 +000011362fi
11363
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011364# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011365
11366
11367echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11368echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011369# Check whether --enable-ipv6 or --disable-ipv6 was given.
11370if test "${enable_ipv6+set}" = set; then
11371 enableval="$enable_ipv6"
11372 case "$enableval" in
11373 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011374 echo "$as_me:$LINENO: result: no" >&5
11375echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011376 ipv6=no
11377 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011378 *) echo "$as_me:$LINENO: result: yes" >&5
11379echo "${ECHO_T}yes" >&6
11380 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011381#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011382_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011383
11384 ipv6=yes
11385 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011386 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011387else
Martin v. Löwis11437992002-04-12 09:54:03 +000011388
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011389 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011390 echo "$as_me:$LINENO: result: no" >&5
11391echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011392 ipv6=no
11393
11394else
Martin v. Löwis11437992002-04-12 09:54:03 +000011395 cat >conftest.$ac_ext <<_ACEOF
11396#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011397#include "confdefs.h"
11398 /* AF_INET6 available check */
11399#include <sys/types.h>
11400#include <sys/socket.h>
11401main()
11402{
11403 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11404 exit(1);
11405 else
11406 exit(0);
11407}
11408
Martin v. Löwis11437992002-04-12 09:54:03 +000011409_ACEOF
11410rm -f conftest$ac_exeext
11411if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11412 (eval $ac_link) 2>&5
11413 ac_status=$?
11414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11415 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11417 (eval $ac_try) 2>&5
11418 ac_status=$?
11419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11420 (exit $ac_status); }; }; then
11421 echo "$as_me:$LINENO: result: yes" >&5
11422echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011423 ipv6=yes
11424else
Martin v. Löwis11437992002-04-12 09:54:03 +000011425 echo "$as_me: program exited with status $ac_status" >&5
11426echo "$as_me: failed program was:" >&5
11427cat conftest.$ac_ext >&5
11428( exit $ac_status )
11429echo "$as_me:$LINENO: result: no" >&5
11430echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011431 ipv6=no
11432fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011433rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011434fi
11435
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011436if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011437 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11438echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11439 cat >conftest.$ac_ext <<_ACEOF
11440#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011441#include "confdefs.h"
11442#include <sys/types.h>
11443#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011444#ifdef F77_DUMMY_MAIN
11445# ifdef __cplusplus
11446 extern "C"
11447# endif
11448 int F77_DUMMY_MAIN() { return 1; }
11449#endif
11450int
11451main ()
11452{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011453struct sockaddr_in6 x;
11454x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011455 ;
11456 return 0;
11457}
11458_ACEOF
11459rm -f conftest.$ac_objext
11460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11461 (eval $ac_compile) 2>&5
11462 ac_status=$?
11463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11464 (exit $ac_status); } &&
11465 { ac_try='test -s conftest.$ac_objext'
11466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11467 (eval $ac_try) 2>&5
11468 ac_status=$?
11469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11470 (exit $ac_status); }; }; then
11471 echo "$as_me:$LINENO: result: yes" >&5
11472echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011473 ipv6=yes
11474else
Martin v. Löwis11437992002-04-12 09:54:03 +000011475 echo "$as_me: failed program was:" >&5
11476cat conftest.$ac_ext >&5
11477echo "$as_me:$LINENO: result: no" >&5
11478echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011479 ipv6=no
11480fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011481rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011482fi
11483
11484if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011485 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011486#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011487_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011488
11489fi
11490
Martin v. Löwis11437992002-04-12 09:54:03 +000011491fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011492
11493ipv6type=unknown
11494ipv6lib=none
11495ipv6trylibc=no
11496
11497if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011498 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11499echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011500 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11501 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011502 case $i in
11503 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011504 cat >conftest.$ac_ext <<_ACEOF
11505#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011506#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011507
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011508#include <netinet/in.h>
11509#ifdef IPV6_INRIA_VERSION
11510yes
11511#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011512_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011513if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11514 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011515 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011516fi
11517rm -f conftest*
11518
11519 ;;
11520 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011521 cat >conftest.$ac_ext <<_ACEOF
11522#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011523#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011524
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011525#include <netinet/in.h>
11526#ifdef __KAME__
11527yes
11528#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011529_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011530if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11531 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011532 ipv6type=$i;
11533 ipv6lib=inet6
11534 ipv6libdir=/usr/local/v6/lib
11535 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011536fi
11537rm -f conftest*
11538
11539 ;;
11540 linux-glibc)
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 <features.h>
11546#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
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 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011554fi
11555rm -f conftest*
11556
11557 ;;
11558 linux-inet6)
11559 if test -d /usr/inet6; then
11560 ipv6type=$i
11561 ipv6lib=inet6
11562 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011563 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011564 fi
11565 ;;
11566 solaris)
11567 if test -f /etc/netconfig; then
11568 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11569 ipv6type=$i
11570 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011571 fi
11572 fi
11573 ;;
11574 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011575 cat >conftest.$ac_ext <<_ACEOF
11576#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011577#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011578
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011579#include <sys/param.h>
11580#ifdef _TOSHIBA_INET6
11581yes
11582#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011583_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011584if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11585 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011586 ipv6type=$i;
11587 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011588 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011589fi
11590rm -f conftest*
11591
11592 ;;
11593 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011594 cat >conftest.$ac_ext <<_ACEOF
11595#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011596#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011597
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011598#include </usr/local/v6/include/sys/v6config.h>
11599#ifdef __V6D__
11600yes
11601#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011602_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011603if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11604 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011605 ipv6type=$i;
11606 ipv6lib=v6;
11607 ipv6libdir=/usr/local/v6/lib;
11608 OPT="-I/usr/local/v6/include $OPT"
11609fi
11610rm -f conftest*
11611
11612 ;;
11613 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011614 cat >conftest.$ac_ext <<_ACEOF
11615#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011616#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011617
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011618#include <sys/param.h>
11619#ifdef _ZETA_MINAMI_INET6
11620yes
11621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011622_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11624 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011625 ipv6type=$i;
11626 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011627 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011628fi
11629rm -f conftest*
11630
11631 ;;
11632 esac
11633 if test "$ipv6type" != "unknown"; then
11634 break
11635 fi
11636 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011637 echo "$as_me:$LINENO: result: $ipv6type" >&5
11638echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011639fi
11640
11641if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11642 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11643 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11644 echo "using lib$ipv6lib"
11645 else
11646 if test $ipv6trylibc = "yes"; then
11647 echo "using libc"
11648 else
11649 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11650 echo "You need to fetch lib$ipv6lib.a from appropriate"
11651 echo 'ipv6 kit and compile beforehand.'
11652 exit 1
11653 fi
11654 fi
11655fi
11656
Jack Jansen7b8c7542002-04-14 20:12:41 +000011657# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011658echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11659echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011660
11661# Check whether --with-universal-newlines or --without-universal-newlines was given.
11662if test "${with_universal_newlines+set}" = set; then
11663 withval="$with_universal_newlines"
11664
11665fi;
11666
11667if test -z "$with_universal_newlines"
11668then with_universal_newlines="yes"
11669fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011670if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011671then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011672 echo --without-universal-newlines is unsupported, see README
11673 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011674else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011675
11676cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011677#define WITH_UNIVERSAL_NEWLINES 1
11678_ACEOF
11679
11680fi
11681echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11682echo "${ECHO_T}$with_universal_newlines" >&6
11683
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011684# Check for --with-doc-strings
11685echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11686echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11687
11688# Check whether --with-doc-strings or --without-doc-strings was given.
11689if test "${with_doc_strings+set}" = set; then
11690 withval="$with_doc_strings"
11691
11692fi;
11693
11694if test -z "$with_doc_strings"
11695then with_doc_strings="yes"
11696fi
11697if test "$with_doc_strings" != "no"
11698then
11699
11700cat >>confdefs.h <<\_ACEOF
11701#define WITH_DOC_STRINGS 1
11702_ACEOF
11703
11704fi
11705echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11706echo "${ECHO_T}$with_doc_strings" >&6
11707
Neil Schemenauera35c6882001-02-27 04:45:05 +000011708# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011709echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11710echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11711
Neil Schemenauera35c6882001-02-27 04:45:05 +000011712# Check whether --with-pymalloc or --without-pymalloc was given.
11713if test "${with_pymalloc+set}" = set; then
11714 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011715
Martin v. Löwis11437992002-04-12 09:54:03 +000011716fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011717
Neil Schemenauer16c22972002-03-22 15:34:49 +000011718if test -z "$with_pymalloc"
11719then with_pymalloc="yes"
11720fi
11721if test "$with_pymalloc" != "no"
11722then
Martin v. Löwis11437992002-04-12 09:54:03 +000011723
11724cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011725#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011726_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011727
11728fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011729echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11730echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011731
Barry Warsawef82cd72000-06-30 16:21:01 +000011732# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011733echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11734echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11735
Barry Warsawef82cd72000-06-30 16:21:01 +000011736# Check whether --with-wctype-functions or --without-wctype-functions was given.
11737if test "${with_wctype_functions+set}" = set; then
11738 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011739
Barry Warsawef82cd72000-06-30 16:21:01 +000011740if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011741then
11742
11743cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011744#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011745_ACEOF
11746
11747 echo "$as_me:$LINENO: result: yes" >&5
11748echo "${ECHO_T}yes" >&6
11749else echo "$as_me:$LINENO: result: no" >&5
11750echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011751fi
11752else
Martin v. Löwis11437992002-04-12 09:54:03 +000011753 echo "$as_me:$LINENO: result: no" >&5
11754echo "${ECHO_T}no" >&6
11755fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011756
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011757# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011758
Guido van Rossum98935bf2001-09-05 19:13:16 +000011759DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011760
Martin v. Löwis11437992002-04-12 09:54:03 +000011761echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11762echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11763
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011764# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011765if test "${with_sgi_dl+set}" = set; then
11766 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011767
11768echo "$as_me:$LINENO: result: $withval" >&5
11769echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011770echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011771exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011772
11773cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011774#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011775_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011776
Guido van Rossume97ee181999-12-20 21:27:22 +000011777DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011778dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011779if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011780then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011781else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11782echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11783 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011784fi
11785DLINCLDIR=${dldir}
11786LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011787else
Martin v. Löwis11437992002-04-12 09:54:03 +000011788 echo "$as_me:$LINENO: result: no" >&5
11789echo "${ECHO_T}no" >&6
11790fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011791
Martin v. Löwis11437992002-04-12 09:54:03 +000011792echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11793echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011794
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011795# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011796if test "${with_dl_dld+set}" = set; then
11797 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011798
11799echo "$as_me:$LINENO: result: $withval" >&5
11800echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011801echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011802exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011803
11804cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011805#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011806_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011807
Guido van Rossume97ee181999-12-20 21:27:22 +000011808DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011809dldir=`echo "$withval" | sed 's/,.*//'`
11810dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011811if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011812then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011813else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
11814echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
11815 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011816fi
11817DLINCLDIR=${dldir}
11818LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011819else
Martin v. Löwis11437992002-04-12 09:54:03 +000011820 echo "$as_me:$LINENO: result: no" >&5
11821echo "${ECHO_T}no" >&6
11822fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011823
Guido van Rossume97ee181999-12-20 21:27:22 +000011824# the dlopen() function means we might want to use dynload_shlib.o. some
11825# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011826
Thomas Wouters3a584202000-08-05 23:28:51 +000011827for ac_func in dlopen
11828do
Martin v. Löwis11437992002-04-12 09:54:03 +000011829as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11830echo "$as_me:$LINENO: checking for $ac_func" >&5
11831echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11832if eval "test \"\${$as_ac_var+set}\" = set"; then
11833 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011834else
Martin v. Löwis11437992002-04-12 09:54:03 +000011835 cat >conftest.$ac_ext <<_ACEOF
11836#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011837#include "confdefs.h"
11838/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011839 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011840#include <assert.h>
11841/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011842#ifdef __cplusplus
11843extern "C"
11844#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011845/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011846 builtin and then its argument prototype would still apply. */
11847char $ac_func ();
11848char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011849
Martin v. Löwis11437992002-04-12 09:54:03 +000011850#ifdef F77_DUMMY_MAIN
11851# ifdef __cplusplus
11852 extern "C"
11853# endif
11854 int F77_DUMMY_MAIN() { return 1; }
11855#endif
11856int
11857main ()
11858{
Guido van Rossume97ee181999-12-20 21:27:22 +000011859/* The GNU C library defines this for functions which it implements
11860 to always fail with ENOSYS. Some functions are actually named
11861 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011862#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011863choke me
11864#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011865f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011866#endif
11867
Martin v. Löwis11437992002-04-12 09:54:03 +000011868 ;
11869 return 0;
11870}
11871_ACEOF
11872rm -f conftest.$ac_objext conftest$ac_exeext
11873if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11874 (eval $ac_link) 2>&5
11875 ac_status=$?
11876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11877 (exit $ac_status); } &&
11878 { ac_try='test -s conftest$ac_exeext'
11879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11880 (eval $ac_try) 2>&5
11881 ac_status=$?
11882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11883 (exit $ac_status); }; }; then
11884 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011885else
Martin v. Löwis11437992002-04-12 09:54:03 +000011886 echo "$as_me: failed program was:" >&5
11887cat conftest.$ac_ext >&5
11888eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011889fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011890rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011891fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011892echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11893echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11894if test `eval echo '${'$as_ac_var'}'` = yes; then
11895 cat >>confdefs.h <<_ACEOF
11896#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11897_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011898
Guido van Rossume97ee181999-12-20 21:27:22 +000011899fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011900done
Guido van Rossume97ee181999-12-20 21:27:22 +000011901
Michael W. Hudson54241132001-12-07 15:38:26 +000011902
Guido van Rossume97ee181999-12-20 21:27:22 +000011903# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11904# loading of modules.
11905
Martin v. Löwis11437992002-04-12 09:54:03 +000011906echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11907echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011908if test -z "$DYNLOADFILE"
11909then
11910 case $ac_sys_system/$ac_sys_release in
11911 AIX*) DYNLOADFILE="dynload_aix.o";;
11912 BeOS*) DYNLOADFILE="dynload_beos.o";;
11913 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011914 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011915 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011916 *)
11917 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11918 # out any dynamic loading
11919 if test "$ac_cv_func_dlopen" = yes
11920 then DYNLOADFILE="dynload_shlib.o"
11921 else DYNLOADFILE="dynload_stub.o"
11922 fi
11923 ;;
11924 esac
11925fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011926echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11927echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011928if test "$DYNLOADFILE" != "dynload_stub.o"
11929then
Martin v. Löwis11437992002-04-12 09:54:03 +000011930
11931cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011932#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011933_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011934
11935fi
11936
Neil Schemenauer4e425612001-06-19 15:44:15 +000011937# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11938
Michael W. Hudson54241132001-12-07 15:38:26 +000011939
Martin v. Löwis11437992002-04-12 09:54:03 +000011940echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11941echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011942if test -z "$MACHDEP_OBJS"
11943then
Jack Jansene578a632001-08-15 01:27:14 +000011944 MACHDEP_OBJS=$extra_machdep_objs
11945else
11946 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011947fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011948echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11949echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011950
Guido van Rossum627b2d71993-12-24 10:39:16 +000011951# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
Martin v. Löwis9c36c292002-12-21 18:34:06 +000012025
Martin v. Löwis438b5342002-12-27 10:16:42 +000012026
Martin v. Löwisd5843682002-11-21 20:41:28 +000012027for ac_func in alarm chown clock confstr ctermid execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000012028 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012029 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
12030 getpriority getpwent getwd \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012031 hstrerror inet_pton kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012032 mremap nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000012033 putenv readlink \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012034 select setegid seteuid setgid \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000012035 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012036 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012037 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012038 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012039do
Martin v. Löwis11437992002-04-12 09:54:03 +000012040as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12041echo "$as_me:$LINENO: checking for $ac_func" >&5
12042echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12043if eval "test \"\${$as_ac_var+set}\" = set"; then
12044 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012045else
Martin v. Löwis11437992002-04-12 09:54:03 +000012046 cat >conftest.$ac_ext <<_ACEOF
12047#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012048#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012049/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012050 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012051#include <assert.h>
12052/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012053#ifdef __cplusplus
12054extern "C"
12055#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012056/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012057 builtin and then its argument prototype would still apply. */
12058char $ac_func ();
12059char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012060
Martin v. Löwis11437992002-04-12 09:54:03 +000012061#ifdef F77_DUMMY_MAIN
12062# ifdef __cplusplus
12063 extern "C"
12064# endif
12065 int F77_DUMMY_MAIN() { return 1; }
12066#endif
12067int
12068main ()
12069{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012070/* The GNU C library defines this for functions which it implements
12071 to always fail with ENOSYS. Some functions are actually named
12072 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012073#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012074choke me
12075#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012076f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012077#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012078
Martin v. Löwis11437992002-04-12 09:54:03 +000012079 ;
12080 return 0;
12081}
12082_ACEOF
12083rm -f conftest.$ac_objext conftest$ac_exeext
12084if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12085 (eval $ac_link) 2>&5
12086 ac_status=$?
12087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12088 (exit $ac_status); } &&
12089 { ac_try='test -s conftest$ac_exeext'
12090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12091 (eval $ac_try) 2>&5
12092 ac_status=$?
12093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12094 (exit $ac_status); }; }; then
12095 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012096else
Martin v. Löwis11437992002-04-12 09:54:03 +000012097 echo "$as_me: failed program was:" >&5
12098cat conftest.$ac_ext >&5
12099eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012100fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012101rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012103echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12104echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12105if test `eval echo '${'$as_ac_var'}'` = yes; then
12106 cat >>confdefs.h <<_ACEOF
12107#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12108_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012109
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012110fi
12111done
12112
Michael W. Hudson54241132001-12-07 15:38:26 +000012113
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012114# For some functions, having a definition is not sufficient, since
12115# we want to take their address.
12116echo "$as_me:$LINENO: checking for chroot" >&5
12117echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12118cat >conftest.$ac_ext <<_ACEOF
12119#line $LINENO "configure"
12120#include "confdefs.h"
12121#include <unistd.h>
12122#ifdef F77_DUMMY_MAIN
12123# ifdef __cplusplus
12124 extern "C"
12125# endif
12126 int F77_DUMMY_MAIN() { return 1; }
12127#endif
12128int
12129main ()
12130{
12131void *x=chroot
12132 ;
12133 return 0;
12134}
12135_ACEOF
12136rm -f conftest.$ac_objext
12137if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12138 (eval $ac_compile) 2>&5
12139 ac_status=$?
12140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12141 (exit $ac_status); } &&
12142 { ac_try='test -s conftest.$ac_objext'
12143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12144 (eval $ac_try) 2>&5
12145 ac_status=$?
12146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12147 (exit $ac_status); }; }; then
12148
12149cat >>confdefs.h <<\_ACEOF
12150#define HAVE_CHROOT 1
12151_ACEOF
12152
12153 echo "$as_me:$LINENO: result: yes" >&5
12154echo "${ECHO_T}yes" >&6
12155else
12156 echo "$as_me: failed program was:" >&5
12157cat conftest.$ac_ext >&5
12158echo "$as_me:$LINENO: result: no" >&5
12159echo "${ECHO_T}no" >&6
12160
12161fi
12162rm -f conftest.$ac_objext conftest.$ac_ext
12163echo "$as_me:$LINENO: checking for link" >&5
12164echo $ECHO_N "checking for link... $ECHO_C" >&6
12165cat >conftest.$ac_ext <<_ACEOF
12166#line $LINENO "configure"
12167#include "confdefs.h"
12168#include <unistd.h>
12169#ifdef F77_DUMMY_MAIN
12170# ifdef __cplusplus
12171 extern "C"
12172# endif
12173 int F77_DUMMY_MAIN() { return 1; }
12174#endif
12175int
12176main ()
12177{
12178void *x=link
12179 ;
12180 return 0;
12181}
12182_ACEOF
12183rm -f conftest.$ac_objext
12184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12185 (eval $ac_compile) 2>&5
12186 ac_status=$?
12187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12188 (exit $ac_status); } &&
12189 { ac_try='test -s conftest.$ac_objext'
12190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12191 (eval $ac_try) 2>&5
12192 ac_status=$?
12193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12194 (exit $ac_status); }; }; then
12195
12196cat >>confdefs.h <<\_ACEOF
12197#define HAVE_LINK 1
12198_ACEOF
12199
12200 echo "$as_me:$LINENO: result: yes" >&5
12201echo "${ECHO_T}yes" >&6
12202else
12203 echo "$as_me: failed program was:" >&5
12204cat conftest.$ac_ext >&5
12205echo "$as_me:$LINENO: result: no" >&5
12206echo "${ECHO_T}no" >&6
12207
12208fi
12209rm -f conftest.$ac_objext conftest.$ac_ext
12210echo "$as_me:$LINENO: checking for symlink" >&5
12211echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12212cat >conftest.$ac_ext <<_ACEOF
12213#line $LINENO "configure"
12214#include "confdefs.h"
12215#include <unistd.h>
12216#ifdef F77_DUMMY_MAIN
12217# ifdef __cplusplus
12218 extern "C"
12219# endif
12220 int F77_DUMMY_MAIN() { return 1; }
12221#endif
12222int
12223main ()
12224{
12225void *x=symlink
12226 ;
12227 return 0;
12228}
12229_ACEOF
12230rm -f conftest.$ac_objext
12231if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12232 (eval $ac_compile) 2>&5
12233 ac_status=$?
12234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12235 (exit $ac_status); } &&
12236 { ac_try='test -s conftest.$ac_objext'
12237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12238 (eval $ac_try) 2>&5
12239 ac_status=$?
12240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12241 (exit $ac_status); }; }; then
12242
12243cat >>confdefs.h <<\_ACEOF
12244#define HAVE_SYMLINK 1
12245_ACEOF
12246
12247 echo "$as_me:$LINENO: result: yes" >&5
12248echo "${ECHO_T}yes" >&6
12249else
12250 echo "$as_me: failed program was:" >&5
12251cat conftest.$ac_ext >&5
12252echo "$as_me:$LINENO: result: no" >&5
12253echo "${ECHO_T}no" >&6
12254
12255fi
12256rm -f conftest.$ac_objext conftest.$ac_ext
12257
Martin v. Löwisd5843682002-11-21 20:41:28 +000012258# On some systems (eg. FreeBSD 5), we would find a definition of the
12259# functions ctermid_r, setgroups in the library, but no prototype
12260# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12261# address to avoid compiler warnings and potential miscompilations
12262# because of the missing prototypes.
12263
12264echo "$as_me:$LINENO: checking for ctermid_r" >&5
12265echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12266cat >conftest.$ac_ext <<_ACEOF
12267#line $LINENO "configure"
12268#include "confdefs.h"
12269
12270#include "confdefs.h"
12271#include <stdio.h>
12272
12273#ifdef F77_DUMMY_MAIN
12274# ifdef __cplusplus
12275 extern "C"
12276# endif
12277 int F77_DUMMY_MAIN() { return 1; }
12278#endif
12279int
12280main ()
12281{
12282void* p = ctermid_r
12283 ;
12284 return 0;
12285}
12286_ACEOF
12287rm -f conftest.$ac_objext
12288if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12289 (eval $ac_compile) 2>&5
12290 ac_status=$?
12291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12292 (exit $ac_status); } &&
12293 { ac_try='test -s conftest.$ac_objext'
12294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12295 (eval $ac_try) 2>&5
12296 ac_status=$?
12297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12298 (exit $ac_status); }; }; then
12299
12300cat >>confdefs.h <<\_ACEOF
12301#define HAVE_CTERMID_R 1
12302_ACEOF
12303
12304 echo "$as_me:$LINENO: result: yes" >&5
12305echo "${ECHO_T}yes" >&6
12306else
12307 echo "$as_me: failed program was:" >&5
12308cat conftest.$ac_ext >&5
12309echo "$as_me:$LINENO: result: no" >&5
12310echo "${ECHO_T}no" >&6
12311
12312fi
12313rm -f conftest.$ac_objext conftest.$ac_ext
12314
12315echo "$as_me:$LINENO: checking for setgroups" >&5
12316echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
12317cat >conftest.$ac_ext <<_ACEOF
12318#line $LINENO "configure"
12319#include "confdefs.h"
12320
12321#include "confdefs.h"
12322#include <unistd.h.h>
12323
12324#ifdef F77_DUMMY_MAIN
12325# ifdef __cplusplus
12326 extern "C"
12327# endif
12328 int F77_DUMMY_MAIN() { return 1; }
12329#endif
12330int
12331main ()
12332{
12333void* p = setgroups
12334 ;
12335 return 0;
12336}
12337_ACEOF
12338rm -f conftest.$ac_objext
12339if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12340 (eval $ac_compile) 2>&5
12341 ac_status=$?
12342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12343 (exit $ac_status); } &&
12344 { ac_try='test -s conftest.$ac_objext'
12345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12346 (eval $ac_try) 2>&5
12347 ac_status=$?
12348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12349 (exit $ac_status); }; }; then
12350
12351cat >>confdefs.h <<\_ACEOF
12352#define HAVE_SETGROUPS 1
12353_ACEOF
12354
12355 echo "$as_me:$LINENO: result: yes" >&5
12356echo "${ECHO_T}yes" >&6
12357else
12358 echo "$as_me: failed program was:" >&5
12359cat conftest.$ac_ext >&5
12360echo "$as_me:$LINENO: result: no" >&5
12361echo "${ECHO_T}no" >&6
12362
12363fi
12364rm -f conftest.$ac_objext conftest.$ac_ext
12365
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012366# check for openpty and forkpty
12367
Martin v. Löwis11437992002-04-12 09:54:03 +000012368
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012369for ac_func in openpty
12370do
Martin v. Löwis11437992002-04-12 09:54:03 +000012371as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12372echo "$as_me:$LINENO: checking for $ac_func" >&5
12373echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12374if eval "test \"\${$as_ac_var+set}\" = set"; then
12375 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012376else
Martin v. Löwis11437992002-04-12 09:54:03 +000012377 cat >conftest.$ac_ext <<_ACEOF
12378#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012379#include "confdefs.h"
12380/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012381 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012382#include <assert.h>
12383/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012384#ifdef __cplusplus
12385extern "C"
12386#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012387/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012388 builtin and then its argument prototype would still apply. */
12389char $ac_func ();
12390char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012391
Martin v. Löwis11437992002-04-12 09:54:03 +000012392#ifdef F77_DUMMY_MAIN
12393# ifdef __cplusplus
12394 extern "C"
12395# endif
12396 int F77_DUMMY_MAIN() { return 1; }
12397#endif
12398int
12399main ()
12400{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012401/* The GNU C library defines this for functions which it implements
12402 to always fail with ENOSYS. Some functions are actually named
12403 something starting with __ and the normal name is an alias. */
12404#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12405choke me
12406#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012407f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012408#endif
12409
Martin v. Löwis11437992002-04-12 09:54:03 +000012410 ;
12411 return 0;
12412}
12413_ACEOF
12414rm -f conftest.$ac_objext conftest$ac_exeext
12415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12416 (eval $ac_link) 2>&5
12417 ac_status=$?
12418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12419 (exit $ac_status); } &&
12420 { ac_try='test -s conftest$ac_exeext'
12421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12422 (eval $ac_try) 2>&5
12423 ac_status=$?
12424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12425 (exit $ac_status); }; }; then
12426 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012427else
Martin v. Löwis11437992002-04-12 09:54:03 +000012428 echo "$as_me: failed program was:" >&5
12429cat conftest.$ac_ext >&5
12430eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012431fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012432rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012433fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012434echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12435echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12436if test `eval echo '${'$as_ac_var'}'` = yes; then
12437 cat >>confdefs.h <<_ACEOF
12438#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12439_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012440
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012441else
Martin v. Löwis11437992002-04-12 09:54:03 +000012442 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
12443echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
12444if test "${ac_cv_lib_util_openpty+set}" = set; then
12445 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012446else
Martin v. Löwis11437992002-04-12 09:54:03 +000012447 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012448LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012449cat >conftest.$ac_ext <<_ACEOF
12450#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012451#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012452
Fred Drake8cef4cf2000-06-28 16:40:38 +000012453/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012454#ifdef __cplusplus
12455extern "C"
12456#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012457/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012458 builtin and then its argument prototype would still apply. */
12459char openpty ();
12460#ifdef F77_DUMMY_MAIN
12461# ifdef __cplusplus
12462 extern "C"
12463# endif
12464 int F77_DUMMY_MAIN() { return 1; }
12465#endif
12466int
12467main ()
12468{
12469openpty ();
12470 ;
12471 return 0;
12472}
12473_ACEOF
12474rm -f conftest.$ac_objext conftest$ac_exeext
12475if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12476 (eval $ac_link) 2>&5
12477 ac_status=$?
12478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12479 (exit $ac_status); } &&
12480 { ac_try='test -s conftest$ac_exeext'
12481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12482 (eval $ac_try) 2>&5
12483 ac_status=$?
12484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12485 (exit $ac_status); }; }; then
12486 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012487else
Martin v. Löwis11437992002-04-12 09:54:03 +000012488 echo "$as_me: failed program was:" >&5
12489cat conftest.$ac_ext >&5
12490ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012491fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012492rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12493LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012494fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012495echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
12496echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
12497if test $ac_cv_lib_util_openpty = yes; then
12498 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012499#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012500_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012501 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012502fi
12503
12504fi
12505done
12506
Martin v. Löwis11437992002-04-12 09:54:03 +000012507
Fred Drake8cef4cf2000-06-28 16:40:38 +000012508for ac_func in forkpty
12509do
Martin v. Löwis11437992002-04-12 09:54:03 +000012510as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12511echo "$as_me:$LINENO: checking for $ac_func" >&5
12512echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12513if eval "test \"\${$as_ac_var+set}\" = set"; then
12514 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012515else
Martin v. Löwis11437992002-04-12 09:54:03 +000012516 cat >conftest.$ac_ext <<_ACEOF
12517#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012518#include "confdefs.h"
12519/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012520 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000012521#include <assert.h>
12522/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012523#ifdef __cplusplus
12524extern "C"
12525#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012526/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012527 builtin and then its argument prototype would still apply. */
12528char $ac_func ();
12529char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000012530
Martin v. Löwis11437992002-04-12 09:54:03 +000012531#ifdef F77_DUMMY_MAIN
12532# ifdef __cplusplus
12533 extern "C"
12534# endif
12535 int F77_DUMMY_MAIN() { return 1; }
12536#endif
12537int
12538main ()
12539{
Fred Drake8cef4cf2000-06-28 16:40:38 +000012540/* The GNU C library defines this for functions which it implements
12541 to always fail with ENOSYS. Some functions are actually named
12542 something starting with __ and the normal name is an alias. */
12543#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12544choke me
12545#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012546f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000012547#endif
12548
Martin v. Löwis11437992002-04-12 09:54:03 +000012549 ;
12550 return 0;
12551}
12552_ACEOF
12553rm -f conftest.$ac_objext conftest$ac_exeext
12554if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12555 (eval $ac_link) 2>&5
12556 ac_status=$?
12557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12558 (exit $ac_status); } &&
12559 { ac_try='test -s conftest$ac_exeext'
12560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12561 (eval $ac_try) 2>&5
12562 ac_status=$?
12563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12564 (exit $ac_status); }; }; then
12565 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012566else
Martin v. Löwis11437992002-04-12 09:54:03 +000012567 echo "$as_me: failed program was:" >&5
12568cat conftest.$ac_ext >&5
12569eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012570fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012571rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012572fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012573echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12574echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12575if test `eval echo '${'$as_ac_var'}'` = yes; then
12576 cat >>confdefs.h <<_ACEOF
12577#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12578_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012579
Fred Drake8cef4cf2000-06-28 16:40:38 +000012580else
Martin v. Löwis11437992002-04-12 09:54:03 +000012581 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
12582echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
12583if test "${ac_cv_lib_util_forkpty+set}" = set; then
12584 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012585else
Martin v. Löwis11437992002-04-12 09:54:03 +000012586 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012587LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012588cat >conftest.$ac_ext <<_ACEOF
12589#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012590#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012591
Fred Drake8cef4cf2000-06-28 16:40:38 +000012592/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012593#ifdef __cplusplus
12594extern "C"
12595#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012596/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012597 builtin and then its argument prototype would still apply. */
12598char forkpty ();
12599#ifdef F77_DUMMY_MAIN
12600# ifdef __cplusplus
12601 extern "C"
12602# endif
12603 int F77_DUMMY_MAIN() { return 1; }
12604#endif
12605int
12606main ()
12607{
12608forkpty ();
12609 ;
12610 return 0;
12611}
12612_ACEOF
12613rm -f conftest.$ac_objext conftest$ac_exeext
12614if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12615 (eval $ac_link) 2>&5
12616 ac_status=$?
12617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12618 (exit $ac_status); } &&
12619 { ac_try='test -s conftest$ac_exeext'
12620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12621 (eval $ac_try) 2>&5
12622 ac_status=$?
12623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12624 (exit $ac_status); }; }; then
12625 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012626else
Martin v. Löwis11437992002-04-12 09:54:03 +000012627 echo "$as_me: failed program was:" >&5
12628cat conftest.$ac_ext >&5
12629ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012630fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012631rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12632LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012633fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012634echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
12635echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
12636if test $ac_cv_lib_util_forkpty = yes; then
12637 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012638#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012639_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012640 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012641fi
12642
12643fi
12644done
12645
Jack Jansendd19cf82001-12-06 22:36:17 +000012646
Michael W. Hudson54241132001-12-07 15:38:26 +000012647# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012648
12649
12650
12651
12652
12653
Fred Drake8cef4cf2000-06-28 16:40:38 +000012654for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
12655do
Martin v. Löwis11437992002-04-12 09:54:03 +000012656as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12657echo "$as_me:$LINENO: checking for $ac_func" >&5
12658echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12659if eval "test \"\${$as_ac_var+set}\" = set"; then
12660 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012661else
Martin v. Löwis11437992002-04-12 09:54:03 +000012662 cat >conftest.$ac_ext <<_ACEOF
12663#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012664#include "confdefs.h"
12665/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012666 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012667#include <assert.h>
12668/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012669#ifdef __cplusplus
12670extern "C"
12671#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012672/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012673 builtin and then its argument prototype would still apply. */
12674char $ac_func ();
12675char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012676
Martin v. Löwis11437992002-04-12 09:54:03 +000012677#ifdef F77_DUMMY_MAIN
12678# ifdef __cplusplus
12679 extern "C"
12680# endif
12681 int F77_DUMMY_MAIN() { return 1; }
12682#endif
12683int
12684main ()
12685{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012686/* The GNU C library defines this for functions which it implements
12687 to always fail with ENOSYS. Some functions are actually named
12688 something starting with __ and the normal name is an alias. */
12689#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12690choke me
12691#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012692f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012693#endif
12694
Martin v. Löwis11437992002-04-12 09:54:03 +000012695 ;
12696 return 0;
12697}
12698_ACEOF
12699rm -f conftest.$ac_objext conftest$ac_exeext
12700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12701 (eval $ac_link) 2>&5
12702 ac_status=$?
12703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12704 (exit $ac_status); } &&
12705 { ac_try='test -s conftest$ac_exeext'
12706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12707 (eval $ac_try) 2>&5
12708 ac_status=$?
12709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12710 (exit $ac_status); }; }; then
12711 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012712else
Martin v. Löwis11437992002-04-12 09:54:03 +000012713 echo "$as_me: failed program was:" >&5
12714cat conftest.$ac_ext >&5
12715eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012716fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012717rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012718fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012719echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12720echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12721if test `eval echo '${'$as_ac_var'}'` = yes; then
12722 cat >>confdefs.h <<_ACEOF
12723#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12724_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012725
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012726fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012727done
12728
Michael W. Hudson54241132001-12-07 15:38:26 +000012729
Martin v. Löwis11437992002-04-12 09:54:03 +000012730
12731
12732
12733
12734
Martin v. Löwis1142de32002-03-29 16:28:31 +000012735for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000012736do
Martin v. Löwis11437992002-04-12 09:54:03 +000012737as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12738echo "$as_me:$LINENO: checking for $ac_func" >&5
12739echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12740if eval "test \"\${$as_ac_var+set}\" = set"; then
12741 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012742else
Martin v. Löwis11437992002-04-12 09:54:03 +000012743 cat >conftest.$ac_ext <<_ACEOF
12744#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012745#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012746/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012748#include <assert.h>
12749/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012750#ifdef __cplusplus
12751extern "C"
12752#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012753/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012754 builtin and then its argument prototype would still apply. */
12755char $ac_func ();
12756char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012757
Martin v. Löwis11437992002-04-12 09:54:03 +000012758#ifdef F77_DUMMY_MAIN
12759# ifdef __cplusplus
12760 extern "C"
12761# endif
12762 int F77_DUMMY_MAIN() { return 1; }
12763#endif
12764int
12765main ()
12766{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012767/* The GNU C library defines this for functions which it implements
12768 to always fail with ENOSYS. Some functions are actually named
12769 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012770#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012771choke me
12772#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012773f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012774#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012775
Martin v. Löwis11437992002-04-12 09:54:03 +000012776 ;
12777 return 0;
12778}
12779_ACEOF
12780rm -f conftest.$ac_objext conftest$ac_exeext
12781if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12782 (eval $ac_link) 2>&5
12783 ac_status=$?
12784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12785 (exit $ac_status); } &&
12786 { ac_try='test -s conftest$ac_exeext'
12787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12788 (eval $ac_try) 2>&5
12789 ac_status=$?
12790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12791 (exit $ac_status); }; }; then
12792 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012793else
Martin v. Löwis11437992002-04-12 09:54:03 +000012794 echo "$as_me: failed program was:" >&5
12795cat conftest.$ac_ext >&5
12796eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012797fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012798rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000012799fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012800echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12801echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12802if test `eval echo '${'$as_ac_var'}'` = yes; then
12803 cat >>confdefs.h <<_ACEOF
12804#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12805_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000012806
Martin v. Löwis1142de32002-03-29 16:28:31 +000012807else
Martin v. Löwis11437992002-04-12 09:54:03 +000012808 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012809fi
12810done
12811
12812
Martin v. Löwis11437992002-04-12 09:54:03 +000012813
Martin v. Löwis1142de32002-03-29 16:28:31 +000012814for ac_func in getpgrp
12815do
Martin v. Löwis11437992002-04-12 09:54:03 +000012816as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12817echo "$as_me:$LINENO: checking for $ac_func" >&5
12818echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12819if eval "test \"\${$as_ac_var+set}\" = set"; then
12820 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000012821else
Martin v. Löwis11437992002-04-12 09:54:03 +000012822 cat >conftest.$ac_ext <<_ACEOF
12823#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012824#include "confdefs.h"
12825/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012826 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000012827#include <assert.h>
12828/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012829#ifdef __cplusplus
12830extern "C"
12831#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012832/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012833 builtin and then its argument prototype would still apply. */
12834char $ac_func ();
12835char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012836
Martin v. Löwis11437992002-04-12 09:54:03 +000012837#ifdef F77_DUMMY_MAIN
12838# ifdef __cplusplus
12839 extern "C"
12840# endif
12841 int F77_DUMMY_MAIN() { return 1; }
12842#endif
12843int
12844main ()
12845{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012846/* The GNU C library defines this for functions which it implements
12847 to always fail with ENOSYS. Some functions are actually named
12848 something starting with __ and the normal name is an alias. */
12849#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12850choke me
12851#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012852f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012853#endif
12854
Martin v. Löwis11437992002-04-12 09:54:03 +000012855 ;
12856 return 0;
12857}
12858_ACEOF
12859rm -f conftest.$ac_objext conftest$ac_exeext
12860if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12861 (eval $ac_link) 2>&5
12862 ac_status=$?
12863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12864 (exit $ac_status); } &&
12865 { ac_try='test -s conftest$ac_exeext'
12866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12867 (eval $ac_try) 2>&5
12868 ac_status=$?
12869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12870 (exit $ac_status); }; }; then
12871 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012872else
Martin v. Löwis11437992002-04-12 09:54:03 +000012873 echo "$as_me: failed program was:" >&5
12874cat conftest.$ac_ext >&5
12875eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012876fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012877rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012878fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012879echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12880echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12881if test `eval echo '${'$as_ac_var'}'` = yes; then
12882 cat >>confdefs.h <<_ACEOF
12883#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12884_ACEOF
12885 cat >conftest.$ac_ext <<_ACEOF
12886#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012887#include "confdefs.h"
12888#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012889#ifdef F77_DUMMY_MAIN
12890# ifdef __cplusplus
12891 extern "C"
12892# endif
12893 int F77_DUMMY_MAIN() { return 1; }
12894#endif
12895int
12896main ()
12897{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012898getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012899 ;
12900 return 0;
12901}
12902_ACEOF
12903rm -f conftest.$ac_objext
12904if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12905 (eval $ac_compile) 2>&5
12906 ac_status=$?
12907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12908 (exit $ac_status); } &&
12909 { ac_try='test -s conftest.$ac_objext'
12910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12911 (eval $ac_try) 2>&5
12912 ac_status=$?
12913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12914 (exit $ac_status); }; }; then
12915
12916cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012917#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012918_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012919
Martin v. Löwis11437992002-04-12 09:54:03 +000012920
Guido van Rossumf78abae1997-01-21 22:02:36 +000012921else
Martin v. Löwis11437992002-04-12 09:54:03 +000012922 echo "$as_me: failed program was:" >&5
12923cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012924fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012925rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012926
Guido van Rossum627b2d71993-12-24 10:39:16 +000012927fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012928done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012929
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012930echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12931echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12932if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012933 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012934else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012935 if test "$cross_compiling" = yes; then
12936 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12937echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12938 { (exit 1); exit 1; }; }
12939else
Martin v. Löwis11437992002-04-12 09:54:03 +000012940 cat >conftest.$ac_ext <<_ACEOF
12941#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012942#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012943#if HAVE_UNISTD_H
12944# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012945#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012946
Martin v. Löwis11437992002-04-12 09:54:03 +000012947#ifdef F77_DUMMY_MAIN
12948# ifdef __cplusplus
12949 extern "C"
12950# endif
12951 int F77_DUMMY_MAIN() { return 1; }
12952#endif
12953int
12954main ()
12955{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012956/* If this system has a BSD-style setpgrp which takes arguments,
12957 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12958 exit successfully. */
12959 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012960 ;
12961 return 0;
12962}
12963_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012964rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012965if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12966 (eval $ac_link) 2>&5
12967 ac_status=$?
12968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012969 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12971 (eval $ac_try) 2>&5
12972 ac_status=$?
12973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12974 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012975 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012976else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012977 echo "$as_me: program exited with status $ac_status" >&5
12978echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012979cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012980( exit $ac_status )
12981ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012982fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012983rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012984fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012985fi
12986echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12987echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12988if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012989
12990cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012991#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012992_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012993
12994fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012995
Martin v. Löwis11437992002-04-12 09:54:03 +000012996
Thomas Wouters3a584202000-08-05 23:28:51 +000012997for ac_func in gettimeofday
12998do
Martin v. Löwis11437992002-04-12 09:54:03 +000012999as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13000echo "$as_me:$LINENO: checking for $ac_func" >&5
13001echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13002if eval "test \"\${$as_ac_var+set}\" = set"; then
13003 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013004else
Martin v. Löwis11437992002-04-12 09:54:03 +000013005 cat >conftest.$ac_ext <<_ACEOF
13006#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013007#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013008/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013009 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013010#include <assert.h>
13011/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013012#ifdef __cplusplus
13013extern "C"
13014#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013015/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013016 builtin and then its argument prototype would still apply. */
13017char $ac_func ();
13018char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013019
Martin v. Löwis11437992002-04-12 09:54:03 +000013020#ifdef F77_DUMMY_MAIN
13021# ifdef __cplusplus
13022 extern "C"
13023# endif
13024 int F77_DUMMY_MAIN() { return 1; }
13025#endif
13026int
13027main ()
13028{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013029/* The GNU C library defines this for functions which it implements
13030 to always fail with ENOSYS. Some functions are actually named
13031 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013032#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013033choke me
13034#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013035f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013036#endif
13037
Martin v. Löwis11437992002-04-12 09:54:03 +000013038 ;
13039 return 0;
13040}
13041_ACEOF
13042rm -f conftest.$ac_objext conftest$ac_exeext
13043if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13044 (eval $ac_link) 2>&5
13045 ac_status=$?
13046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13047 (exit $ac_status); } &&
13048 { ac_try='test -s conftest$ac_exeext'
13049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13050 (eval $ac_try) 2>&5
13051 ac_status=$?
13052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13053 (exit $ac_status); }; }; then
13054 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013055else
Martin v. Löwis11437992002-04-12 09:54:03 +000013056 echo "$as_me: failed program was:" >&5
13057cat conftest.$ac_ext >&5
13058eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013059fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013060rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013061fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013062echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13063echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13064if test `eval echo '${'$as_ac_var'}'` = yes; then
13065 cat >>confdefs.h <<_ACEOF
13066#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13067_ACEOF
13068 cat >conftest.$ac_ext <<_ACEOF
13069#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013070#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013071#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013072#ifdef F77_DUMMY_MAIN
13073# ifdef __cplusplus
13074 extern "C"
13075# endif
13076 int F77_DUMMY_MAIN() { return 1; }
13077#endif
13078int
13079main ()
13080{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013081gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013082 ;
13083 return 0;
13084}
13085_ACEOF
13086rm -f conftest.$ac_objext
13087if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13088 (eval $ac_compile) 2>&5
13089 ac_status=$?
13090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13091 (exit $ac_status); } &&
13092 { ac_try='test -s conftest.$ac_objext'
13093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13094 (eval $ac_try) 2>&5
13095 ac_status=$?
13096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13097 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013098 :
13099else
Martin v. Löwis11437992002-04-12 09:54:03 +000013100 echo "$as_me: failed program was:" >&5
13101cat conftest.$ac_ext >&5
13102
13103cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013104#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013105_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013106
Martin v. Löwis11437992002-04-12 09:54:03 +000013107
Guido van Rossum627b2d71993-12-24 10:39:16 +000013108fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013109rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013110
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013111fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013112done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013113
Michael W. Hudson54241132001-12-07 15:38:26 +000013114
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013115echo "$as_me:$LINENO: checking for major" >&5
13116echo $ECHO_N "checking for major... $ECHO_C" >&6
13117cat >conftest.$ac_ext <<_ACEOF
13118#line $LINENO "configure"
13119#include "confdefs.h"
13120
13121 #if defined(MAJOR_IN_MKDEV)
13122 #include <sys/mkdev.h>
13123 #elif defined(MAJOR_IN_SYSMACROS)
13124 #include <sys/sysmacros.h>
13125 #else
13126 #include <sys/types.h>
13127 #endif
13128
13129#ifdef F77_DUMMY_MAIN
13130# ifdef __cplusplus
13131 extern "C"
13132# endif
13133 int F77_DUMMY_MAIN() { return 1; }
13134#endif
13135int
13136main ()
13137{
13138
13139 makedev(major(0),minor(0));
13140
13141 ;
13142 return 0;
13143}
13144_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013145rm -f conftest.$ac_objext conftest$ac_exeext
13146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13147 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013148 ac_status=$?
13149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13150 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013151 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13153 (eval $ac_try) 2>&5
13154 ac_status=$?
13155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13156 (exit $ac_status); }; }; then
13157
13158
13159cat >>confdefs.h <<\_ACEOF
13160#define HAVE_DEVICE_MACROS 1
13161_ACEOF
13162
13163 echo "$as_me:$LINENO: result: yes" >&5
13164echo "${ECHO_T}yes" >&6
13165
13166else
13167 echo "$as_me: failed program was:" >&5
13168cat conftest.$ac_ext >&5
13169
13170 echo "$as_me:$LINENO: result: no" >&5
13171echo "${ECHO_T}no" >&6
13172
13173fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013174rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013175
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013176# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013177# for [no]getaddrinfo in netdb.h.
13178echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13179echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13180cat >conftest.$ac_ext <<_ACEOF
13181#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013182#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013183
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013184#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013185#include <sys/socket.h>
13186#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013187#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013188
Martin v. Löwis11437992002-04-12 09:54:03 +000013189#ifdef F77_DUMMY_MAIN
13190# ifdef __cplusplus
13191 extern "C"
13192# endif
13193 int F77_DUMMY_MAIN() { return 1; }
13194#endif
13195int
13196main ()
13197{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013198
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013199getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013200
Martin v. Löwis11437992002-04-12 09:54:03 +000013201 ;
13202 return 0;
13203}
13204_ACEOF
13205rm -f conftest.$ac_objext conftest$ac_exeext
13206if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13207 (eval $ac_link) 2>&5
13208 ac_status=$?
13209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13210 (exit $ac_status); } &&
13211 { ac_try='test -s conftest$ac_exeext'
13212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13213 (eval $ac_try) 2>&5
13214 ac_status=$?
13215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13216 (exit $ac_status); }; }; then
13217
13218echo "$as_me:$LINENO: result: yes" >&5
13219echo "${ECHO_T}yes" >&6
13220echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13221echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013222if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013223 echo "$as_me:$LINENO: result: buggy" >&5
13224echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013225buggygetaddrinfo=yes
13226else
Martin v. Löwis11437992002-04-12 09:54:03 +000013227 cat >conftest.$ac_ext <<_ACEOF
13228#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013229#include "confdefs.h"
13230
13231#include <sys/types.h>
13232#include <netdb.h>
13233#include <string.h>
13234#include <sys/socket.h>
13235#include <netinet/in.h>
13236
13237main()
13238{
13239 int passive, gaierr, inet4 = 0, inet6 = 0;
13240 struct addrinfo hints, *ai, *aitop;
13241 char straddr[INET6_ADDRSTRLEN], strport[16];
13242
13243 for (passive = 0; passive <= 1; passive++) {
13244 memset(&hints, 0, sizeof(hints));
13245 hints.ai_family = AF_UNSPEC;
13246 hints.ai_flags = passive ? AI_PASSIVE : 0;
13247 hints.ai_socktype = SOCK_STREAM;
13248 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13249 (void)gai_strerror(gaierr);
13250 goto bad;
13251 }
13252 for (ai = aitop; ai; ai = ai->ai_next) {
13253 if (ai->ai_addr == NULL ||
13254 ai->ai_addrlen == 0 ||
13255 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13256 straddr, sizeof(straddr), strport, sizeof(strport),
13257 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13258 goto bad;
13259 }
13260 switch (ai->ai_family) {
13261 case AF_INET:
13262 if (strcmp(strport, "54321") != 0) {
13263 goto bad;
13264 }
13265 if (passive) {
13266 if (strcmp(straddr, "0.0.0.0") != 0) {
13267 goto bad;
13268 }
13269 } else {
13270 if (strcmp(straddr, "127.0.0.1") != 0) {
13271 goto bad;
13272 }
13273 }
13274 inet4++;
13275 break;
13276 case AF_INET6:
13277 if (strcmp(strport, "54321") != 0) {
13278 goto bad;
13279 }
13280 if (passive) {
13281 if (strcmp(straddr, "::") != 0) {
13282 goto bad;
13283 }
13284 } else {
13285 if (strcmp(straddr, "::1") != 0) {
13286 goto bad;
13287 }
13288 }
13289 inet6++;
13290 break;
13291 case AF_UNSPEC:
13292 goto bad;
13293 break;
13294 default:
13295 /* another family support? */
13296 break;
13297 }
13298 }
13299 }
13300
13301 if (!(inet4 == 0 || inet4 == 2))
13302 goto bad;
13303 if (!(inet6 == 0 || inet6 == 2))
13304 goto bad;
13305
13306 if (aitop)
13307 freeaddrinfo(aitop);
13308 exit(0);
13309
13310 bad:
13311 if (aitop)
13312 freeaddrinfo(aitop);
13313 exit(1);
13314}
13315
Martin v. Löwis11437992002-04-12 09:54:03 +000013316_ACEOF
13317rm -f conftest$ac_exeext
13318if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13319 (eval $ac_link) 2>&5
13320 ac_status=$?
13321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13322 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13324 (eval $ac_try) 2>&5
13325 ac_status=$?
13326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13327 (exit $ac_status); }; }; then
13328 echo "$as_me:$LINENO: result: good" >&5
13329echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013330buggygetaddrinfo=no
13331else
Martin v. Löwis11437992002-04-12 09:54:03 +000013332 echo "$as_me: program exited with status $ac_status" >&5
13333echo "$as_me: failed program was:" >&5
13334cat conftest.$ac_ext >&5
13335( exit $ac_status )
13336echo "$as_me:$LINENO: result: buggy" >&5
13337echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013338buggygetaddrinfo=yes
13339fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013340rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013341fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013342else
Martin v. Löwis11437992002-04-12 09:54:03 +000013343 echo "$as_me: failed program was:" >&5
13344cat conftest.$ac_ext >&5
13345
13346echo "$as_me:$LINENO: result: no" >&5
13347echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013348buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013349
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013350fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013351rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013352
13353if test "$buggygetaddrinfo" = "yes"; then
13354 if test "$ipv6" = "yes"; then
13355 echo 'Fatal: You must get working getaddrinfo() function.'
13356 echo ' or you can specify "--disable-ipv6"'.
13357 exit 1
13358 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013359else
Martin v. Löwis11437992002-04-12 09:54:03 +000013360
13361cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013362#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013363_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013364
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013365fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013366
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013367for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013368do
Martin v. Löwis11437992002-04-12 09:54:03 +000013369as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13370echo "$as_me:$LINENO: checking for $ac_func" >&5
13371echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13372if eval "test \"\${$as_ac_var+set}\" = set"; then
13373 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013374else
Martin v. Löwis11437992002-04-12 09:54:03 +000013375 cat >conftest.$ac_ext <<_ACEOF
13376#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013377#include "confdefs.h"
13378/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013379 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013380#include <assert.h>
13381/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013382#ifdef __cplusplus
13383extern "C"
13384#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013385/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013386 builtin and then its argument prototype would still apply. */
13387char $ac_func ();
13388char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013389
Martin v. Löwis11437992002-04-12 09:54:03 +000013390#ifdef F77_DUMMY_MAIN
13391# ifdef __cplusplus
13392 extern "C"
13393# endif
13394 int F77_DUMMY_MAIN() { return 1; }
13395#endif
13396int
13397main ()
13398{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013399/* The GNU C library defines this for functions which it implements
13400 to always fail with ENOSYS. Some functions are actually named
13401 something starting with __ and the normal name is an alias. */
13402#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13403choke me
13404#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013405f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013406#endif
13407
Martin v. Löwis11437992002-04-12 09:54:03 +000013408 ;
13409 return 0;
13410}
13411_ACEOF
13412rm -f conftest.$ac_objext conftest$ac_exeext
13413if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13414 (eval $ac_link) 2>&5
13415 ac_status=$?
13416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13417 (exit $ac_status); } &&
13418 { ac_try='test -s conftest$ac_exeext'
13419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13420 (eval $ac_try) 2>&5
13421 ac_status=$?
13422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13423 (exit $ac_status); }; }; then
13424 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013425else
Martin v. Löwis11437992002-04-12 09:54:03 +000013426 echo "$as_me: failed program was:" >&5
13427cat conftest.$ac_ext >&5
13428eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013429fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013430rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013431fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013432echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13433echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13434if test `eval echo '${'$as_ac_var'}'` = yes; then
13435 cat >>confdefs.h <<_ACEOF
13436#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13437_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013438
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013439fi
13440done
13441
Michael W. Hudson54241132001-12-07 15:38:26 +000013442
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013443# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000013444echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13445echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13446if test "${ac_cv_header_time+set}" = set; then
13447 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013448else
Martin v. Löwis11437992002-04-12 09:54:03 +000013449 cat >conftest.$ac_ext <<_ACEOF
13450#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013451#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013452#include <sys/types.h>
13453#include <sys/time.h>
13454#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013455
13456#ifdef F77_DUMMY_MAIN
13457# ifdef __cplusplus
13458 extern "C"
13459# endif
13460 int F77_DUMMY_MAIN() { return 1; }
13461#endif
13462int
13463main ()
13464{
13465if ((struct tm *) 0)
13466return 0;
13467 ;
13468 return 0;
13469}
13470_ACEOF
13471rm -f conftest.$ac_objext
13472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13473 (eval $ac_compile) 2>&5
13474 ac_status=$?
13475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13476 (exit $ac_status); } &&
13477 { ac_try='test -s conftest.$ac_objext'
13478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13479 (eval $ac_try) 2>&5
13480 ac_status=$?
13481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13482 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013483 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013484else
Martin v. Löwis11437992002-04-12 09:54:03 +000013485 echo "$as_me: failed program was:" >&5
13486cat conftest.$ac_ext >&5
13487ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013488fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013489rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013490fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013491echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
13492echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013493if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013494
13495cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013496#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013497_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013498
13499fi
13500
Martin v. Löwis11437992002-04-12 09:54:03 +000013501echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
13502echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
13503if test "${ac_cv_struct_tm+set}" = set; then
13504 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013505else
Martin v. Löwis11437992002-04-12 09:54:03 +000013506 cat >conftest.$ac_ext <<_ACEOF
13507#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013508#include "confdefs.h"
13509#include <sys/types.h>
13510#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013511
13512#ifdef F77_DUMMY_MAIN
13513# ifdef __cplusplus
13514 extern "C"
13515# endif
13516 int F77_DUMMY_MAIN() { return 1; }
13517#endif
13518int
13519main ()
13520{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013521struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000013522 ;
13523 return 0;
13524}
13525_ACEOF
13526rm -f conftest.$ac_objext
13527if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13528 (eval $ac_compile) 2>&5
13529 ac_status=$?
13530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13531 (exit $ac_status); } &&
13532 { ac_try='test -s conftest.$ac_objext'
13533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13534 (eval $ac_try) 2>&5
13535 ac_status=$?
13536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13537 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013538 ac_cv_struct_tm=time.h
13539else
Martin v. Löwis11437992002-04-12 09:54:03 +000013540 echo "$as_me: failed program was:" >&5
13541cat conftest.$ac_ext >&5
13542ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013543fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013544rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013545fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013546echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
13547echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013548if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013549
13550cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013551#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013552_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013553
13554fi
13555
Martin v. Löwis11437992002-04-12 09:54:03 +000013556echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13557echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
13558if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13559 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013560else
Martin v. Löwis11437992002-04-12 09:54:03 +000013561 cat >conftest.$ac_ext <<_ACEOF
13562#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013563#include "confdefs.h"
13564#include <sys/types.h>
13565#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013566
13567
13568#ifdef F77_DUMMY_MAIN
13569# ifdef __cplusplus
13570 extern "C"
13571# endif
13572 int F77_DUMMY_MAIN() { return 1; }
13573#endif
13574int
13575main ()
13576{
13577static struct tm ac_aggr;
13578if (ac_aggr.tm_zone)
13579return 0;
13580 ;
13581 return 0;
13582}
13583_ACEOF
13584rm -f conftest.$ac_objext
13585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13586 (eval $ac_compile) 2>&5
13587 ac_status=$?
13588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13589 (exit $ac_status); } &&
13590 { ac_try='test -s conftest.$ac_objext'
13591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13592 (eval $ac_try) 2>&5
13593 ac_status=$?
13594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13595 (exit $ac_status); }; }; then
13596 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013597else
Martin v. Löwis11437992002-04-12 09:54:03 +000013598 echo "$as_me: failed program was:" >&5
13599cat conftest.$ac_ext >&5
13600ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013601fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013602rm -f conftest.$ac_objext conftest.$ac_ext
13603fi
13604echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13605echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
13606if test $ac_cv_member_struct_tm_tm_zone = yes; then
13607
13608cat >>confdefs.h <<_ACEOF
13609#define HAVE_STRUCT_TM_TM_ZONE 1
13610_ACEOF
13611
13612
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013613fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013614
Martin v. Löwis11437992002-04-12 09:54:03 +000013615if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13616
13617cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013618#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013619_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013620
13621else
Martin v. Löwis11437992002-04-12 09:54:03 +000013622 echo "$as_me:$LINENO: checking for tzname" >&5
13623echo $ECHO_N "checking for tzname... $ECHO_C" >&6
13624if test "${ac_cv_var_tzname+set}" = set; then
13625 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013626else
Martin v. Löwis11437992002-04-12 09:54:03 +000013627 cat >conftest.$ac_ext <<_ACEOF
13628#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013629#include "confdefs.h"
13630#include <time.h>
13631#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013632extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013633#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013634
13635#ifdef F77_DUMMY_MAIN
13636# ifdef __cplusplus
13637 extern "C"
13638# endif
13639 int F77_DUMMY_MAIN() { return 1; }
13640#endif
13641int
13642main ()
13643{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013644atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000013645 ;
13646 return 0;
13647}
13648_ACEOF
13649rm -f conftest.$ac_objext conftest$ac_exeext
13650if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13651 (eval $ac_link) 2>&5
13652 ac_status=$?
13653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13654 (exit $ac_status); } &&
13655 { ac_try='test -s conftest$ac_exeext'
13656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13657 (eval $ac_try) 2>&5
13658 ac_status=$?
13659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13660 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013661 ac_cv_var_tzname=yes
13662else
Martin v. Löwis11437992002-04-12 09:54:03 +000013663 echo "$as_me: failed program was:" >&5
13664cat conftest.$ac_ext >&5
13665ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013666fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013667rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013668fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013669echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13670echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013671 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013672
13673cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013674#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013675_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013676
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013677 fi
13678fi
13679
Martin v. Löwis11437992002-04-12 09:54:03 +000013680echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
13681echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
13682if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
13683 echo $ECHO_N "(cached) $ECHO_C" >&6
13684else
13685 cat >conftest.$ac_ext <<_ACEOF
13686#line $LINENO "configure"
13687#include "confdefs.h"
13688$ac_includes_default
13689#ifdef F77_DUMMY_MAIN
13690# ifdef __cplusplus
13691 extern "C"
13692# endif
13693 int F77_DUMMY_MAIN() { return 1; }
13694#endif
13695int
13696main ()
13697{
13698static struct stat ac_aggr;
13699if (ac_aggr.st_rdev)
13700return 0;
13701 ;
13702 return 0;
13703}
13704_ACEOF
13705rm -f conftest.$ac_objext
13706if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13707 (eval $ac_compile) 2>&5
13708 ac_status=$?
13709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13710 (exit $ac_status); } &&
13711 { ac_try='test -s conftest.$ac_objext'
13712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13713 (eval $ac_try) 2>&5
13714 ac_status=$?
13715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13716 (exit $ac_status); }; }; then
13717 ac_cv_member_struct_stat_st_rdev=yes
13718else
13719 echo "$as_me: failed program was:" >&5
13720cat conftest.$ac_ext >&5
13721ac_cv_member_struct_stat_st_rdev=no
13722fi
13723rm -f conftest.$ac_objext conftest.$ac_ext
13724fi
13725echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
13726echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
13727if test $ac_cv_member_struct_stat_st_rdev = yes; then
13728
13729cat >>confdefs.h <<_ACEOF
13730#define HAVE_STRUCT_STAT_ST_RDEV 1
13731_ACEOF
13732
13733
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013734fi
13735
Martin v. Löwis11437992002-04-12 09:54:03 +000013736echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13737echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13738if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13739 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013740else
Martin v. Löwis11437992002-04-12 09:54:03 +000013741 cat >conftest.$ac_ext <<_ACEOF
13742#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013743#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013744$ac_includes_default
13745#ifdef F77_DUMMY_MAIN
13746# ifdef __cplusplus
13747 extern "C"
13748# endif
13749 int F77_DUMMY_MAIN() { return 1; }
13750#endif
13751int
13752main ()
13753{
13754static struct stat ac_aggr;
13755if (ac_aggr.st_blksize)
13756return 0;
13757 ;
13758 return 0;
13759}
13760_ACEOF
13761rm -f conftest.$ac_objext
13762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13763 (eval $ac_compile) 2>&5
13764 ac_status=$?
13765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13766 (exit $ac_status); } &&
13767 { ac_try='test -s conftest.$ac_objext'
13768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13769 (eval $ac_try) 2>&5
13770 ac_status=$?
13771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13772 (exit $ac_status); }; }; then
13773 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013774else
Martin v. Löwis11437992002-04-12 09:54:03 +000013775 echo "$as_me: failed program was:" >&5
13776cat conftest.$ac_ext >&5
13777ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013778fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013779rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013780fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013781echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13782echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13783if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013784
Martin v. Löwis11437992002-04-12 09:54:03 +000013785cat >>confdefs.h <<_ACEOF
13786#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13787_ACEOF
13788
13789
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013790fi
13791
Martin v. Löwis11437992002-04-12 09:54:03 +000013792echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13793echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13794if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13795 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013796else
Martin v. Löwis11437992002-04-12 09:54:03 +000013797 cat >conftest.$ac_ext <<_ACEOF
13798#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013799#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013800$ac_includes_default
13801#ifdef F77_DUMMY_MAIN
13802# ifdef __cplusplus
13803 extern "C"
13804# endif
13805 int F77_DUMMY_MAIN() { return 1; }
13806#endif
13807int
13808main ()
13809{
13810static struct stat ac_aggr;
13811if (ac_aggr.st_blocks)
13812return 0;
13813 ;
13814 return 0;
13815}
13816_ACEOF
13817rm -f conftest.$ac_objext
13818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13819 (eval $ac_compile) 2>&5
13820 ac_status=$?
13821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13822 (exit $ac_status); } &&
13823 { ac_try='test -s conftest.$ac_objext'
13824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13825 (eval $ac_try) 2>&5
13826 ac_status=$?
13827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13828 (exit $ac_status); }; }; then
13829 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013830else
Martin v. Löwis11437992002-04-12 09:54:03 +000013831 echo "$as_me: failed program was:" >&5
13832cat conftest.$ac_ext >&5
13833ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013834fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013835rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013836fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013837echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13838echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13839if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013840
Martin v. Löwis11437992002-04-12 09:54:03 +000013841cat >>confdefs.h <<_ACEOF
13842#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13843_ACEOF
13844
13845
13846cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013847#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013848_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013849
13850else
Martin v. Löwis11437992002-04-12 09:54:03 +000013851 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013852fi
13853
Michael W. Hudson54241132001-12-07 15:38:26 +000013854
Martin v. Löwis11437992002-04-12 09:54:03 +000013855
13856echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13857echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13858if test "${ac_cv_header_time_altzone+set}" = set; then
13859 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013860else
Martin v. Löwis11437992002-04-12 09:54:03 +000013861 cat >conftest.$ac_ext <<_ACEOF
13862#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013863#include "confdefs.h"
13864#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013865#ifdef F77_DUMMY_MAIN
13866# ifdef __cplusplus
13867 extern "C"
13868# endif
13869 int F77_DUMMY_MAIN() { return 1; }
13870#endif
13871int
13872main ()
13873{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013874return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013875 ;
13876 return 0;
13877}
13878_ACEOF
13879rm -f conftest.$ac_objext
13880if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13881 (eval $ac_compile) 2>&5
13882 ac_status=$?
13883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13884 (exit $ac_status); } &&
13885 { ac_try='test -s conftest.$ac_objext'
13886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13887 (eval $ac_try) 2>&5
13888 ac_status=$?
13889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13890 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013891 ac_cv_header_time_altzone=yes
13892else
Martin v. Löwis11437992002-04-12 09:54:03 +000013893 echo "$as_me: failed program was:" >&5
13894cat conftest.$ac_ext >&5
13895ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013896fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013897rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013898fi
13899
Martin v. Löwis11437992002-04-12 09:54:03 +000013900echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13901echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013902if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013903
13904cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013905#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013906_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013907
13908fi
13909
Guido van Rossumda88dad1995-01-26 00:46:29 +000013910was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013911echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13912echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13913cat >conftest.$ac_ext <<_ACEOF
13914#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013915#include "confdefs.h"
13916
13917#include <sys/types.h>
13918#include <sys/select.h>
13919#include <sys/time.h>
13920
Martin v. Löwis11437992002-04-12 09:54:03 +000013921#ifdef F77_DUMMY_MAIN
13922# ifdef __cplusplus
13923 extern "C"
13924# endif
13925 int F77_DUMMY_MAIN() { return 1; }
13926#endif
13927int
13928main ()
13929{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013930;
Martin v. Löwis11437992002-04-12 09:54:03 +000013931 ;
13932 return 0;
13933}
13934_ACEOF
13935rm -f conftest.$ac_objext
13936if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13937 (eval $ac_compile) 2>&5
13938 ac_status=$?
13939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13940 (exit $ac_status); } &&
13941 { ac_try='test -s conftest.$ac_objext'
13942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13943 (eval $ac_try) 2>&5
13944 ac_status=$?
13945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13946 (exit $ac_status); }; }; then
13947
13948
13949cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013950#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013951_ACEOF
13952
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013953 was_it_defined=yes
13954
Guido van Rossumf78abae1997-01-21 22:02:36 +000013955else
Martin v. Löwis11437992002-04-12 09:54:03 +000013956 echo "$as_me: failed program was:" >&5
13957cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013958fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013959rm -f conftest.$ac_objext conftest.$ac_ext
13960echo "$as_me:$LINENO: result: $was_it_defined" >&5
13961echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013962
Martin v. Löwis11437992002-04-12 09:54:03 +000013963echo "$as_me:$LINENO: checking for addrinfo" >&5
13964echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13965if test "${ac_cv_struct_addrinfo+set}" = set; then
13966 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013967else
Martin v. Löwis11437992002-04-12 09:54:03 +000013968 cat >conftest.$ac_ext <<_ACEOF
13969#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013970#include "confdefs.h"
13971
13972# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013973#ifdef F77_DUMMY_MAIN
13974# ifdef __cplusplus
13975 extern "C"
13976# endif
13977 int F77_DUMMY_MAIN() { return 1; }
13978#endif
13979int
13980main ()
13981{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013982struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013983 ;
13984 return 0;
13985}
13986_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
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013999 ac_cv_struct_addrinfo=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_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014004fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014005rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014006fi
14007
Martin v. Löwis11437992002-04-12 09:54:03 +000014008echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
14009echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014010if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014011
14012cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014013#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014014_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014015
14016fi
14017
Martin v. Löwis11437992002-04-12 09:54:03 +000014018echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
14019echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
14020if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
14021 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014022else
Martin v. Löwis11437992002-04-12 09:54:03 +000014023 cat >conftest.$ac_ext <<_ACEOF
14024#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014025#include "confdefs.h"
14026
14027# include <sys/types.h>
14028# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014029#ifdef F77_DUMMY_MAIN
14030# ifdef __cplusplus
14031 extern "C"
14032# endif
14033 int F77_DUMMY_MAIN() { return 1; }
14034#endif
14035int
14036main ()
14037{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014038struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014039 ;
14040 return 0;
14041}
14042_ACEOF
14043rm -f conftest.$ac_objext
14044if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14045 (eval $ac_compile) 2>&5
14046 ac_status=$?
14047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14048 (exit $ac_status); } &&
14049 { ac_try='test -s conftest.$ac_objext'
14050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14051 (eval $ac_try) 2>&5
14052 ac_status=$?
14053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14054 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014055 ac_cv_struct_sockaddr_storage=yes
14056else
Martin v. Löwis11437992002-04-12 09:54:03 +000014057 echo "$as_me: failed program was:" >&5
14058cat conftest.$ac_ext >&5
14059ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014060fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014061rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014062fi
14063
Martin v. Löwis11437992002-04-12 09:54:03 +000014064echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14065echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014066if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014067
14068cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014069#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014070_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014071
14072fi
14073
Guido van Rossum627b2d71993-12-24 10:39:16 +000014074# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014075
Michael W. Hudson54241132001-12-07 15:38:26 +000014076
Martin v. Löwis11437992002-04-12 09:54:03 +000014077echo "$as_me:$LINENO: checking whether char is unsigned" >&5
14078echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
14079if test "${ac_cv_c_char_unsigned+set}" = set; then
14080 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000014081else
Martin v. Löwis11437992002-04-12 09:54:03 +000014082 cat >conftest.$ac_ext <<_ACEOF
14083#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000014084#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014085$ac_includes_default
14086#ifdef F77_DUMMY_MAIN
14087# ifdef __cplusplus
14088 extern "C"
14089# endif
14090 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014091#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014092int
14093main ()
14094{
14095static int test_array [1 - 2 * !(((char) -1) < 0)];
14096test_array [0] = 0
14097
14098 ;
14099 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014100}
Martin v. Löwis11437992002-04-12 09:54:03 +000014101_ACEOF
14102rm -f conftest.$ac_objext
14103if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14104 (eval $ac_compile) 2>&5
14105 ac_status=$?
14106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14107 (exit $ac_status); } &&
14108 { ac_try='test -s conftest.$ac_objext'
14109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14110 (eval $ac_try) 2>&5
14111 ac_status=$?
14112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14113 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000014114 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014115else
14116 echo "$as_me: failed program was:" >&5
14117cat conftest.$ac_ext >&5
14118ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014119fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014120rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014121fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014122echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
14123echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014124if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014125 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014126#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014127_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014128
14129fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014130
Martin v. Löwis11437992002-04-12 09:54:03 +000014131echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
14132echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14133if test "${ac_cv_prog_cc_stdc+set}" = set; then
14134 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014135else
Martin v. Löwis11437992002-04-12 09:54:03 +000014136 ac_cv_prog_cc_stdc=no
14137ac_save_CC=$CC
14138cat >conftest.$ac_ext <<_ACEOF
14139#line $LINENO "configure"
14140#include "confdefs.h"
14141#include <stdarg.h>
14142#include <stdio.h>
14143#include <sys/types.h>
14144#include <sys/stat.h>
14145/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14146struct buf { int x; };
14147FILE * (*rcsopen) (struct buf *, struct stat *, int);
14148static char *e (p, i)
14149 char **p;
14150 int i;
14151{
14152 return p[i];
14153}
14154static char *f (char * (*g) (char **, int), char **p, ...)
14155{
14156 char *s;
14157 va_list v;
14158 va_start (v,p);
14159 s = g (p, va_arg (v,int));
14160 va_end (v);
14161 return s;
14162}
14163int test (int i, double x);
14164struct s1 {int (*f) (int a);};
14165struct s2 {int (*f) (double a);};
14166int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14167int argc;
14168char **argv;
14169#ifdef F77_DUMMY_MAIN
14170# ifdef __cplusplus
14171 extern "C"
14172# endif
14173 int F77_DUMMY_MAIN() { return 1; }
14174#endif
14175int
14176main ()
14177{
14178return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14179 ;
14180 return 0;
14181}
14182_ACEOF
14183# Don't try gcc -ansi; that turns off useful extensions and
14184# breaks some systems' header files.
14185# AIX -qlanglvl=ansi
14186# Ultrix and OSF/1 -std1
14187# HP-UX 10.20 and later -Ae
14188# HP-UX older versions -Aa -D_HPUX_SOURCE
14189# SVR4 -Xc -D__EXTENSIONS__
14190for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14191do
14192 CC="$ac_save_CC $ac_arg"
14193 rm -f conftest.$ac_objext
14194if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14195 (eval $ac_compile) 2>&5
14196 ac_status=$?
14197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14198 (exit $ac_status); } &&
14199 { ac_try='test -s conftest.$ac_objext'
14200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14201 (eval $ac_try) 2>&5
14202 ac_status=$?
14203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14204 (exit $ac_status); }; }; then
14205 ac_cv_prog_cc_stdc=$ac_arg
14206break
14207else
14208 echo "$as_me: failed program was:" >&5
14209cat conftest.$ac_ext >&5
14210fi
14211rm -f conftest.$ac_objext
14212done
14213rm -f conftest.$ac_ext conftest.$ac_objext
14214CC=$ac_save_CC
14215
14216fi
14217
14218case "x$ac_cv_prog_cc_stdc" in
14219 x|xno)
14220 echo "$as_me:$LINENO: result: none needed" >&5
14221echo "${ECHO_T}none needed" >&6 ;;
14222 *)
14223 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14224echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14225 CC="$CC $ac_cv_prog_cc_stdc" ;;
14226esac
14227
14228echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14229echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14230if test "${ac_cv_c_const+set}" = set; then
14231 echo $ECHO_N "(cached) $ECHO_C" >&6
14232else
14233 cat >conftest.$ac_ext <<_ACEOF
14234#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014235#include "confdefs.h"
14236
Martin v. Löwis11437992002-04-12 09:54:03 +000014237#ifdef F77_DUMMY_MAIN
14238# ifdef __cplusplus
14239 extern "C"
14240# endif
14241 int F77_DUMMY_MAIN() { return 1; }
14242#endif
14243int
14244main ()
14245{
14246/* FIXME: Include the comments suggested by Paul. */
14247#ifndef __cplusplus
14248 /* Ultrix mips cc rejects this. */
14249 typedef int charset[2];
14250 const charset x;
14251 /* SunOS 4.1.1 cc rejects this. */
14252 char const *const *ccp;
14253 char **p;
14254 /* NEC SVR4.0.2 mips cc rejects this. */
14255 struct point {int x, y;};
14256 static struct point const zero = {0,0};
14257 /* AIX XL C 1.02.0.0 rejects this.
14258 It does not let you subtract one const X* pointer from another in
14259 an arm of an if-expression whose if-part is not a constant
14260 expression */
14261 const char *g = "string";
14262 ccp = &g + (g ? g-g : 0);
14263 /* HPUX 7.0 cc rejects these. */
14264 ++ccp;
14265 p = (char**) ccp;
14266 ccp = (char const *const *) p;
14267 { /* SCO 3.2v4 cc rejects this. */
14268 char *t;
14269 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014270
Martin v. Löwis11437992002-04-12 09:54:03 +000014271 *t++ = 0;
14272 }
14273 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14274 int x[] = {25, 17};
14275 const int *foo = &x[0];
14276 ++foo;
14277 }
14278 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14279 typedef const int *iptr;
14280 iptr p = 0;
14281 ++p;
14282 }
14283 { /* AIX XL C 1.02.0.0 rejects this saying
14284 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14285 struct s { int j; const int *ap[3]; };
14286 struct s *b; b->j = 5;
14287 }
14288 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14289 const int foo = 10;
14290 }
14291#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014292
Martin v. Löwis11437992002-04-12 09:54:03 +000014293 ;
14294 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014295}
Martin v. Löwis11437992002-04-12 09:54:03 +000014296_ACEOF
14297rm -f conftest.$ac_objext
14298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14299 (eval $ac_compile) 2>&5
14300 ac_status=$?
14301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14302 (exit $ac_status); } &&
14303 { ac_try='test -s conftest.$ac_objext'
14304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14305 (eval $ac_try) 2>&5
14306 ac_status=$?
14307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14308 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014309 ac_cv_c_const=yes
14310else
Martin v. Löwis11437992002-04-12 09:54:03 +000014311 echo "$as_me: failed program was:" >&5
14312cat conftest.$ac_ext >&5
14313ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014314fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014315rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014316fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014317echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14318echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014319if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014320
14321cat >>confdefs.h <<\_ACEOF
14322#define const
14323_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014324
14325fi
14326
Michael W. Hudson54241132001-12-07 15:38:26 +000014327
Guido van Rossumda88dad1995-01-26 00:46:29 +000014328works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014329echo "$as_me:$LINENO: checking for working volatile" >&5
14330echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14331cat >conftest.$ac_ext <<_ACEOF
14332#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014333#include "confdefs.h"
14334
Martin v. Löwis11437992002-04-12 09:54:03 +000014335#ifdef F77_DUMMY_MAIN
14336# ifdef __cplusplus
14337 extern "C"
14338# endif
14339 int F77_DUMMY_MAIN() { return 1; }
14340#endif
14341int
14342main ()
14343{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014344volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014345 ;
14346 return 0;
14347}
14348_ACEOF
14349rm -f conftest.$ac_objext
14350if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14351 (eval $ac_compile) 2>&5
14352 ac_status=$?
14353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14354 (exit $ac_status); } &&
14355 { ac_try='test -s conftest.$ac_objext'
14356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14357 (eval $ac_try) 2>&5
14358 ac_status=$?
14359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14360 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014361 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014362else
Martin v. Löwis11437992002-04-12 09:54:03 +000014363 echo "$as_me: failed program was:" >&5
14364cat conftest.$ac_ext >&5
14365
14366cat >>confdefs.h <<\_ACEOF
14367#define volatile
14368_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014369
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014370
Guido van Rossum627b2d71993-12-24 10:39:16 +000014371fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014372rm -f conftest.$ac_objext conftest.$ac_ext
14373echo "$as_me:$LINENO: result: $works" >&5
14374echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014375
Guido van Rossumda88dad1995-01-26 00:46:29 +000014376works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014377echo "$as_me:$LINENO: checking for working signed char" >&5
14378echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14379cat >conftest.$ac_ext <<_ACEOF
14380#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014381#include "confdefs.h"
14382
Martin v. Löwis11437992002-04-12 09:54:03 +000014383#ifdef F77_DUMMY_MAIN
14384# ifdef __cplusplus
14385 extern "C"
14386# endif
14387 int F77_DUMMY_MAIN() { return 1; }
14388#endif
14389int
14390main ()
14391{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014392signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014393 ;
14394 return 0;
14395}
14396_ACEOF
14397rm -f conftest.$ac_objext
14398if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14399 (eval $ac_compile) 2>&5
14400 ac_status=$?
14401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14402 (exit $ac_status); } &&
14403 { ac_try='test -s conftest.$ac_objext'
14404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14405 (eval $ac_try) 2>&5
14406 ac_status=$?
14407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14408 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014409 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014410else
Martin v. Löwis11437992002-04-12 09:54:03 +000014411 echo "$as_me: failed program was:" >&5
14412cat conftest.$ac_ext >&5
14413
14414cat >>confdefs.h <<\_ACEOF
14415#define signed
14416_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000014417
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014418
Guido van Rossum7f43da71994-08-01 12:15:30 +000014419fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014420rm -f conftest.$ac_objext conftest.$ac_ext
14421echo "$as_me:$LINENO: result: $works" >&5
14422echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014423
Guido van Rossumda88dad1995-01-26 00:46:29 +000014424have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014425echo "$as_me:$LINENO: checking for prototypes" >&5
14426echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
14427cat >conftest.$ac_ext <<_ACEOF
14428#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014429#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014430int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014431#ifdef F77_DUMMY_MAIN
14432# ifdef __cplusplus
14433 extern "C"
14434# endif
14435 int F77_DUMMY_MAIN() { return 1; }
14436#endif
14437int
14438main ()
14439{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014440return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014441 ;
14442 return 0;
14443}
14444_ACEOF
14445rm -f conftest.$ac_objext
14446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14447 (eval $ac_compile) 2>&5
14448 ac_status=$?
14449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14450 (exit $ac_status); } &&
14451 { ac_try='test -s conftest.$ac_objext'
14452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14453 (eval $ac_try) 2>&5
14454 ac_status=$?
14455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14456 (exit $ac_status); }; }; then
14457
14458
14459cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014460#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014461_ACEOF
14462
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014463 have_prototypes=yes
14464
Guido van Rossumf78abae1997-01-21 22:02:36 +000014465else
Martin v. Löwis11437992002-04-12 09:54:03 +000014466 echo "$as_me: failed program was:" >&5
14467cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014468fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014469rm -f conftest.$ac_objext conftest.$ac_ext
14470echo "$as_me:$LINENO: result: $have_prototypes" >&5
14471echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014472
Guido van Rossumda88dad1995-01-26 00:46:29 +000014473works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014474echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
14475echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
14476cat >conftest.$ac_ext <<_ACEOF
14477#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014478#include "confdefs.h"
14479
14480#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014481int foo(int x, ...) {
14482 va_list va;
14483 va_start(va, x);
14484 va_arg(va, int);
14485 va_arg(va, char *);
14486 va_arg(va, double);
14487 return 0;
14488}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014489
Martin v. Löwis11437992002-04-12 09:54:03 +000014490#ifdef F77_DUMMY_MAIN
14491# ifdef __cplusplus
14492 extern "C"
14493# endif
14494 int F77_DUMMY_MAIN() { return 1; }
14495#endif
14496int
14497main ()
14498{
Guido van Rossum90eea071996-08-30 20:58:57 +000014499return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014500 ;
14501 return 0;
14502}
14503_ACEOF
14504rm -f conftest.$ac_objext
14505if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14506 (eval $ac_compile) 2>&5
14507 ac_status=$?
14508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14509 (exit $ac_status); } &&
14510 { ac_try='test -s conftest.$ac_objext'
14511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14512 (eval $ac_try) 2>&5
14513 ac_status=$?
14514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14515 (exit $ac_status); }; }; then
14516
14517
14518cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014519#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014520_ACEOF
14521
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014522 works=yes
14523
Guido van Rossumf78abae1997-01-21 22:02:36 +000014524else
Martin v. Löwis11437992002-04-12 09:54:03 +000014525 echo "$as_me: failed program was:" >&5
14526cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000014527fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014528rm -f conftest.$ac_objext conftest.$ac_ext
14529echo "$as_me:$LINENO: result: $works" >&5
14530echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014531
Guido van Rossumda88dad1995-01-26 00:46:29 +000014532if test "$have_prototypes" = yes; then
14533bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014534echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
14535echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
14536cat >conftest.$ac_ext <<_ACEOF
14537#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014538#include "confdefs.h"
14539#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014540#ifdef F77_DUMMY_MAIN
14541# ifdef __cplusplus
14542 extern "C"
14543# endif
14544 int F77_DUMMY_MAIN() { return 1; }
14545#endif
14546int
14547main ()
14548{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014549char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000014550 ;
14551 return 0;
14552}
14553_ACEOF
14554rm -f conftest.$ac_objext
14555if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14556 (eval $ac_compile) 2>&5
14557 ac_status=$?
14558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14559 (exit $ac_status); } &&
14560 { ac_try='test -s conftest.$ac_objext'
14561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14562 (eval $ac_try) 2>&5
14563 ac_status=$?
14564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14565 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014566 :
14567else
Martin v. Löwis11437992002-04-12 09:54:03 +000014568 echo "$as_me: failed program was:" >&5
14569cat conftest.$ac_ext >&5
14570
14571cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014572#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014573_ACEOF
14574
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014575 bad_prototypes=yes
14576
Guido van Rossum627b2d71993-12-24 10:39:16 +000014577fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014578rm -f conftest.$ac_objext conftest.$ac_ext
14579echo "$as_me:$LINENO: result: $bad_prototypes" >&5
14580echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014581fi
14582
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014583# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000014584echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
14585echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
14586cat >conftest.$ac_ext <<_ACEOF
14587#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014588#include "confdefs.h"
14589#include <sys/types.h>
14590#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014591#ifdef F77_DUMMY_MAIN
14592# ifdef __cplusplus
14593 extern "C"
14594# endif
14595 int F77_DUMMY_MAIN() { return 1; }
14596#endif
14597int
14598main ()
14599{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014600struct sockaddr x;
14601x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014602 ;
14603 return 0;
14604}
14605_ACEOF
14606rm -f conftest.$ac_objext
14607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14608 (eval $ac_compile) 2>&5
14609 ac_status=$?
14610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14611 (exit $ac_status); } &&
14612 { ac_try='test -s conftest.$ac_objext'
14613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14614 (eval $ac_try) 2>&5
14615 ac_status=$?
14616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14617 (exit $ac_status); }; }; then
14618 echo "$as_me:$LINENO: result: yes" >&5
14619echo "${ECHO_T}yes" >&6
14620
14621cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014622#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014623_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014624
14625else
Martin v. Löwis11437992002-04-12 09:54:03 +000014626 echo "$as_me: failed program was:" >&5
14627cat conftest.$ac_ext >&5
14628echo "$as_me:$LINENO: result: no" >&5
14629echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014630fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014631rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014632
Guido van Rossumda88dad1995-01-26 00:46:29 +000014633va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014634echo "$as_me:$LINENO: checking whether va_list is an array" >&5
14635echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
14636cat >conftest.$ac_ext <<_ACEOF
14637#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014638#include "confdefs.h"
14639
14640#ifdef HAVE_STDARG_PROTOTYPES
14641#include <stdarg.h>
14642#else
14643#include <varargs.h>
14644#endif
14645
Martin v. Löwis11437992002-04-12 09:54:03 +000014646#ifdef F77_DUMMY_MAIN
14647# ifdef __cplusplus
14648 extern "C"
14649# endif
14650 int F77_DUMMY_MAIN() { return 1; }
14651#endif
14652int
14653main ()
14654{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014655va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000014656 ;
14657 return 0;
14658}
14659_ACEOF
14660rm -f conftest.$ac_objext
14661if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14662 (eval $ac_compile) 2>&5
14663 ac_status=$?
14664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14665 (exit $ac_status); } &&
14666 { ac_try='test -s conftest.$ac_objext'
14667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14668 (eval $ac_try) 2>&5
14669 ac_status=$?
14670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14671 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014672 :
14673else
Martin v. Löwis11437992002-04-12 09:54:03 +000014674 echo "$as_me: failed program was:" >&5
14675cat conftest.$ac_ext >&5
14676
14677
14678cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014679#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014680_ACEOF
14681
Guido van Rossumda88dad1995-01-26 00:46:29 +000014682 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014683
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014684fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014685rm -f conftest.$ac_objext conftest.$ac_ext
14686echo "$as_me:$LINENO: result: $va_list_is_array" >&5
14687echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014688
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014689# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014690
14691
14692
14693echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
14694echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
14695if test "${ac_cv_func_gethostbyname_r+set}" = set; then
14696 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014697else
Martin v. Löwis11437992002-04-12 09:54:03 +000014698 cat >conftest.$ac_ext <<_ACEOF
14699#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014700#include "confdefs.h"
14701/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014702 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014703#include <assert.h>
14704/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014705#ifdef __cplusplus
14706extern "C"
14707#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014708/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014709 builtin and then its argument prototype would still apply. */
14710char gethostbyname_r ();
14711char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014712
Martin v. Löwis11437992002-04-12 09:54:03 +000014713#ifdef F77_DUMMY_MAIN
14714# ifdef __cplusplus
14715 extern "C"
14716# endif
14717 int F77_DUMMY_MAIN() { return 1; }
14718#endif
14719int
14720main ()
14721{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014722/* The GNU C library defines this for functions which it implements
14723 to always fail with ENOSYS. Some functions are actually named
14724 something starting with __ and the normal name is an alias. */
14725#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
14726choke me
14727#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014728f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014729#endif
14730
Martin v. Löwis11437992002-04-12 09:54:03 +000014731 ;
14732 return 0;
14733}
14734_ACEOF
14735rm -f conftest.$ac_objext conftest$ac_exeext
14736if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14737 (eval $ac_link) 2>&5
14738 ac_status=$?
14739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14740 (exit $ac_status); } &&
14741 { ac_try='test -s conftest$ac_exeext'
14742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14743 (eval $ac_try) 2>&5
14744 ac_status=$?
14745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14746 (exit $ac_status); }; }; then
14747 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014748else
Martin v. Löwis11437992002-04-12 09:54:03 +000014749 echo "$as_me: failed program was:" >&5
14750cat conftest.$ac_ext >&5
14751ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014752fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014753rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014754fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014755echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
14756echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
14757if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014758
Martin v. Löwis11437992002-04-12 09:54:03 +000014759 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014760#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014761_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014762
Martin v. Löwis11437992002-04-12 09:54:03 +000014763 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
14764echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014765 OLD_CFLAGS=$CFLAGS
14766 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014767 cat >conftest.$ac_ext <<_ACEOF
14768#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014769#include "confdefs.h"
14770
14771# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014772
14773#ifdef F77_DUMMY_MAIN
14774# ifdef __cplusplus
14775 extern "C"
14776# endif
14777 int F77_DUMMY_MAIN() { return 1; }
14778#endif
14779int
14780main ()
14781{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014782
14783 char *name;
14784 struct hostent *he, *res;
14785 char buffer[2048];
14786 int buflen = 2048;
14787 int h_errnop;
14788
14789 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014790
14791 ;
14792 return 0;
14793}
14794_ACEOF
14795rm -f conftest.$ac_objext
14796if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14797 (eval $ac_compile) 2>&5
14798 ac_status=$?
14799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14800 (exit $ac_status); } &&
14801 { ac_try='test -s conftest.$ac_objext'
14802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14803 (eval $ac_try) 2>&5
14804 ac_status=$?
14805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14806 (exit $ac_status); }; }; then
14807
14808 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014809#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014810_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014811
Martin v. Löwis11437992002-04-12 09:54:03 +000014812
14813cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014814#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014815_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014816
Martin v. Löwis11437992002-04-12 09:54:03 +000014817 echo "$as_me:$LINENO: result: yes" >&5
14818echo "${ECHO_T}yes" >&6
14819
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014820else
Martin v. Löwis11437992002-04-12 09:54:03 +000014821 echo "$as_me: failed program was:" >&5
14822cat conftest.$ac_ext >&5
14823
14824 echo "$as_me:$LINENO: result: no" >&5
14825echo "${ECHO_T}no" >&6
14826 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14827echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14828 cat >conftest.$ac_ext <<_ACEOF
14829#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014830#include "confdefs.h"
14831
14832# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014833
14834#ifdef F77_DUMMY_MAIN
14835# ifdef __cplusplus
14836 extern "C"
14837# endif
14838 int F77_DUMMY_MAIN() { return 1; }
14839#endif
14840int
14841main ()
14842{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014843
14844 char *name;
14845 struct hostent *he;
14846 char buffer[2048];
14847 int buflen = 2048;
14848 int h_errnop;
14849
14850 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014851
14852 ;
14853 return 0;
14854}
14855_ACEOF
14856rm -f conftest.$ac_objext
14857if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14858 (eval $ac_compile) 2>&5
14859 ac_status=$?
14860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14861 (exit $ac_status); } &&
14862 { ac_try='test -s conftest.$ac_objext'
14863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14864 (eval $ac_try) 2>&5
14865 ac_status=$?
14866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14867 (exit $ac_status); }; }; then
14868
14869 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014870#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014871_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014872
Martin v. Löwis11437992002-04-12 09:54:03 +000014873
14874cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014875#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014876_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014877
Martin v. Löwis11437992002-04-12 09:54:03 +000014878 echo "$as_me:$LINENO: result: yes" >&5
14879echo "${ECHO_T}yes" >&6
14880
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014881else
Martin v. Löwis11437992002-04-12 09:54:03 +000014882 echo "$as_me: failed program was:" >&5
14883cat conftest.$ac_ext >&5
14884
14885 echo "$as_me:$LINENO: result: no" >&5
14886echo "${ECHO_T}no" >&6
14887 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14888echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14889 cat >conftest.$ac_ext <<_ACEOF
14890#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014891#include "confdefs.h"
14892
14893# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014894
14895#ifdef F77_DUMMY_MAIN
14896# ifdef __cplusplus
14897 extern "C"
14898# endif
14899 int F77_DUMMY_MAIN() { return 1; }
14900#endif
14901int
14902main ()
14903{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014904
14905 char *name;
14906 struct hostent *he;
14907 struct hostent_data data;
14908
14909 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014910
14911 ;
14912 return 0;
14913}
14914_ACEOF
14915rm -f conftest.$ac_objext
14916if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14917 (eval $ac_compile) 2>&5
14918 ac_status=$?
14919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14920 (exit $ac_status); } &&
14921 { ac_try='test -s conftest.$ac_objext'
14922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14923 (eval $ac_try) 2>&5
14924 ac_status=$?
14925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14926 (exit $ac_status); }; }; then
14927
14928 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014929#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014930_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014931
Martin v. Löwis11437992002-04-12 09:54:03 +000014932
14933cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014934#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014935_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014936
Martin v. Löwis11437992002-04-12 09:54:03 +000014937 echo "$as_me:$LINENO: result: yes" >&5
14938echo "${ECHO_T}yes" >&6
14939
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014940else
Martin v. Löwis11437992002-04-12 09:54:03 +000014941 echo "$as_me: failed program was:" >&5
14942cat conftest.$ac_ext >&5
14943
14944 echo "$as_me:$LINENO: result: no" >&5
14945echo "${ECHO_T}no" >&6
14946
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014947fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014948rm -f conftest.$ac_objext conftest.$ac_ext
14949
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014950fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014951rm -f conftest.$ac_objext conftest.$ac_ext
14952
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014953fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014954rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014955 CFLAGS=$OLD_CFLAGS
14956
14957else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014958
Martin v. Löwis11437992002-04-12 09:54:03 +000014959
14960for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014961do
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 Rossuma96f0ba1999-03-22 21:49:51 +000014967else
Martin v. Löwis11437992002-04-12 09:54:03 +000014968 cat >conftest.$ac_ext <<_ACEOF
14969#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014970#include "confdefs.h"
14971/* 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 Rossuma96f0ba1999-03-22 21:49:51 +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 Rossuma96f0ba1999-03-22 21:49:51 +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 Rossuma96f0ba1999-03-22 21:49:51 +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 Rossuma96f0ba1999-03-22 21:49:51 +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. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014995#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014996choke me
14997#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014998f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +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"
Michael W. Hudson54241132001-12-07 15:38:26 +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
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015031
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015032fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015033done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015034
Michael W. Hudson54241132001-12-07 15:38:26 +000015035
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015036fi
15037
Michael W. Hudson54241132001-12-07 15:38:26 +000015038
15039
15040
15041
15042
15043
Guido van Rossum627b2d71993-12-24 10:39:16 +000015044# checks for system services
15045# (none yet)
15046
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015047# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015048echo "$as_me:$LINENO: checking for __fpu_control" >&5
15049echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15050if test "${ac_cv_func___fpu_control+set}" = set; then
15051 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015052else
Martin v. Löwis11437992002-04-12 09:54:03 +000015053 cat >conftest.$ac_ext <<_ACEOF
15054#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015055#include "confdefs.h"
15056/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015057 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015058#include <assert.h>
15059/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015060#ifdef __cplusplus
15061extern "C"
15062#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015063/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015064 builtin and then its argument prototype would still apply. */
15065char __fpu_control ();
15066char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015067
Martin v. Löwis11437992002-04-12 09:54:03 +000015068#ifdef F77_DUMMY_MAIN
15069# ifdef __cplusplus
15070 extern "C"
15071# endif
15072 int F77_DUMMY_MAIN() { return 1; }
15073#endif
15074int
15075main ()
15076{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015077/* The GNU C library defines this for functions which it implements
15078 to always fail with ENOSYS. Some functions are actually named
15079 something starting with __ and the normal name is an alias. */
15080#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
15081choke me
15082#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015083f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015084#endif
15085
Martin v. Löwis11437992002-04-12 09:54:03 +000015086 ;
15087 return 0;
15088}
15089_ACEOF
15090rm -f conftest.$ac_objext conftest$ac_exeext
15091if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15092 (eval $ac_link) 2>&5
15093 ac_status=$?
15094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15095 (exit $ac_status); } &&
15096 { ac_try='test -s conftest$ac_exeext'
15097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15098 (eval $ac_try) 2>&5
15099 ac_status=$?
15100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15101 (exit $ac_status); }; }; then
15102 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015103else
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 echo "$as_me: failed program was:" >&5
15105cat conftest.$ac_ext >&5
15106ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015107fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015108rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015109fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015110echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
15111echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
15112if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015113 :
15114else
Martin v. Löwis11437992002-04-12 09:54:03 +000015115
15116echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
15117echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
15118if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
15119 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015120else
Martin v. Löwis11437992002-04-12 09:54:03 +000015121 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015122LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015123cat >conftest.$ac_ext <<_ACEOF
15124#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015125#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015126
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015127/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015128#ifdef __cplusplus
15129extern "C"
15130#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015131/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015132 builtin and then its argument prototype would still apply. */
15133char __fpu_control ();
15134#ifdef F77_DUMMY_MAIN
15135# ifdef __cplusplus
15136 extern "C"
15137# endif
15138 int F77_DUMMY_MAIN() { return 1; }
15139#endif
15140int
15141main ()
15142{
15143__fpu_control ();
15144 ;
15145 return 0;
15146}
15147_ACEOF
15148rm -f conftest.$ac_objext conftest$ac_exeext
15149if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15150 (eval $ac_link) 2>&5
15151 ac_status=$?
15152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15153 (exit $ac_status); } &&
15154 { ac_try='test -s conftest$ac_exeext'
15155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15156 (eval $ac_try) 2>&5
15157 ac_status=$?
15158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15159 (exit $ac_status); }; }; then
15160 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015161else
Martin v. Löwis11437992002-04-12 09:54:03 +000015162 echo "$as_me: failed program was:" >&5
15163cat conftest.$ac_ext >&5
15164ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015165fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015166rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15167LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015168fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015169echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15170echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15171if test $ac_cv_lib_ieee___fpu_control = yes; then
15172 cat >>confdefs.h <<_ACEOF
15173#define HAVE_LIBIEEE 1
15174_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015175
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015176 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015177
Guido van Rossum627b2d71993-12-24 10:39:16 +000015178fi
15179
Michael W. Hudson54241132001-12-07 15:38:26 +000015180
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015181fi
15182
Michael W. Hudson54241132001-12-07 15:38:26 +000015183
Guido van Rossum7f253911997-05-09 02:42:48 +000015184# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015185echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15186echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15187
Guido van Rossum7f253911997-05-09 02:42:48 +000015188# Check whether --with-fpectl or --without-fpectl was given.
15189if test "${with_fpectl+set}" = set; then
15190 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015191
Guido van Rossum7f253911997-05-09 02:42:48 +000015192if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015193then
15194
15195cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015196#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015197_ACEOF
15198
15199 echo "$as_me:$LINENO: result: yes" >&5
15200echo "${ECHO_T}yes" >&6
15201else echo "$as_me:$LINENO: result: no" >&5
15202echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015203fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015204else
Martin v. Löwis11437992002-04-12 09:54:03 +000015205 echo "$as_me:$LINENO: result: no" >&5
15206echo "${ECHO_T}no" >&6
15207fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015208
Guido van Rossum7f43da71994-08-01 12:15:30 +000015209# check for --with-libm=...
15210
Guido van Rossum563e7081996-09-10 18:20:48 +000015211case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015212Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015213BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015214*) LIBM=-lm
15215esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015216echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15217echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15218
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015219# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015220if test "${with_libm+set}" = set; then
15221 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015222
Guido van Rossum7f253911997-05-09 02:42:48 +000015223if test "$withval" = no
15224then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015225 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15226echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015227elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015228then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015229 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15230echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15231else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15232echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15233 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015234fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015235else
Martin v. Löwis11437992002-04-12 09:54:03 +000015236 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15237echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15238fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015239
15240# check for --with-libc=...
15241
Martin v. Löwis11437992002-04-12 09:54:03 +000015242echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15243echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15244
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015245# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015246if test "${with_libc+set}" = set; then
15247 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015248
Guido van Rossum7f253911997-05-09 02:42:48 +000015249if test "$withval" = no
15250then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015251 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15252echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015253elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015254then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015255 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
15256echo "${ECHO_T}set LIBC=\"$withval\"" >&6
15257else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
15258echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
15259 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015260fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015261else
Martin v. Löwis11437992002-04-12 09:54:03 +000015262 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
15263echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
15264fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015265
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015266# check for hypot() in math library
15267LIBS_SAVE=$LIBS
15268LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000015269
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015270for ac_func in hypot
15271do
Martin v. Löwis11437992002-04-12 09:54:03 +000015272as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15273echo "$as_me:$LINENO: checking for $ac_func" >&5
15274echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15275if eval "test \"\${$as_ac_var+set}\" = set"; then
15276 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015277else
Martin v. Löwis11437992002-04-12 09:54:03 +000015278 cat >conftest.$ac_ext <<_ACEOF
15279#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015280#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015281/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015282 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015283#include <assert.h>
15284/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015285#ifdef __cplusplus
15286extern "C"
15287#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015288/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015289 builtin and then its argument prototype would still apply. */
15290char $ac_func ();
15291char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015292
Martin v. Löwis11437992002-04-12 09:54:03 +000015293#ifdef F77_DUMMY_MAIN
15294# ifdef __cplusplus
15295 extern "C"
15296# endif
15297 int F77_DUMMY_MAIN() { return 1; }
15298#endif
15299int
15300main ()
15301{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015302/* The GNU C library defines this for functions which it implements
15303 to always fail with ENOSYS. Some functions are actually named
15304 something starting with __ and the normal name is an alias. */
15305#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15306choke me
15307#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015308f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015309#endif
15310
Martin v. Löwis11437992002-04-12 09:54:03 +000015311 ;
15312 return 0;
15313}
15314_ACEOF
15315rm -f conftest.$ac_objext conftest$ac_exeext
15316if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15317 (eval $ac_link) 2>&5
15318 ac_status=$?
15319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15320 (exit $ac_status); } &&
15321 { ac_try='test -s conftest$ac_exeext'
15322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15323 (eval $ac_try) 2>&5
15324 ac_status=$?
15325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15326 (exit $ac_status); }; }; then
15327 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015328else
Martin v. Löwis11437992002-04-12 09:54:03 +000015329 echo "$as_me: failed program was:" >&5
15330cat conftest.$ac_ext >&5
15331eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015332fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015333rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015334fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015335echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15336echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15337if test `eval echo '${'$as_ac_var'}'` = yes; then
15338 cat >>confdefs.h <<_ACEOF
15339#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15340_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015341
Michael W. Hudson54241132001-12-07 15:38:26 +000015342else
Martin v. Löwis11437992002-04-12 09:54:03 +000015343 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015344fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015345done
15346
Michael W. Hudson54241132001-12-07 15:38:26 +000015347
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015348LIBS=$LIBS_SAVE
15349
Guido van Rossumef2255b2000-03-10 22:30:29 +000015350# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015351if test "${ac_cv_header_wchar_h+set}" = set; then
15352 echo "$as_me:$LINENO: checking for wchar.h" >&5
15353echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15354if test "${ac_cv_header_wchar_h+set}" = set; then
15355 echo $ECHO_N "(cached) $ECHO_C" >&6
15356fi
15357echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15358echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015359else
Martin v. Löwis11437992002-04-12 09:54:03 +000015360 # Is the header compilable?
15361echo "$as_me:$LINENO: checking wchar.h usability" >&5
15362echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15363cat >conftest.$ac_ext <<_ACEOF
15364#line $LINENO "configure"
15365#include "confdefs.h"
15366$ac_includes_default
15367#include <wchar.h>
15368_ACEOF
15369rm -f conftest.$ac_objext
15370if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15371 (eval $ac_compile) 2>&5
15372 ac_status=$?
15373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15374 (exit $ac_status); } &&
15375 { ac_try='test -s conftest.$ac_objext'
15376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15377 (eval $ac_try) 2>&5
15378 ac_status=$?
15379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15380 (exit $ac_status); }; }; then
15381 ac_header_compiler=yes
15382else
15383 echo "$as_me: failed program was:" >&5
15384cat conftest.$ac_ext >&5
15385ac_header_compiler=no
15386fi
15387rm -f conftest.$ac_objext conftest.$ac_ext
15388echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15389echo "${ECHO_T}$ac_header_compiler" >&6
15390
15391# Is the header present?
15392echo "$as_me:$LINENO: checking wchar.h presence" >&5
15393echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
15394cat >conftest.$ac_ext <<_ACEOF
15395#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015396#include "confdefs.h"
15397#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015398_ACEOF
15399if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15400 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15401 ac_status=$?
15402 egrep -v '^ *\+' conftest.er1 >conftest.err
15403 rm -f conftest.er1
15404 cat conftest.err >&5
15405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15406 (exit $ac_status); } >/dev/null; then
15407 if test -s conftest.err; then
15408 ac_cpp_err=$ac_c_preproc_warn_flag
15409 else
15410 ac_cpp_err=
15411 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015412else
Martin v. Löwis11437992002-04-12 09:54:03 +000015413 ac_cpp_err=yes
15414fi
15415if test -z "$ac_cpp_err"; then
15416 ac_header_preproc=yes
15417else
15418 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000015419 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015420 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015421fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015422rm -f conftest.err conftest.$ac_ext
15423echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15424echo "${ECHO_T}$ac_header_preproc" >&6
15425
15426# So? What about this header?
15427case $ac_header_compiler:$ac_header_preproc in
15428 yes:no )
15429 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
15430echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15431 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15432echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15433 no:yes )
15434 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
15435echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
15436 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
15437echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
15438 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15439echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15440esac
15441echo "$as_me:$LINENO: checking for wchar.h" >&5
15442echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15443if test "${ac_cv_header_wchar_h+set}" = set; then
15444 echo $ECHO_N "(cached) $ECHO_C" >&6
15445else
15446 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000015447fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015448echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15449echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
15450
15451fi
15452if test $ac_cv_header_wchar_h = yes; then
15453
15454
15455cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015456#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015457_ACEOF
15458
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015459 wchar_h="yes"
15460
Guido van Rossumef2255b2000-03-10 22:30:29 +000015461else
Martin v. Löwis11437992002-04-12 09:54:03 +000015462 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015463
15464fi
15465
Michael W. Hudson54241132001-12-07 15:38:26 +000015466
Martin v. Löwis11437992002-04-12 09:54:03 +000015467
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015468# determine wchar_t size
15469if test "$wchar_h" = yes
15470then
Martin v. Löwis11437992002-04-12 09:54:03 +000015471 echo "$as_me:$LINENO: checking for wchar_t" >&5
15472echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
15473if test "${ac_cv_type_wchar_t+set}" = set; then
15474 echo $ECHO_N "(cached) $ECHO_C" >&6
15475else
15476 cat >conftest.$ac_ext <<_ACEOF
15477#line $LINENO "configure"
15478#include "confdefs.h"
15479#include <wchar.h>
15480
15481#ifdef F77_DUMMY_MAIN
15482# ifdef __cplusplus
15483 extern "C"
15484# endif
15485 int F77_DUMMY_MAIN() { return 1; }
15486#endif
15487int
15488main ()
15489{
15490if ((wchar_t *) 0)
15491 return 0;
15492if (sizeof (wchar_t))
15493 return 0;
15494 ;
15495 return 0;
15496}
15497_ACEOF
15498rm -f conftest.$ac_objext
15499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15500 (eval $ac_compile) 2>&5
15501 ac_status=$?
15502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15503 (exit $ac_status); } &&
15504 { ac_try='test -s conftest.$ac_objext'
15505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15506 (eval $ac_try) 2>&5
15507 ac_status=$?
15508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15509 (exit $ac_status); }; }; then
15510 ac_cv_type_wchar_t=yes
15511else
15512 echo "$as_me: failed program was:" >&5
15513cat conftest.$ac_ext >&5
15514ac_cv_type_wchar_t=no
15515fi
15516rm -f conftest.$ac_objext conftest.$ac_ext
15517fi
15518echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
15519echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
15520
15521echo "$as_me:$LINENO: checking size of wchar_t" >&5
15522echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
15523if test "${ac_cv_sizeof_wchar_t+set}" = set; then
15524 echo $ECHO_N "(cached) $ECHO_C" >&6
15525else
15526 if test "$ac_cv_type_wchar_t" = yes; then
15527 # The cast to unsigned long works around a bug in the HP C Compiler
15528 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15529 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15530 # This bug is HP SR number 8606223364.
15531 if test "$cross_compiling" = yes; then
15532 # Depending upon the size, compute the lo and hi bounds.
15533cat >conftest.$ac_ext <<_ACEOF
15534#line $LINENO "configure"
15535#include "confdefs.h"
15536#include <wchar.h>
15537
15538#ifdef F77_DUMMY_MAIN
15539# ifdef __cplusplus
15540 extern "C"
15541# endif
15542 int F77_DUMMY_MAIN() { return 1; }
15543#endif
15544int
15545main ()
15546{
15547static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
15548test_array [0] = 0
15549
15550 ;
15551 return 0;
15552}
15553_ACEOF
15554rm -f conftest.$ac_objext
15555if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15556 (eval $ac_compile) 2>&5
15557 ac_status=$?
15558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15559 (exit $ac_status); } &&
15560 { ac_try='test -s conftest.$ac_objext'
15561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15562 (eval $ac_try) 2>&5
15563 ac_status=$?
15564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15565 (exit $ac_status); }; }; then
15566 ac_lo=0 ac_mid=0
15567 while :; do
15568 cat >conftest.$ac_ext <<_ACEOF
15569#line $LINENO "configure"
15570#include "confdefs.h"
15571#include <wchar.h>
15572
15573#ifdef F77_DUMMY_MAIN
15574# ifdef __cplusplus
15575 extern "C"
15576# endif
15577 int F77_DUMMY_MAIN() { return 1; }
15578#endif
15579int
15580main ()
15581{
15582static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15583test_array [0] = 0
15584
15585 ;
15586 return 0;
15587}
15588_ACEOF
15589rm -f conftest.$ac_objext
15590if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15591 (eval $ac_compile) 2>&5
15592 ac_status=$?
15593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15594 (exit $ac_status); } &&
15595 { ac_try='test -s conftest.$ac_objext'
15596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15597 (eval $ac_try) 2>&5
15598 ac_status=$?
15599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15600 (exit $ac_status); }; }; then
15601 ac_hi=$ac_mid; break
15602else
15603 echo "$as_me: failed program was:" >&5
15604cat conftest.$ac_ext >&5
15605ac_lo=`expr $ac_mid + 1`
15606 if test $ac_lo -le $ac_mid; then
15607 ac_lo= ac_hi=
15608 break
15609 fi
15610 ac_mid=`expr 2 '*' $ac_mid + 1`
15611fi
15612rm -f conftest.$ac_objext conftest.$ac_ext
15613 done
15614else
15615 echo "$as_me: failed program was:" >&5
15616cat conftest.$ac_ext >&5
15617cat >conftest.$ac_ext <<_ACEOF
15618#line $LINENO "configure"
15619#include "confdefs.h"
15620#include <wchar.h>
15621
15622#ifdef F77_DUMMY_MAIN
15623# ifdef __cplusplus
15624 extern "C"
15625# endif
15626 int F77_DUMMY_MAIN() { return 1; }
15627#endif
15628int
15629main ()
15630{
15631static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
15632test_array [0] = 0
15633
15634 ;
15635 return 0;
15636}
15637_ACEOF
15638rm -f conftest.$ac_objext
15639if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15640 (eval $ac_compile) 2>&5
15641 ac_status=$?
15642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15643 (exit $ac_status); } &&
15644 { ac_try='test -s conftest.$ac_objext'
15645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15646 (eval $ac_try) 2>&5
15647 ac_status=$?
15648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15649 (exit $ac_status); }; }; then
15650 ac_hi=-1 ac_mid=-1
15651 while :; do
15652 cat >conftest.$ac_ext <<_ACEOF
15653#line $LINENO "configure"
15654#include "confdefs.h"
15655#include <wchar.h>
15656
15657#ifdef F77_DUMMY_MAIN
15658# ifdef __cplusplus
15659 extern "C"
15660# endif
15661 int F77_DUMMY_MAIN() { return 1; }
15662#endif
15663int
15664main ()
15665{
15666static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
15667test_array [0] = 0
15668
15669 ;
15670 return 0;
15671}
15672_ACEOF
15673rm -f conftest.$ac_objext
15674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15675 (eval $ac_compile) 2>&5
15676 ac_status=$?
15677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15678 (exit $ac_status); } &&
15679 { ac_try='test -s conftest.$ac_objext'
15680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15681 (eval $ac_try) 2>&5
15682 ac_status=$?
15683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15684 (exit $ac_status); }; }; then
15685 ac_lo=$ac_mid; break
15686else
15687 echo "$as_me: failed program was:" >&5
15688cat conftest.$ac_ext >&5
15689ac_hi=`expr '(' $ac_mid ')' - 1`
15690 if test $ac_mid -le $ac_hi; then
15691 ac_lo= ac_hi=
15692 break
15693 fi
15694 ac_mid=`expr 2 '*' $ac_mid`
15695fi
15696rm -f conftest.$ac_objext conftest.$ac_ext
15697 done
15698else
15699 echo "$as_me: failed program was:" >&5
15700cat conftest.$ac_ext >&5
15701ac_lo= ac_hi=
15702fi
15703rm -f conftest.$ac_objext conftest.$ac_ext
15704fi
15705rm -f conftest.$ac_objext conftest.$ac_ext
15706# Binary search between lo and hi bounds.
15707while test "x$ac_lo" != "x$ac_hi"; do
15708 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15709 cat >conftest.$ac_ext <<_ACEOF
15710#line $LINENO "configure"
15711#include "confdefs.h"
15712#include <wchar.h>
15713
15714#ifdef F77_DUMMY_MAIN
15715# ifdef __cplusplus
15716 extern "C"
15717# endif
15718 int F77_DUMMY_MAIN() { return 1; }
15719#endif
15720int
15721main ()
15722{
15723static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15724test_array [0] = 0
15725
15726 ;
15727 return 0;
15728}
15729_ACEOF
15730rm -f conftest.$ac_objext
15731if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15732 (eval $ac_compile) 2>&5
15733 ac_status=$?
15734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15735 (exit $ac_status); } &&
15736 { ac_try='test -s conftest.$ac_objext'
15737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15738 (eval $ac_try) 2>&5
15739 ac_status=$?
15740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15741 (exit $ac_status); }; }; then
15742 ac_hi=$ac_mid
15743else
15744 echo "$as_me: failed program was:" >&5
15745cat conftest.$ac_ext >&5
15746ac_lo=`expr '(' $ac_mid ')' + 1`
15747fi
15748rm -f conftest.$ac_objext conftest.$ac_ext
15749done
15750case $ac_lo in
15751?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15752'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15753echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15754 { (exit 1); exit 1; }; } ;;
15755esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015756else
15757 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015758 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15759echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15760 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015761else
Martin v. Löwis11437992002-04-12 09:54:03 +000015762 cat >conftest.$ac_ext <<_ACEOF
15763#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015764#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015765#include <wchar.h>
15766
15767long longval () { return (long) (sizeof (wchar_t)); }
15768unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015769#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015770#include <stdlib.h>
15771#ifdef F77_DUMMY_MAIN
15772# ifdef __cplusplus
15773 extern "C"
15774# endif
15775 int F77_DUMMY_MAIN() { return 1; }
15776#endif
15777int
15778main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015779{
Martin v. Löwis11437992002-04-12 09:54:03 +000015780
15781 FILE *f = fopen ("conftest.val", "w");
15782 if (! f)
15783 exit (1);
15784 if (((long) (sizeof (wchar_t))) < 0)
15785 {
15786 long i = longval ();
15787 if (i != ((long) (sizeof (wchar_t))))
15788 exit (1);
15789 fprintf (f, "%ld\n", i);
15790 }
15791 else
15792 {
15793 unsigned long i = ulongval ();
15794 if (i != ((long) (sizeof (wchar_t))))
15795 exit (1);
15796 fprintf (f, "%lu\n", i);
15797 }
15798 exit (ferror (f) || fclose (f) != 0);
15799
15800 ;
15801 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015802}
Martin v. Löwis11437992002-04-12 09:54:03 +000015803_ACEOF
15804rm -f conftest$ac_exeext
15805if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15806 (eval $ac_link) 2>&5
15807 ac_status=$?
15808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15809 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15811 (eval $ac_try) 2>&5
15812 ac_status=$?
15813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15814 (exit $ac_status); }; }; then
15815 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015816else
Martin v. Löwis11437992002-04-12 09:54:03 +000015817 echo "$as_me: program exited with status $ac_status" >&5
15818echo "$as_me: failed program was:" >&5
15819cat conftest.$ac_ext >&5
15820( exit $ac_status )
15821{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15822echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15823 { (exit 1); exit 1; }; }
15824fi
15825rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15826fi
15827fi
15828rm -f conftest.val
15829else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015830 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015831fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015832fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015833echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15834echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15835cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015836#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015837_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015838
Michael W. Hudson54241132001-12-07 15:38:26 +000015839
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015840fi
15841
Martin v. Löwis11437992002-04-12 09:54:03 +000015842echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15843echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015844# Check whether --enable-unicode or --disable-unicode was given.
15845if test "${enable_unicode+set}" = set; then
15846 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015847
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015848else
15849 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015850fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015851
15852if test $enable_unicode = yes
15853then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015854 # Without any arguments, Py_UNICODE defaults to two-byte mode
15855 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015856fi
15857
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015858
15859
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015860case "$enable_unicode" in
15861ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015862 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015863#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015864_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015865
15866 ;;
15867ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015868 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015869#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015870_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015871
15872 ;;
15873esac
15874
Michael W. Hudson54241132001-12-07 15:38:26 +000015875
Martin v. Löwis11437992002-04-12 09:54:03 +000015876
15877
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015878
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015879if test "$enable_unicode" = "no"
15880then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015881 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015882 echo "$as_me:$LINENO: result: not used" >&5
15883echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015884else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015885 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015886
15887cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015888#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015889_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015890
15891 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15892 then
15893 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015894
Martin v. Löwis11437992002-04-12 09:54:03 +000015895cat >>confdefs.h <<\_ACEOF
15896#define HAVE_USABLE_WCHAR_T 1
15897_ACEOF
15898
15899 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015900#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015901_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015902
15903 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15904 then
15905 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015906 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015907#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015908_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015909
15910 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15911 then
15912 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015913 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015914#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015915_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015916
15917 else
15918 PY_UNICODE_TYPE="no type found"
15919 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015920 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15921echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015922fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015923
15924# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015925echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15926echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15927if test "${ac_cv_c_bigendian+set}" = set; then
15928 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015929else
Martin v. Löwis11437992002-04-12 09:54:03 +000015930 # See if sys/param.h defines the BYTE_ORDER macro.
15931cat >conftest.$ac_ext <<_ACEOF
15932#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015933#include "confdefs.h"
15934#include <sys/types.h>
15935#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015936
Martin v. Löwis11437992002-04-12 09:54:03 +000015937#ifdef F77_DUMMY_MAIN
15938# ifdef __cplusplus
15939 extern "C"
15940# endif
15941 int F77_DUMMY_MAIN() { return 1; }
15942#endif
15943int
15944main ()
15945{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015946#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15947 bogus endian macros
15948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015949
15950 ;
15951 return 0;
15952}
15953_ACEOF
15954rm -f conftest.$ac_objext
15955if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15956 (eval $ac_compile) 2>&5
15957 ac_status=$?
15958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15959 (exit $ac_status); } &&
15960 { ac_try='test -s conftest.$ac_objext'
15961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15962 (eval $ac_try) 2>&5
15963 ac_status=$?
15964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15965 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015966 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015967cat >conftest.$ac_ext <<_ACEOF
15968#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015969#include "confdefs.h"
15970#include <sys/types.h>
15971#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015972
Martin v. Löwis11437992002-04-12 09:54:03 +000015973#ifdef F77_DUMMY_MAIN
15974# ifdef __cplusplus
15975 extern "C"
15976# endif
15977 int F77_DUMMY_MAIN() { return 1; }
15978#endif
15979int
15980main ()
15981{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015982#if BYTE_ORDER != BIG_ENDIAN
15983 not big endian
15984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015985
15986 ;
15987 return 0;
15988}
15989_ACEOF
15990rm -f conftest.$ac_objext
15991if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15992 (eval $ac_compile) 2>&5
15993 ac_status=$?
15994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15995 (exit $ac_status); } &&
15996 { ac_try='test -s conftest.$ac_objext'
15997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15998 (eval $ac_try) 2>&5
15999 ac_status=$?
16000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16001 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016002 ac_cv_c_bigendian=yes
16003else
Martin v. Löwis11437992002-04-12 09:54:03 +000016004 echo "$as_me: failed program was:" >&5
16005cat conftest.$ac_ext >&5
16006ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016007fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016008rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016009else
Martin v. Löwis11437992002-04-12 09:54:03 +000016010 echo "$as_me: failed program was:" >&5
16011cat conftest.$ac_ext >&5
16012# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000016013if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016014 # try to guess the endianess by grep'ing values into an object file
16015 ac_cv_c_bigendian=unknown
16016 cat >conftest.$ac_ext <<_ACEOF
16017#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016018#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016019short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16020short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16021void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
16022short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16023short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16024void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
16025#ifdef F77_DUMMY_MAIN
16026# ifdef __cplusplus
16027 extern "C"
16028# endif
16029 int F77_DUMMY_MAIN() { return 1; }
16030#endif
16031int
16032main ()
16033{
16034 _ascii (); _ebcdic ();
16035 ;
16036 return 0;
16037}
16038_ACEOF
16039rm -f conftest.$ac_objext
16040if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16041 (eval $ac_compile) 2>&5
16042 ac_status=$?
16043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16044 (exit $ac_status); } &&
16045 { ac_try='test -s conftest.$ac_objext'
16046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16047 (eval $ac_try) 2>&5
16048 ac_status=$?
16049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16050 (exit $ac_status); }; }; then
16051 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
16052 ac_cv_c_bigendian=yes
16053fi
16054if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16055 if test "$ac_cv_c_bigendian" = unknown; then
16056 ac_cv_c_bigendian=no
16057 else
16058 # finding both strings is unlikely to happen, but who knows?
16059 ac_cv_c_bigendian=unknown
16060 fi
16061fi
16062else
16063 echo "$as_me: failed program was:" >&5
16064cat conftest.$ac_ext >&5
16065fi
16066rm -f conftest.$ac_objext conftest.$ac_ext
16067else
16068 cat >conftest.$ac_ext <<_ACEOF
16069#line $LINENO "configure"
16070#include "confdefs.h"
16071int
16072main ()
16073{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016074 /* Are we little or big endian? From Harbison&Steele. */
16075 union
16076 {
16077 long l;
16078 char c[sizeof (long)];
16079 } u;
16080 u.l = 1;
16081 exit (u.c[sizeof (long) - 1] == 1);
16082}
Martin v. Löwis11437992002-04-12 09:54:03 +000016083_ACEOF
16084rm -f conftest$ac_exeext
16085if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16086 (eval $ac_link) 2>&5
16087 ac_status=$?
16088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16089 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16091 (eval $ac_try) 2>&5
16092 ac_status=$?
16093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16094 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016095 ac_cv_c_bigendian=no
16096else
Martin v. Löwis11437992002-04-12 09:54:03 +000016097 echo "$as_me: program exited with status $ac_status" >&5
16098echo "$as_me: failed program was:" >&5
16099cat conftest.$ac_ext >&5
16100( exit $ac_status )
16101ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016103rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016104fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016105fi
16106rm -f conftest.$ac_objext conftest.$ac_ext
16107fi
16108echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16109echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16110case $ac_cv_c_bigendian in
16111 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016112
Martin v. Löwis11437992002-04-12 09:54:03 +000016113cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016114#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016115_ACEOF
16116 ;;
16117 no)
16118 ;;
16119 *)
16120 { { echo "$as_me:$LINENO: error: unknown endianess
16121presetting ac_cv_c_bigendian=no (or yes) will help" >&5
16122echo "$as_me: error: unknown endianess
16123presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16124 { (exit 1); exit 1; }; } ;;
16125esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016126
Michael W. Hudson54241132001-12-07 15:38:26 +000016127
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016128# Check whether right shifting a negative integer extends the sign bit
16129# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016130echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16131echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16132if test "${ac_cv_rshift_extends_sign+set}" = set; then
16133 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016134else
Martin v. Löwis11437992002-04-12 09:54:03 +000016135
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016136if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016137 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016138else
Martin v. Löwis11437992002-04-12 09:54:03 +000016139 cat >conftest.$ac_ext <<_ACEOF
16140#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016141#include "confdefs.h"
16142
16143int main()
16144{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016145 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016146}
16147
Martin v. Löwis11437992002-04-12 09:54:03 +000016148_ACEOF
16149rm -f conftest$ac_exeext
16150if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16151 (eval $ac_link) 2>&5
16152 ac_status=$?
16153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16154 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16156 (eval $ac_try) 2>&5
16157 ac_status=$?
16158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16159 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016160 ac_cv_rshift_extends_sign=yes
16161else
Martin v. Löwis11437992002-04-12 09:54:03 +000016162 echo "$as_me: program exited with status $ac_status" >&5
16163echo "$as_me: failed program was:" >&5
16164cat conftest.$ac_ext >&5
16165( exit $ac_status )
16166ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016167fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016168rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16169fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016170fi
16171
Martin v. Löwis11437992002-04-12 09:54:03 +000016172echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16173echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016174if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016175then
Martin v. Löwis11437992002-04-12 09:54:03 +000016176
16177cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016178#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016179_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016180
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016181fi
16182
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016183# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016184echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16185echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16186if test "${ac_cv_have_getc_unlocked+set}" = set; then
16187 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016188else
Martin v. Löwis11437992002-04-12 09:54:03 +000016189
16190cat >conftest.$ac_ext <<_ACEOF
16191#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016192#include "confdefs.h"
16193#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016194#ifdef F77_DUMMY_MAIN
16195# ifdef __cplusplus
16196 extern "C"
16197# endif
16198 int F77_DUMMY_MAIN() { return 1; }
16199#endif
16200int
16201main ()
16202{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016203
16204 FILE *f = fopen("/dev/null", "r");
16205 flockfile(f);
16206 getc_unlocked(f);
16207 funlockfile(f);
16208
Martin v. Löwis11437992002-04-12 09:54:03 +000016209 ;
16210 return 0;
16211}
16212_ACEOF
16213rm -f conftest.$ac_objext conftest$ac_exeext
16214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16215 (eval $ac_link) 2>&5
16216 ac_status=$?
16217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16218 (exit $ac_status); } &&
16219 { ac_try='test -s conftest$ac_exeext'
16220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16221 (eval $ac_try) 2>&5
16222 ac_status=$?
16223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16224 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016225 ac_cv_have_getc_unlocked=yes
16226else
Martin v. Löwis11437992002-04-12 09:54:03 +000016227 echo "$as_me: failed program was:" >&5
16228cat conftest.$ac_ext >&5
16229ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016231rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016232fi
16233
Martin v. Löwis11437992002-04-12 09:54:03 +000016234echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16235echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016236if test "$ac_cv_have_getc_unlocked" = yes
16237then
Martin v. Löwis11437992002-04-12 09:54:03 +000016238
16239cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016240#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016241_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016242
16243fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016244
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016245# check for readline 2.2
16246cat >conftest.$ac_ext <<_ACEOF
16247#line $LINENO "configure"
16248#include "confdefs.h"
16249#include <readline/readline.h>
16250_ACEOF
16251if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16252 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16253 ac_status=$?
16254 egrep -v '^ *\+' conftest.er1 >conftest.err
16255 rm -f conftest.er1
16256 cat conftest.err >&5
16257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16258 (exit $ac_status); } >/dev/null; then
16259 if test -s conftest.err; then
16260 ac_cpp_err=$ac_c_preproc_warn_flag
16261 else
16262 ac_cpp_err=
16263 fi
16264else
16265 ac_cpp_err=yes
16266fi
16267if test -z "$ac_cpp_err"; then
16268 have_readline=yes
16269else
16270 echo "$as_me: failed program was:" >&5
16271 cat conftest.$ac_ext >&5
16272 have_readline=no
16273fi
16274rm -f conftest.err conftest.$ac_ext
16275if test $have_readline = yes
16276then
16277 cat >conftest.$ac_ext <<_ACEOF
16278#line $LINENO "configure"
16279#include "confdefs.h"
16280#include <readline/readline.h>
16281
16282_ACEOF
16283if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16284 egrep "extern int rl_completion_append_character;" >/dev/null 2>&1; then
16285
16286cat >>confdefs.h <<\_ACEOF
16287#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
16288_ACEOF
16289
16290fi
16291rm -f conftest*
16292
16293fi
16294
Martin v. Löwis0daad592001-09-30 21:09:59 +000016295# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000016296echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
16297echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
16298if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
16299 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000016300else
Martin v. Löwis11437992002-04-12 09:54:03 +000016301 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000016302LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016303cat >conftest.$ac_ext <<_ACEOF
16304#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000016305#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016306
Guido van Rossum353ae582001-07-10 16:45:32 +000016307/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016308#ifdef __cplusplus
16309extern "C"
16310#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000016311/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016312 builtin and then its argument prototype would still apply. */
16313char rl_pre_input_hook ();
16314#ifdef F77_DUMMY_MAIN
16315# ifdef __cplusplus
16316 extern "C"
16317# endif
16318 int F77_DUMMY_MAIN() { return 1; }
16319#endif
16320int
16321main ()
16322{
16323rl_pre_input_hook ();
16324 ;
16325 return 0;
16326}
16327_ACEOF
16328rm -f conftest.$ac_objext conftest$ac_exeext
16329if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16330 (eval $ac_link) 2>&5
16331 ac_status=$?
16332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16333 (exit $ac_status); } &&
16334 { ac_try='test -s conftest$ac_exeext'
16335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16336 (eval $ac_try) 2>&5
16337 ac_status=$?
16338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16339 (exit $ac_status); }; }; then
16340 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016341else
Martin v. Löwis11437992002-04-12 09:54:03 +000016342 echo "$as_me: failed program was:" >&5
16343cat conftest.$ac_ext >&5
16344ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016345fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016346rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16347LIBS=$ac_check_lib_save_LIBS
16348fi
16349echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16350echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16351if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016352
Martin v. Löwis11437992002-04-12 09:54:03 +000016353cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016354#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016355_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016356
Martin v. Löwis0daad592001-09-30 21:09:59 +000016357fi
16358
Michael W. Hudson54241132001-12-07 15:38:26 +000016359
Martin v. Löwis0daad592001-09-30 21:09:59 +000016360# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016361echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16362echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16363if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16364 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016365else
Martin v. Löwis11437992002-04-12 09:54:03 +000016366 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016367LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016368cat >conftest.$ac_ext <<_ACEOF
16369#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016370#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016371
Martin v. Löwis0daad592001-09-30 21:09:59 +000016372/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016373#ifdef __cplusplus
16374extern "C"
16375#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016376/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016377 builtin and then its argument prototype would still apply. */
16378char rl_completion_matches ();
16379#ifdef F77_DUMMY_MAIN
16380# ifdef __cplusplus
16381 extern "C"
16382# endif
16383 int F77_DUMMY_MAIN() { return 1; }
16384#endif
16385int
16386main ()
16387{
16388rl_completion_matches ();
16389 ;
16390 return 0;
16391}
16392_ACEOF
16393rm -f conftest.$ac_objext conftest$ac_exeext
16394if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16395 (eval $ac_link) 2>&5
16396 ac_status=$?
16397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16398 (exit $ac_status); } &&
16399 { ac_try='test -s conftest$ac_exeext'
16400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16401 (eval $ac_try) 2>&5
16402 ac_status=$?
16403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16404 (exit $ac_status); }; }; then
16405 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000016406else
Martin v. Löwis11437992002-04-12 09:54:03 +000016407 echo "$as_me: failed program was:" >&5
16408cat conftest.$ac_ext >&5
16409ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000016410fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016411rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16412LIBS=$ac_check_lib_save_LIBS
16413fi
16414echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
16415echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
16416if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016417
Martin v. Löwis11437992002-04-12 09:54:03 +000016418cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016419#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016420_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016421
Guido van Rossum353ae582001-07-10 16:45:32 +000016422fi
16423
Jack Jansendd19cf82001-12-06 22:36:17 +000016424
Martin v. Löwis11437992002-04-12 09:54:03 +000016425echo "$as_me:$LINENO: checking for broken nice()" >&5
16426echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
16427if test "${ac_cv_broken_nice+set}" = set; then
16428 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016429else
Martin v. Löwis11437992002-04-12 09:54:03 +000016430
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016431if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016432 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016433else
Martin v. Löwis11437992002-04-12 09:54:03 +000016434 cat >conftest.$ac_ext <<_ACEOF
16435#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016436#include "confdefs.h"
16437
16438int main()
16439{
16440 int val1 = nice(1);
16441 if (val1 != -1 && val1 == nice(2))
16442 exit(0);
16443 exit(1);
16444}
16445
Martin v. Löwis11437992002-04-12 09:54:03 +000016446_ACEOF
16447rm -f conftest$ac_exeext
16448if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16449 (eval $ac_link) 2>&5
16450 ac_status=$?
16451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16452 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16454 (eval $ac_try) 2>&5
16455 ac_status=$?
16456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16457 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016458 ac_cv_broken_nice=yes
16459else
Martin v. Löwis11437992002-04-12 09:54:03 +000016460 echo "$as_me: program exited with status $ac_status" >&5
16461echo "$as_me: failed program was:" >&5
16462cat conftest.$ac_ext >&5
16463( exit $ac_status )
16464ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016465fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016466rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16467fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016468fi
16469
Martin v. Löwis11437992002-04-12 09:54:03 +000016470echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
16471echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016472if test "$ac_cv_broken_nice" = yes
16473then
Martin v. Löwis11437992002-04-12 09:54:03 +000016474
16475cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016476#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016477_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016478
16479fi
16480
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016481# Look for subsecond timestamps in struct stat
16482echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
16483echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
16484if test "${ac_cv_stat_tv_nsec+set}" = set; then
16485 echo $ECHO_N "(cached) $ECHO_C" >&6
16486else
16487 cat >conftest.$ac_ext <<_ACEOF
16488#line $LINENO "configure"
16489#include "confdefs.h"
16490#include <sys/stat.h>
16491#ifdef F77_DUMMY_MAIN
16492# ifdef __cplusplus
16493 extern "C"
16494# endif
16495 int F77_DUMMY_MAIN() { return 1; }
16496#endif
16497int
16498main ()
16499{
16500
16501struct stat st;
16502st.st_mtim.tv_nsec = 1;
16503
16504 ;
16505 return 0;
16506}
16507_ACEOF
16508rm -f conftest.$ac_objext
16509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16510 (eval $ac_compile) 2>&5
16511 ac_status=$?
16512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16513 (exit $ac_status); } &&
16514 { ac_try='test -s conftest.$ac_objext'
16515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16516 (eval $ac_try) 2>&5
16517 ac_status=$?
16518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16519 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016520 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016521else
16522 echo "$as_me: failed program was:" >&5
16523cat conftest.$ac_ext >&5
16524ac_cv_stat_tv_nsec=no
16525fi
16526rm -f conftest.$ac_objext conftest.$ac_ext
16527fi
16528
16529echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
16530echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
16531if test "$ac_cv_stat_tv_nsec" = yes
16532then
16533
16534cat >>confdefs.h <<\_ACEOF
16535#define HAVE_STAT_TV_NSEC 1
16536_ACEOF
16537
16538fi
16539
Jack Jansen666b1e72001-10-31 12:11:48 +000016540# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000016541echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
16542echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
16543if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
16544 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016545else
Martin v. Löwis11437992002-04-12 09:54:03 +000016546 cat >conftest.$ac_ext <<_ACEOF
16547#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016548#include "confdefs.h"
16549#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016550#ifdef F77_DUMMY_MAIN
16551# ifdef __cplusplus
16552 extern "C"
16553# endif
16554 int F77_DUMMY_MAIN() { return 1; }
16555#endif
16556int
16557main ()
16558{
Jack Jansen666b1e72001-10-31 12:11:48 +000016559
16560 int rtn;
16561 rtn = mvwdelch(0,0,0);
16562
Martin v. Löwis11437992002-04-12 09:54:03 +000016563 ;
16564 return 0;
16565}
16566_ACEOF
16567rm -f conftest.$ac_objext
16568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16569 (eval $ac_compile) 2>&5
16570 ac_status=$?
16571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16572 (exit $ac_status); } &&
16573 { ac_try='test -s conftest.$ac_objext'
16574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16575 (eval $ac_try) 2>&5
16576 ac_status=$?
16577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16578 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016579 ac_cv_mvwdelch_is_expression=yes
16580else
Martin v. Löwis11437992002-04-12 09:54:03 +000016581 echo "$as_me: failed program was:" >&5
16582cat conftest.$ac_ext >&5
16583ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016584fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016585rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016586fi
16587
Martin v. Löwis11437992002-04-12 09:54:03 +000016588echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
16589echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016590
16591if test "$ac_cv_mvwdelch_is_expression" = yes
16592then
Martin v. Löwis11437992002-04-12 09:54:03 +000016593
16594cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016595#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016596_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016597
16598fi
16599
Martin v. Löwis11437992002-04-12 09:54:03 +000016600echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
16601echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
16602if test "${ac_cv_window_has_flags+set}" = set; then
16603 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016604else
Martin v. Löwis11437992002-04-12 09:54:03 +000016605 cat >conftest.$ac_ext <<_ACEOF
16606#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016607#include "confdefs.h"
16608#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016609#ifdef F77_DUMMY_MAIN
16610# ifdef __cplusplus
16611 extern "C"
16612# endif
16613 int F77_DUMMY_MAIN() { return 1; }
16614#endif
16615int
16616main ()
16617{
Jack Jansen666b1e72001-10-31 12:11:48 +000016618
16619 WINDOW *w;
16620 w->_flags = 0;
16621
Martin v. Löwis11437992002-04-12 09:54:03 +000016622 ;
16623 return 0;
16624}
16625_ACEOF
16626rm -f conftest.$ac_objext
16627if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16628 (eval $ac_compile) 2>&5
16629 ac_status=$?
16630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16631 (exit $ac_status); } &&
16632 { ac_try='test -s conftest.$ac_objext'
16633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16634 (eval $ac_try) 2>&5
16635 ac_status=$?
16636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16637 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016638 ac_cv_window_has_flags=yes
16639else
Martin v. Löwis11437992002-04-12 09:54:03 +000016640 echo "$as_me: failed program was:" >&5
16641cat conftest.$ac_ext >&5
16642ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016643fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016644rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016645fi
16646
Martin v. Löwis11437992002-04-12 09:54:03 +000016647echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
16648echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016649
Jack Jansen666b1e72001-10-31 12:11:48 +000016650
16651if test "$ac_cv_window_has_flags" = yes
16652then
Martin v. Löwis11437992002-04-12 09:54:03 +000016653
16654cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016655#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016656_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016657
16658fi
16659
Martin v. Löwis11437992002-04-12 09:54:03 +000016660echo "$as_me:$LINENO: checking for socklen_t" >&5
16661echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
16662if test "${ac_cv_type_socklen_t+set}" = set; then
16663 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000016664else
Martin v. Löwis11437992002-04-12 09:54:03 +000016665 cat >conftest.$ac_ext <<_ACEOF
16666#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000016667#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000016668
16669#ifdef HAVE_SYS_TYPES_H
16670#include <sys/types.h>
16671#endif
16672#ifdef HAVE_SYS_SOCKET_H
16673#include <sys/socket.h>
16674#endif
16675
16676
Martin v. Löwis11437992002-04-12 09:54:03 +000016677#ifdef F77_DUMMY_MAIN
16678# ifdef __cplusplus
16679 extern "C"
16680# endif
16681 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016682#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016683int
16684main ()
16685{
16686if ((socklen_t *) 0)
16687 return 0;
16688if (sizeof (socklen_t))
16689 return 0;
16690 ;
16691 return 0;
16692}
16693_ACEOF
16694rm -f conftest.$ac_objext
16695if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16696 (eval $ac_compile) 2>&5
16697 ac_status=$?
16698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16699 (exit $ac_status); } &&
16700 { ac_try='test -s conftest.$ac_objext'
16701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16702 (eval $ac_try) 2>&5
16703 ac_status=$?
16704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16705 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016706 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000016707else
Martin v. Löwis11437992002-04-12 09:54:03 +000016708 echo "$as_me: failed program was:" >&5
16709cat conftest.$ac_ext >&5
16710ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000016711fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016712rm -f conftest.$ac_objext conftest.$ac_ext
16713fi
16714echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
16715echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
16716if test $ac_cv_type_socklen_t = yes; then
16717 :
16718else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016719
Martin v. Löwis01c04012002-11-11 14:58:44 +000016720cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016721#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000016722_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016723
16724fi
16725
Michael W. Hudson54241132001-12-07 15:38:26 +000016726
Michael W. Hudson54241132001-12-07 15:38:26 +000016727
16728
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016729for h in `(cd $srcdir;echo Python/thread_*.h)`
16730do
16731 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16732done
16733
Michael W. Hudson54241132001-12-07 15:38:26 +000016734
Jack Jansen0b06be72002-06-21 14:48:38 +000016735SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000016736echo "$as_me:$LINENO: checking for build directories" >&5
16737echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016738for dir in $SRCDIRS; do
16739 if test ! -d $dir; then
16740 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016741 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016742done
Martin v. Löwis11437992002-04-12 09:54:03 +000016743echo "$as_me:$LINENO: result: done" >&5
16744echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000016745
Guido van Rossum627b2d71993-12-24 10:39:16 +000016746# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000016747ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016748
Martin v. Löwis11437992002-04-12 09:54:03 +000016749cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016750# This file is a shell script that caches the results of configure
16751# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016752# scripts and configure runs, see configure's option --config-cache.
16753# It is not useful on other systems. If it contains results you don't
16754# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016755#
Martin v. Löwis11437992002-04-12 09:54:03 +000016756# config.status only pays attention to the cache file if you give it
16757# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016758#
Martin v. Löwis11437992002-04-12 09:54:03 +000016759# `ac_cv_env_foo' variables (set or unset) will be overriden when
16760# loading this file, other *unset* `ac_cv_foo' will be assigned the
16761# following values.
16762
16763_ACEOF
16764
Guido van Rossumf78abae1997-01-21 22:02:36 +000016765# The following way of writing the cache mishandles newlines in values,
16766# but we know of no workaround that is simple, portable, and efficient.
16767# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016768# Ultrix sh set writes to stderr and can't be redirected directly,
16769# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000016770{
16771 (set) 2>&1 |
16772 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16773 *ac_space=\ *)
16774 # `set' does not quote correctly, so add quotes (double-quote
16775 # substitution turns \\\\ into \\, and sed turns \\ into \).
16776 sed -n \
16777 "s/'/'\\\\''/g;
16778 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16779 ;;
16780 *)
16781 # `set' quotes correctly as required by POSIX, so do not add quotes.
16782 sed -n \
16783 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16784 ;;
16785 esac;
16786} |
16787 sed '
16788 t clear
16789 : clear
16790 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16791 t end
16792 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16793 : end' >>confcache
16794if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016795 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016796 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16797 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016798 else
16799 echo "not updating unwritable cache $cache_file"
16800 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016801fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016802rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016803
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016804test "x$prefix" = xNONE && prefix=$ac_default_prefix
16805# Let make expand exec_prefix.
16806test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016807
Martin v. Löwis11437992002-04-12 09:54:03 +000016808# VPATH may cause trouble with some makes, so we remove $(srcdir),
16809# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16810# trailing colons and then remove the whole line if VPATH becomes empty
16811# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016812if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016813 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16814s/:*\$(srcdir):*/:/;
16815s/:*\${srcdir}:*/:/;
16816s/:*@srcdir@:*/:/;
16817s/^\([^=]*=[ ]*\):*/\1/;
16818s/:*$//;
16819s/^[^=]*=[ ]*$//;
16820}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016821fi
16822
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016823DEFS=-DHAVE_CONFIG_H
16824
Martin v. Löwis11437992002-04-12 09:54:03 +000016825
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016826: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016827ac_clean_files_save=$ac_clean_files
16828ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16829{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16830echo "$as_me: creating $CONFIG_STATUS" >&6;}
16831cat >$CONFIG_STATUS <<_ACEOF
16832#! $SHELL
16833# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016834# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016835# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016836# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016837
Martin v. Löwis11437992002-04-12 09:54:03 +000016838debug=false
16839SHELL=\${CONFIG_SHELL-$SHELL}
16840_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016841
Martin v. Löwis11437992002-04-12 09:54:03 +000016842cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016843
Martin v. Löwis11437992002-04-12 09:54:03 +000016844## --------------------- ##
16845## M4sh Initialization. ##
16846## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016847
Martin v. Löwis11437992002-04-12 09:54:03 +000016848# Be Bourne compatible
16849if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16850 emulate sh
16851 NULLCMD=:
16852elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16853 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016854fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016855
Martin v. Löwis11437992002-04-12 09:54:03 +000016856# NLS nuisances.
16857# Support unset when possible.
16858if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16859 as_unset=unset
16860else
16861 as_unset=false
16862fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016863
Martin v. Löwis11437992002-04-12 09:54:03 +000016864(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16865 { $as_unset LANG || test "${LANG+set}" != set; } ||
16866 { LANG=C; export LANG; }
16867(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16868 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16869 { LC_ALL=C; export LC_ALL; }
16870(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16871 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16872 { LC_TIME=C; export LC_TIME; }
16873(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16874 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16875 { LC_CTYPE=C; export LC_CTYPE; }
16876(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16877 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16878 { LANGUAGE=C; export LANGUAGE; }
16879(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16880 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16881 { LC_COLLATE=C; export LC_COLLATE; }
16882(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16883 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16884 { LC_NUMERIC=C; export LC_NUMERIC; }
16885(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16886 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16887 { LC_MESSAGES=C; export LC_MESSAGES; }
16888
16889
16890# Name of the executable.
16891as_me=`(basename "$0") 2>/dev/null ||
16892$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16893 X"$0" : 'X\(//\)$' \| \
16894 X"$0" : 'X\(/\)$' \| \
16895 . : '\(.\)' 2>/dev/null ||
16896echo X/"$0" |
16897 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16898 /^X\/\(\/\/\)$/{ s//\1/; q; }
16899 /^X\/\(\/\).*/{ s//\1/; q; }
16900 s/.*/./; q'`
16901
16902# PATH needs CR, and LINENO needs CR and PATH.
16903# Avoid depending upon Character Ranges.
16904as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16905as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16906as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16907as_cr_digits='0123456789'
16908as_cr_alnum=$as_cr_Letters$as_cr_digits
16909
16910# The user is always right.
16911if test "${PATH_SEPARATOR+set}" != set; then
16912 echo "#! /bin/sh" >conftest.sh
16913 echo "exit 0" >>conftest.sh
16914 chmod +x conftest.sh
16915 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16916 PATH_SEPARATOR=';'
16917 else
16918 PATH_SEPARATOR=:
16919 fi
16920 rm -f conftest.sh
16921fi
16922
16923
16924 as_lineno_1=$LINENO
16925 as_lineno_2=$LINENO
16926 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16927 test "x$as_lineno_1" != "x$as_lineno_2" &&
16928 test "x$as_lineno_3" = "x$as_lineno_2" || {
16929 # Find who we are. Look in the path if we contain no path at all
16930 # relative or not.
16931 case $0 in
16932 *[\\/]* ) as_myself=$0 ;;
16933 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16934for as_dir in $PATH
16935do
16936 IFS=$as_save_IFS
16937 test -z "$as_dir" && as_dir=.
16938 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16939done
16940
16941 ;;
16942 esac
16943 # We did not find ourselves, most probably we were run as `sh COMMAND'
16944 # in which case we are not to be found in the path.
16945 if test "x$as_myself" = x; then
16946 as_myself=$0
16947 fi
16948 if test ! -f "$as_myself"; then
16949 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16950echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16951 { (exit 1); exit 1; }; }
16952 fi
16953 case $CONFIG_SHELL in
16954 '')
16955 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16956for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16957do
16958 IFS=$as_save_IFS
16959 test -z "$as_dir" && as_dir=.
16960 for as_base in sh bash ksh sh5; do
16961 case $as_dir in
16962 /*)
16963 if ("$as_dir/$as_base" -c '
16964 as_lineno_1=$LINENO
16965 as_lineno_2=$LINENO
16966 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16967 test "x$as_lineno_1" != "x$as_lineno_2" &&
16968 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16969 CONFIG_SHELL=$as_dir/$as_base
16970 export CONFIG_SHELL
16971 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16972 fi;;
16973 esac
16974 done
16975done
16976;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016977 esac
16978
Martin v. Löwis11437992002-04-12 09:54:03 +000016979 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16980 # uniformly replaced by the line number. The first 'sed' inserts a
16981 # line-number line before each line; the second 'sed' does the real
16982 # work. The second script uses 'N' to pair each line-number line
16983 # with the numbered line, and appends trailing '-' during
16984 # substitution so that $LINENO is not a special case at line end.
16985 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16986 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16987 sed '=' <$as_myself |
16988 sed '
16989 N
16990 s,$,-,
16991 : loop
16992 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16993 t loop
16994 s,-$,,
16995 s,^['$as_cr_digits']*\n,,
16996 ' >$as_me.lineno &&
16997 chmod +x $as_me.lineno ||
16998 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16999echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
17000 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017001
Martin v. Löwis11437992002-04-12 09:54:03 +000017002 # Don't try to exec as it changes $[0], causing all sort of problems
17003 # (the dirname of $[0] is not the place where we might find the
17004 # original and so on. Autoconf is especially sensible to this).
17005 . ./$as_me.lineno
17006 # Exit status is that of the last command.
17007 exit
17008}
17009
17010
17011case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17012 *c*,-n*) ECHO_N= ECHO_C='
17013' ECHO_T=' ' ;;
17014 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17015 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
17016esac
17017
17018if expr a : '\(a\)' >/dev/null 2>&1; then
17019 as_expr=expr
17020else
17021 as_expr=false
17022fi
17023
17024rm -f conf$$ conf$$.exe conf$$.file
17025echo >conf$$.file
17026if ln -s conf$$.file conf$$ 2>/dev/null; then
17027 # We could just check for DJGPP; but this test a) works b) is more generic
17028 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17029 if test -f conf$$.exe; then
17030 # Don't use ln at all; we don't have any links
17031 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017032 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017033 as_ln_s='ln -s'
17034 fi
17035elif ln conf$$.file conf$$ 2>/dev/null; then
17036 as_ln_s=ln
17037else
17038 as_ln_s='cp -p'
17039fi
17040rm -f conf$$ conf$$.exe conf$$.file
17041
17042as_executable_p="test -f"
17043
17044# Sed expression to map a string onto a valid CPP name.
17045as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17046
17047# Sed expression to map a string onto a valid variable name.
17048as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17049
17050
17051# IFS
17052# We need space, tab and new line, in precisely that order.
17053as_nl='
17054'
17055IFS=" $as_nl"
17056
17057# CDPATH.
17058$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
17059
17060exec 6>&1
17061
17062# Open the log real soon, to keep \$[0] and so on meaningful, and to
17063# report actual input values of CONFIG_FILES etc. instead of their
17064# values after options handling. Logging --version etc. is OK.
17065exec 5>>config.log
17066{
17067 echo
17068 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17069## Running $as_me. ##
17070_ASBOX
17071} >&5
17072cat >&5 <<_CSEOF
17073
Martin v. Löwis88afe662002-10-26 13:47:44 +000017074This file was extended by python $as_me 2.3, which was
Martin v. Löwis11437992002-04-12 09:54:03 +000017075generated by GNU Autoconf 2.53. Invocation command line was
17076
17077 CONFIG_FILES = $CONFIG_FILES
17078 CONFIG_HEADERS = $CONFIG_HEADERS
17079 CONFIG_LINKS = $CONFIG_LINKS
17080 CONFIG_COMMANDS = $CONFIG_COMMANDS
17081 $ $0 $@
17082
17083_CSEOF
17084echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17085echo >&5
17086_ACEOF
17087
17088# Files that config.status was made for.
17089if test -n "$ac_config_files"; then
17090 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17091fi
17092
17093if test -n "$ac_config_headers"; then
17094 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17095fi
17096
17097if test -n "$ac_config_links"; then
17098 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17099fi
17100
17101if test -n "$ac_config_commands"; then
17102 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17103fi
17104
17105cat >>$CONFIG_STATUS <<\_ACEOF
17106
17107ac_cs_usage="\
17108\`$as_me' instantiates files from templates according to the
17109current configuration.
17110
17111Usage: $0 [OPTIONS] [FILE]...
17112
17113 -h, --help print this help, then exit
17114 -V, --version print version number, then exit
17115 -d, --debug don't remove temporary files
17116 --recheck update $as_me by reconfiguring in the same conditions
17117 --file=FILE[:TEMPLATE]
17118 instantiate the configuration file FILE
17119 --header=FILE[:TEMPLATE]
17120 instantiate the configuration header FILE
17121
17122Configuration files:
17123$config_files
17124
17125Configuration headers:
17126$config_headers
17127
17128Report bugs to <bug-autoconf@gnu.org>."
17129_ACEOF
17130
17131cat >>$CONFIG_STATUS <<_ACEOF
17132ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017133python config.status 2.3
Martin v. Löwis11437992002-04-12 09:54:03 +000017134configured by $0, generated by GNU Autoconf 2.53,
17135 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17136
17137Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17138Free Software Foundation, Inc.
17139This config.status script is free software; the Free Software Foundation
17140gives unlimited permission to copy, distribute and modify it."
17141srcdir=$srcdir
17142INSTALL="$INSTALL"
17143_ACEOF
17144
17145cat >>$CONFIG_STATUS <<\_ACEOF
17146# If no file are specified by the user, then we need to provide default
17147# value. By we need to know if files were specified by the user.
17148ac_need_defaults=:
17149while test $# != 0
17150do
17151 case $1 in
17152 --*=*)
17153 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17154 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17155 shift
17156 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17157 shift
17158 ;;
17159 -*);;
17160 *) # This is not an option, so the user has probably given explicit
17161 # arguments.
17162 ac_need_defaults=false;;
17163 esac
17164
17165 case $1 in
17166 # Handling of the options.
17167_ACEOF
17168cat >>$CONFIG_STATUS <<_ACEOF
17169 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17170 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17171 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17172_ACEOF
17173cat >>$CONFIG_STATUS <<\_ACEOF
17174 --version | --vers* | -V )
17175 echo "$ac_cs_version"; exit 0 ;;
17176 --he | --h)
17177 # Conflict between --help and --header
17178 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17179Try \`$0 --help' for more information." >&5
17180echo "$as_me: error: ambiguous option: $1
17181Try \`$0 --help' for more information." >&2;}
17182 { (exit 1); exit 1; }; };;
17183 --help | --hel | -h )
17184 echo "$ac_cs_usage"; exit 0 ;;
17185 --debug | --d* | -d )
17186 debug=: ;;
17187 --file | --fil | --fi | --f )
17188 shift
17189 CONFIG_FILES="$CONFIG_FILES $1"
17190 ac_need_defaults=false;;
17191 --header | --heade | --head | --hea )
17192 shift
17193 CONFIG_HEADERS="$CONFIG_HEADERS $1"
17194 ac_need_defaults=false;;
17195
17196 # This is an error.
17197 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17198Try \`$0 --help' for more information." >&5
17199echo "$as_me: error: unrecognized option: $1
17200Try \`$0 --help' for more information." >&2;}
17201 { (exit 1); exit 1; }; } ;;
17202
17203 *) ac_config_targets="$ac_config_targets $1" ;;
17204
17205 esac
17206 shift
17207done
17208
17209_ACEOF
17210
17211
17212
17213
17214
17215cat >>$CONFIG_STATUS <<\_ACEOF
17216for ac_config_target in $ac_config_targets
17217do
17218 case "$ac_config_target" in
17219 # Handling of arguments.
17220 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17221 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
17222 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17223 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17224echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17225 { (exit 1); exit 1; }; };;
17226 esac
17227done
17228
17229# If the user did not use the arguments to specify the items to instantiate,
17230# then the envvar interface is used. Set only those that are not.
17231# We use the long form for the default assignment because of an extremely
17232# bizarre bug on SunOS 4.1.3.
17233if $ac_need_defaults; then
17234 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17235 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17236fi
17237
17238# Create a temporary directory, and hook for its removal unless debugging.
17239$debug ||
17240{
17241 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17242 trap '{ (exit 1); exit 1; }' 1 2 13 15
17243}
17244
17245# Create a (secure) tmp directory for tmp files.
17246: ${TMPDIR=/tmp}
17247{
17248 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17249 test -n "$tmp" && test -d "$tmp"
17250} ||
17251{
17252 tmp=$TMPDIR/cs$$-$RANDOM
17253 (umask 077 && mkdir $tmp)
17254} ||
17255{
17256 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17257 { (exit 1); exit 1; }
17258}
17259
17260_ACEOF
17261
17262cat >>$CONFIG_STATUS <<_ACEOF
17263
17264#
17265# CONFIG_FILES section.
17266#
17267
17268# No need to generate the scripts if there are no CONFIG_FILES.
17269# This happens for instance when ./config.status config.h
17270if test -n "\$CONFIG_FILES"; then
17271 # Protect against being on the right side of a sed subst in config.status.
17272 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17273 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17274s,@SHELL@,$SHELL,;t t
17275s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17276s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17277s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17278s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17279s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17280s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17281s,@exec_prefix@,$exec_prefix,;t t
17282s,@prefix@,$prefix,;t t
17283s,@program_transform_name@,$program_transform_name,;t t
17284s,@bindir@,$bindir,;t t
17285s,@sbindir@,$sbindir,;t t
17286s,@libexecdir@,$libexecdir,;t t
17287s,@datadir@,$datadir,;t t
17288s,@sysconfdir@,$sysconfdir,;t t
17289s,@sharedstatedir@,$sharedstatedir,;t t
17290s,@localstatedir@,$localstatedir,;t t
17291s,@libdir@,$libdir,;t t
17292s,@includedir@,$includedir,;t t
17293s,@oldincludedir@,$oldincludedir,;t t
17294s,@infodir@,$infodir,;t t
17295s,@mandir@,$mandir,;t t
17296s,@build_alias@,$build_alias,;t t
17297s,@host_alias@,$host_alias,;t t
17298s,@target_alias@,$target_alias,;t t
17299s,@DEFS@,$DEFS,;t t
17300s,@ECHO_C@,$ECHO_C,;t t
17301s,@ECHO_N@,$ECHO_N,;t t
17302s,@ECHO_T@,$ECHO_T,;t t
17303s,@LIBS@,$LIBS,;t t
17304s,@VERSION@,$VERSION,;t t
17305s,@SOVERSION@,$SOVERSION,;t t
17306s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
17307s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
17308s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
17309s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
17310s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
17311s,@MACHDEP@,$MACHDEP,;t t
17312s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000017313s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017314s,@CXX@,$CXX,;t t
17315s,@MAINOBJ@,$MAINOBJ,;t t
17316s,@EXEEXT@,$EXEEXT,;t t
17317s,@CC@,$CC,;t t
17318s,@CFLAGS@,$CFLAGS,;t t
17319s,@LDFLAGS@,$LDFLAGS,;t t
17320s,@CPPFLAGS@,$CPPFLAGS,;t t
17321s,@ac_ct_CC@,$ac_ct_CC,;t t
17322s,@OBJEXT@,$OBJEXT,;t t
17323s,@CPP@,$CPP,;t t
17324s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
17325s,@LIBRARY@,$LIBRARY,;t t
17326s,@LDLIBRARY@,$LDLIBRARY,;t t
17327s,@DLLLIBRARY@,$DLLLIBRARY,;t t
17328s,@BLDLIBRARY@,$BLDLIBRARY,;t t
17329s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
17330s,@INSTSONAME@,$INSTSONAME,;t t
17331s,@RUNSHARED@,$RUNSHARED,;t t
17332s,@LINKCC@,$LINKCC,;t t
17333s,@RANLIB@,$RANLIB,;t t
17334s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17335s,@AR@,$AR,;t t
17336s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17337s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17338s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17339s,@LN@,$LN,;t t
17340s,@OPT@,$OPT,;t t
17341s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
17342s,@SO@,$SO,;t t
17343s,@LDSHARED@,$LDSHARED,;t t
17344s,@BLDSHARED@,$BLDSHARED,;t t
17345s,@CCSHARED@,$CCSHARED,;t t
17346s,@LINKFORSHARED@,$LINKFORSHARED,;t t
17347s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017348s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017349s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
17350s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
17351s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
17352s,@LDLAST@,$LDLAST,;t t
17353s,@THREADOBJ@,$THREADOBJ,;t t
17354s,@DLINCLDIR@,$DLINCLDIR,;t t
17355s,@DYNLOADFILE@,$DYNLOADFILE,;t t
17356s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
17357s,@LIBOBJS@,$LIBOBJS,;t t
17358s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
17359s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
17360s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
17361s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
17362s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
17363s,@LIBM@,$LIBM,;t t
17364s,@LIBC@,$LIBC,;t t
17365s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
17366s,@THREADHEADERS@,$THREADHEADERS,;t t
17367s,@SRCDIRS@,$SRCDIRS,;t t
17368CEOF
17369
17370_ACEOF
17371
17372 cat >>$CONFIG_STATUS <<\_ACEOF
17373 # Split the substitutions into bite-sized pieces for seds with
17374 # small command number limits, like on Digital OSF/1 and HP-UX.
17375 ac_max_sed_lines=48
17376 ac_sed_frag=1 # Number of current file.
17377 ac_beg=1 # First line for current file.
17378 ac_end=$ac_max_sed_lines # Line after last line for current file.
17379 ac_more_lines=:
17380 ac_sed_cmds=
17381 while $ac_more_lines; do
17382 if test $ac_beg -gt 1; then
17383 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17384 else
17385 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17386 fi
17387 if test ! -s $tmp/subs.frag; then
17388 ac_more_lines=false
17389 else
17390 # The purpose of the label and of the branching condition is to
17391 # speed up the sed processing (if there are no `@' at all, there
17392 # is no need to browse any of the substitutions).
17393 # These are the two extra sed commands mentioned above.
17394 (echo ':t
17395 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17396 if test -z "$ac_sed_cmds"; then
17397 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17398 else
17399 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17400 fi
17401 ac_sed_frag=`expr $ac_sed_frag + 1`
17402 ac_beg=$ac_end
17403 ac_end=`expr $ac_end + $ac_max_sed_lines`
17404 fi
17405 done
17406 if test -z "$ac_sed_cmds"; then
17407 ac_sed_cmds=cat
17408 fi
17409fi # test -n "$CONFIG_FILES"
17410
17411_ACEOF
17412cat >>$CONFIG_STATUS <<\_ACEOF
17413for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17414 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17415 case $ac_file in
17416 - | *:- | *:-:* ) # input from stdin
17417 cat >$tmp/stdin
17418 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17419 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17420 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17421 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17422 * ) ac_file_in=$ac_file.in ;;
17423 esac
17424
17425 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17426 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17427$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17428 X"$ac_file" : 'X\(//\)[^/]' \| \
17429 X"$ac_file" : 'X\(//\)$' \| \
17430 X"$ac_file" : 'X\(/\)' \| \
17431 . : '\(.\)' 2>/dev/null ||
17432echo X"$ac_file" |
17433 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17434 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17435 /^X\(\/\/\)$/{ s//\1/; q; }
17436 /^X\(\/\).*/{ s//\1/; q; }
17437 s/.*/./; q'`
17438 { case "$ac_dir" in
17439 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17440 *) as_incr_dir=.;;
17441esac
17442as_dummy="$ac_dir"
17443for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17444 case $as_mkdir_dir in
17445 # Skip DOS drivespec
17446 ?:) as_incr_dir=$as_mkdir_dir ;;
17447 *)
17448 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17449 test -d "$as_incr_dir" ||
17450 mkdir "$as_incr_dir" ||
17451 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17452echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17453 { (exit 1); exit 1; }; }
17454 ;;
17455 esac
17456done; }
17457
17458 ac_builddir=.
17459
17460if test "$ac_dir" != .; then
17461 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17462 # A "../" for each directory in $ac_dir_suffix.
17463 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17464else
17465 ac_dir_suffix= ac_top_builddir=
17466fi
17467
17468case $srcdir in
17469 .) # No --srcdir option. We are building in place.
17470 ac_srcdir=.
17471 if test -z "$ac_top_builddir"; then
17472 ac_top_srcdir=.
17473 else
17474 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17475 fi ;;
17476 [\\/]* | ?:[\\/]* ) # Absolute path.
17477 ac_srcdir=$srcdir$ac_dir_suffix;
17478 ac_top_srcdir=$srcdir ;;
17479 *) # Relative path.
17480 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17481 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17482esac
17483# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
17484# absolute.
17485ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017486ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000017487ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
17488ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
17489
17490
17491 case $INSTALL in
17492 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17493 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
17494 esac
17495
17496 if test x"$ac_file" != x-; then
17497 { echo "$as_me:$LINENO: creating $ac_file" >&5
17498echo "$as_me: creating $ac_file" >&6;}
17499 rm -f "$ac_file"
17500 fi
17501 # Let's still pretend it is `configure' which instantiates (i.e., don't
17502 # use $as_me), people would be surprised to read:
17503 # /* config.h. Generated by config.status. */
17504 if test x"$ac_file" = x-; then
17505 configure_input=
17506 else
17507 configure_input="$ac_file. "
17508 fi
17509 configure_input=$configure_input"Generated from `echo $ac_file_in |
17510 sed 's,.*/,,'` by configure."
17511
17512 # First look for the input files in the build tree, otherwise in the
17513 # src tree.
17514 ac_file_inputs=`IFS=:
17515 for f in $ac_file_in; do
17516 case $f in
17517 -) echo $tmp/stdin ;;
17518 [\\/$]*)
17519 # Absolute (can't be DOS-style, as IFS=:)
17520 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17521echo "$as_me: error: cannot find input file: $f" >&2;}
17522 { (exit 1); exit 1; }; }
17523 echo $f;;
17524 *) # Relative
17525 if test -f "$f"; then
17526 # Build tree
17527 echo $f
17528 elif test -f "$srcdir/$f"; then
17529 # Source tree
17530 echo $srcdir/$f
17531 else
17532 # /dev/null tree
17533 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17534echo "$as_me: error: cannot find input file: $f" >&2;}
17535 { (exit 1); exit 1; }; }
17536 fi;;
17537 esac
17538 done` || { (exit 1); exit 1; }
17539_ACEOF
17540cat >>$CONFIG_STATUS <<_ACEOF
17541 sed "$ac_vpsub
17542$extrasub
17543_ACEOF
17544cat >>$CONFIG_STATUS <<\_ACEOF
17545:t
17546/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17547s,@configure_input@,$configure_input,;t t
17548s,@srcdir@,$ac_srcdir,;t t
17549s,@abs_srcdir@,$ac_abs_srcdir,;t t
17550s,@top_srcdir@,$ac_top_srcdir,;t t
17551s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17552s,@builddir@,$ac_builddir,;t t
17553s,@abs_builddir@,$ac_abs_builddir,;t t
17554s,@top_builddir@,$ac_top_builddir,;t t
17555s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17556s,@INSTALL@,$ac_INSTALL,;t t
17557" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17558 rm -f $tmp/stdin
17559 if test x"$ac_file" != x-; then
17560 mv $tmp/out $ac_file
17561 else
17562 cat $tmp/out
17563 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017564 fi
17565
Martin v. Löwis11437992002-04-12 09:54:03 +000017566done
17567_ACEOF
17568cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017569
Martin v. Löwis11437992002-04-12 09:54:03 +000017570#
17571# CONFIG_HEADER section.
17572#
Guido van Rossum627b2d71993-12-24 10:39:16 +000017573
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017574# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17575# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017576#
17577# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000017578ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17579ac_dB='[ ].*$,\1#\2'
17580ac_dC=' '
17581ac_dD=',;t'
17582# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17583ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17584ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017585ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000017586ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017587
Martin v. Löwis11437992002-04-12 09:54:03 +000017588for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000017589 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000017590 case $ac_file in
17591 - | *:- | *:-:* ) # input from stdin
17592 cat >$tmp/stdin
17593 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17594 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17595 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17596 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17597 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017598 esac
17599
Martin v. Löwis11437992002-04-12 09:54:03 +000017600 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17601echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017602
Martin v. Löwis11437992002-04-12 09:54:03 +000017603 # First look for the input files in the build tree, otherwise in the
17604 # src tree.
17605 ac_file_inputs=`IFS=:
17606 for f in $ac_file_in; do
17607 case $f in
17608 -) echo $tmp/stdin ;;
17609 [\\/$]*)
17610 # Absolute (can't be DOS-style, as IFS=:)
17611 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17612echo "$as_me: error: cannot find input file: $f" >&2;}
17613 { (exit 1); exit 1; }; }
17614 echo $f;;
17615 *) # Relative
17616 if test -f "$f"; then
17617 # Build tree
17618 echo $f
17619 elif test -f "$srcdir/$f"; then
17620 # Source tree
17621 echo $srcdir/$f
17622 else
17623 # /dev/null tree
17624 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17625echo "$as_me: error: cannot find input file: $f" >&2;}
17626 { (exit 1); exit 1; }; }
17627 fi;;
17628 esac
17629 done` || { (exit 1); exit 1; }
17630 # Remove the trailing spaces.
17631 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017632
Martin v. Löwis11437992002-04-12 09:54:03 +000017633_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017634
Martin v. Löwis11437992002-04-12 09:54:03 +000017635# Transform confdefs.h into two sed scripts, `conftest.defines' and
17636# `conftest.undefs', that substitutes the proper values into
17637# config.h.in to produce config.h. The first handles `#define'
17638# templates, and the second `#undef' templates.
17639# And first: Protect against being on the right side of a sed subst in
17640# config.status. Protect against being in an unquoted here document
17641# in config.status.
17642rm -f conftest.defines conftest.undefs
17643# Using a here document instead of a string reduces the quoting nightmare.
17644# Putting comments in sed scripts is not portable.
17645#
17646# `end' is used to avoid that the second main sed command (meant for
17647# 0-ary CPP macros) applies to n-ary macro definitions.
17648# See the Autoconf documentation for `clear'.
17649cat >confdef2sed.sed <<\_ACEOF
17650s/[\\&,]/\\&/g
17651s,[\\$`],\\&,g
17652t clear
17653: clear
17654s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
17655t end
17656s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
17657: end
17658_ACEOF
17659# If some macros were called several times there might be several times
17660# the same #defines, which is useless. Nevertheless, we may not want to
17661# sort them, since we want the *last* AC-DEFINE to be honored.
17662uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17663sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17664rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017665
17666# This sed command replaces #undef with comments. This is necessary, for
17667# example, in the case of _POSIX_SOURCE, which is predefined and required
17668# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017669cat >>conftest.undefs <<\_ACEOF
17670s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
17671_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017672
Martin v. Löwis11437992002-04-12 09:54:03 +000017673# Break up conftest.defines because some shells have a limit on the size
17674# of here documents, and old seds have small limits too (100 cmds).
17675echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
17676echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
17677echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17678echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017679rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000017680while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000017681do
Martin v. Löwis11437992002-04-12 09:54:03 +000017682 # Write a limited-size here document to $tmp/defines.sed.
17683 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17684 # Speed up: don't consider the non `#define' lines.
17685 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
17686 # Work around the forget-to-reset-the-flag bug.
17687 echo 't clr' >>$CONFIG_STATUS
17688 echo ': clr' >>$CONFIG_STATUS
17689 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017690 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017691 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17692 rm -f $tmp/in
17693 mv $tmp/out $tmp/in
17694' >>$CONFIG_STATUS
17695 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17696 rm -f conftest.defines
17697 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000017698done
Martin v. Löwis11437992002-04-12 09:54:03 +000017699rm -f conftest.defines
17700echo ' fi # egrep' >>$CONFIG_STATUS
17701echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017702
Martin v. Löwis11437992002-04-12 09:54:03 +000017703# Break up conftest.undefs because some shells have a limit on the size
17704# of here documents, and old seds have small limits too (100 cmds).
17705echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
17706rm -f conftest.tail
17707while grep . conftest.undefs >/dev/null
17708do
17709 # Write a limited-size here document to $tmp/undefs.sed.
17710 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17711 # Speed up: don't consider the non `#undef'
17712 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
17713 # Work around the forget-to-reset-the-flag bug.
17714 echo 't clr' >>$CONFIG_STATUS
17715 echo ': clr' >>$CONFIG_STATUS
17716 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
17717 echo 'CEOF
17718 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17719 rm -f $tmp/in
17720 mv $tmp/out $tmp/in
17721' >>$CONFIG_STATUS
17722 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17723 rm -f conftest.undefs
17724 mv conftest.tail conftest.undefs
17725done
17726rm -f conftest.undefs
17727
17728cat >>$CONFIG_STATUS <<\_ACEOF
17729 # Let's still pretend it is `configure' which instantiates (i.e., don't
17730 # use $as_me), people would be surprised to read:
17731 # /* config.h. Generated by config.status. */
17732 if test x"$ac_file" = x-; then
17733 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000017734 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017735 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000017736 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017737 cat $tmp/in >>$tmp/config.h
17738 rm -f $tmp/in
17739 if test x"$ac_file" != x-; then
17740 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17741 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17742echo "$as_me: $ac_file is unchanged" >&6;}
17743 else
17744 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17745$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17746 X"$ac_file" : 'X\(//\)[^/]' \| \
17747 X"$ac_file" : 'X\(//\)$' \| \
17748 X"$ac_file" : 'X\(/\)' \| \
17749 . : '\(.\)' 2>/dev/null ||
17750echo X"$ac_file" |
17751 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17752 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17753 /^X\(\/\/\)$/{ s//\1/; q; }
17754 /^X\(\/\).*/{ s//\1/; q; }
17755 s/.*/./; q'`
17756 { case "$ac_dir" in
17757 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17758 *) as_incr_dir=.;;
17759esac
17760as_dummy="$ac_dir"
17761for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17762 case $as_mkdir_dir in
17763 # Skip DOS drivespec
17764 ?:) as_incr_dir=$as_mkdir_dir ;;
17765 *)
17766 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17767 test -d "$as_incr_dir" ||
17768 mkdir "$as_incr_dir" ||
17769 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17770echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17771 { (exit 1); exit 1; }; }
17772 ;;
17773 esac
17774done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017775
Martin v. Löwis11437992002-04-12 09:54:03 +000017776 rm -f $ac_file
17777 mv $tmp/config.h $ac_file
17778 fi
17779 else
17780 cat $tmp/config.h
17781 rm -f $tmp/config.h
17782 fi
17783done
17784_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017785
Martin v. Löwis11437992002-04-12 09:54:03 +000017786cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017787
Martin v. Löwis11437992002-04-12 09:54:03 +000017788{ (exit 0); exit 0; }
17789_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017790chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000017791ac_clean_files=$ac_clean_files_save
17792
17793
17794# configure is writing to config.log, and then calls config.status.
17795# config.status does its own redirection, appending to config.log.
17796# Unfortunately, on DOS this fails, as config.log is still kept open
17797# by configure, so config.status won't be able to write to it; its
17798# output is simply discarded. So we exec the FD to /dev/null,
17799# effectively closing config.log, so it can be properly (re)opened and
17800# appended to by config.status. When coming back to configure, we
17801# need to make the FD available again.
17802if test "$no_create" != yes; then
17803 ac_cs_success=:
17804 exec 5>/dev/null
17805 $SHELL $CONFIG_STATUS || ac_cs_success=false
17806 exec 5>>config.log
17807 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17808 # would make configure fail if this is the last instruction.
17809 $ac_cs_success || { (exit 1); exit 1; }
17810fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017811
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017812
17813echo "creating Setup"
17814if test ! -f Modules/Setup
17815then
17816 cp $srcdir/Modules/Setup.dist Modules/Setup
17817fi
17818
17819echo "creating Setup.local"
17820if test ! -f Modules/Setup.local
17821then
17822 echo "# Edit this file for local setup changes" >Modules/Setup.local
17823fi
17824
17825echo "creating Makefile"
17826$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17827 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017828 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017829mv config.c Modules