blob: b825d151ddcb15a46a2668d04320511ef7676b36 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis03d00d52002-12-19 19:03:31 +00002# From configure.in Revision: 1.376 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis88afe662002-10-26 13:47:44 +00004# Generated by GNU Autoconf 2.53 for python 2.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000010
Martin v. Löwis11437992002-04-12 09:54:03 +000011if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
18## --------------------- ##
19## M4sh Initialization. ##
20## --------------------- ##
21
22# Be Bourne compatible
23if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24 emulate sh
25 NULLCMD=:
26elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27 set -o posix
28fi
29
30# NLS nuisances.
31# Support unset when possible.
32if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
33 as_unset=unset
34else
35 as_unset=false
36fi
37
38(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
39 { $as_unset LANG || test "${LANG+set}" != set; } ||
40 { LANG=C; export LANG; }
41(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
42 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
43 { LC_ALL=C; export LC_ALL; }
44(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
45 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
46 { LC_TIME=C; export LC_TIME; }
47(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
48 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
49 { LC_CTYPE=C; export LC_CTYPE; }
50(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
51 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
52 { LANGUAGE=C; export LANGUAGE; }
53(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
54 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
55 { LC_COLLATE=C; export LC_COLLATE; }
56(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
57 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
58 { LC_NUMERIC=C; export LC_NUMERIC; }
59(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
60 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
61 { LC_MESSAGES=C; export LC_MESSAGES; }
62
63
64# Name of the executable.
65as_me=`(basename "$0") 2>/dev/null ||
66$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67 X"$0" : 'X\(//\)$' \| \
68 X"$0" : 'X\(/\)$' \| \
69 . : '\(.\)' 2>/dev/null ||
70echo X/"$0" |
71 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
72 /^X\/\(\/\/\)$/{ s//\1/; q; }
73 /^X\/\(\/\).*/{ s//\1/; q; }
74 s/.*/./; q'`
75
76# PATH needs CR, and LINENO needs CR and PATH.
77# Avoid depending upon Character Ranges.
78as_cr_letters='abcdefghijklmnopqrstuvwxyz'
79as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
80as_cr_Letters=$as_cr_letters$as_cr_LETTERS
81as_cr_digits='0123456789'
82as_cr_alnum=$as_cr_Letters$as_cr_digits
83
84# The user is always right.
85if test "${PATH_SEPARATOR+set}" != set; then
86 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
89 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
90 PATH_SEPARATOR=';'
91 else
92 PATH_SEPARATOR=:
93 fi
94 rm -f conftest.sh
95fi
96
97
98 as_lineno_1=$LINENO
99 as_lineno_2=$LINENO
100 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
101 test "x$as_lineno_1" != "x$as_lineno_2" &&
102 test "x$as_lineno_3" = "x$as_lineno_2" || {
103 # Find who we are. Look in the path if we contain no path at all
104 # relative or not.
105 case $0 in
106 *[\\/]* ) as_myself=$0 ;;
107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
108for as_dir in $PATH
109do
110 IFS=$as_save_IFS
111 test -z "$as_dir" && as_dir=.
112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
113done
114
115 ;;
116 esac
117 # We did not find ourselves, most probably we were run as `sh COMMAND'
118 # in which case we are not to be found in the path.
119 if test "x$as_myself" = x; then
120 as_myself=$0
121 fi
122 if test ! -f "$as_myself"; then
123 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
124 { (exit 1); exit 1; }; }
125 fi
126 case $CONFIG_SHELL in
127 '')
128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
129for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
130do
131 IFS=$as_save_IFS
132 test -z "$as_dir" && as_dir=.
133 for as_base in sh bash ksh sh5; do
134 case $as_dir in
135 /*)
136 if ("$as_dir/$as_base" -c '
137 as_lineno_1=$LINENO
138 as_lineno_2=$LINENO
139 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
140 test "x$as_lineno_1" != "x$as_lineno_2" &&
141 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
142 CONFIG_SHELL=$as_dir/$as_base
143 export CONFIG_SHELL
144 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
145 fi;;
146 esac
147 done
148done
149;;
150 esac
151
152 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
153 # uniformly replaced by the line number. The first 'sed' inserts a
154 # line-number line before each line; the second 'sed' does the real
155 # work. The second script uses 'N' to pair each line-number line
156 # with the numbered line, and appends trailing '-' during
157 # substitution so that $LINENO is not a special case at line end.
158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
159 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
160 sed '=' <$as_myself |
161 sed '
162 N
163 s,$,-,
164 : loop
165 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
166 t loop
167 s,-$,,
168 s,^['$as_cr_digits']*\n,,
169 ' >$as_me.lineno &&
170 chmod +x $as_me.lineno ||
171 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
172 { (exit 1); exit 1; }; }
173
174 # Don't try to exec as it changes $[0], causing all sort of problems
175 # (the dirname of $[0] is not the place where we might find the
176 # original and so on. Autoconf is especially sensible to this).
177 . ./$as_me.lineno
178 # Exit status is that of the last command.
179 exit
180}
181
182
183case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
184 *c*,-n*) ECHO_N= ECHO_C='
185' ECHO_T=' ' ;;
186 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
187 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
188esac
189
190if expr a : '\(a\)' >/dev/null 2>&1; then
191 as_expr=expr
192else
193 as_expr=false
194fi
195
196rm -f conf$$ conf$$.exe conf$$.file
197echo >conf$$.file
198if ln -s conf$$.file conf$$ 2>/dev/null; then
199 # We could just check for DJGPP; but this test a) works b) is more generic
200 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
201 if test -f conf$$.exe; then
202 # Don't use ln at all; we don't have any links
203 as_ln_s='cp -p'
204 else
205 as_ln_s='ln -s'
206 fi
207elif ln conf$$.file conf$$ 2>/dev/null; then
208 as_ln_s=ln
209else
210 as_ln_s='cp -p'
211fi
212rm -f conf$$ conf$$.exe conf$$.file
213
214as_executable_p="test -f"
215
216# Sed expression to map a string onto a valid CPP name.
217as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
218
219# Sed expression to map a string onto a valid variable name.
220as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
221
222
223# IFS
224# We need space, tab and new line, in precisely that order.
225as_nl='
226'
227IFS=" $as_nl"
228
229# CDPATH.
230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
231
232
233# Name of the host.
234# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
235# so uname gets run too.
236ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
237
238exec 6>&1
239
240#
241# Initializations.
242#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000243ac_default_prefix=/usr/local
Martin v. Löwis11437992002-04-12 09:54:03 +0000244cross_compiling=no
245subdirs=
246MFLAGS=
247MAKEFLAGS=
248SHELL=${CONFIG_SHELL-/bin/sh}
249
250# Maximum number of lines to put in a shell here document.
251# This variable seems obsolete. It should probably be removed, and
252# only ac_max_sed_lines should be used.
253: ${ac_max_here_lines=38}
254
255# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000256PACKAGE_NAME='python'
257PACKAGE_TARNAME='python'
258PACKAGE_VERSION='2.3'
259PACKAGE_STRING='python 2.3'
260PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000261
262ac_unique_file="Include/object.h"
263# Factoring default headers for most tests.
264ac_includes_default="\
265#include <stdio.h>
266#if HAVE_SYS_TYPES_H
267# include <sys/types.h>
268#endif
269#if HAVE_SYS_STAT_H
270# include <sys/stat.h>
271#endif
272#if STDC_HEADERS
273# include <stdlib.h>
274# include <stddef.h>
275#else
276# if HAVE_STDLIB_H
277# include <stdlib.h>
278# endif
279#endif
280#if HAVE_STRING_H
281# if !STDC_HEADERS && HAVE_MEMORY_H
282# include <memory.h>
283# endif
284# include <string.h>
285#endif
286#if HAVE_STRINGS_H
287# include <strings.h>
288#endif
289#if HAVE_INTTYPES_H
290# include <inttypes.h>
291#else
292# if HAVE_STDINT_H
293# include <stdint.h>
294# endif
295#endif
296#if HAVE_UNISTD_H
297# include <unistd.h>
298#endif"
299
Guido van Rossum627b2d71993-12-24 10:39:16 +0000300
Guido van Rossum7f43da71994-08-01 12:15:30 +0000301# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000302ac_init_help=
303ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304# The variables have the same names as the options, with
305# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000306cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000308no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000309no_recursion=
310prefix=NONE
311program_prefix=NONE
312program_suffix=NONE
313program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000314silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000315site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318x_includes=NONE
319x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000320
321# Installation directory options.
322# These are left unexpanded so users can "make install exec_prefix=/foo"
323# and all the variables that are supposed to be based on exec_prefix
324# by default will actually change.
325# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000326bindir='${exec_prefix}/bin'
327sbindir='${exec_prefix}/sbin'
328libexecdir='${exec_prefix}/libexec'
329datadir='${prefix}/share'
330sysconfdir='${prefix}/etc'
331sharedstatedir='${prefix}/com'
332localstatedir='${prefix}/var'
333libdir='${exec_prefix}/lib'
334includedir='${prefix}/include'
335oldincludedir='/usr/include'
336infodir='${prefix}/info'
337mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000338
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339ac_prev=
340for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000341do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000342 # If the previous option needs an argument, assign it.
343 if test -n "$ac_prev"; then
344 eval "$ac_prev=\$ac_option"
345 ac_prev=
346 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000348
Martin v. Löwis11437992002-04-12 09:54:03 +0000349 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000351 # Accept the important Cygnus configure options, so we can diagnose typos.
352
Martin v. Löwis11437992002-04-12 09:54:03 +0000353 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000355 -bindir | --bindir | --bindi | --bind | --bin | --bi)
356 ac_prev=bindir ;;
357 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000358 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000359
360 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000361 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 -cache-file | --cache-file | --cache-fil | --cache-fi \
366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
367 ac_prev=cache_file ;;
368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 cache_file=$ac_optarg ;;
371
372 --config-cache | -C)
373 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
376 ac_prev=datadir ;;
377 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
378 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000379 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000380
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000382 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
385 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
386 { (exit 1); exit 1; }; }
387 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
388 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000391 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395 { (exit 1); exit 1; }; }
396 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397 case $ac_option in
398 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 *) ac_optarg=yes ;;
400 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
404 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
405 | --exec | --exe | --ex)
406 ac_prev=exec_prefix ;;
407 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
408 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
409 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 # Obsolete; use --with-gas.
414 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 -help | --help | --hel | --he | -h)
417 ac_init_help=long ;;
418 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
419 ac_init_help=recursive ;;
420 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
421 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000426 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 -includedir | --includedir | --includedi | --included | --include \
429 | --includ | --inclu | --incl | --inc)
430 ac_prev=includedir ;;
431 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
432 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000434
435 -infodir | --infodir | --infodi | --infod | --info | --inf)
436 ac_prev=infodir ;;
437 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439
440 -libdir | --libdir | --libdi | --libd)
441 ac_prev=libdir ;;
442 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000444
445 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
446 | --libexe | --libex | --libe)
447 ac_prev=libexecdir ;;
448 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
449 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -localstatedir | --localstatedir | --localstatedi | --localstated \
453 | --localstate | --localstat | --localsta | --localst \
454 | --locals | --local | --loca | --loc | --lo)
455 ac_prev=localstatedir ;;
456 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
457 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
458 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000460
461 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
462 ac_prev=mandir ;;
463 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 # Obsolete; use --without-fp.
468 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469
470 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000471 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 no_create=yes ;;
473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
476 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000478 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
479 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
480 | --oldin | --oldi | --old | --ol | --o)
481 ac_prev=oldincludedir ;;
482 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
483 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
484 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
488 ac_prev=prefix ;;
489 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000490 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
492 -program-prefix | --program-prefix | --program-prefi | --program-pref \
493 | --program-pre | --program-pr | --program-p)
494 ac_prev=program_prefix ;;
495 -program-prefix=* | --program-prefix=* | --program-prefi=* \
496 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498
499 -program-suffix | --program-suffix | --program-suffi | --program-suff \
500 | --program-suf | --program-su | --program-s)
501 ac_prev=program_suffix ;;
502 -program-suffix=* | --program-suffix=* | --program-suffi=* \
503 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-transform-name | --program-transform-name \
507 | --program-transform-nam | --program-transform-na \
508 | --program-transform-n | --program-transform- \
509 | --program-transform | --program-transfor \
510 | --program-transfo | --program-transf \
511 | --program-trans | --program-tran \
512 | --progr-tra | --program-tr | --program-t)
513 ac_prev=program_transform_name ;;
514 -program-transform-name=* | --program-transform-name=* \
515 | --program-transform-nam=* | --program-transform-na=* \
516 | --program-transform-n=* | --program-transform-=* \
517 | --program-transform=* | --program-transfor=* \
518 | --program-transfo=* | --program-transf=* \
519 | --program-trans=* | --program-tran=* \
520 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
524 | -silent | --silent | --silen | --sile | --sil)
525 silent=yes ;;
526
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000527 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
528 ac_prev=sbindir ;;
529 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
530 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000532
533 -sharedstatedir | --sharedstatedir | --sharedstatedi \
534 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
535 | --sharedst | --shareds | --shared | --share | --shar \
536 | --sha | --sh)
537 ac_prev=sharedstatedir ;;
538 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
539 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
540 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
541 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544 -site | --site | --sit)
545 ac_prev=site ;;
546 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000547 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
550 ac_prev=srcdir ;;
551 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000552 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
555 | --syscon | --sysco | --sysc | --sys | --sy)
556 ac_prev=sysconfdir ;;
557 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
558 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565
566 -v | -verbose | --verbose | --verbos | --verbo | --verb)
567 verbose=yes ;;
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 -version | --version | --versio | --versi | --vers | -V)
570 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000571
572 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
576 { echo "$as_me: error: invalid package name: $ac_package" >&2
577 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 case $ac_option in
580 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581 *) ac_optarg=yes ;;
582 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000584
585 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package | sed 's/-/_/g'`
592 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000594 --x)
595 # Obsolete; use --with-x.
596 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597
598 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
599 | --x-incl | --x-inc | --x-in | --x-i)
600 ac_prev=x_includes ;;
601 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
602 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
605 -x-libraries | --x-libraries | --x-librarie | --x-librari \
606 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
607 ac_prev=x_libraries ;;
608 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
609 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000610 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
Martin v. Löwis11437992002-04-12 09:54:03 +0000612 -*) { echo "$as_me: error: unrecognized option: $ac_option
613Try \`$0 --help' for more information." >&2
614 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615 ;;
616
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 *=*)
618 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
619 # Reject names that are not valid shell variable names.
620 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
621 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
622 { (exit 1); exit 1; }; }
623 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
624 eval "$ac_envvar='$ac_optarg'"
625 export $ac_envvar ;;
626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000627 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 # FIXME: should be removed in autoconf 3.0.
629 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
630 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
631 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
632 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633 ;;
634
635 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636done
637
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
640 { echo "$as_me: error: missing argument to $ac_option" >&2
641 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642fi
643
Martin v. Löwis11437992002-04-12 09:54:03 +0000644# Be sure to have absolute paths.
645for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646do
Martin v. Löwis11437992002-04-12 09:54:03 +0000647 eval ac_val=$`echo $ac_var`
648 case $ac_val in
649 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
650 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
651 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652 esac
653done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
657 localstatedir libdir includedir oldincludedir infodir mandir
658do
659 eval ac_val=$`echo $ac_var`
660 case $ac_val in
661 [\\/$]* | ?:[\\/]* ) ;;
662 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
663 { (exit 1); exit 1; }; };;
664 esac
665done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666
Martin v. Löwis11437992002-04-12 09:54:03 +0000667# There might be people who depend on the old broken behavior: `$host'
668# used to hold the argument of --host etc.
669# FIXME: To remove some day.
670build=$build_alias
671host=$host_alias
672target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673
Martin v. Löwis11437992002-04-12 09:54:03 +0000674# FIXME: To remove some day.
675if test "x$host_alias" != x; then
676 if test "x$build_alias" = x; then
677 cross_compiling=maybe
678 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
679 If a cross compiler is detected then cross compile mode will be used." >&2
680 elif test "x$build_alias" != "x$host_alias"; then
681 cross_compiling=yes
682 fi
683fi
684
685ac_tool_prefix=
686test -n "$host_alias" && ac_tool_prefix=$host_alias-
687
688test "$silent" = yes && exec 6>/dev/null
689
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
691# Find the source files, if location was not specified.
692if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000693 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000694 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000695 ac_confdir=`(dirname "$0") 2>/dev/null ||
696$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
697 X"$0" : 'X\(//\)[^/]' \| \
698 X"$0" : 'X\(//\)$' \| \
699 X"$0" : 'X\(/\)' \| \
700 . : '\(.\)' 2>/dev/null ||
701echo X"$0" |
702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
703 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
704 /^X\(\/\/\)$/{ s//\1/; q; }
705 /^X\(\/\).*/{ s//\1/; q; }
706 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 srcdir=$ac_confdir
708 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709 srcdir=..
710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711else
712 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000716 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
717 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000719 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
720 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000722fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000723srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
724ac_env_build_alias_set=${build_alias+set}
725ac_env_build_alias_value=$build_alias
726ac_cv_env_build_alias_set=${build_alias+set}
727ac_cv_env_build_alias_value=$build_alias
728ac_env_host_alias_set=${host_alias+set}
729ac_env_host_alias_value=$host_alias
730ac_cv_env_host_alias_set=${host_alias+set}
731ac_cv_env_host_alias_value=$host_alias
732ac_env_target_alias_set=${target_alias+set}
733ac_env_target_alias_value=$target_alias
734ac_cv_env_target_alias_set=${target_alias+set}
735ac_cv_env_target_alias_value=$target_alias
736ac_env_CC_set=${CC+set}
737ac_env_CC_value=$CC
738ac_cv_env_CC_set=${CC+set}
739ac_cv_env_CC_value=$CC
740ac_env_CFLAGS_set=${CFLAGS+set}
741ac_env_CFLAGS_value=$CFLAGS
742ac_cv_env_CFLAGS_set=${CFLAGS+set}
743ac_cv_env_CFLAGS_value=$CFLAGS
744ac_env_LDFLAGS_set=${LDFLAGS+set}
745ac_env_LDFLAGS_value=$LDFLAGS
746ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
747ac_cv_env_LDFLAGS_value=$LDFLAGS
748ac_env_CPPFLAGS_set=${CPPFLAGS+set}
749ac_env_CPPFLAGS_value=$CPPFLAGS
750ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
751ac_cv_env_CPPFLAGS_value=$CPPFLAGS
752ac_env_CPP_set=${CPP+set}
753ac_env_CPP_value=$CPP
754ac_cv_env_CPP_set=${CPP+set}
755ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756
Martin v. Löwis11437992002-04-12 09:54:03 +0000757#
758# Report the --help message.
759#
760if test "$ac_init_help" = "long"; then
761 # Omit some internal or obsolete options to make the list less imposing.
762 # This message is too long to be a string in the A/UX 3.1 sh.
763 cat <<_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000764\`configure' configures python 2.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000765
766Usage: $0 [OPTION]... [VAR=VALUE]...
767
768To assign environment variables (e.g., CC, CFLAGS...), specify them as
769VAR=VALUE. See below for descriptions of some of the useful variables.
770
771Defaults for the options are specified in brackets.
772
773Configuration:
774 -h, --help display this help and exit
775 --help=short display options specific to this package
776 --help=recursive display the short help of all the included packages
777 -V, --version display version information and exit
778 -q, --quiet, --silent do not print \`checking...' messages
779 --cache-file=FILE cache test results in FILE [disabled]
780 -C, --config-cache alias for \`--cache-file=config.cache'
781 -n, --no-create do not create output files
782 --srcdir=DIR find the sources in DIR [configure dir or \`..']
783
784_ACEOF
785
786 cat <<_ACEOF
787Installation directories:
788 --prefix=PREFIX install architecture-independent files in PREFIX
789 [$ac_default_prefix]
790 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
791 [PREFIX]
792
793By default, \`make install' will install all the files in
794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
796for instance \`--prefix=\$HOME'.
797
798For better control, use the options below.
799
800Fine tuning of the installation directories:
801 --bindir=DIR user executables [EPREFIX/bin]
802 --sbindir=DIR system admin executables [EPREFIX/sbin]
803 --libexecdir=DIR program executables [EPREFIX/libexec]
804 --datadir=DIR read-only architecture-independent data [PREFIX/share]
805 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
806 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
807 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
808 --libdir=DIR object code libraries [EPREFIX/lib]
809 --includedir=DIR C header files [PREFIX/include]
810 --oldincludedir=DIR C header files for non-gcc [/usr/include]
811 --infodir=DIR info documentation [PREFIX/info]
812 --mandir=DIR man documentation [PREFIX/man]
813_ACEOF
814
815 cat <<\_ACEOF
816_ACEOF
817fi
818
819if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000820 case $ac_init_help in
821 short | recursive ) echo "Configuration of python 2.3:";;
822 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 cat <<\_ACEOF
824
825Optional Features:
826 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
827 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000828 --enable-framework[=INSTALLDIR]
829 Build (MacOSX|Darwin) framework
830 --enable-shared disable/enable building shared python library
831 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
832 --enable-ipv6 Enable ipv6 (with ipv4) support
833 --disable-ipv6 Disable ipv6 support
834 --enable-unicode[=ucs[24]]
835 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000836
837Optional Packages:
838 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
839 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000840 --without-gcc never use gcc
841 --with-cxx=<compiler> enable C++ support
842 --with-suffix=.exe set executable suffix
843 --with-pydebug build with Py_DEBUG defined
844 --with-libs='lib1 ...' link against additional libs
845 --with-signal-module disable/enable signal module
846 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
847 --with(out)-threads[=DIRECTORY]
848 disable/enable thread support
849 --with(out)-thread[=DIRECTORY]
850 deprecated; use --with(out)-threads
851 --with-pth use GNU pth threading libraries
852 --with(out)-universal-newlines
853 disable/enable foreign newlines
854 --with(out)-doc-strings disable/enable documentation strings
855 --with(out)-pymalloc disable/enable specialized mallocs
856 --with-wctype-functions use wctype.h functions
857 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
858 --with-dl-dld=DL_DIR GNU dynamic linking
859 --with-fpectl enable SIGFPE catching
860 --with-libm=STRING math library
861 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000862
863Some influential environment variables:
864 CC C compiler command
865 CFLAGS C compiler flags
866 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
867 nonstandard directory <lib dir>
868 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
869 headers in a nonstandard directory <include dir>
870 CPP C preprocessor
871
872Use these variables to override the choices made by `configure' or to help
873it to find libraries and programs with nonstandard names/locations.
874
875_ACEOF
876fi
877
878if test "$ac_init_help" = "recursive"; then
879 # If there are subdirs, report their specific --help.
880 ac_popdir=`pwd`
881 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
882 test -d $ac_dir || continue
883 ac_builddir=.
884
885if test "$ac_dir" != .; then
886 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
887 # A "../" for each directory in $ac_dir_suffix.
888 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
889else
890 ac_dir_suffix= ac_top_builddir=
891fi
892
893case $srcdir in
894 .) # No --srcdir option. We are building in place.
895 ac_srcdir=.
896 if test -z "$ac_top_builddir"; then
897 ac_top_srcdir=.
898 else
899 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
900 fi ;;
901 [\\/]* | ?:[\\/]* ) # Absolute path.
902 ac_srcdir=$srcdir$ac_dir_suffix;
903 ac_top_srcdir=$srcdir ;;
904 *) # Relative path.
905 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
906 ac_top_srcdir=$ac_top_builddir$srcdir ;;
907esac
908# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
909# absolute.
910ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise3271202002-11-07 07:42:30 +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
Guido van Rossum627b2d71993-12-24 10:39:16 +00001391# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001392echo "$as_me:$LINENO: checking for --without-gcc" >&5
1393echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1394
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001395# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001396if test "${with_gcc+set}" = set; then
1397 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001398
Guido van Rossum7f43da71994-08-01 12:15:30 +00001399 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001400 no) CC=cc
1401 without_gcc=yes;;
1402 yes) CC=gcc
1403 without_gcc=no;;
1404 *) CC=$withval
1405 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001406 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001407else
Martin v. Löwis11437992002-04-12 09:54:03 +00001408
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001409 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001410 AIX*) CC=cc_r
1411 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001412 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001413 case $BE_HOST_CPU in
1414 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001415 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001416 without_gcc=yes
Mark Hammond8235ea12002-07-19 06:55:41 +00001417 OPT="-O -export pragma"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001418 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001419 ;;
1420 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001421 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001422 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001423 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001424 ;;
1425 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1427echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1428 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001429 ;;
1430 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001431 AR="\$(srcdir)/Modules/ar_beos"
1432 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001433 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001434 Monterey*)
1435 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001436 without_gcc=;;
1437 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001438 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001439fi;
1440echo "$as_me:$LINENO: result: $without_gcc" >&5
1441echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001442
1443
Guido van Rossum95012191999-12-16 17:50:52 +00001444
Fred Drakea1a84e72001-03-06 05:52:16 +00001445MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001446echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1447echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1448
Guido van Rossum95012191999-12-16 17:50:52 +00001449# Check whether --with-cxx or --without-cxx was given.
1450if test "${with_cxx+set}" = set; then
1451 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001452
Martin v. Löwis22352952000-12-13 17:37:02 +00001453 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001454 case $withval in
1455 no) CXX=
1456 with_cxx=no;;
1457 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001458 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001459 with_cxx=$withval;;
1460 esac
1461else
Martin v. Löwis11437992002-04-12 09:54:03 +00001462
Guido van Rossum95012191999-12-16 17:50:52 +00001463 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001464 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001465
Martin v. Löwis11437992002-04-12 09:54:03 +00001466fi;
1467echo "$as_me:$LINENO: result: $with_cxx" >&5
1468echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001469
1470if test "$with_cxx" = "yes"
1471then
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1473echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1474 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001475fi
1476
1477
1478
1479
Martin v. Löwis11437992002-04-12 09:54:03 +00001480if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001481then
1482 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1483do
Martin v. Löwis11437992002-04-12 09:54:03 +00001484 # 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 +00001485set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001486echo "$as_me:$LINENO: checking for $ac_word" >&5
1487echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1488if test "${ac_cv_prog_CXX+set}" = set; then
1489 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001490else
1491 if test -n "$CXX"; then
1492 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1493else
Martin v. Löwis11437992002-04-12 09:54:03 +00001494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1495for as_dir in $PATH
1496do
1497 IFS=$as_save_IFS
1498 test -z "$as_dir" && as_dir=.
1499 for ac_exec_ext in '' $ac_executable_extensions; do
1500 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1501 ac_cv_prog_CXX="$ac_prog"
1502 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1503 break 2
1504 fi
1505done
1506done
1507
Martin v. Löwis22352952000-12-13 17:37:02 +00001508fi
1509fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001510CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001511if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 echo "$as_me:$LINENO: result: $CXX" >&5
1513echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001514else
Martin v. Löwis11437992002-04-12 09:54:03 +00001515 echo "$as_me:$LINENO: result: no" >&5
1516echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001517fi
1518
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001520done
1521test -n "$CXX" || CXX="notfound"
1522
1523 if test "$CXX" = "notfound"
1524 then
1525 CXX=
1526 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001527 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001528ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001529ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1530ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1531ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1532 cat >conftest.$ac_ext <<_ACEOF
1533#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001534#include "confdefs.h"
1535
Martin v. Löwis11437992002-04-12 09:54:03 +00001536#ifdef F77_DUMMY_MAIN
1537# ifdef __cplusplus
1538 extern "C"
1539# endif
1540 int F77_DUMMY_MAIN() { return 1; }
1541#endif
1542int
1543main ()
1544{
Michael W. Hudson54241132001-12-07 15:38:26 +00001545
Martin v. Löwis11437992002-04-12 09:54:03 +00001546 ;
1547 return 0;
1548}
1549_ACEOF
1550ac_clean_files_save=$ac_clean_files
1551ac_clean_files="$ac_clean_files a.out a.exe"
1552# Try to create an executable without -o first, disregard a.out.
1553# It will help us diagnose broken compilers, and finding out an intuition
1554# of exeext.
1555echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1556echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1557ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1558if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1559 (eval $ac_link_default) 2>&5
1560 ac_status=$?
1561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1562 (exit $ac_status); }; then
1563 # Find the output, starting from the most likely. This scheme is
1564# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1565# resort.
1566
1567# Be careful to initialize this variable, since it used to be cached.
1568# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1569ac_cv_exeext=
1570for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1571 ls a.out conftest 2>/dev/null;
1572 ls a.* conftest.* 2>/dev/null`; do
1573 case $ac_file in
1574 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1575 a.out ) # We found the default executable, but exeext='' is most
1576 # certainly right.
1577 break;;
1578 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1579 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1580 export ac_cv_exeext
1581 break;;
1582 * ) break;;
1583 esac
1584done
1585else
1586 echo "$as_me: failed program was:" >&5
1587cat conftest.$ac_ext >&5
1588{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1589echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1590 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001591fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001592
1593ac_exeext=$ac_cv_exeext
1594echo "$as_me:$LINENO: result: $ac_file" >&5
1595echo "${ECHO_T}$ac_file" >&6
1596
1597# Check the compiler produces executables we can run. If not, either
1598# the compiler is broken, or we cross compile.
1599echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1600echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1601# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1602# If not cross compiling, check that we can run a simple program.
1603if test "$cross_compiling" != yes; then
1604 if { ac_try='./$ac_file'
1605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1606 (eval $ac_try) 2>&5
1607 ac_status=$?
1608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1609 (exit $ac_status); }; }; then
1610 cross_compiling=no
1611 else
1612 if test "$cross_compiling" = maybe; then
1613 cross_compiling=yes
1614 else
1615 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1616If you meant to cross compile, use \`--host'." >&5
1617echo "$as_me: error: cannot run C++ compiled programs.
1618If you meant to cross compile, use \`--host'." >&2;}
1619 { (exit 1); exit 1; }; }
1620 fi
1621 fi
1622fi
1623echo "$as_me:$LINENO: result: yes" >&5
1624echo "${ECHO_T}yes" >&6
1625
1626rm -f a.out a.exe conftest$ac_cv_exeext
1627ac_clean_files=$ac_clean_files_save
1628# Check the compiler produces executables we can run. If not, either
1629# the compiler is broken, or we cross compile.
1630echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1631echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1632echo "$as_me:$LINENO: result: $cross_compiling" >&5
1633echo "${ECHO_T}$cross_compiling" >&6
1634
1635echo "$as_me:$LINENO: checking for suffix of executables" >&5
1636echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1637if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1638 (eval $ac_link) 2>&5
1639 ac_status=$?
1640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1641 (exit $ac_status); }; then
1642 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1643# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1644# work properly (i.e., refer to `conftest.exe'), while it won't with
1645# `rm'.
1646for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1647 case $ac_file in
1648 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1649 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1650 export ac_cv_exeext
1651 break;;
1652 * ) break;;
1653 esac
1654done
1655else
1656 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1657echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1658 { (exit 1); exit 1; }; }
1659fi
1660
1661rm -f conftest$ac_cv_exeext
1662echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1663echo "${ECHO_T}$ac_cv_exeext" >&6
1664
1665rm -f conftest.$ac_ext
1666EXEEXT=$ac_cv_exeext
1667ac_exeext=$EXEEXT
1668
1669 ac_ext=c
1670ac_cpp='$CPP $CPPFLAGS'
1671ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1672ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1673ac_compiler_gnu=$ac_cv_c_compiler_gnu
1674
1675
Martin v. Löwis22352952000-12-13 17:37:02 +00001676
1677 fi
1678fi
1679
Guido van Rossum8b131c51995-03-09 14:10:13 +00001680# If the user switches compilers, we can't believe the cache
1681if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1682then
Martin v. Löwis11437992002-04-12 09:54:03 +00001683 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1684(it is also a good idea to do 'make clean' before compiling)" >&5
1685echo "$as_me: error: cached CC is different -- throw away $cache_file
1686(it is also a good idea to do 'make clean' before compiling)" >&2;}
1687 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001688fi
1689
Martin v. Löwis11437992002-04-12 09:54:03 +00001690ac_ext=c
1691ac_cpp='$CPP $CPPFLAGS'
1692ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1693ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1694ac_compiler_gnu=$ac_cv_c_compiler_gnu
1695if test -n "$ac_tool_prefix"; then
1696 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1697set dummy ${ac_tool_prefix}gcc; ac_word=$2
1698echo "$as_me:$LINENO: checking for $ac_word" >&5
1699echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1700if test "${ac_cv_prog_CC+set}" = set; then
1701 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001702else
1703 if test -n "$CC"; then
1704 ac_cv_prog_CC="$CC" # Let the user override the test.
1705else
Martin v. Löwis11437992002-04-12 09:54:03 +00001706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1707for as_dir in $PATH
1708do
1709 IFS=$as_save_IFS
1710 test -z "$as_dir" && as_dir=.
1711 for ac_exec_ext in '' $ac_executable_extensions; do
1712 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1713 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1714 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1715 break 2
1716 fi
1717done
1718done
1719
Jack Jansendd19cf82001-12-06 22:36:17 +00001720fi
1721fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001722CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001723if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001724 echo "$as_me:$LINENO: result: $CC" >&5
1725echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001726else
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 echo "$as_me:$LINENO: result: no" >&5
1728echo "${ECHO_T}no" >&6
1729fi
1730
1731fi
1732if test -z "$ac_cv_prog_CC"; then
1733 ac_ct_CC=$CC
1734 # Extract the first word of "gcc", so it can be a program name with args.
1735set dummy gcc; ac_word=$2
1736echo "$as_me:$LINENO: checking for $ac_word" >&5
1737echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1738if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1739 echo $ECHO_N "(cached) $ECHO_C" >&6
1740else
1741 if test -n "$ac_ct_CC"; then
1742 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1743else
1744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1745for as_dir in $PATH
1746do
1747 IFS=$as_save_IFS
1748 test -z "$as_dir" && as_dir=.
1749 for ac_exec_ext in '' $ac_executable_extensions; do
1750 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1751 ac_cv_prog_ac_ct_CC="gcc"
1752 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1753 break 2
1754 fi
1755done
1756done
1757
1758fi
1759fi
1760ac_ct_CC=$ac_cv_prog_ac_ct_CC
1761if test -n "$ac_ct_CC"; then
1762 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1763echo "${ECHO_T}$ac_ct_CC" >&6
1764else
1765 echo "$as_me:$LINENO: result: no" >&5
1766echo "${ECHO_T}no" >&6
1767fi
1768
1769 CC=$ac_ct_CC
1770else
1771 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001772fi
1773
Jack Jansendd19cf82001-12-06 22:36:17 +00001774if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001775 if test -n "$ac_tool_prefix"; then
1776 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1777set dummy ${ac_tool_prefix}cc; ac_word=$2
1778echo "$as_me:$LINENO: checking for $ac_word" >&5
1779echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1780if test "${ac_cv_prog_CC+set}" = set; then
1781 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001782else
1783 if test -n "$CC"; then
1784 ac_cv_prog_CC="$CC" # Let the user override the test.
1785else
Martin v. Löwis11437992002-04-12 09:54:03 +00001786as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1787for as_dir in $PATH
1788do
1789 IFS=$as_save_IFS
1790 test -z "$as_dir" && as_dir=.
1791 for ac_exec_ext in '' $ac_executable_extensions; do
1792 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1793 ac_cv_prog_CC="${ac_tool_prefix}cc"
1794 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1795 break 2
1796 fi
1797done
1798done
1799
1800fi
1801fi
1802CC=$ac_cv_prog_CC
1803if test -n "$CC"; then
1804 echo "$as_me:$LINENO: result: $CC" >&5
1805echo "${ECHO_T}$CC" >&6
1806else
1807 echo "$as_me:$LINENO: result: no" >&5
1808echo "${ECHO_T}no" >&6
1809fi
1810
1811fi
1812if test -z "$ac_cv_prog_CC"; then
1813 ac_ct_CC=$CC
1814 # Extract the first word of "cc", so it can be a program name with args.
1815set dummy cc; ac_word=$2
1816echo "$as_me:$LINENO: checking for $ac_word" >&5
1817echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1818if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1819 echo $ECHO_N "(cached) $ECHO_C" >&6
1820else
1821 if test -n "$ac_ct_CC"; then
1822 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1823else
1824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1825for as_dir in $PATH
1826do
1827 IFS=$as_save_IFS
1828 test -z "$as_dir" && as_dir=.
1829 for ac_exec_ext in '' $ac_executable_extensions; do
1830 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1831 ac_cv_prog_ac_ct_CC="cc"
1832 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1833 break 2
1834 fi
1835done
1836done
1837
1838fi
1839fi
1840ac_ct_CC=$ac_cv_prog_ac_ct_CC
1841if test -n "$ac_ct_CC"; then
1842 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1843echo "${ECHO_T}$ac_ct_CC" >&6
1844else
1845 echo "$as_me:$LINENO: result: no" >&5
1846echo "${ECHO_T}no" >&6
1847fi
1848
1849 CC=$ac_ct_CC
1850else
1851 CC="$ac_cv_prog_CC"
1852fi
1853
1854fi
1855if test -z "$CC"; then
1856 # Extract the first word of "cc", so it can be a program name with args.
1857set dummy cc; ac_word=$2
1858echo "$as_me:$LINENO: checking for $ac_word" >&5
1859echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1860if test "${ac_cv_prog_CC+set}" = set; then
1861 echo $ECHO_N "(cached) $ECHO_C" >&6
1862else
1863 if test -n "$CC"; then
1864 ac_cv_prog_CC="$CC" # Let the user override the test.
1865else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001866 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1868for as_dir in $PATH
1869do
1870 IFS=$as_save_IFS
1871 test -z "$as_dir" && as_dir=.
1872 for ac_exec_ext in '' $ac_executable_extensions; do
1873 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1874 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1875 ac_prog_rejected=yes
1876 continue
1877 fi
1878 ac_cv_prog_CC="cc"
1879 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1880 break 2
1881 fi
1882done
1883done
1884
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001885if test $ac_prog_rejected = yes; then
1886 # We found a bogon in the path, so make sure we never use it.
1887 set dummy $ac_cv_prog_CC
1888 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001889 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001890 # We chose a different compiler from the bogus one.
1891 # However, it has the same basename, so the bogon will be chosen
1892 # first if we set CC to just the basename; use the full file name.
1893 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001894 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001895 shift
1896 ac_cv_prog_CC="$@"
1897 fi
1898fi
1899fi
1900fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001901CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001902if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001903 echo "$as_me:$LINENO: result: $CC" >&5
1904echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001905else
Martin v. Löwis11437992002-04-12 09:54:03 +00001906 echo "$as_me:$LINENO: result: no" >&5
1907echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001908fi
1909
Martin v. Löwis11437992002-04-12 09:54:03 +00001910fi
1911if test -z "$CC"; then
1912 if test -n "$ac_tool_prefix"; then
1913 for ac_prog in cl
1914 do
1915 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1916set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1917echo "$as_me:$LINENO: checking for $ac_word" >&5
1918echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1919if test "${ac_cv_prog_CC+set}" = set; then
1920 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001921else
1922 if test -n "$CC"; then
1923 ac_cv_prog_CC="$CC" # Let the user override the test.
1924else
Martin v. Löwis11437992002-04-12 09:54:03 +00001925as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1926for as_dir in $PATH
1927do
1928 IFS=$as_save_IFS
1929 test -z "$as_dir" && as_dir=.
1930 for ac_exec_ext in '' $ac_executable_extensions; do
1931 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1932 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1933 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1934 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001935 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001936done
1937done
1938
1939fi
1940fi
1941CC=$ac_cv_prog_CC
1942if test -n "$CC"; then
1943 echo "$as_me:$LINENO: result: $CC" >&5
1944echo "${ECHO_T}$CC" >&6
1945else
1946 echo "$as_me:$LINENO: result: no" >&5
1947echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001948fi
1949
Martin v. Löwis11437992002-04-12 09:54:03 +00001950 test -n "$CC" && break
1951 done
1952fi
1953if test -z "$CC"; then
1954 ac_ct_CC=$CC
1955 for ac_prog in cl
1956do
1957 # Extract the first word of "$ac_prog", so it can be a program name with args.
1958set dummy $ac_prog; ac_word=$2
1959echo "$as_me:$LINENO: checking for $ac_word" >&5
1960echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1961if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1962 echo $ECHO_N "(cached) $ECHO_C" >&6
1963else
1964 if test -n "$ac_ct_CC"; then
1965 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1966else
1967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1968for as_dir in $PATH
1969do
1970 IFS=$as_save_IFS
1971 test -z "$as_dir" && as_dir=.
1972 for ac_exec_ext in '' $ac_executable_extensions; do
1973 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1974 ac_cv_prog_ac_ct_CC="$ac_prog"
1975 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1976 break 2
1977 fi
1978done
1979done
Jack Jansendd19cf82001-12-06 22:36:17 +00001980
Martin v. Löwis11437992002-04-12 09:54:03 +00001981fi
1982fi
1983ac_ct_CC=$ac_cv_prog_ac_ct_CC
1984if test -n "$ac_ct_CC"; then
1985 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1986echo "${ECHO_T}$ac_ct_CC" >&6
1987else
1988 echo "$as_me:$LINENO: result: no" >&5
1989echo "${ECHO_T}no" >&6
1990fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001991
Martin v. Löwis11437992002-04-12 09:54:03 +00001992 test -n "$ac_ct_CC" && break
1993done
Michael W. Hudson54241132001-12-07 15:38:26 +00001994
Martin v. Löwis11437992002-04-12 09:54:03 +00001995 CC=$ac_ct_CC
1996fi
1997
1998fi
1999
2000
2001test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2002echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2003 { (exit 1); exit 1; }; }
2004
2005# Provide some information about the compiler.
2006echo "$as_me:$LINENO:" \
2007 "checking for C compiler version" >&5
2008ac_compiler=`set X $ac_compile; echo $2`
2009{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2010 (eval $ac_compiler --version </dev/null >&5) 2>&5
2011 ac_status=$?
2012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2013 (exit $ac_status); }
2014{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2015 (eval $ac_compiler -v </dev/null >&5) 2>&5
2016 ac_status=$?
2017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2018 (exit $ac_status); }
2019{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2020 (eval $ac_compiler -V </dev/null >&5) 2>&5
2021 ac_status=$?
2022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2023 (exit $ac_status); }
2024
2025cat >conftest.$ac_ext <<_ACEOF
2026#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002027#include "confdefs.h"
2028
Martin v. Löwis11437992002-04-12 09:54:03 +00002029#ifdef F77_DUMMY_MAIN
2030# ifdef __cplusplus
2031 extern "C"
2032# endif
2033 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002035int
2036main ()
2037{
2038
2039 ;
2040 return 0;
2041}
2042_ACEOF
2043ac_clean_files_save=$ac_clean_files
2044ac_clean_files="$ac_clean_files a.out a.exe"
2045# Try to create an executable without -o first, disregard a.out.
2046# It will help us diagnose broken compilers, and finding out an intuition
2047# of exeext.
2048echo "$as_me:$LINENO: checking for C compiler default output" >&5
2049echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2050ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2051if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2052 (eval $ac_link_default) 2>&5
2053 ac_status=$?
2054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2055 (exit $ac_status); }; then
2056 # Find the output, starting from the most likely. This scheme is
2057# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2058# resort.
2059
2060# Be careful to initialize this variable, since it used to be cached.
2061# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2062ac_cv_exeext=
2063for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2064 ls a.out conftest 2>/dev/null;
2065 ls a.* conftest.* 2>/dev/null`; do
2066 case $ac_file in
2067 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2068 a.out ) # We found the default executable, but exeext='' is most
2069 # certainly right.
2070 break;;
2071 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2072 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2073 export ac_cv_exeext
2074 break;;
2075 * ) break;;
2076 esac
2077done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002078else
Martin v. Löwis11437992002-04-12 09:54:03 +00002079 echo "$as_me: failed program was:" >&5
2080cat conftest.$ac_ext >&5
2081{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2082echo "$as_me: error: C compiler cannot create executables" >&2;}
2083 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002084fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002085
Martin v. Löwis11437992002-04-12 09:54:03 +00002086ac_exeext=$ac_cv_exeext
2087echo "$as_me:$LINENO: result: $ac_file" >&5
2088echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002089
Martin v. Löwis11437992002-04-12 09:54:03 +00002090# Check the compiler produces executables we can run. If not, either
2091# the compiler is broken, or we cross compile.
2092echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2093echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2094# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2095# If not cross compiling, check that we can run a simple program.
2096if test "$cross_compiling" != yes; then
2097 if { ac_try='./$ac_file'
2098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2099 (eval $ac_try) 2>&5
2100 ac_status=$?
2101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2102 (exit $ac_status); }; }; then
2103 cross_compiling=no
2104 else
2105 if test "$cross_compiling" = maybe; then
2106 cross_compiling=yes
2107 else
2108 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2109If you meant to cross compile, use \`--host'." >&5
2110echo "$as_me: error: cannot run C compiled programs.
2111If you meant to cross compile, use \`--host'." >&2;}
2112 { (exit 1); exit 1; }; }
2113 fi
2114 fi
2115fi
2116echo "$as_me:$LINENO: result: yes" >&5
2117echo "${ECHO_T}yes" >&6
2118
2119rm -f a.out a.exe conftest$ac_cv_exeext
2120ac_clean_files=$ac_clean_files_save
2121# Check the compiler produces executables we can run. If not, either
2122# the compiler is broken, or we cross compile.
2123echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2124echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2125echo "$as_me:$LINENO: result: $cross_compiling" >&5
2126echo "${ECHO_T}$cross_compiling" >&6
2127
2128echo "$as_me:$LINENO: checking for suffix of executables" >&5
2129echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2131 (eval $ac_link) 2>&5
2132 ac_status=$?
2133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2134 (exit $ac_status); }; then
2135 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2136# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2137# work properly (i.e., refer to `conftest.exe'), while it won't with
2138# `rm'.
2139for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2140 case $ac_file in
2141 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2142 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2143 export ac_cv_exeext
2144 break;;
2145 * ) break;;
2146 esac
2147done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002148else
Martin v. Löwis11437992002-04-12 09:54:03 +00002149 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2150echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2151 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002152fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002153
Martin v. Löwis11437992002-04-12 09:54:03 +00002154rm -f conftest$ac_cv_exeext
2155echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2156echo "${ECHO_T}$ac_cv_exeext" >&6
2157
2158rm -f conftest.$ac_ext
2159EXEEXT=$ac_cv_exeext
2160ac_exeext=$EXEEXT
2161echo "$as_me:$LINENO: checking for suffix of object files" >&5
2162echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2163if test "${ac_cv_objext+set}" = set; then
2164 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002165else
Martin v. Löwis11437992002-04-12 09:54:03 +00002166 cat >conftest.$ac_ext <<_ACEOF
2167#line $LINENO "configure"
2168#include "confdefs.h"
2169
2170#ifdef F77_DUMMY_MAIN
2171# ifdef __cplusplus
2172 extern "C"
2173# endif
2174 int F77_DUMMY_MAIN() { return 1; }
2175#endif
2176int
2177main ()
2178{
2179
2180 ;
2181 return 0;
2182}
2183_ACEOF
2184rm -f conftest.o conftest.obj
2185if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2186 (eval $ac_compile) 2>&5
2187 ac_status=$?
2188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2189 (exit $ac_status); }; then
2190 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2191 case $ac_file in
2192 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2193 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2194 break;;
2195 esac
2196done
2197else
2198 echo "$as_me: failed program was:" >&5
2199cat conftest.$ac_ext >&5
2200{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2201echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2202 { (exit 1); exit 1; }; }
2203fi
2204
2205rm -f conftest.$ac_cv_objext conftest.$ac_ext
2206fi
2207echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2208echo "${ECHO_T}$ac_cv_objext" >&6
2209OBJEXT=$ac_cv_objext
2210ac_objext=$OBJEXT
2211echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2212echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2213if test "${ac_cv_c_compiler_gnu+set}" = set; then
2214 echo $ECHO_N "(cached) $ECHO_C" >&6
2215else
2216 cat >conftest.$ac_ext <<_ACEOF
2217#line $LINENO "configure"
2218#include "confdefs.h"
2219
2220#ifdef F77_DUMMY_MAIN
2221# ifdef __cplusplus
2222 extern "C"
2223# endif
2224 int F77_DUMMY_MAIN() { return 1; }
2225#endif
2226int
2227main ()
2228{
2229#ifndef __GNUC__
2230 choke me
2231#endif
2232
2233 ;
2234 return 0;
2235}
2236_ACEOF
2237rm -f conftest.$ac_objext
2238if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2239 (eval $ac_compile) 2>&5
2240 ac_status=$?
2241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2242 (exit $ac_status); } &&
2243 { ac_try='test -s conftest.$ac_objext'
2244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2245 (eval $ac_try) 2>&5
2246 ac_status=$?
2247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2248 (exit $ac_status); }; }; then
2249 ac_compiler_gnu=yes
2250else
2251 echo "$as_me: failed program was:" >&5
2252cat conftest.$ac_ext >&5
2253ac_compiler_gnu=no
2254fi
2255rm -f conftest.$ac_objext conftest.$ac_ext
2256ac_cv_c_compiler_gnu=$ac_compiler_gnu
2257
2258fi
2259echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2260echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2261GCC=`test $ac_compiler_gnu = yes && echo yes`
2262ac_test_CFLAGS=${CFLAGS+set}
2263ac_save_CFLAGS=$CFLAGS
2264CFLAGS="-g"
2265echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2266echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2267if test "${ac_cv_prog_cc_g+set}" = set; then
2268 echo $ECHO_N "(cached) $ECHO_C" >&6
2269else
2270 cat >conftest.$ac_ext <<_ACEOF
2271#line $LINENO "configure"
2272#include "confdefs.h"
2273
2274#ifdef F77_DUMMY_MAIN
2275# ifdef __cplusplus
2276 extern "C"
2277# endif
2278 int F77_DUMMY_MAIN() { return 1; }
2279#endif
2280int
2281main ()
2282{
2283
2284 ;
2285 return 0;
2286}
2287_ACEOF
2288rm -f conftest.$ac_objext
2289if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2290 (eval $ac_compile) 2>&5
2291 ac_status=$?
2292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2293 (exit $ac_status); } &&
2294 { ac_try='test -s conftest.$ac_objext'
2295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2296 (eval $ac_try) 2>&5
2297 ac_status=$?
2298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2299 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002300 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002301else
Martin v. Löwis11437992002-04-12 09:54:03 +00002302 echo "$as_me: failed program was:" >&5
2303cat conftest.$ac_ext >&5
2304ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002305fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002306rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002307fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002308echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2309echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002310if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002311 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002312elif test $ac_cv_prog_cc_g = yes; then
2313 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002314 CFLAGS="-g -O2"
2315 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002316 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002317 fi
2318else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002319 if test "$GCC" = yes; then
2320 CFLAGS="-O2"
2321 else
2322 CFLAGS=
2323 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002324fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002325# Some people use a C++ compiler to compile C. Since we use `exit',
2326# in C++ we need to declare it. In case someone uses the same compiler
2327# for both compiling C and C++ we need to have the C++ compiler decide
2328# the declaration of exit, since it's the most demanding environment.
2329cat >conftest.$ac_ext <<_ACEOF
2330#ifndef __cplusplus
2331 choke me
2332#endif
2333_ACEOF
2334rm -f conftest.$ac_objext
2335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2336 (eval $ac_compile) 2>&5
2337 ac_status=$?
2338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2339 (exit $ac_status); } &&
2340 { ac_try='test -s conftest.$ac_objext'
2341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2342 (eval $ac_try) 2>&5
2343 ac_status=$?
2344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2345 (exit $ac_status); }; }; then
2346 for ac_declaration in \
2347 ''\
2348 '#include <stdlib.h>' \
2349 'extern "C" void std::exit (int) throw (); using std::exit;' \
2350 'extern "C" void std::exit (int); using std::exit;' \
2351 'extern "C" void exit (int) throw ();' \
2352 'extern "C" void exit (int);' \
2353 'void exit (int);'
2354do
2355 cat >conftest.$ac_ext <<_ACEOF
2356#line $LINENO "configure"
2357#include "confdefs.h"
2358#include <stdlib.h>
2359$ac_declaration
2360#ifdef F77_DUMMY_MAIN
2361# ifdef __cplusplus
2362 extern "C"
2363# endif
2364 int F77_DUMMY_MAIN() { return 1; }
2365#endif
2366int
2367main ()
2368{
2369exit (42);
2370 ;
2371 return 0;
2372}
2373_ACEOF
2374rm -f conftest.$ac_objext
2375if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2376 (eval $ac_compile) 2>&5
2377 ac_status=$?
2378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2379 (exit $ac_status); } &&
2380 { ac_try='test -s conftest.$ac_objext'
2381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2382 (eval $ac_try) 2>&5
2383 ac_status=$?
2384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2385 (exit $ac_status); }; }; then
2386 :
2387else
2388 echo "$as_me: failed program was:" >&5
2389cat conftest.$ac_ext >&5
2390continue
2391fi
2392rm -f conftest.$ac_objext conftest.$ac_ext
2393 cat >conftest.$ac_ext <<_ACEOF
2394#line $LINENO "configure"
2395#include "confdefs.h"
2396$ac_declaration
2397#ifdef F77_DUMMY_MAIN
2398# ifdef __cplusplus
2399 extern "C"
2400# endif
2401 int F77_DUMMY_MAIN() { return 1; }
2402#endif
2403int
2404main ()
2405{
2406exit (42);
2407 ;
2408 return 0;
2409}
2410_ACEOF
2411rm -f conftest.$ac_objext
2412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2413 (eval $ac_compile) 2>&5
2414 ac_status=$?
2415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2416 (exit $ac_status); } &&
2417 { ac_try='test -s conftest.$ac_objext'
2418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2419 (eval $ac_try) 2>&5
2420 ac_status=$?
2421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2422 (exit $ac_status); }; }; then
2423 break
2424else
2425 echo "$as_me: failed program was:" >&5
2426cat conftest.$ac_ext >&5
2427fi
2428rm -f conftest.$ac_objext conftest.$ac_ext
2429done
2430rm -f conftest*
2431if test -n "$ac_declaration"; then
2432 echo '#ifdef __cplusplus' >>confdefs.h
2433 echo $ac_declaration >>confdefs.h
2434 echo '#endif' >>confdefs.h
2435fi
2436
2437else
2438 echo "$as_me: failed program was:" >&5
2439cat conftest.$ac_ext >&5
2440fi
2441rm -f conftest.$ac_objext conftest.$ac_ext
2442ac_ext=c
2443ac_cpp='$CPP $CPPFLAGS'
2444ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2445ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2446ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002447
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002448
2449# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002450
2451ac_ext=c
2452ac_cpp='$CPP $CPPFLAGS'
2453ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2454ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2455ac_compiler_gnu=$ac_cv_c_compiler_gnu
2456echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2457echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002458# On Suns, sometimes $CPP names a directory.
2459if test -n "$CPP" && test -d "$CPP"; then
2460 CPP=
2461fi
2462if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002463 if test "${ac_cv_prog_CPP+set}" = set; then
2464 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002465else
Martin v. Löwis11437992002-04-12 09:54:03 +00002466 # Double quotes because CPP needs to be expanded
2467 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2468 do
2469 ac_preproc_ok=false
2470for ac_c_preproc_warn_flag in '' yes
2471do
2472 # Use a header file that comes with gcc, so configuring glibc
2473 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002474 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 # not just through cpp. "Syntax error" is here to catch this case.
2476 cat >conftest.$ac_ext <<_ACEOF
2477#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002478#include "confdefs.h"
2479#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 Syntax error
2481_ACEOF
2482if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2483 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2484 ac_status=$?
2485 egrep -v '^ *\+' conftest.er1 >conftest.err
2486 rm -f conftest.er1
2487 cat conftest.err >&5
2488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2489 (exit $ac_status); } >/dev/null; then
2490 if test -s conftest.err; then
2491 ac_cpp_err=$ac_c_preproc_warn_flag
2492 else
2493 ac_cpp_err=
2494 fi
2495else
2496 ac_cpp_err=yes
2497fi
2498if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002499 :
2500else
Martin v. Löwis11437992002-04-12 09:54:03 +00002501 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002502 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002503 # Broken: fails on valid input.
2504continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002505fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002506rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002507
Martin v. Löwis11437992002-04-12 09:54:03 +00002508 # OK, works on sane cases. Now check whether non-existent headers
2509 # can be detected and how.
2510 cat >conftest.$ac_ext <<_ACEOF
2511#line $LINENO "configure"
2512#include "confdefs.h"
2513#include <ac_nonexistent.h>
2514_ACEOF
2515if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2516 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2517 ac_status=$?
2518 egrep -v '^ *\+' conftest.er1 >conftest.err
2519 rm -f conftest.er1
2520 cat conftest.err >&5
2521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2522 (exit $ac_status); } >/dev/null; then
2523 if test -s conftest.err; then
2524 ac_cpp_err=$ac_c_preproc_warn_flag
2525 else
2526 ac_cpp_err=
2527 fi
2528else
2529 ac_cpp_err=yes
2530fi
2531if test -z "$ac_cpp_err"; then
2532 # Broken: success on invalid input.
2533continue
2534else
2535 echo "$as_me: failed program was:" >&5
2536 cat conftest.$ac_ext >&5
2537 # Passes both tests.
2538ac_preproc_ok=:
2539break
2540fi
2541rm -f conftest.err conftest.$ac_ext
2542
2543done
2544# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2545rm -f conftest.err conftest.$ac_ext
2546if $ac_preproc_ok; then
2547 break
2548fi
2549
2550 done
2551 ac_cv_prog_CPP=$CPP
2552
2553fi
2554 CPP=$ac_cv_prog_CPP
2555else
2556 ac_cv_prog_CPP=$CPP
2557fi
2558echo "$as_me:$LINENO: result: $CPP" >&5
2559echo "${ECHO_T}$CPP" >&6
2560ac_preproc_ok=false
2561for ac_c_preproc_warn_flag in '' yes
2562do
2563 # Use a header file that comes with gcc, so configuring glibc
2564 # with a fresh cross-compiler works.
2565 # On the NeXT, cc -E runs the code through the compiler's parser,
2566 # not just through cpp. "Syntax error" is here to catch this case.
2567 cat >conftest.$ac_ext <<_ACEOF
2568#line $LINENO "configure"
2569#include "confdefs.h"
2570#include <assert.h>
2571 Syntax error
2572_ACEOF
2573if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2574 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2575 ac_status=$?
2576 egrep -v '^ *\+' conftest.er1 >conftest.err
2577 rm -f conftest.er1
2578 cat conftest.err >&5
2579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2580 (exit $ac_status); } >/dev/null; then
2581 if test -s conftest.err; then
2582 ac_cpp_err=$ac_c_preproc_warn_flag
2583 else
2584 ac_cpp_err=
2585 fi
2586else
2587 ac_cpp_err=yes
2588fi
2589if test -z "$ac_cpp_err"; then
2590 :
2591else
2592 echo "$as_me: failed program was:" >&5
2593 cat conftest.$ac_ext >&5
2594 # Broken: fails on valid input.
2595continue
2596fi
2597rm -f conftest.err conftest.$ac_ext
2598
2599 # OK, works on sane cases. Now check whether non-existent headers
2600 # can be detected and how.
2601 cat >conftest.$ac_ext <<_ACEOF
2602#line $LINENO "configure"
2603#include "confdefs.h"
2604#include <ac_nonexistent.h>
2605_ACEOF
2606if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2607 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2608 ac_status=$?
2609 egrep -v '^ *\+' conftest.er1 >conftest.err
2610 rm -f conftest.er1
2611 cat conftest.err >&5
2612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2613 (exit $ac_status); } >/dev/null; then
2614 if test -s conftest.err; then
2615 ac_cpp_err=$ac_c_preproc_warn_flag
2616 else
2617 ac_cpp_err=
2618 fi
2619else
2620 ac_cpp_err=yes
2621fi
2622if test -z "$ac_cpp_err"; then
2623 # Broken: success on invalid input.
2624continue
2625else
2626 echo "$as_me: failed program was:" >&5
2627 cat conftest.$ac_ext >&5
2628 # Passes both tests.
2629ac_preproc_ok=:
2630break
2631fi
2632rm -f conftest.err conftest.$ac_ext
2633
2634done
2635# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2636rm -f conftest.err conftest.$ac_ext
2637if $ac_preproc_ok; then
2638 :
2639else
2640 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2641echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2642 { (exit 1); exit 1; }; }
2643fi
2644
2645ac_ext=c
2646ac_cpp='$CPP $CPPFLAGS'
2647ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2648ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2649ac_compiler_gnu=$ac_cv_c_compiler_gnu
2650
2651
2652
2653echo "$as_me:$LINENO: checking for AIX" >&5
2654echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2655cat >conftest.$ac_ext <<_ACEOF
2656#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002657#include "confdefs.h"
2658#ifdef _AIX
2659 yes
2660#endif
2661
Martin v. Löwis11437992002-04-12 09:54:03 +00002662_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002663if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2664 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 echo "$as_me:$LINENO: result: yes" >&5
2666echo "${ECHO_T}yes" >&6
2667cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002668#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002669_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002670
2671else
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 echo "$as_me:$LINENO: result: no" >&5
2673echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002674fi
2675rm -f conftest*
2676
Michael W. Hudson54241132001-12-07 15:38:26 +00002677
Martin v. Löwis11437992002-04-12 09:54:03 +00002678echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2679echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2680if test "${ac_cv_header_stdc+set}" = set; then
2681 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002682else
Martin v. Löwis11437992002-04-12 09:54:03 +00002683 cat >conftest.$ac_ext <<_ACEOF
2684#line $LINENO "configure"
2685#include "confdefs.h"
2686#include <stdlib.h>
2687#include <stdarg.h>
2688#include <string.h>
2689#include <float.h>
2690
2691_ACEOF
2692if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2693 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2694 ac_status=$?
2695 egrep -v '^ *\+' conftest.er1 >conftest.err
2696 rm -f conftest.er1
2697 cat conftest.err >&5
2698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2699 (exit $ac_status); } >/dev/null; then
2700 if test -s conftest.err; then
2701 ac_cpp_err=$ac_c_preproc_warn_flag
2702 else
2703 ac_cpp_err=
2704 fi
2705else
2706 ac_cpp_err=yes
2707fi
2708if test -z "$ac_cpp_err"; then
2709 ac_cv_header_stdc=yes
2710else
2711 echo "$as_me: failed program was:" >&5
2712 cat conftest.$ac_ext >&5
2713 ac_cv_header_stdc=no
2714fi
2715rm -f conftest.err conftest.$ac_ext
2716
2717if test $ac_cv_header_stdc = yes; then
2718 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2719 cat >conftest.$ac_ext <<_ACEOF
2720#line $LINENO "configure"
2721#include "confdefs.h"
2722#include <string.h>
2723
2724_ACEOF
2725if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2726 egrep "memchr" >/dev/null 2>&1; then
2727 :
2728else
2729 ac_cv_header_stdc=no
2730fi
2731rm -f conftest*
2732
2733fi
2734
2735if test $ac_cv_header_stdc = yes; then
2736 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2737 cat >conftest.$ac_ext <<_ACEOF
2738#line $LINENO "configure"
2739#include "confdefs.h"
2740#include <stdlib.h>
2741
2742_ACEOF
2743if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2744 egrep "free" >/dev/null 2>&1; then
2745 :
2746else
2747 ac_cv_header_stdc=no
2748fi
2749rm -f conftest*
2750
2751fi
2752
2753if test $ac_cv_header_stdc = yes; then
2754 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2755 if test "$cross_compiling" = yes; then
2756 :
2757else
2758 cat >conftest.$ac_ext <<_ACEOF
2759#line $LINENO "configure"
2760#include "confdefs.h"
2761#include <ctype.h>
2762#if ((' ' & 0x0FF) == 0x020)
2763# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2764# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2765#else
2766# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2767 || ('j' <= (c) && (c) <= 'r') \
2768 || ('s' <= (c) && (c) <= 'z'))
2769# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2770#endif
2771
2772#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2773int
2774main ()
2775{
2776 int i;
2777 for (i = 0; i < 256; i++)
2778 if (XOR (islower (i), ISLOWER (i))
2779 || toupper (i) != TOUPPER (i))
2780 exit(2);
2781 exit (0);
2782}
2783_ACEOF
2784rm -f conftest$ac_exeext
2785if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2786 (eval $ac_link) 2>&5
2787 ac_status=$?
2788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2789 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2791 (eval $ac_try) 2>&5
2792 ac_status=$?
2793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2794 (exit $ac_status); }; }; then
2795 :
2796else
2797 echo "$as_me: program exited with status $ac_status" >&5
2798echo "$as_me: failed program was:" >&5
2799cat conftest.$ac_ext >&5
2800( exit $ac_status )
2801ac_cv_header_stdc=no
2802fi
2803rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2804fi
2805fi
2806fi
2807echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2808echo "${ECHO_T}$ac_cv_header_stdc" >&6
2809if test $ac_cv_header_stdc = yes; then
2810
2811cat >>confdefs.h <<\_ACEOF
2812#define STDC_HEADERS 1
2813_ACEOF
2814
2815fi
2816
2817# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2828 inttypes.h stdint.h unistd.h
2829do
2830as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2831echo "$as_me:$LINENO: checking for $ac_header" >&5
2832echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2833if eval "test \"\${$as_ac_Header+set}\" = set"; then
2834 echo $ECHO_N "(cached) $ECHO_C" >&6
2835else
2836 cat >conftest.$ac_ext <<_ACEOF
2837#line $LINENO "configure"
2838#include "confdefs.h"
2839$ac_includes_default
2840
2841#include <$ac_header>
2842_ACEOF
2843rm -f conftest.$ac_objext
2844if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2845 (eval $ac_compile) 2>&5
2846 ac_status=$?
2847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2848 (exit $ac_status); } &&
2849 { ac_try='test -s conftest.$ac_objext'
2850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2851 (eval $ac_try) 2>&5
2852 ac_status=$?
2853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2854 (exit $ac_status); }; }; then
2855 eval "$as_ac_Header=yes"
2856else
2857 echo "$as_me: failed program was:" >&5
2858cat conftest.$ac_ext >&5
2859eval "$as_ac_Header=no"
2860fi
2861rm -f conftest.$ac_objext conftest.$ac_ext
2862fi
2863echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2864echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2865if test `eval echo '${'$as_ac_Header'}'` = yes; then
2866 cat >>confdefs.h <<_ACEOF
2867#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2868_ACEOF
2869
2870fi
2871
2872done
2873
2874
2875if test "${ac_cv_header_minix_config_h+set}" = set; then
2876 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2877echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2878if test "${ac_cv_header_minix_config_h+set}" = set; then
2879 echo $ECHO_N "(cached) $ECHO_C" >&6
2880fi
2881echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2882echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2883else
2884 # Is the header compilable?
2885echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2886echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2887cat >conftest.$ac_ext <<_ACEOF
2888#line $LINENO "configure"
2889#include "confdefs.h"
2890$ac_includes_default
2891#include <minix/config.h>
2892_ACEOF
2893rm -f conftest.$ac_objext
2894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2895 (eval $ac_compile) 2>&5
2896 ac_status=$?
2897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2898 (exit $ac_status); } &&
2899 { ac_try='test -s conftest.$ac_objext'
2900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2901 (eval $ac_try) 2>&5
2902 ac_status=$?
2903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2904 (exit $ac_status); }; }; then
2905 ac_header_compiler=yes
2906else
2907 echo "$as_me: failed program was:" >&5
2908cat conftest.$ac_ext >&5
2909ac_header_compiler=no
2910fi
2911rm -f conftest.$ac_objext conftest.$ac_ext
2912echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2913echo "${ECHO_T}$ac_header_compiler" >&6
2914
2915# Is the header present?
2916echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2917echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2918cat >conftest.$ac_ext <<_ACEOF
2919#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002920#include "confdefs.h"
2921#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002922_ACEOF
2923if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2924 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2925 ac_status=$?
2926 egrep -v '^ *\+' conftest.er1 >conftest.err
2927 rm -f conftest.er1
2928 cat conftest.err >&5
2929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2930 (exit $ac_status); } >/dev/null; then
2931 if test -s conftest.err; then
2932 ac_cpp_err=$ac_c_preproc_warn_flag
2933 else
2934 ac_cpp_err=
2935 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002936else
Martin v. Löwis11437992002-04-12 09:54:03 +00002937 ac_cpp_err=yes
2938fi
2939if test -z "$ac_cpp_err"; then
2940 ac_header_preproc=yes
2941else
2942 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002943 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002944 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002945fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002946rm -f conftest.err conftest.$ac_ext
2947echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2948echo "${ECHO_T}$ac_header_preproc" >&6
2949
2950# So? What about this header?
2951case $ac_header_compiler:$ac_header_preproc in
2952 yes:no )
2953 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2954echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2955 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2956echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2957 no:yes )
2958 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2959echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2960 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2961echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2962 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2963echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2964esac
2965echo "$as_me:$LINENO: checking for minix/config.h" >&5
2966echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2967if test "${ac_cv_header_minix_config_h+set}" = set; then
2968 echo $ECHO_N "(cached) $ECHO_C" >&6
2969else
2970 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002971fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002972echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2973echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2974
2975fi
2976if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002977 MINIX=yes
2978else
Martin v. Löwis11437992002-04-12 09:54:03 +00002979 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002980fi
2981
Martin v. Löwis11437992002-04-12 09:54:03 +00002982
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002983if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002984
2985cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002986#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002987_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002988
Martin v. Löwis11437992002-04-12 09:54:03 +00002989
2990cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002991#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002992_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002993
Martin v. Löwis11437992002-04-12 09:54:03 +00002994
2995cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002996#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002997_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002998
2999fi
3000
3001
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003002# Check for unsupported systems
3003case $ac_sys_system/$ac_sys_release in
3004SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3005 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3006 echo See README for details.
3007 exit 1;;
3008esac
3009
3010if test "$MINIX" = yes; then
3011 echo This system \(MINIX\) is no longer supported.
3012 echo Read README for details.
3013 exit 1
3014fi
3015
Michael W. Hudson54241132001-12-07 15:38:26 +00003016
Martin v. Löwis11437992002-04-12 09:54:03 +00003017echo "$as_me:$LINENO: checking for --with-suffix" >&5
3018echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003019
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003020# Check whether --with-suffix or --without-suffix was given.
3021if test "${with_suffix+set}" = set; then
3022 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003023
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003024 case $withval in
3025 no) EXEEXT=;;
3026 yes) EXEEXT=.exe;;
3027 *) EXEEXT=$withval;;
3028 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003029fi;
3030echo "$as_me:$LINENO: result: $EXEEXT" >&5
3031echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003032
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003033# Test whether we're running on a non-case-sensitive system, in which
3034# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003035
Martin v. Löwis11437992002-04-12 09:54:03 +00003036echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3037echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003038if test ! -d CaseSensitiveTestDir; then
3039mkdir CaseSensitiveTestDir
3040fi
3041
3042if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003043then
Martin v. Löwis11437992002-04-12 09:54:03 +00003044 echo "$as_me:$LINENO: result: yes" >&5
3045echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003046 BUILDEXEEXT=.exe
3047else
Martin v. Löwis11437992002-04-12 09:54:03 +00003048 echo "$as_me:$LINENO: result: no" >&5
3049echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003050 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003051fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003052rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003053
Guido van Rossumdd997f71998-10-07 19:58:26 +00003054case $MACHDEP in
3055bsdos*)
3056 case $CC in
3057 gcc) CC="$CC -D_HAVE_BSDI";;
3058 esac;;
3059esac
3060
Guido van Rossum24b1e751997-08-21 02:29:16 +00003061case $ac_sys_system in
3062hp*|HP*)
3063 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003064 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003065 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003066Monterey*)
3067 case $CC in
3068 cc) CC="$CC -Wl,-Bexport";;
3069 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003070SunOS*)
3071 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003072
3073cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003074#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003075_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003076
3077 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003078esac
3079
Michael W. Hudson54241132001-12-07 15:38:26 +00003080
3081
Martin v. Löwis11437992002-04-12 09:54:03 +00003082echo "$as_me:$LINENO: checking LIBRARY" >&5
3083echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003084if test -z "$LIBRARY"
3085then
3086 LIBRARY='libpython$(VERSION).a'
3087fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003088echo "$as_me:$LINENO: result: $LIBRARY" >&5
3089echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003090
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003091# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003092# name of the library into which to insert object files). BLDLIBRARY is also
3093# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3094# is blank as the main program is not linked directly against LDLIBRARY.
3095# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3096# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3097# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3098# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003099#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003100# RUNSHARED is used to run shared python without installed libraries
3101#
3102# INSTSONAME is the name of the shared library that will be use to install
3103# on the system - some systems like version suffix, others don't
3104
3105
Michael W. Hudson54241132001-12-07 15:38:26 +00003106
3107
3108
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003109
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003110LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003111BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003112INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003113DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003114LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003115RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003116
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003117# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003118# If CXX is set, and if it is needed to link a main function that was
3119# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3120# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003121# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003122# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003123
Martin v. Löwis11437992002-04-12 09:54:03 +00003124echo "$as_me:$LINENO: checking LINKCC" >&5
3125echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003126if test -z "$LINKCC"
3127then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003128 if test -z "$CXX"; then
3129 LINKCC="\$(PURIFY) \$(CC)"
3130 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003131 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003132 $CXX -c conftest.$ac_ext 2>&5
3133 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3134 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3135 then
3136 LINKCC="\$(PURIFY) \$(CC)"
3137 else
3138 LINKCC="\$(PURIFY) \$(CXX)"
3139 fi
3140 rm -fr conftest*
3141 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003142 case $ac_sys_system in
3143 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003144 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003145 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003146 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003147 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003148 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003149 esac
3150fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003151echo "$as_me:$LINENO: result: $LINKCC" >&5
3152echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003153
Martin v. Löwis11437992002-04-12 09:54:03 +00003154echo "$as_me:$LINENO: checking for --enable-shared" >&5
3155echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003156# Check whether --enable-shared or --disable-shared was given.
3157if test "${enable_shared+set}" = set; then
3158 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003159
Martin v. Löwis11437992002-04-12 09:54:03 +00003160fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003161
3162if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003163then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003164 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003165 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003166 enable_shared="yes";;
3167 *)
3168 enable_shared="no";;
3169 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003170fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003171echo "$as_me:$LINENO: result: $enable_shared" >&5
3172echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003173
3174
Martin v. Löwis11437992002-04-12 09:54:03 +00003175echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3176echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003177
Guido van Rossumb8552162001-09-05 14:58:11 +00003178# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3179# library that we build, but we do not want to link against it (we
3180# will find it with a -framework option). For this reason there is an
3181# extra variable BLDLIBRARY against which Python and the extension
3182# modules are linked, BLDLIBRARY. This is normally the same as
3183# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003184if test "$enable_framework"
3185then
3186 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3187 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3188 BLDLIBRARY=''
3189else
3190 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003191fi
Jack Jansene578a632001-08-15 01:27:14 +00003192
Martin v. Löwis1142de32002-03-29 16:28:31 +00003193# Other platforms follow
3194if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003195
3196cat >>confdefs.h <<\_ACEOF
3197#define Py_ENABLE_SHARED 1
3198_ACEOF
3199
Martin v. Löwis1142de32002-03-29 16:28:31 +00003200 case $ac_sys_system in
3201 BeOS*)
3202 LDLIBRARY='libpython$(VERSION).so'
3203 ;;
3204 CYGWIN*)
3205 LDLIBRARY='libpython$(VERSION).dll.a'
3206 DLLLIBRARY='libpython$(VERSION).dll'
3207 ;;
3208 SunOS*)
3209 LDLIBRARY='libpython$(VERSION).so'
3210 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3211 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3212 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003213 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003214 LDLIBRARY='libpython$(VERSION).so'
3215 BLDLIBRARY='-L. -lpython$(VERSION)'
3216 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3217 INSTSONAME="$LDLIBRARY".$SOVERSION
3218 ;;
3219 hp*|HP*)
3220 LDLIBRARY='libpython$(VERSION).sl'
3221 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3222 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3223 ;;
3224 OSF*)
3225 LDLIBRARY='libpython$(VERSION).so'
3226 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3227 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3228 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003229 atheos*)
3230 LDLIBRARY='libpython$(VERSION).so'
3231 BLDLIBRARY='-L. -lpython$(VERSION)'
3232 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3233 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003234 esac
3235 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3236 case $MACHDEP in
3237 dguxR4)
3238 LDLIBRARY='libpython$(VERSION).so'
3239 OPT="$OPT -pic"
3240 ;;
3241 esac
3242fi
3243
Martin v. Löwis11437992002-04-12 09:54:03 +00003244echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3245echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003246
Martin v. Löwis11437992002-04-12 09:54:03 +00003247if test -n "$ac_tool_prefix"; then
3248 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3249set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3250echo "$as_me:$LINENO: checking for $ac_word" >&5
3251echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3252if test "${ac_cv_prog_RANLIB+set}" = set; then
3253 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003254else
3255 if test -n "$RANLIB"; then
3256 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3257else
Martin v. Löwis11437992002-04-12 09:54:03 +00003258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3259for as_dir in $PATH
3260do
3261 IFS=$as_save_IFS
3262 test -z "$as_dir" && as_dir=.
3263 for ac_exec_ext in '' $ac_executable_extensions; do
3264 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3265 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3266 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3267 break 2
3268 fi
3269done
3270done
3271
Guido van Rossum627b2d71993-12-24 10:39:16 +00003272fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003273fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003274RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003275if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003276 echo "$as_me:$LINENO: result: $RANLIB" >&5
3277echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003278else
Martin v. Löwis11437992002-04-12 09:54:03 +00003279 echo "$as_me:$LINENO: result: no" >&5
3280echo "${ECHO_T}no" >&6
3281fi
3282
3283fi
3284if test -z "$ac_cv_prog_RANLIB"; then
3285 ac_ct_RANLIB=$RANLIB
3286 # Extract the first word of "ranlib", so it can be a program name with args.
3287set dummy ranlib; ac_word=$2
3288echo "$as_me:$LINENO: checking for $ac_word" >&5
3289echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3290if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3291 echo $ECHO_N "(cached) $ECHO_C" >&6
3292else
3293 if test -n "$ac_ct_RANLIB"; then
3294 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3295else
3296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3297for as_dir in $PATH
3298do
3299 IFS=$as_save_IFS
3300 test -z "$as_dir" && as_dir=.
3301 for ac_exec_ext in '' $ac_executable_extensions; do
3302 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3303 ac_cv_prog_ac_ct_RANLIB="ranlib"
3304 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3305 break 2
3306 fi
3307done
3308done
3309
3310 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3311fi
3312fi
3313ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3314if test -n "$ac_ct_RANLIB"; then
3315 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3316echo "${ECHO_T}$ac_ct_RANLIB" >&6
3317else
3318 echo "$as_me:$LINENO: result: no" >&5
3319echo "${ECHO_T}no" >&6
3320fi
3321
3322 RANLIB=$ac_ct_RANLIB
3323else
3324 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003325fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003326
3327
Guido van Rossum7f43da71994-08-01 12:15:30 +00003328for ac_prog in ar aal
3329do
Martin v. Löwis11437992002-04-12 09:54:03 +00003330 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003331set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003332echo "$as_me:$LINENO: checking for $ac_word" >&5
3333echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3334if test "${ac_cv_prog_AR+set}" = set; then
3335 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003336else
3337 if test -n "$AR"; then
3338 ac_cv_prog_AR="$AR" # Let the user override the test.
3339else
Martin v. Löwis11437992002-04-12 09:54:03 +00003340as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3341for as_dir in $PATH
3342do
3343 IFS=$as_save_IFS
3344 test -z "$as_dir" && as_dir=.
3345 for ac_exec_ext in '' $ac_executable_extensions; do
3346 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3347 ac_cv_prog_AR="$ac_prog"
3348 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3349 break 2
3350 fi
3351done
3352done
3353
Guido van Rossum7f43da71994-08-01 12:15:30 +00003354fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003355fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003356AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003357if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003358 echo "$as_me:$LINENO: result: $AR" >&5
3359echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003360else
Martin v. Löwis11437992002-04-12 09:54:03 +00003361 echo "$as_me:$LINENO: result: no" >&5
3362echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003363fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003364
Martin v. Löwis11437992002-04-12 09:54:03 +00003365 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003366done
3367test -n "$AR" || AR="ar"
3368
Michael W. Hudson54241132001-12-07 15:38:26 +00003369
Neil Schemenauera42c8272001-03-31 00:01:55 +00003370case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003371bsdos*|hp*|HP*)
3372 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003373 if test -z "$INSTALL"
3374 then
3375 INSTALL="${srcdir}/install-sh -c"
3376 fi
3377esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003378ac_aux_dir=
3379for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3380 if test -f $ac_dir/install-sh; then
3381 ac_aux_dir=$ac_dir
3382 ac_install_sh="$ac_aux_dir/install-sh -c"
3383 break
3384 elif test -f $ac_dir/install.sh; then
3385 ac_aux_dir=$ac_dir
3386 ac_install_sh="$ac_aux_dir/install.sh -c"
3387 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003388 elif test -f $ac_dir/shtool; then
3389 ac_aux_dir=$ac_dir
3390 ac_install_sh="$ac_aux_dir/shtool install -c"
3391 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003392 fi
3393done
3394if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003395 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3396echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3397 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003398fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003399ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3400ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3401ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003402
3403# Find a good install program. We prefer a C program (faster),
3404# so one script is as good as another. But avoid the broken or
3405# incompatible versions:
3406# SysV /etc/install, /usr/sbin/install
3407# SunOS /usr/etc/install
3408# IRIX /sbin/install
3409# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003410# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003411# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3412# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3413# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3414# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003415echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3416echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003417if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003418if test "${ac_cv_path_install+set}" = set; then
3419 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003420else
Martin v. Löwis11437992002-04-12 09:54:03 +00003421 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3422for as_dir in $PATH
3423do
3424 IFS=$as_save_IFS
3425 test -z "$as_dir" && as_dir=.
3426 # Account for people who put trailing slashes in PATH elements.
3427case $as_dir/ in
3428 ./ | .// | /cC/* | \
3429 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3430 /usr/ucb/* ) ;;
3431 *)
3432 # OSF1 and SCO ODT 3.0 have their own names for install.
3433 # Don't use installbsd from OSF since it installs stuff as root
3434 # by default.
3435 for ac_prog in ginstall scoinst install; do
3436 for ac_exec_ext in '' $ac_executable_extensions; do
3437 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3438 if test $ac_prog = install &&
3439 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3440 # AIX install. It has an incompatible calling convention.
3441 :
3442 elif test $ac_prog = install &&
3443 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3444 # program-specific install script used by HP pwplus--don't use.
3445 :
3446 else
3447 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3448 break 3
3449 fi
3450 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003451 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003452 done
3453 ;;
3454esac
3455done
3456
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003457
3458fi
3459 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003460 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003461 else
3462 # As a last resort, use the slow shell script. We don't cache a
3463 # path for INSTALL within a source directory, because that will
3464 # break other packages using the cache if that directory is
3465 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003466 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003467 fi
3468fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003469echo "$as_me:$LINENO: result: $INSTALL" >&5
3470echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003471
3472# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3473# It thinks the first close brace ends the variable substitution.
3474test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3475
Martin v. Löwis11437992002-04-12 09:54:03 +00003476test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003477
3478test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3479
Michael W. Hudson54241132001-12-07 15:38:26 +00003480
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003481# Not every filesystem supports hard links
3482
3483if test -z "$LN" ; then
3484 case $ac_sys_system in
3485 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003486 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003487 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003488 *) LN=ln;;
3489 esac
3490fi
3491
Fred Drake109d9862001-07-11 06:27:56 +00003492# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003493echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3494echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3495
Fred Drake109d9862001-07-11 06:27:56 +00003496# Check whether --with-pydebug or --without-pydebug was given.
3497if test "${with_pydebug+set}" = set; then
3498 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003499
Fred Drake109d9862001-07-11 06:27:56 +00003500if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003501then
3502
3503cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003504#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003505_ACEOF
3506
3507 echo "$as_me:$LINENO: result: yes" >&5
3508echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003509 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003510else echo "$as_me:$LINENO: result: no" >&5
3511echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003512fi
3513else
Martin v. Löwis11437992002-04-12 09:54:03 +00003514 echo "$as_me:$LINENO: result: no" >&5
3515echo "${ECHO_T}no" >&6
3516fi;
Fred Drake109d9862001-07-11 06:27:56 +00003517
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003518# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003519
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003520if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003521then
Neal Norwitzd957f392002-09-25 21:26:19 +00003522 case $GCC in
Guido van Rossumedca74a1997-07-18 23:29:40 +00003523 yes)
3524 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003525 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003526 if test "$Py_DEBUG" = 'true' ; then
3527 # Optimization messes up debuggers, so turn it off for
3528 # debug builds.
3529 OPT="-g -Wall -Wstrict-prototypes"
3530 else
3531 OPT="-g -O3 -Wall -Wstrict-prototypes"
3532 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003533 *)
Fred Drake109d9862001-07-11 06:27:56 +00003534 OPT="-O3 -Wall -Wstrict-prototypes";;
3535 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003536 case $ac_sys_system in
3537 SCO_SV*) OPT="$OPT -m486 -DSCO5";;
3538 esac
Fred Drake109d9862001-07-11 06:27:56 +00003539 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003540 *)
3541 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003542 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003543 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003544 SCO_SV*)
3545 CFLAGS="$CFLAGS -belf"
3546 OPT="-belf -O -Ki486 -DSCO5";;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003547 *)
3548 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003549 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003550 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003551 case $ac_sys_system in
3552 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003553 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003554 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003555fi
3556
Fred Drakee1ceaa02001-12-04 20:55:47 +00003557if test "$Py_DEBUG" = 'true'; then
3558 :
3559else
3560 OPT="-DNDEBUG $OPT"
3561fi
3562
Trent Mick635f6fb2000-08-23 21:33:05 +00003563# The current (beta) Monterey compiler dies with optimizations
3564case $ac_sys_system in
3565Monterey*) OPT="";;
3566esac
3567
Guido van Rossum563e7081996-09-10 18:20:48 +00003568if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003569then
3570 OPT="$OPT $ac_arch_flags"
3571fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003572
Martin v. Löwis11437992002-04-12 09:54:03 +00003573echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3574echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3575if test "${ac_cv_opt_olimit_ok+set}" = set; then
3576 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003577else
3578 ac_save_cc="$CC"
3579CC="$CC -OPT:Olimit=0"
3580if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003581 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003582else
Martin v. Löwis11437992002-04-12 09:54:03 +00003583 cat >conftest.$ac_ext <<_ACEOF
3584#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003585#include "confdefs.h"
3586int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003587_ACEOF
3588rm -f conftest$ac_exeext
3589if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3590 (eval $ac_link) 2>&5
3591 ac_status=$?
3592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3593 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3595 (eval $ac_try) 2>&5
3596 ac_status=$?
3597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3598 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003599 ac_cv_opt_olimit_ok=yes
3600else
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 echo "$as_me: program exited with status $ac_status" >&5
3602echo "$as_me: failed program was:" >&5
3603cat conftest.$ac_ext >&5
3604( exit $ac_status )
3605ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003606fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003607rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003608fi
Guido van Rossum91922671997-10-09 20:24:13 +00003609CC="$ac_save_cc"
3610fi
3611
Martin v. Löwis11437992002-04-12 09:54:03 +00003612echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3613echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003614if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003615 case $ac_sys_system in
3616 Darwin*) OPT="$OPT" ;;
3617 *) OPT="$OPT -OPT:Olimit=0";;
3618 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003619else
Martin v. Löwis11437992002-04-12 09:54:03 +00003620 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3621echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3622 if test "${ac_cv_olimit_ok+set}" = set; then
3623 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003624else
3625 ac_save_cc="$CC"
3626 CC="$CC -Olimit 1500"
3627 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003628 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003629else
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 cat >conftest.$ac_ext <<_ACEOF
3631#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003632#include "confdefs.h"
3633int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003634_ACEOF
3635rm -f conftest$ac_exeext
3636if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3637 (eval $ac_link) 2>&5
3638 ac_status=$?
3639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3640 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3642 (eval $ac_try) 2>&5
3643 ac_status=$?
3644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3645 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003646 ac_cv_olimit_ok=yes
3647else
Martin v. Löwis11437992002-04-12 09:54:03 +00003648 echo "$as_me: program exited with status $ac_status" >&5
3649echo "$as_me: failed program was:" >&5
3650cat conftest.$ac_ext >&5
3651( exit $ac_status )
3652ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003653fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003654rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003655fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003656 CC="$ac_save_cc"
3657fi
3658
Martin v. Löwis11437992002-04-12 09:54:03 +00003659 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3660echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003661 if test $ac_cv_olimit_ok = yes; then
3662 OPT="$OPT -Olimit 1500"
3663 fi
3664fi
3665
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003666# On some compilers, pthreads are available without further options
3667# (e.g. MacOS X). On some of these systems, the compiler will not
3668# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3669# So we have to see first whether pthreads are available without
3670# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003671echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3672echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3673if test "${ac_cv_pthread_is_default+set}" = set; then
3674 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003675else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003676 if test "$cross_compiling" = yes; then
3677 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003678else
Martin v. Löwis11437992002-04-12 09:54:03 +00003679 cat >conftest.$ac_ext <<_ACEOF
3680#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003681#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003682
Martin v. Löwis130fb172001-07-19 11:00:41 +00003683#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003684
3685void* routine(void* p){return NULL;}
3686
3687int main(){
3688 pthread_t p;
3689 if(pthread_create(&p,NULL,routine,NULL)!=0)
3690 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003691 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003692 return 0;
3693}
3694
Martin v. Löwis11437992002-04-12 09:54:03 +00003695_ACEOF
3696rm -f conftest$ac_exeext
3697if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3698 (eval $ac_link) 2>&5
3699 ac_status=$?
3700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3701 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3703 (eval $ac_try) 2>&5
3704 ac_status=$?
3705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3706 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003707 ac_cv_pthread_is_default=yes
3708else
Martin v. Löwis11437992002-04-12 09:54:03 +00003709 echo "$as_me: program exited with status $ac_status" >&5
3710echo "$as_me: failed program was:" >&5
3711cat conftest.$ac_ext >&5
3712( exit $ac_status )
3713ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003714fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003715rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003716fi
3717
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003718fi
3719
Martin v. Löwis11437992002-04-12 09:54:03 +00003720echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3721echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003722
Michael W. Hudson54241132001-12-07 15:38:26 +00003723
Martin v. Löwis11437992002-04-12 09:54:03 +00003724if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003725then
3726 ac_cv_kpthread=no
3727else
3728# -Kpthread, if available, provides the right #defines
3729# and linker options to make pthread_create available
3730# Some compilers won't report that they do not support -Kpthread,
3731# so we need to run a program to see whether it really made the
3732# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003733echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3734echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3735if test "${ac_cv_kpthread+set}" = set; then
3736 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003737else
3738 ac_save_cc="$CC"
3739CC="$CC -Kpthread"
3740if test "$cross_compiling" = yes; then
3741 ac_cv_kpthread=no
3742else
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 cat >conftest.$ac_ext <<_ACEOF
3744#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003745#include "confdefs.h"
3746
3747#include <pthread.h>
3748
3749void* routine(void* p){return NULL;}
3750
3751int main(){
3752 pthread_t p;
3753 if(pthread_create(&p,NULL,routine,NULL)!=0)
3754 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003755 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003756 return 0;
3757}
3758
Martin v. Löwis11437992002-04-12 09:54:03 +00003759_ACEOF
3760rm -f conftest$ac_exeext
3761if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3762 (eval $ac_link) 2>&5
3763 ac_status=$?
3764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3765 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3767 (eval $ac_try) 2>&5
3768 ac_status=$?
3769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3770 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003771 ac_cv_kpthread=yes
3772else
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 echo "$as_me: program exited with status $ac_status" >&5
3774echo "$as_me: failed program was:" >&5
3775cat conftest.$ac_ext >&5
3776( exit $ac_status )
3777ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003778fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003779rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003780fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003781CC="$ac_save_cc"
3782fi
3783
Martin v. Löwis11437992002-04-12 09:54:03 +00003784echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3785echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003786fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003787
Michael W. Hudson54241132001-12-07 15:38:26 +00003788
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003789# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003790echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3791echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3792if test "${ac_cv_header_stdc+set}" = set; then
3793 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003794else
Martin v. Löwis11437992002-04-12 09:54:03 +00003795 cat >conftest.$ac_ext <<_ACEOF
3796#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003797#include "confdefs.h"
3798#include <stdlib.h>
3799#include <stdarg.h>
3800#include <string.h>
3801#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003802
3803_ACEOF
3804if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3805 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3806 ac_status=$?
3807 egrep -v '^ *\+' conftest.er1 >conftest.err
3808 rm -f conftest.er1
3809 cat conftest.err >&5
3810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3811 (exit $ac_status); } >/dev/null; then
3812 if test -s conftest.err; then
3813 ac_cpp_err=$ac_c_preproc_warn_flag
3814 else
3815 ac_cpp_err=
3816 fi
3817else
3818 ac_cpp_err=yes
3819fi
3820if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003821 ac_cv_header_stdc=yes
3822else
Martin v. Löwis11437992002-04-12 09:54:03 +00003823 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003824 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003825 ac_cv_header_stdc=no
3826fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003827rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003828
3829if test $ac_cv_header_stdc = yes; then
3830 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003831 cat >conftest.$ac_ext <<_ACEOF
3832#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003833#include "confdefs.h"
3834#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003835
3836_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003837if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3838 egrep "memchr" >/dev/null 2>&1; then
3839 :
3840else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003841 ac_cv_header_stdc=no
3842fi
3843rm -f conftest*
3844
3845fi
3846
3847if test $ac_cv_header_stdc = yes; then
3848 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 cat >conftest.$ac_ext <<_ACEOF
3850#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003851#include "confdefs.h"
3852#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003853
3854_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003855if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3856 egrep "free" >/dev/null 2>&1; then
3857 :
3858else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003859 ac_cv_header_stdc=no
3860fi
3861rm -f conftest*
3862
3863fi
3864
3865if test $ac_cv_header_stdc = yes; then
3866 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003867 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003868 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003869else
Martin v. Löwis11437992002-04-12 09:54:03 +00003870 cat >conftest.$ac_ext <<_ACEOF
3871#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003872#include "confdefs.h"
3873#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003874#if ((' ' & 0x0FF) == 0x020)
3875# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3876# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3877#else
3878# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3879 || ('j' <= (c) && (c) <= 'r') \
3880 || ('s' <= (c) && (c) <= 'z'))
3881# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3882#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003883
Martin v. Löwis11437992002-04-12 09:54:03 +00003884#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3885int
3886main ()
3887{
3888 int i;
3889 for (i = 0; i < 256; i++)
3890 if (XOR (islower (i), ISLOWER (i))
3891 || toupper (i) != TOUPPER (i))
3892 exit(2);
3893 exit (0);
3894}
3895_ACEOF
3896rm -f conftest$ac_exeext
3897if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3898 (eval $ac_link) 2>&5
3899 ac_status=$?
3900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3901 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3903 (eval $ac_try) 2>&5
3904 ac_status=$?
3905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3906 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003907 :
3908else
Martin v. Löwis11437992002-04-12 09:54:03 +00003909 echo "$as_me: program exited with status $ac_status" >&5
3910echo "$as_me: failed program was:" >&5
3911cat conftest.$ac_ext >&5
3912( exit $ac_status )
3913ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003914fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003915rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003916fi
3917fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003918fi
3919echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3920echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003921if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003922
3923cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003924#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003925_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003926
3927fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003928
Martin v. Löwis11437992002-04-12 09:54:03 +00003929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
Martin v. Löwis11437992002-04-12 09:54:03 +00003966for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003967libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003968signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003969sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003970sys/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 +00003971sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003972sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003973do
Martin v. Löwis11437992002-04-12 09:54:03 +00003974as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3975if eval "test \"\${$as_ac_Header+set}\" = set"; then
3976 echo "$as_me:$LINENO: checking for $ac_header" >&5
3977echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3978if eval "test \"\${$as_ac_Header+set}\" = set"; then
3979 echo $ECHO_N "(cached) $ECHO_C" >&6
3980fi
3981echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3982echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003983else
Martin v. Löwis11437992002-04-12 09:54:03 +00003984 # Is the header compilable?
3985echo "$as_me:$LINENO: checking $ac_header usability" >&5
3986echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3987cat >conftest.$ac_ext <<_ACEOF
3988#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003989#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003990$ac_includes_default
3991#include <$ac_header>
3992_ACEOF
3993rm -f conftest.$ac_objext
3994if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3995 (eval $ac_compile) 2>&5
3996 ac_status=$?
3997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3998 (exit $ac_status); } &&
3999 { ac_try='test -s conftest.$ac_objext'
4000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4001 (eval $ac_try) 2>&5
4002 ac_status=$?
4003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4004 (exit $ac_status); }; }; then
4005 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004006else
Martin v. Löwis11437992002-04-12 09:54:03 +00004007 echo "$as_me: failed program was:" >&5
4008cat conftest.$ac_ext >&5
4009ac_header_compiler=no
4010fi
4011rm -f conftest.$ac_objext conftest.$ac_ext
4012echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4013echo "${ECHO_T}$ac_header_compiler" >&6
4014
4015# Is the header present?
4016echo "$as_me:$LINENO: checking $ac_header presence" >&5
4017echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4018cat >conftest.$ac_ext <<_ACEOF
4019#line $LINENO "configure"
4020#include "confdefs.h"
4021#include <$ac_header>
4022_ACEOF
4023if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4024 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4025 ac_status=$?
4026 egrep -v '^ *\+' conftest.er1 >conftest.err
4027 rm -f conftest.er1
4028 cat conftest.err >&5
4029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4030 (exit $ac_status); } >/dev/null; then
4031 if test -s conftest.err; then
4032 ac_cpp_err=$ac_c_preproc_warn_flag
4033 else
4034 ac_cpp_err=
4035 fi
4036else
4037 ac_cpp_err=yes
4038fi
4039if test -z "$ac_cpp_err"; then
4040 ac_header_preproc=yes
4041else
4042 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004043 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004044 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004045fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004046rm -f conftest.err conftest.$ac_ext
4047echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4048echo "${ECHO_T}$ac_header_preproc" >&6
4049
4050# So? What about this header?
4051case $ac_header_compiler:$ac_header_preproc in
4052 yes:no )
4053 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4054echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4055 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4056echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4057 no:yes )
4058 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4059echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4060 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4061echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4062 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4063echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4064esac
4065echo "$as_me:$LINENO: checking for $ac_header" >&5
4066echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4067if eval "test \"\${$as_ac_Header+set}\" = set"; then
4068 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004069else
Martin v. Löwis11437992002-04-12 09:54:03 +00004070 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004071fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004072echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4073echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4074
4075fi
4076if test `eval echo '${'$as_ac_Header'}'` = yes; then
4077 cat >>confdefs.h <<_ACEOF
4078#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4079_ACEOF
4080
4081fi
4082
Guido van Rossum627b2d71993-12-24 10:39:16 +00004083done
4084
Martin v. Löwis11437992002-04-12 09:54:03 +00004085
4086
4087
4088
4089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004090ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004091for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4092 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4093echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4094echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4095if eval "test \"\${$as_ac_Header+set}\" = set"; then
4096 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004097else
Martin v. Löwis11437992002-04-12 09:54:03 +00004098 cat >conftest.$ac_ext <<_ACEOF
4099#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004100#include "confdefs.h"
4101#include <sys/types.h>
4102#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004103
4104#ifdef F77_DUMMY_MAIN
4105# ifdef __cplusplus
4106 extern "C"
4107# endif
4108 int F77_DUMMY_MAIN() { return 1; }
4109#endif
4110int
4111main ()
4112{
4113if ((DIR *) 0)
4114return 0;
4115 ;
4116 return 0;
4117}
4118_ACEOF
4119rm -f conftest.$ac_objext
4120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4121 (eval $ac_compile) 2>&5
4122 ac_status=$?
4123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4124 (exit $ac_status); } &&
4125 { ac_try='test -s conftest.$ac_objext'
4126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4127 (eval $ac_try) 2>&5
4128 ac_status=$?
4129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4130 (exit $ac_status); }; }; then
4131 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004132else
Martin v. Löwis11437992002-04-12 09:54:03 +00004133 echo "$as_me: failed program was:" >&5
4134cat conftest.$ac_ext >&5
4135eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004136fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004137rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004138fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004139echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4140echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4141if test `eval echo '${'$as_ac_Header'}'` = yes; then
4142 cat >>confdefs.h <<_ACEOF
4143#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4144_ACEOF
4145
4146ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004147fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149done
4150# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4151if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4153echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4154if test "${ac_cv_search_opendir+set}" = set; then
4155 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004156else
Martin v. Löwis11437992002-04-12 09:54:03 +00004157 ac_func_search_save_LIBS=$LIBS
4158ac_cv_search_opendir=no
4159cat >conftest.$ac_ext <<_ACEOF
4160#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004161#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004162
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004163/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004164#ifdef __cplusplus
4165extern "C"
4166#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004167/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004168 builtin and then its argument prototype would still apply. */
4169char opendir ();
4170#ifdef F77_DUMMY_MAIN
4171# ifdef __cplusplus
4172 extern "C"
4173# endif
4174 int F77_DUMMY_MAIN() { return 1; }
4175#endif
4176int
4177main ()
4178{
4179opendir ();
4180 ;
4181 return 0;
4182}
4183_ACEOF
4184rm -f conftest.$ac_objext conftest$ac_exeext
4185if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4186 (eval $ac_link) 2>&5
4187 ac_status=$?
4188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4189 (exit $ac_status); } &&
4190 { ac_try='test -s conftest$ac_exeext'
4191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4192 (eval $ac_try) 2>&5
4193 ac_status=$?
4194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4195 (exit $ac_status); }; }; then
4196 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004197else
Martin v. Löwis11437992002-04-12 09:54:03 +00004198 echo "$as_me: failed program was:" >&5
4199cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004200fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004201rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4202if test "$ac_cv_search_opendir" = no; then
4203 for ac_lib in dir; do
4204 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4205 cat >conftest.$ac_ext <<_ACEOF
4206#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004207#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004208
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004209/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004210#ifdef __cplusplus
4211extern "C"
4212#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004213/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004214 builtin and then its argument prototype would still apply. */
4215char opendir ();
4216#ifdef F77_DUMMY_MAIN
4217# ifdef __cplusplus
4218 extern "C"
4219# endif
4220 int F77_DUMMY_MAIN() { return 1; }
4221#endif
4222int
4223main ()
4224{
4225opendir ();
4226 ;
4227 return 0;
4228}
4229_ACEOF
4230rm -f conftest.$ac_objext conftest$ac_exeext
4231if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4232 (eval $ac_link) 2>&5
4233 ac_status=$?
4234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4235 (exit $ac_status); } &&
4236 { ac_try='test -s conftest$ac_exeext'
4237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4238 (eval $ac_try) 2>&5
4239 ac_status=$?
4240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4241 (exit $ac_status); }; }; then
4242 ac_cv_search_opendir="-l$ac_lib"
4243break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004244else
Martin v. Löwis11437992002-04-12 09:54:03 +00004245 echo "$as_me: failed program was:" >&5
4246cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004247fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004248rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4249 done
4250fi
4251LIBS=$ac_func_search_save_LIBS
4252fi
4253echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4254echo "${ECHO_T}$ac_cv_search_opendir" >&6
4255if test "$ac_cv_search_opendir" != no; then
4256 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004257
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004258fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004259
Michael W. Hudson54241132001-12-07 15:38:26 +00004260else
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4262echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4263if test "${ac_cv_search_opendir+set}" = set; then
4264 echo $ECHO_N "(cached) $ECHO_C" >&6
4265else
4266 ac_func_search_save_LIBS=$LIBS
4267ac_cv_search_opendir=no
4268cat >conftest.$ac_ext <<_ACEOF
4269#line $LINENO "configure"
4270#include "confdefs.h"
4271
4272/* Override any gcc2 internal prototype to avoid an error. */
4273#ifdef __cplusplus
4274extern "C"
4275#endif
4276/* We use char because int might match the return type of a gcc2
4277 builtin and then its argument prototype would still apply. */
4278char opendir ();
4279#ifdef F77_DUMMY_MAIN
4280# ifdef __cplusplus
4281 extern "C"
4282# endif
4283 int F77_DUMMY_MAIN() { return 1; }
4284#endif
4285int
4286main ()
4287{
4288opendir ();
4289 ;
4290 return 0;
4291}
4292_ACEOF
4293rm -f conftest.$ac_objext conftest$ac_exeext
4294if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4295 (eval $ac_link) 2>&5
4296 ac_status=$?
4297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4298 (exit $ac_status); } &&
4299 { ac_try='test -s conftest$ac_exeext'
4300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4301 (eval $ac_try) 2>&5
4302 ac_status=$?
4303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4304 (exit $ac_status); }; }; then
4305 ac_cv_search_opendir="none required"
4306else
4307 echo "$as_me: failed program was:" >&5
4308cat conftest.$ac_ext >&5
4309fi
4310rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4311if test "$ac_cv_search_opendir" = no; then
4312 for ac_lib in x; do
4313 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4314 cat >conftest.$ac_ext <<_ACEOF
4315#line $LINENO "configure"
4316#include "confdefs.h"
4317
4318/* Override any gcc2 internal prototype to avoid an error. */
4319#ifdef __cplusplus
4320extern "C"
4321#endif
4322/* We use char because int might match the return type of a gcc2
4323 builtin and then its argument prototype would still apply. */
4324char opendir ();
4325#ifdef F77_DUMMY_MAIN
4326# ifdef __cplusplus
4327 extern "C"
4328# endif
4329 int F77_DUMMY_MAIN() { return 1; }
4330#endif
4331int
4332main ()
4333{
4334opendir ();
4335 ;
4336 return 0;
4337}
4338_ACEOF
4339rm -f conftest.$ac_objext conftest$ac_exeext
4340if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4341 (eval $ac_link) 2>&5
4342 ac_status=$?
4343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4344 (exit $ac_status); } &&
4345 { ac_try='test -s conftest$ac_exeext'
4346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4347 (eval $ac_try) 2>&5
4348 ac_status=$?
4349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4350 (exit $ac_status); }; }; then
4351 ac_cv_search_opendir="-l$ac_lib"
4352break
4353else
4354 echo "$as_me: failed program was:" >&5
4355cat conftest.$ac_ext >&5
4356fi
4357rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4358 done
4359fi
4360LIBS=$ac_func_search_save_LIBS
4361fi
4362echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4363echo "${ECHO_T}$ac_cv_search_opendir" >&6
4364if test "$ac_cv_search_opendir" != no; then
4365 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4366
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004367fi
4368
4369fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004370
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004371echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4372echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4373if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4374 echo $ECHO_N "(cached) $ECHO_C" >&6
4375else
4376 cat >conftest.$ac_ext <<_ACEOF
4377#line $LINENO "configure"
4378#include "confdefs.h"
4379#include <sys/types.h>
4380#ifdef F77_DUMMY_MAIN
4381# ifdef __cplusplus
4382 extern "C"
4383# endif
4384 int F77_DUMMY_MAIN() { return 1; }
4385#endif
4386int
4387main ()
4388{
4389return makedev(0, 0);
4390 ;
4391 return 0;
4392}
4393_ACEOF
4394rm -f conftest.$ac_objext conftest$ac_exeext
4395if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4396 (eval $ac_link) 2>&5
4397 ac_status=$?
4398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4399 (exit $ac_status); } &&
4400 { ac_try='test -s conftest$ac_exeext'
4401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4402 (eval $ac_try) 2>&5
4403 ac_status=$?
4404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4405 (exit $ac_status); }; }; then
4406 ac_cv_header_sys_types_h_makedev=yes
4407else
4408 echo "$as_me: failed program was:" >&5
4409cat conftest.$ac_ext >&5
4410ac_cv_header_sys_types_h_makedev=no
4411fi
4412rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4413
4414fi
4415echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4416echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4417
4418if test $ac_cv_header_sys_types_h_makedev = no; then
4419if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4420 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4421echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4422if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4423 echo $ECHO_N "(cached) $ECHO_C" >&6
4424fi
4425echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4426echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4427else
4428 # Is the header compilable?
4429echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4430echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4431cat >conftest.$ac_ext <<_ACEOF
4432#line $LINENO "configure"
4433#include "confdefs.h"
4434$ac_includes_default
4435#include <sys/mkdev.h>
4436_ACEOF
4437rm -f conftest.$ac_objext
4438if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4439 (eval $ac_compile) 2>&5
4440 ac_status=$?
4441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4442 (exit $ac_status); } &&
4443 { ac_try='test -s conftest.$ac_objext'
4444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4445 (eval $ac_try) 2>&5
4446 ac_status=$?
4447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4448 (exit $ac_status); }; }; then
4449 ac_header_compiler=yes
4450else
4451 echo "$as_me: failed program was:" >&5
4452cat conftest.$ac_ext >&5
4453ac_header_compiler=no
4454fi
4455rm -f conftest.$ac_objext conftest.$ac_ext
4456echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4457echo "${ECHO_T}$ac_header_compiler" >&6
4458
4459# Is the header present?
4460echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4461echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4462cat >conftest.$ac_ext <<_ACEOF
4463#line $LINENO "configure"
4464#include "confdefs.h"
4465#include <sys/mkdev.h>
4466_ACEOF
4467if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4468 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4469 ac_status=$?
4470 egrep -v '^ *\+' conftest.er1 >conftest.err
4471 rm -f conftest.er1
4472 cat conftest.err >&5
4473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4474 (exit $ac_status); } >/dev/null; then
4475 if test -s conftest.err; then
4476 ac_cpp_err=$ac_c_preproc_warn_flag
4477 else
4478 ac_cpp_err=
4479 fi
4480else
4481 ac_cpp_err=yes
4482fi
4483if test -z "$ac_cpp_err"; then
4484 ac_header_preproc=yes
4485else
4486 echo "$as_me: failed program was:" >&5
4487 cat conftest.$ac_ext >&5
4488 ac_header_preproc=no
4489fi
4490rm -f conftest.err conftest.$ac_ext
4491echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4492echo "${ECHO_T}$ac_header_preproc" >&6
4493
4494# So? What about this header?
4495case $ac_header_compiler:$ac_header_preproc in
4496 yes:no )
4497 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4498echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4499 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4500echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4501 no:yes )
4502 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4503echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4504 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4505echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4506 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4507echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4508esac
4509echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4510echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4511if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4512 echo $ECHO_N "(cached) $ECHO_C" >&6
4513else
4514 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4515fi
4516echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4517echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4518
4519fi
4520if test $ac_cv_header_sys_mkdev_h = yes; then
4521
4522cat >>confdefs.h <<\_ACEOF
4523#define MAJOR_IN_MKDEV 1
4524_ACEOF
4525
4526fi
4527
4528
4529
4530 if test $ac_cv_header_sys_mkdev_h = no; then
4531 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4532 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4533echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4534if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4535 echo $ECHO_N "(cached) $ECHO_C" >&6
4536fi
4537echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4538echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4539else
4540 # Is the header compilable?
4541echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4542echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4543cat >conftest.$ac_ext <<_ACEOF
4544#line $LINENO "configure"
4545#include "confdefs.h"
4546$ac_includes_default
4547#include <sys/sysmacros.h>
4548_ACEOF
4549rm -f conftest.$ac_objext
4550if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4551 (eval $ac_compile) 2>&5
4552 ac_status=$?
4553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4554 (exit $ac_status); } &&
4555 { ac_try='test -s conftest.$ac_objext'
4556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4557 (eval $ac_try) 2>&5
4558 ac_status=$?
4559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4560 (exit $ac_status); }; }; then
4561 ac_header_compiler=yes
4562else
4563 echo "$as_me: failed program was:" >&5
4564cat conftest.$ac_ext >&5
4565ac_header_compiler=no
4566fi
4567rm -f conftest.$ac_objext conftest.$ac_ext
4568echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4569echo "${ECHO_T}$ac_header_compiler" >&6
4570
4571# Is the header present?
4572echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4573echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4574cat >conftest.$ac_ext <<_ACEOF
4575#line $LINENO "configure"
4576#include "confdefs.h"
4577#include <sys/sysmacros.h>
4578_ACEOF
4579if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4580 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4581 ac_status=$?
4582 egrep -v '^ *\+' conftest.er1 >conftest.err
4583 rm -f conftest.er1
4584 cat conftest.err >&5
4585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4586 (exit $ac_status); } >/dev/null; then
4587 if test -s conftest.err; then
4588 ac_cpp_err=$ac_c_preproc_warn_flag
4589 else
4590 ac_cpp_err=
4591 fi
4592else
4593 ac_cpp_err=yes
4594fi
4595if test -z "$ac_cpp_err"; then
4596 ac_header_preproc=yes
4597else
4598 echo "$as_me: failed program was:" >&5
4599 cat conftest.$ac_ext >&5
4600 ac_header_preproc=no
4601fi
4602rm -f conftest.err conftest.$ac_ext
4603echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4604echo "${ECHO_T}$ac_header_preproc" >&6
4605
4606# So? What about this header?
4607case $ac_header_compiler:$ac_header_preproc in
4608 yes:no )
4609 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4610echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4611 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4612echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4613 no:yes )
4614 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4615echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4616 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4617echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4618 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4619echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4620esac
4621echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4622echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4623if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4624 echo $ECHO_N "(cached) $ECHO_C" >&6
4625else
4626 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4627fi
4628echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4629echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4630
4631fi
4632if test $ac_cv_header_sys_sysmacros_h = yes; then
4633
4634cat >>confdefs.h <<\_ACEOF
4635#define MAJOR_IN_SYSMACROS 1
4636_ACEOF
4637
4638fi
4639
4640
4641 fi
4642fi
4643
Michael W. Hudson54241132001-12-07 15:38:26 +00004644
Guido van Rossum627b2d71993-12-24 10:39:16 +00004645# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004646was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004647echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4648echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4649cat >conftest.$ac_ext <<_ACEOF
4650#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004651#include "confdefs.h"
4652#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004653
4654_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004655if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4656 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004657 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004658else
Martin v. Löwis11437992002-04-12 09:54:03 +00004659
4660
4661cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004662#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004663_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004664
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004665
Guido van Rossum627b2d71993-12-24 10:39:16 +00004666fi
4667rm -f conftest*
4668
Martin v. Löwis11437992002-04-12 09:54:03 +00004669echo "$as_me:$LINENO: result: $was_it_defined" >&5
4670echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004671
Neal Norwitz11690112002-07-30 01:08:28 +00004672# Check whether using makedev requires defining _OSF_SOURCE
4673echo "$as_me:$LINENO: checking for makedev" >&5
4674echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4675cat >conftest.$ac_ext <<_ACEOF
4676#line $LINENO "configure"
4677#include "confdefs.h"
4678 #include <sys/types.h>
4679#ifdef F77_DUMMY_MAIN
4680# ifdef __cplusplus
4681 extern "C"
4682# endif
4683 int F77_DUMMY_MAIN() { return 1; }
4684#endif
4685int
4686main ()
4687{
4688 makedev(0, 0)
4689 ;
4690 return 0;
4691}
4692_ACEOF
4693rm -f conftest.$ac_objext conftest$ac_exeext
4694if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4695 (eval $ac_link) 2>&5
4696 ac_status=$?
4697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4698 (exit $ac_status); } &&
4699 { ac_try='test -s conftest$ac_exeext'
4700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4701 (eval $ac_try) 2>&5
4702 ac_status=$?
4703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4704 (exit $ac_status); }; }; then
4705 ac_cv_has_makedev=yes
4706else
4707 echo "$as_me: failed program was:" >&5
4708cat conftest.$ac_ext >&5
4709ac_cv_has_makedev=no
4710fi
4711rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4712if test "$ac_cv_has_makedev" = "no"; then
4713 # we didn't link, try if _OSF_SOURCE will allow us to link
4714 cat >conftest.$ac_ext <<_ACEOF
4715#line $LINENO "configure"
4716#include "confdefs.h"
4717
4718 #define _OSF_SOURCE 1
4719 #include <sys/types.h>
4720
4721#ifdef F77_DUMMY_MAIN
4722# ifdef __cplusplus
4723 extern "C"
4724# endif
4725 int F77_DUMMY_MAIN() { return 1; }
4726#endif
4727int
4728main ()
4729{
4730 makedev(0, 0)
4731 ;
4732 return 0;
4733}
4734_ACEOF
4735rm -f conftest.$ac_objext conftest$ac_exeext
4736if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4737 (eval $ac_link) 2>&5
4738 ac_status=$?
4739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4740 (exit $ac_status); } &&
4741 { ac_try='test -s conftest$ac_exeext'
4742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4743 (eval $ac_try) 2>&5
4744 ac_status=$?
4745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4746 (exit $ac_status); }; }; then
4747 ac_cv_has_makedev=yes
4748else
4749 echo "$as_me: failed program was:" >&5
4750cat conftest.$ac_ext >&5
4751ac_cv_has_makedev=no
4752fi
4753rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4754 if test "$ac_cv_has_makedev" = "yes"; then
4755
4756cat >>confdefs.h <<\_ACEOF
4757#define _OSF_SOURCE 1
4758_ACEOF
4759
4760 fi
4761fi
4762echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4763echo "${ECHO_T}$ac_cv_has_makedev" >&6
4764if test "$ac_cv_has_makedev" = "yes"; then
4765
4766cat >>confdefs.h <<\_ACEOF
4767#define HAVE_MAKEDEV 1
4768_ACEOF
4769
4770fi
4771
Martin v. Löwis399a6892002-10-04 10:22:02 +00004772# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4773# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4774# defined, but the compiler does not support pragma redefine_extname,
4775# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4776# structures (such as rlimit64) without declaring them. As a
4777# work-around, disable LFS on such configurations
4778
4779use_lfs=yes
4780echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4781echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4782cat >conftest.$ac_ext <<_ACEOF
4783#line $LINENO "configure"
4784#include "confdefs.h"
4785
4786#define _LARGEFILE_SOURCE 1
4787#define _FILE_OFFSET_BITS 64
4788#include <sys/resource.h>
4789
4790#ifdef F77_DUMMY_MAIN
4791# ifdef __cplusplus
4792 extern "C"
4793# endif
4794 int F77_DUMMY_MAIN() { return 1; }
4795#endif
4796int
4797main ()
4798{
4799struct rlimit foo;
4800 ;
4801 return 0;
4802}
4803_ACEOF
4804rm -f conftest.$ac_objext
4805if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4806 (eval $ac_compile) 2>&5
4807 ac_status=$?
4808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4809 (exit $ac_status); } &&
4810 { ac_try='test -s conftest.$ac_objext'
4811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4812 (eval $ac_try) 2>&5
4813 ac_status=$?
4814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4815 (exit $ac_status); }; }; then
4816 sol_lfs_bug=no
4817else
4818 echo "$as_me: failed program was:" >&5
4819cat conftest.$ac_ext >&5
4820sol_lfs_bug=yes
4821fi
4822rm -f conftest.$ac_objext conftest.$ac_ext
4823echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4824echo "${ECHO_T}$sol_lfs_bug" >&6
4825if test "$sol_lfs_bug" = "yes"; then
4826 use_lfs=no
4827fi
4828
4829if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004830# Two defines needed to enable largefile support on various platforms
4831# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004832
Martin v. Löwis11437992002-04-12 09:54:03 +00004833cat >>confdefs.h <<\_ACEOF
4834#define _LARGEFILE_SOURCE 1
4835_ACEOF
4836
4837
4838cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004839#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004840_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004841
Martin v. Löwis399a6892002-10-04 10:22:02 +00004842fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004843
Guido van Rossum84e7b241996-08-19 21:59:00 +00004844# Add some code to confdefs.h so that the test for off_t works on SCO
4845cat >> confdefs.h <<\EOF
4846#if defined(SCO_DS)
4847#undef _OFF_T
4848#endif
4849EOF
4850
Guido van Rossumef2255b2000-03-10 22:30:29 +00004851# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004852echo "$as_me:$LINENO: checking for mode_t" >&5
4853echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4854if test "${ac_cv_type_mode_t+set}" = set; then
4855 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004856else
Martin v. Löwis11437992002-04-12 09:54:03 +00004857 cat >conftest.$ac_ext <<_ACEOF
4858#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004859#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004860$ac_includes_default
4861#ifdef F77_DUMMY_MAIN
4862# ifdef __cplusplus
4863 extern "C"
4864# endif
4865 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004866#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004867int
4868main ()
4869{
4870if ((mode_t *) 0)
4871 return 0;
4872if (sizeof (mode_t))
4873 return 0;
4874 ;
4875 return 0;
4876}
4877_ACEOF
4878rm -f conftest.$ac_objext
4879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4880 (eval $ac_compile) 2>&5
4881 ac_status=$?
4882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4883 (exit $ac_status); } &&
4884 { ac_try='test -s conftest.$ac_objext'
4885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4886 (eval $ac_try) 2>&5
4887 ac_status=$?
4888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4889 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004890 ac_cv_type_mode_t=yes
4891else
Martin v. Löwis11437992002-04-12 09:54:03 +00004892 echo "$as_me: failed program was:" >&5
4893cat conftest.$ac_ext >&5
4894ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004895fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004896rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004897fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004898echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4899echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4900if test $ac_cv_type_mode_t = yes; then
4901 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004902else
Martin v. Löwis11437992002-04-12 09:54:03 +00004903
4904cat >>confdefs.h <<_ACEOF
4905#define mode_t int
4906_ACEOF
4907
4908fi
4909
4910echo "$as_me:$LINENO: checking for off_t" >&5
4911echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4912if test "${ac_cv_type_off_t+set}" = set; then
4913 echo $ECHO_N "(cached) $ECHO_C" >&6
4914else
4915 cat >conftest.$ac_ext <<_ACEOF
4916#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004917#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004918$ac_includes_default
4919#ifdef F77_DUMMY_MAIN
4920# ifdef __cplusplus
4921 extern "C"
4922# endif
4923 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004924#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004925int
4926main ()
4927{
4928if ((off_t *) 0)
4929 return 0;
4930if (sizeof (off_t))
4931 return 0;
4932 ;
4933 return 0;
4934}
4935_ACEOF
4936rm -f conftest.$ac_objext
4937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4938 (eval $ac_compile) 2>&5
4939 ac_status=$?
4940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4941 (exit $ac_status); } &&
4942 { ac_try='test -s conftest.$ac_objext'
4943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4944 (eval $ac_try) 2>&5
4945 ac_status=$?
4946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4947 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004948 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004949else
Martin v. Löwis11437992002-04-12 09:54:03 +00004950 echo "$as_me: failed program was:" >&5
4951cat conftest.$ac_ext >&5
4952ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004953fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004954rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004955fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004956echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4957echo "${ECHO_T}$ac_cv_type_off_t" >&6
4958if test $ac_cv_type_off_t = yes; then
4959 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004960else
Martin v. Löwis11437992002-04-12 09:54:03 +00004961
4962cat >>confdefs.h <<_ACEOF
4963#define off_t long
4964_ACEOF
4965
4966fi
4967
4968echo "$as_me:$LINENO: checking for pid_t" >&5
4969echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4970if test "${ac_cv_type_pid_t+set}" = set; then
4971 echo $ECHO_N "(cached) $ECHO_C" >&6
4972else
4973 cat >conftest.$ac_ext <<_ACEOF
4974#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004975#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004976$ac_includes_default
4977#ifdef F77_DUMMY_MAIN
4978# ifdef __cplusplus
4979 extern "C"
4980# endif
4981 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004983int
4984main ()
4985{
4986if ((pid_t *) 0)
4987 return 0;
4988if (sizeof (pid_t))
4989 return 0;
4990 ;
4991 return 0;
4992}
4993_ACEOF
4994rm -f conftest.$ac_objext
4995if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4996 (eval $ac_compile) 2>&5
4997 ac_status=$?
4998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4999 (exit $ac_status); } &&
5000 { ac_try='test -s conftest.$ac_objext'
5001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5002 (eval $ac_try) 2>&5
5003 ac_status=$?
5004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5005 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005006 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005007else
Martin v. Löwis11437992002-04-12 09:54:03 +00005008 echo "$as_me: failed program was:" >&5
5009cat conftest.$ac_ext >&5
5010ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005011fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005012rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005013fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005014echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5015echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5016if test $ac_cv_type_pid_t = yes; then
5017 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005018else
Martin v. Löwis11437992002-04-12 09:54:03 +00005019
5020cat >>confdefs.h <<_ACEOF
5021#define pid_t int
5022_ACEOF
5023
5024fi
5025
5026echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5027echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5028if test "${ac_cv_type_signal+set}" = set; then
5029 echo $ECHO_N "(cached) $ECHO_C" >&6
5030else
5031 cat >conftest.$ac_ext <<_ACEOF
5032#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005033#include "confdefs.h"
5034#include <sys/types.h>
5035#include <signal.h>
5036#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005037# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005038#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005039#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005040extern "C" void (*signal (int, void (*)(int)))(int);
5041#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005042void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005043#endif
5044
Martin v. Löwis11437992002-04-12 09:54:03 +00005045#ifdef F77_DUMMY_MAIN
5046# ifdef __cplusplus
5047 extern "C"
5048# endif
5049 int F77_DUMMY_MAIN() { return 1; }
5050#endif
5051int
5052main ()
5053{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005054int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005055 ;
5056 return 0;
5057}
5058_ACEOF
5059rm -f conftest.$ac_objext
5060if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5061 (eval $ac_compile) 2>&5
5062 ac_status=$?
5063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5064 (exit $ac_status); } &&
5065 { ac_try='test -s conftest.$ac_objext'
5066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5067 (eval $ac_try) 2>&5
5068 ac_status=$?
5069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5070 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005071 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005072else
Martin v. Löwis11437992002-04-12 09:54:03 +00005073 echo "$as_me: failed program was:" >&5
5074cat conftest.$ac_ext >&5
5075ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005076fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005077rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005078fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005079echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5080echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005081
Martin v. Löwis11437992002-04-12 09:54:03 +00005082cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005083#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005084_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005085
Michael W. Hudson54241132001-12-07 15:38:26 +00005086
Martin v. Löwis11437992002-04-12 09:54:03 +00005087echo "$as_me:$LINENO: checking for size_t" >&5
5088echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5089if test "${ac_cv_type_size_t+set}" = set; then
5090 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005091else
Martin v. Löwis11437992002-04-12 09:54:03 +00005092 cat >conftest.$ac_ext <<_ACEOF
5093#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005094#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005095$ac_includes_default
5096#ifdef F77_DUMMY_MAIN
5097# ifdef __cplusplus
5098 extern "C"
5099# endif
5100 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005102int
5103main ()
5104{
5105if ((size_t *) 0)
5106 return 0;
5107if (sizeof (size_t))
5108 return 0;
5109 ;
5110 return 0;
5111}
5112_ACEOF
5113rm -f conftest.$ac_objext
5114if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5115 (eval $ac_compile) 2>&5
5116 ac_status=$?
5117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5118 (exit $ac_status); } &&
5119 { ac_try='test -s conftest.$ac_objext'
5120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5121 (eval $ac_try) 2>&5
5122 ac_status=$?
5123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5124 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005125 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005126else
Martin v. Löwis11437992002-04-12 09:54:03 +00005127 echo "$as_me: failed program was:" >&5
5128cat conftest.$ac_ext >&5
5129ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005130fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005131rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005132fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005133echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5134echo "${ECHO_T}$ac_cv_type_size_t" >&6
5135if test $ac_cv_type_size_t = yes; then
5136 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005137else
Martin v. Löwis11437992002-04-12 09:54:03 +00005138
5139cat >>confdefs.h <<_ACEOF
5140#define size_t unsigned
5141_ACEOF
5142
5143fi
5144
5145echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5146echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5147if test "${ac_cv_type_uid_t+set}" = set; then
5148 echo $ECHO_N "(cached) $ECHO_C" >&6
5149else
5150 cat >conftest.$ac_ext <<_ACEOF
5151#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005152#include "confdefs.h"
5153#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005154
5155_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005156if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5157 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005158 ac_cv_type_uid_t=yes
5159else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005160 ac_cv_type_uid_t=no
5161fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005162rm -f conftest*
5163
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005164fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005165echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5166echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005167if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005168
Martin v. Löwis11437992002-04-12 09:54:03 +00005169cat >>confdefs.h <<\_ACEOF
5170#define uid_t int
5171_ACEOF
5172
5173
5174cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005175#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005176_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005177
5178fi
5179
Jack Jansendd19cf82001-12-06 22:36:17 +00005180
Michael W. Hudson54241132001-12-07 15:38:26 +00005181# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005182echo "$as_me:$LINENO: checking for int" >&5
5183echo $ECHO_N "checking for int... $ECHO_C" >&6
5184if test "${ac_cv_type_int+set}" = set; then
5185 echo $ECHO_N "(cached) $ECHO_C" >&6
5186else
5187 cat >conftest.$ac_ext <<_ACEOF
5188#line $LINENO "configure"
5189#include "confdefs.h"
5190$ac_includes_default
5191#ifdef F77_DUMMY_MAIN
5192# ifdef __cplusplus
5193 extern "C"
5194# endif
5195 int F77_DUMMY_MAIN() { return 1; }
5196#endif
5197int
5198main ()
5199{
5200if ((int *) 0)
5201 return 0;
5202if (sizeof (int))
5203 return 0;
5204 ;
5205 return 0;
5206}
5207_ACEOF
5208rm -f conftest.$ac_objext
5209if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5210 (eval $ac_compile) 2>&5
5211 ac_status=$?
5212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5213 (exit $ac_status); } &&
5214 { ac_try='test -s conftest.$ac_objext'
5215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5216 (eval $ac_try) 2>&5
5217 ac_status=$?
5218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5219 (exit $ac_status); }; }; then
5220 ac_cv_type_int=yes
5221else
5222 echo "$as_me: failed program was:" >&5
5223cat conftest.$ac_ext >&5
5224ac_cv_type_int=no
5225fi
5226rm -f conftest.$ac_objext conftest.$ac_ext
5227fi
5228echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5229echo "${ECHO_T}$ac_cv_type_int" >&6
5230
5231echo "$as_me:$LINENO: checking size of int" >&5
5232echo $ECHO_N "checking size of int... $ECHO_C" >&6
5233if test "${ac_cv_sizeof_int+set}" = set; then
5234 echo $ECHO_N "(cached) $ECHO_C" >&6
5235else
5236 if test "$ac_cv_type_int" = yes; then
5237 # The cast to unsigned long works around a bug in the HP C Compiler
5238 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5239 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5240 # This bug is HP SR number 8606223364.
5241 if test "$cross_compiling" = yes; then
5242 # Depending upon the size, compute the lo and hi bounds.
5243cat >conftest.$ac_ext <<_ACEOF
5244#line $LINENO "configure"
5245#include "confdefs.h"
5246$ac_includes_default
5247#ifdef F77_DUMMY_MAIN
5248# ifdef __cplusplus
5249 extern "C"
5250# endif
5251 int F77_DUMMY_MAIN() { return 1; }
5252#endif
5253int
5254main ()
5255{
5256static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5257test_array [0] = 0
5258
5259 ;
5260 return 0;
5261}
5262_ACEOF
5263rm -f conftest.$ac_objext
5264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5265 (eval $ac_compile) 2>&5
5266 ac_status=$?
5267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5268 (exit $ac_status); } &&
5269 { ac_try='test -s conftest.$ac_objext'
5270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5271 (eval $ac_try) 2>&5
5272 ac_status=$?
5273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5274 (exit $ac_status); }; }; then
5275 ac_lo=0 ac_mid=0
5276 while :; do
5277 cat >conftest.$ac_ext <<_ACEOF
5278#line $LINENO "configure"
5279#include "confdefs.h"
5280$ac_includes_default
5281#ifdef F77_DUMMY_MAIN
5282# ifdef __cplusplus
5283 extern "C"
5284# endif
5285 int F77_DUMMY_MAIN() { return 1; }
5286#endif
5287int
5288main ()
5289{
5290static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5291test_array [0] = 0
5292
5293 ;
5294 return 0;
5295}
5296_ACEOF
5297rm -f conftest.$ac_objext
5298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5299 (eval $ac_compile) 2>&5
5300 ac_status=$?
5301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5302 (exit $ac_status); } &&
5303 { ac_try='test -s conftest.$ac_objext'
5304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5305 (eval $ac_try) 2>&5
5306 ac_status=$?
5307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5308 (exit $ac_status); }; }; then
5309 ac_hi=$ac_mid; break
5310else
5311 echo "$as_me: failed program was:" >&5
5312cat conftest.$ac_ext >&5
5313ac_lo=`expr $ac_mid + 1`
5314 if test $ac_lo -le $ac_mid; then
5315 ac_lo= ac_hi=
5316 break
5317 fi
5318 ac_mid=`expr 2 '*' $ac_mid + 1`
5319fi
5320rm -f conftest.$ac_objext conftest.$ac_ext
5321 done
5322else
5323 echo "$as_me: failed program was:" >&5
5324cat conftest.$ac_ext >&5
5325cat >conftest.$ac_ext <<_ACEOF
5326#line $LINENO "configure"
5327#include "confdefs.h"
5328$ac_includes_default
5329#ifdef F77_DUMMY_MAIN
5330# ifdef __cplusplus
5331 extern "C"
5332# endif
5333 int F77_DUMMY_MAIN() { return 1; }
5334#endif
5335int
5336main ()
5337{
5338static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5339test_array [0] = 0
5340
5341 ;
5342 return 0;
5343}
5344_ACEOF
5345rm -f conftest.$ac_objext
5346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5347 (eval $ac_compile) 2>&5
5348 ac_status=$?
5349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5350 (exit $ac_status); } &&
5351 { ac_try='test -s conftest.$ac_objext'
5352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5353 (eval $ac_try) 2>&5
5354 ac_status=$?
5355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5356 (exit $ac_status); }; }; then
5357 ac_hi=-1 ac_mid=-1
5358 while :; do
5359 cat >conftest.$ac_ext <<_ACEOF
5360#line $LINENO "configure"
5361#include "confdefs.h"
5362$ac_includes_default
5363#ifdef F77_DUMMY_MAIN
5364# ifdef __cplusplus
5365 extern "C"
5366# endif
5367 int F77_DUMMY_MAIN() { return 1; }
5368#endif
5369int
5370main ()
5371{
5372static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5373test_array [0] = 0
5374
5375 ;
5376 return 0;
5377}
5378_ACEOF
5379rm -f conftest.$ac_objext
5380if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5381 (eval $ac_compile) 2>&5
5382 ac_status=$?
5383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5384 (exit $ac_status); } &&
5385 { ac_try='test -s conftest.$ac_objext'
5386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5387 (eval $ac_try) 2>&5
5388 ac_status=$?
5389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5390 (exit $ac_status); }; }; then
5391 ac_lo=$ac_mid; break
5392else
5393 echo "$as_me: failed program was:" >&5
5394cat conftest.$ac_ext >&5
5395ac_hi=`expr '(' $ac_mid ')' - 1`
5396 if test $ac_mid -le $ac_hi; then
5397 ac_lo= ac_hi=
5398 break
5399 fi
5400 ac_mid=`expr 2 '*' $ac_mid`
5401fi
5402rm -f conftest.$ac_objext conftest.$ac_ext
5403 done
5404else
5405 echo "$as_me: failed program was:" >&5
5406cat conftest.$ac_ext >&5
5407ac_lo= ac_hi=
5408fi
5409rm -f conftest.$ac_objext conftest.$ac_ext
5410fi
5411rm -f conftest.$ac_objext conftest.$ac_ext
5412# Binary search between lo and hi bounds.
5413while test "x$ac_lo" != "x$ac_hi"; do
5414 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5415 cat >conftest.$ac_ext <<_ACEOF
5416#line $LINENO "configure"
5417#include "confdefs.h"
5418$ac_includes_default
5419#ifdef F77_DUMMY_MAIN
5420# ifdef __cplusplus
5421 extern "C"
5422# endif
5423 int F77_DUMMY_MAIN() { return 1; }
5424#endif
5425int
5426main ()
5427{
5428static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5429test_array [0] = 0
5430
5431 ;
5432 return 0;
5433}
5434_ACEOF
5435rm -f conftest.$ac_objext
5436if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5437 (eval $ac_compile) 2>&5
5438 ac_status=$?
5439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5440 (exit $ac_status); } &&
5441 { ac_try='test -s conftest.$ac_objext'
5442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5443 (eval $ac_try) 2>&5
5444 ac_status=$?
5445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5446 (exit $ac_status); }; }; then
5447 ac_hi=$ac_mid
5448else
5449 echo "$as_me: failed program was:" >&5
5450cat conftest.$ac_ext >&5
5451ac_lo=`expr '(' $ac_mid ')' + 1`
5452fi
5453rm -f conftest.$ac_objext conftest.$ac_ext
5454done
5455case $ac_lo in
5456?*) ac_cv_sizeof_int=$ac_lo;;
5457'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5458echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5459 { (exit 1); exit 1; }; } ;;
5460esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005461else
5462 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005463 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5464echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5465 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005466else
Martin v. Löwis11437992002-04-12 09:54:03 +00005467 cat >conftest.$ac_ext <<_ACEOF
5468#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005469#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005470$ac_includes_default
5471long longval () { return (long) (sizeof (int)); }
5472unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005473#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005474#include <stdlib.h>
5475#ifdef F77_DUMMY_MAIN
5476# ifdef __cplusplus
5477 extern "C"
5478# endif
5479 int F77_DUMMY_MAIN() { return 1; }
5480#endif
5481int
5482main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005483{
Martin v. Löwis11437992002-04-12 09:54:03 +00005484
5485 FILE *f = fopen ("conftest.val", "w");
5486 if (! f)
5487 exit (1);
5488 if (((long) (sizeof (int))) < 0)
5489 {
5490 long i = longval ();
5491 if (i != ((long) (sizeof (int))))
5492 exit (1);
5493 fprintf (f, "%ld\n", i);
5494 }
5495 else
5496 {
5497 unsigned long i = ulongval ();
5498 if (i != ((long) (sizeof (int))))
5499 exit (1);
5500 fprintf (f, "%lu\n", i);
5501 }
5502 exit (ferror (f) || fclose (f) != 0);
5503
5504 ;
5505 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005506}
Martin v. Löwis11437992002-04-12 09:54:03 +00005507_ACEOF
5508rm -f conftest$ac_exeext
5509if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5510 (eval $ac_link) 2>&5
5511 ac_status=$?
5512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5513 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5515 (eval $ac_try) 2>&5
5516 ac_status=$?
5517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5518 (exit $ac_status); }; }; then
5519 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005520else
Martin v. Löwis11437992002-04-12 09:54:03 +00005521 echo "$as_me: program exited with status $ac_status" >&5
5522echo "$as_me: failed program was:" >&5
5523cat conftest.$ac_ext >&5
5524( exit $ac_status )
5525{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5526echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5527 { (exit 1); exit 1; }; }
5528fi
5529rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5530fi
5531fi
5532rm -f conftest.val
5533else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005534 ac_cv_sizeof_int=0
5535fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005536fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005537echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5538echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5539cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005540#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005541_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005542
5543
Martin v. Löwis11437992002-04-12 09:54:03 +00005544echo "$as_me:$LINENO: checking for long" >&5
5545echo $ECHO_N "checking for long... $ECHO_C" >&6
5546if test "${ac_cv_type_long+set}" = set; then
5547 echo $ECHO_N "(cached) $ECHO_C" >&6
5548else
5549 cat >conftest.$ac_ext <<_ACEOF
5550#line $LINENO "configure"
5551#include "confdefs.h"
5552$ac_includes_default
5553#ifdef F77_DUMMY_MAIN
5554# ifdef __cplusplus
5555 extern "C"
5556# endif
5557 int F77_DUMMY_MAIN() { return 1; }
5558#endif
5559int
5560main ()
5561{
5562if ((long *) 0)
5563 return 0;
5564if (sizeof (long))
5565 return 0;
5566 ;
5567 return 0;
5568}
5569_ACEOF
5570rm -f conftest.$ac_objext
5571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5572 (eval $ac_compile) 2>&5
5573 ac_status=$?
5574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5575 (exit $ac_status); } &&
5576 { ac_try='test -s conftest.$ac_objext'
5577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5578 (eval $ac_try) 2>&5
5579 ac_status=$?
5580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5581 (exit $ac_status); }; }; then
5582 ac_cv_type_long=yes
5583else
5584 echo "$as_me: failed program was:" >&5
5585cat conftest.$ac_ext >&5
5586ac_cv_type_long=no
5587fi
5588rm -f conftest.$ac_objext conftest.$ac_ext
5589fi
5590echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5591echo "${ECHO_T}$ac_cv_type_long" >&6
5592
5593echo "$as_me:$LINENO: checking size of long" >&5
5594echo $ECHO_N "checking size of long... $ECHO_C" >&6
5595if test "${ac_cv_sizeof_long+set}" = set; then
5596 echo $ECHO_N "(cached) $ECHO_C" >&6
5597else
5598 if test "$ac_cv_type_long" = yes; then
5599 # The cast to unsigned long works around a bug in the HP C Compiler
5600 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5601 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5602 # This bug is HP SR number 8606223364.
5603 if test "$cross_compiling" = yes; then
5604 # Depending upon the size, compute the lo and hi bounds.
5605cat >conftest.$ac_ext <<_ACEOF
5606#line $LINENO "configure"
5607#include "confdefs.h"
5608$ac_includes_default
5609#ifdef F77_DUMMY_MAIN
5610# ifdef __cplusplus
5611 extern "C"
5612# endif
5613 int F77_DUMMY_MAIN() { return 1; }
5614#endif
5615int
5616main ()
5617{
5618static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5619test_array [0] = 0
5620
5621 ;
5622 return 0;
5623}
5624_ACEOF
5625rm -f conftest.$ac_objext
5626if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5627 (eval $ac_compile) 2>&5
5628 ac_status=$?
5629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5630 (exit $ac_status); } &&
5631 { ac_try='test -s conftest.$ac_objext'
5632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5633 (eval $ac_try) 2>&5
5634 ac_status=$?
5635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5636 (exit $ac_status); }; }; then
5637 ac_lo=0 ac_mid=0
5638 while :; do
5639 cat >conftest.$ac_ext <<_ACEOF
5640#line $LINENO "configure"
5641#include "confdefs.h"
5642$ac_includes_default
5643#ifdef F77_DUMMY_MAIN
5644# ifdef __cplusplus
5645 extern "C"
5646# endif
5647 int F77_DUMMY_MAIN() { return 1; }
5648#endif
5649int
5650main ()
5651{
5652static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5653test_array [0] = 0
5654
5655 ;
5656 return 0;
5657}
5658_ACEOF
5659rm -f conftest.$ac_objext
5660if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5661 (eval $ac_compile) 2>&5
5662 ac_status=$?
5663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5664 (exit $ac_status); } &&
5665 { ac_try='test -s conftest.$ac_objext'
5666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5667 (eval $ac_try) 2>&5
5668 ac_status=$?
5669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5670 (exit $ac_status); }; }; then
5671 ac_hi=$ac_mid; break
5672else
5673 echo "$as_me: failed program was:" >&5
5674cat conftest.$ac_ext >&5
5675ac_lo=`expr $ac_mid + 1`
5676 if test $ac_lo -le $ac_mid; then
5677 ac_lo= ac_hi=
5678 break
5679 fi
5680 ac_mid=`expr 2 '*' $ac_mid + 1`
5681fi
5682rm -f conftest.$ac_objext conftest.$ac_ext
5683 done
5684else
5685 echo "$as_me: failed program was:" >&5
5686cat conftest.$ac_ext >&5
5687cat >conftest.$ac_ext <<_ACEOF
5688#line $LINENO "configure"
5689#include "confdefs.h"
5690$ac_includes_default
5691#ifdef F77_DUMMY_MAIN
5692# ifdef __cplusplus
5693 extern "C"
5694# endif
5695 int F77_DUMMY_MAIN() { return 1; }
5696#endif
5697int
5698main ()
5699{
5700static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5701test_array [0] = 0
5702
5703 ;
5704 return 0;
5705}
5706_ACEOF
5707rm -f conftest.$ac_objext
5708if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5709 (eval $ac_compile) 2>&5
5710 ac_status=$?
5711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5712 (exit $ac_status); } &&
5713 { ac_try='test -s conftest.$ac_objext'
5714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5715 (eval $ac_try) 2>&5
5716 ac_status=$?
5717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5718 (exit $ac_status); }; }; then
5719 ac_hi=-1 ac_mid=-1
5720 while :; do
5721 cat >conftest.$ac_ext <<_ACEOF
5722#line $LINENO "configure"
5723#include "confdefs.h"
5724$ac_includes_default
5725#ifdef F77_DUMMY_MAIN
5726# ifdef __cplusplus
5727 extern "C"
5728# endif
5729 int F77_DUMMY_MAIN() { return 1; }
5730#endif
5731int
5732main ()
5733{
5734static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5735test_array [0] = 0
5736
5737 ;
5738 return 0;
5739}
5740_ACEOF
5741rm -f conftest.$ac_objext
5742if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5743 (eval $ac_compile) 2>&5
5744 ac_status=$?
5745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5746 (exit $ac_status); } &&
5747 { ac_try='test -s conftest.$ac_objext'
5748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5749 (eval $ac_try) 2>&5
5750 ac_status=$?
5751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5752 (exit $ac_status); }; }; then
5753 ac_lo=$ac_mid; break
5754else
5755 echo "$as_me: failed program was:" >&5
5756cat conftest.$ac_ext >&5
5757ac_hi=`expr '(' $ac_mid ')' - 1`
5758 if test $ac_mid -le $ac_hi; then
5759 ac_lo= ac_hi=
5760 break
5761 fi
5762 ac_mid=`expr 2 '*' $ac_mid`
5763fi
5764rm -f conftest.$ac_objext conftest.$ac_ext
5765 done
5766else
5767 echo "$as_me: failed program was:" >&5
5768cat conftest.$ac_ext >&5
5769ac_lo= ac_hi=
5770fi
5771rm -f conftest.$ac_objext conftest.$ac_ext
5772fi
5773rm -f conftest.$ac_objext conftest.$ac_ext
5774# Binary search between lo and hi bounds.
5775while test "x$ac_lo" != "x$ac_hi"; do
5776 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5777 cat >conftest.$ac_ext <<_ACEOF
5778#line $LINENO "configure"
5779#include "confdefs.h"
5780$ac_includes_default
5781#ifdef F77_DUMMY_MAIN
5782# ifdef __cplusplus
5783 extern "C"
5784# endif
5785 int F77_DUMMY_MAIN() { return 1; }
5786#endif
5787int
5788main ()
5789{
5790static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5791test_array [0] = 0
5792
5793 ;
5794 return 0;
5795}
5796_ACEOF
5797rm -f conftest.$ac_objext
5798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5799 (eval $ac_compile) 2>&5
5800 ac_status=$?
5801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5802 (exit $ac_status); } &&
5803 { ac_try='test -s conftest.$ac_objext'
5804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5805 (eval $ac_try) 2>&5
5806 ac_status=$?
5807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5808 (exit $ac_status); }; }; then
5809 ac_hi=$ac_mid
5810else
5811 echo "$as_me: failed program was:" >&5
5812cat conftest.$ac_ext >&5
5813ac_lo=`expr '(' $ac_mid ')' + 1`
5814fi
5815rm -f conftest.$ac_objext conftest.$ac_ext
5816done
5817case $ac_lo in
5818?*) ac_cv_sizeof_long=$ac_lo;;
5819'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5820echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5821 { (exit 1); exit 1; }; } ;;
5822esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005823else
5824 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005825 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5826echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5827 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005828else
Martin v. Löwis11437992002-04-12 09:54:03 +00005829 cat >conftest.$ac_ext <<_ACEOF
5830#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005831#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005832$ac_includes_default
5833long longval () { return (long) (sizeof (long)); }
5834unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005835#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005836#include <stdlib.h>
5837#ifdef F77_DUMMY_MAIN
5838# ifdef __cplusplus
5839 extern "C"
5840# endif
5841 int F77_DUMMY_MAIN() { return 1; }
5842#endif
5843int
5844main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005845{
Martin v. Löwis11437992002-04-12 09:54:03 +00005846
5847 FILE *f = fopen ("conftest.val", "w");
5848 if (! f)
5849 exit (1);
5850 if (((long) (sizeof (long))) < 0)
5851 {
5852 long i = longval ();
5853 if (i != ((long) (sizeof (long))))
5854 exit (1);
5855 fprintf (f, "%ld\n", i);
5856 }
5857 else
5858 {
5859 unsigned long i = ulongval ();
5860 if (i != ((long) (sizeof (long))))
5861 exit (1);
5862 fprintf (f, "%lu\n", i);
5863 }
5864 exit (ferror (f) || fclose (f) != 0);
5865
5866 ;
5867 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005868}
Martin v. Löwis11437992002-04-12 09:54:03 +00005869_ACEOF
5870rm -f conftest$ac_exeext
5871if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5872 (eval $ac_link) 2>&5
5873 ac_status=$?
5874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5875 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5877 (eval $ac_try) 2>&5
5878 ac_status=$?
5879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5880 (exit $ac_status); }; }; then
5881 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005882else
Martin v. Löwis11437992002-04-12 09:54:03 +00005883 echo "$as_me: program exited with status $ac_status" >&5
5884echo "$as_me: failed program was:" >&5
5885cat conftest.$ac_ext >&5
5886( exit $ac_status )
5887{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5888echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5889 { (exit 1); exit 1; }; }
5890fi
5891rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5892fi
5893fi
5894rm -f conftest.val
5895else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005896 ac_cv_sizeof_long=0
5897fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005898fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005899echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5900echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5901cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005902#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005903_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005904
5905
Martin v. Löwis11437992002-04-12 09:54:03 +00005906echo "$as_me:$LINENO: checking for void *" >&5
5907echo $ECHO_N "checking for void *... $ECHO_C" >&6
5908if test "${ac_cv_type_void_p+set}" = set; then
5909 echo $ECHO_N "(cached) $ECHO_C" >&6
5910else
5911 cat >conftest.$ac_ext <<_ACEOF
5912#line $LINENO "configure"
5913#include "confdefs.h"
5914$ac_includes_default
5915#ifdef F77_DUMMY_MAIN
5916# ifdef __cplusplus
5917 extern "C"
5918# endif
5919 int F77_DUMMY_MAIN() { return 1; }
5920#endif
5921int
5922main ()
5923{
5924if ((void * *) 0)
5925 return 0;
5926if (sizeof (void *))
5927 return 0;
5928 ;
5929 return 0;
5930}
5931_ACEOF
5932rm -f conftest.$ac_objext
5933if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5934 (eval $ac_compile) 2>&5
5935 ac_status=$?
5936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5937 (exit $ac_status); } &&
5938 { ac_try='test -s conftest.$ac_objext'
5939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5940 (eval $ac_try) 2>&5
5941 ac_status=$?
5942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5943 (exit $ac_status); }; }; then
5944 ac_cv_type_void_p=yes
5945else
5946 echo "$as_me: failed program was:" >&5
5947cat conftest.$ac_ext >&5
5948ac_cv_type_void_p=no
5949fi
5950rm -f conftest.$ac_objext conftest.$ac_ext
5951fi
5952echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5953echo "${ECHO_T}$ac_cv_type_void_p" >&6
5954
5955echo "$as_me:$LINENO: checking size of void *" >&5
5956echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5957if test "${ac_cv_sizeof_void_p+set}" = set; then
5958 echo $ECHO_N "(cached) $ECHO_C" >&6
5959else
5960 if test "$ac_cv_type_void_p" = yes; then
5961 # The cast to unsigned long works around a bug in the HP C Compiler
5962 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5963 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5964 # This bug is HP SR number 8606223364.
5965 if test "$cross_compiling" = yes; then
5966 # Depending upon the size, compute the lo and hi bounds.
5967cat >conftest.$ac_ext <<_ACEOF
5968#line $LINENO "configure"
5969#include "confdefs.h"
5970$ac_includes_default
5971#ifdef F77_DUMMY_MAIN
5972# ifdef __cplusplus
5973 extern "C"
5974# endif
5975 int F77_DUMMY_MAIN() { return 1; }
5976#endif
5977int
5978main ()
5979{
5980static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5981test_array [0] = 0
5982
5983 ;
5984 return 0;
5985}
5986_ACEOF
5987rm -f conftest.$ac_objext
5988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5989 (eval $ac_compile) 2>&5
5990 ac_status=$?
5991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5992 (exit $ac_status); } &&
5993 { ac_try='test -s conftest.$ac_objext'
5994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5995 (eval $ac_try) 2>&5
5996 ac_status=$?
5997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5998 (exit $ac_status); }; }; then
5999 ac_lo=0 ac_mid=0
6000 while :; do
6001 cat >conftest.$ac_ext <<_ACEOF
6002#line $LINENO "configure"
6003#include "confdefs.h"
6004$ac_includes_default
6005#ifdef F77_DUMMY_MAIN
6006# ifdef __cplusplus
6007 extern "C"
6008# endif
6009 int F77_DUMMY_MAIN() { return 1; }
6010#endif
6011int
6012main ()
6013{
6014static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6015test_array [0] = 0
6016
6017 ;
6018 return 0;
6019}
6020_ACEOF
6021rm -f conftest.$ac_objext
6022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6023 (eval $ac_compile) 2>&5
6024 ac_status=$?
6025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6026 (exit $ac_status); } &&
6027 { ac_try='test -s conftest.$ac_objext'
6028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6029 (eval $ac_try) 2>&5
6030 ac_status=$?
6031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6032 (exit $ac_status); }; }; then
6033 ac_hi=$ac_mid; break
6034else
6035 echo "$as_me: failed program was:" >&5
6036cat conftest.$ac_ext >&5
6037ac_lo=`expr $ac_mid + 1`
6038 if test $ac_lo -le $ac_mid; then
6039 ac_lo= ac_hi=
6040 break
6041 fi
6042 ac_mid=`expr 2 '*' $ac_mid + 1`
6043fi
6044rm -f conftest.$ac_objext conftest.$ac_ext
6045 done
6046else
6047 echo "$as_me: failed program was:" >&5
6048cat conftest.$ac_ext >&5
6049cat >conftest.$ac_ext <<_ACEOF
6050#line $LINENO "configure"
6051#include "confdefs.h"
6052$ac_includes_default
6053#ifdef F77_DUMMY_MAIN
6054# ifdef __cplusplus
6055 extern "C"
6056# endif
6057 int F77_DUMMY_MAIN() { return 1; }
6058#endif
6059int
6060main ()
6061{
6062static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6063test_array [0] = 0
6064
6065 ;
6066 return 0;
6067}
6068_ACEOF
6069rm -f conftest.$ac_objext
6070if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6071 (eval $ac_compile) 2>&5
6072 ac_status=$?
6073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6074 (exit $ac_status); } &&
6075 { ac_try='test -s conftest.$ac_objext'
6076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6077 (eval $ac_try) 2>&5
6078 ac_status=$?
6079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6080 (exit $ac_status); }; }; then
6081 ac_hi=-1 ac_mid=-1
6082 while :; do
6083 cat >conftest.$ac_ext <<_ACEOF
6084#line $LINENO "configure"
6085#include "confdefs.h"
6086$ac_includes_default
6087#ifdef F77_DUMMY_MAIN
6088# ifdef __cplusplus
6089 extern "C"
6090# endif
6091 int F77_DUMMY_MAIN() { return 1; }
6092#endif
6093int
6094main ()
6095{
6096static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6097test_array [0] = 0
6098
6099 ;
6100 return 0;
6101}
6102_ACEOF
6103rm -f conftest.$ac_objext
6104if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6105 (eval $ac_compile) 2>&5
6106 ac_status=$?
6107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6108 (exit $ac_status); } &&
6109 { ac_try='test -s conftest.$ac_objext'
6110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6111 (eval $ac_try) 2>&5
6112 ac_status=$?
6113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6114 (exit $ac_status); }; }; then
6115 ac_lo=$ac_mid; break
6116else
6117 echo "$as_me: failed program was:" >&5
6118cat conftest.$ac_ext >&5
6119ac_hi=`expr '(' $ac_mid ')' - 1`
6120 if test $ac_mid -le $ac_hi; then
6121 ac_lo= ac_hi=
6122 break
6123 fi
6124 ac_mid=`expr 2 '*' $ac_mid`
6125fi
6126rm -f conftest.$ac_objext conftest.$ac_ext
6127 done
6128else
6129 echo "$as_me: failed program was:" >&5
6130cat conftest.$ac_ext >&5
6131ac_lo= ac_hi=
6132fi
6133rm -f conftest.$ac_objext conftest.$ac_ext
6134fi
6135rm -f conftest.$ac_objext conftest.$ac_ext
6136# Binary search between lo and hi bounds.
6137while test "x$ac_lo" != "x$ac_hi"; do
6138 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6139 cat >conftest.$ac_ext <<_ACEOF
6140#line $LINENO "configure"
6141#include "confdefs.h"
6142$ac_includes_default
6143#ifdef F77_DUMMY_MAIN
6144# ifdef __cplusplus
6145 extern "C"
6146# endif
6147 int F77_DUMMY_MAIN() { return 1; }
6148#endif
6149int
6150main ()
6151{
6152static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6153test_array [0] = 0
6154
6155 ;
6156 return 0;
6157}
6158_ACEOF
6159rm -f conftest.$ac_objext
6160if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6161 (eval $ac_compile) 2>&5
6162 ac_status=$?
6163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6164 (exit $ac_status); } &&
6165 { ac_try='test -s conftest.$ac_objext'
6166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6167 (eval $ac_try) 2>&5
6168 ac_status=$?
6169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6170 (exit $ac_status); }; }; then
6171 ac_hi=$ac_mid
6172else
6173 echo "$as_me: failed program was:" >&5
6174cat conftest.$ac_ext >&5
6175ac_lo=`expr '(' $ac_mid ')' + 1`
6176fi
6177rm -f conftest.$ac_objext conftest.$ac_ext
6178done
6179case $ac_lo in
6180?*) ac_cv_sizeof_void_p=$ac_lo;;
6181'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6182echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6183 { (exit 1); exit 1; }; } ;;
6184esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006185else
6186 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006187 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6188echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6189 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006190else
Martin v. Löwis11437992002-04-12 09:54:03 +00006191 cat >conftest.$ac_ext <<_ACEOF
6192#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006193#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006194$ac_includes_default
6195long longval () { return (long) (sizeof (void *)); }
6196unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006197#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006198#include <stdlib.h>
6199#ifdef F77_DUMMY_MAIN
6200# ifdef __cplusplus
6201 extern "C"
6202# endif
6203 int F77_DUMMY_MAIN() { return 1; }
6204#endif
6205int
6206main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006207{
Martin v. Löwis11437992002-04-12 09:54:03 +00006208
6209 FILE *f = fopen ("conftest.val", "w");
6210 if (! f)
6211 exit (1);
6212 if (((long) (sizeof (void *))) < 0)
6213 {
6214 long i = longval ();
6215 if (i != ((long) (sizeof (void *))))
6216 exit (1);
6217 fprintf (f, "%ld\n", i);
6218 }
6219 else
6220 {
6221 unsigned long i = ulongval ();
6222 if (i != ((long) (sizeof (void *))))
6223 exit (1);
6224 fprintf (f, "%lu\n", i);
6225 }
6226 exit (ferror (f) || fclose (f) != 0);
6227
6228 ;
6229 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006230}
Martin v. Löwis11437992002-04-12 09:54:03 +00006231_ACEOF
6232rm -f conftest$ac_exeext
6233if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6234 (eval $ac_link) 2>&5
6235 ac_status=$?
6236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6237 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6239 (eval $ac_try) 2>&5
6240 ac_status=$?
6241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6242 (exit $ac_status); }; }; then
6243 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006244else
Martin v. Löwis11437992002-04-12 09:54:03 +00006245 echo "$as_me: program exited with status $ac_status" >&5
6246echo "$as_me: failed program was:" >&5
6247cat conftest.$ac_ext >&5
6248( exit $ac_status )
6249{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6250echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6251 { (exit 1); exit 1; }; }
6252fi
6253rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6254fi
6255fi
6256rm -f conftest.val
6257else
Guido van Rossumad678af1998-10-02 14:42:15 +00006258 ac_cv_sizeof_void_p=0
6259fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006260fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006261echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6262echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6263cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006264#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006265_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006266
6267
Martin v. Löwis11437992002-04-12 09:54:03 +00006268echo "$as_me:$LINENO: checking for char" >&5
6269echo $ECHO_N "checking for char... $ECHO_C" >&6
6270if test "${ac_cv_type_char+set}" = set; then
6271 echo $ECHO_N "(cached) $ECHO_C" >&6
6272else
6273 cat >conftest.$ac_ext <<_ACEOF
6274#line $LINENO "configure"
6275#include "confdefs.h"
6276$ac_includes_default
6277#ifdef F77_DUMMY_MAIN
6278# ifdef __cplusplus
6279 extern "C"
6280# endif
6281 int F77_DUMMY_MAIN() { return 1; }
6282#endif
6283int
6284main ()
6285{
6286if ((char *) 0)
6287 return 0;
6288if (sizeof (char))
6289 return 0;
6290 ;
6291 return 0;
6292}
6293_ACEOF
6294rm -f conftest.$ac_objext
6295if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6296 (eval $ac_compile) 2>&5
6297 ac_status=$?
6298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6299 (exit $ac_status); } &&
6300 { ac_try='test -s conftest.$ac_objext'
6301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6302 (eval $ac_try) 2>&5
6303 ac_status=$?
6304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6305 (exit $ac_status); }; }; then
6306 ac_cv_type_char=yes
6307else
6308 echo "$as_me: failed program was:" >&5
6309cat conftest.$ac_ext >&5
6310ac_cv_type_char=no
6311fi
6312rm -f conftest.$ac_objext conftest.$ac_ext
6313fi
6314echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6315echo "${ECHO_T}$ac_cv_type_char" >&6
6316
6317echo "$as_me:$LINENO: checking size of char" >&5
6318echo $ECHO_N "checking size of char... $ECHO_C" >&6
6319if test "${ac_cv_sizeof_char+set}" = set; then
6320 echo $ECHO_N "(cached) $ECHO_C" >&6
6321else
6322 if test "$ac_cv_type_char" = yes; then
6323 # The cast to unsigned long works around a bug in the HP C Compiler
6324 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6325 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6326 # This bug is HP SR number 8606223364.
6327 if test "$cross_compiling" = yes; then
6328 # Depending upon the size, compute the lo and hi bounds.
6329cat >conftest.$ac_ext <<_ACEOF
6330#line $LINENO "configure"
6331#include "confdefs.h"
6332$ac_includes_default
6333#ifdef F77_DUMMY_MAIN
6334# ifdef __cplusplus
6335 extern "C"
6336# endif
6337 int F77_DUMMY_MAIN() { return 1; }
6338#endif
6339int
6340main ()
6341{
6342static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6343test_array [0] = 0
6344
6345 ;
6346 return 0;
6347}
6348_ACEOF
6349rm -f conftest.$ac_objext
6350if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6351 (eval $ac_compile) 2>&5
6352 ac_status=$?
6353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6354 (exit $ac_status); } &&
6355 { ac_try='test -s conftest.$ac_objext'
6356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6357 (eval $ac_try) 2>&5
6358 ac_status=$?
6359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6360 (exit $ac_status); }; }; then
6361 ac_lo=0 ac_mid=0
6362 while :; do
6363 cat >conftest.$ac_ext <<_ACEOF
6364#line $LINENO "configure"
6365#include "confdefs.h"
6366$ac_includes_default
6367#ifdef F77_DUMMY_MAIN
6368# ifdef __cplusplus
6369 extern "C"
6370# endif
6371 int F77_DUMMY_MAIN() { return 1; }
6372#endif
6373int
6374main ()
6375{
6376static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6377test_array [0] = 0
6378
6379 ;
6380 return 0;
6381}
6382_ACEOF
6383rm -f conftest.$ac_objext
6384if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6385 (eval $ac_compile) 2>&5
6386 ac_status=$?
6387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6388 (exit $ac_status); } &&
6389 { ac_try='test -s conftest.$ac_objext'
6390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6391 (eval $ac_try) 2>&5
6392 ac_status=$?
6393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6394 (exit $ac_status); }; }; then
6395 ac_hi=$ac_mid; break
6396else
6397 echo "$as_me: failed program was:" >&5
6398cat conftest.$ac_ext >&5
6399ac_lo=`expr $ac_mid + 1`
6400 if test $ac_lo -le $ac_mid; then
6401 ac_lo= ac_hi=
6402 break
6403 fi
6404 ac_mid=`expr 2 '*' $ac_mid + 1`
6405fi
6406rm -f conftest.$ac_objext conftest.$ac_ext
6407 done
6408else
6409 echo "$as_me: failed program was:" >&5
6410cat conftest.$ac_ext >&5
6411cat >conftest.$ac_ext <<_ACEOF
6412#line $LINENO "configure"
6413#include "confdefs.h"
6414$ac_includes_default
6415#ifdef F77_DUMMY_MAIN
6416# ifdef __cplusplus
6417 extern "C"
6418# endif
6419 int F77_DUMMY_MAIN() { return 1; }
6420#endif
6421int
6422main ()
6423{
6424static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6425test_array [0] = 0
6426
6427 ;
6428 return 0;
6429}
6430_ACEOF
6431rm -f conftest.$ac_objext
6432if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6433 (eval $ac_compile) 2>&5
6434 ac_status=$?
6435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6436 (exit $ac_status); } &&
6437 { ac_try='test -s conftest.$ac_objext'
6438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6439 (eval $ac_try) 2>&5
6440 ac_status=$?
6441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6442 (exit $ac_status); }; }; then
6443 ac_hi=-1 ac_mid=-1
6444 while :; do
6445 cat >conftest.$ac_ext <<_ACEOF
6446#line $LINENO "configure"
6447#include "confdefs.h"
6448$ac_includes_default
6449#ifdef F77_DUMMY_MAIN
6450# ifdef __cplusplus
6451 extern "C"
6452# endif
6453 int F77_DUMMY_MAIN() { return 1; }
6454#endif
6455int
6456main ()
6457{
6458static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6459test_array [0] = 0
6460
6461 ;
6462 return 0;
6463}
6464_ACEOF
6465rm -f conftest.$ac_objext
6466if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6467 (eval $ac_compile) 2>&5
6468 ac_status=$?
6469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6470 (exit $ac_status); } &&
6471 { ac_try='test -s conftest.$ac_objext'
6472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6473 (eval $ac_try) 2>&5
6474 ac_status=$?
6475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6476 (exit $ac_status); }; }; then
6477 ac_lo=$ac_mid; break
6478else
6479 echo "$as_me: failed program was:" >&5
6480cat conftest.$ac_ext >&5
6481ac_hi=`expr '(' $ac_mid ')' - 1`
6482 if test $ac_mid -le $ac_hi; then
6483 ac_lo= ac_hi=
6484 break
6485 fi
6486 ac_mid=`expr 2 '*' $ac_mid`
6487fi
6488rm -f conftest.$ac_objext conftest.$ac_ext
6489 done
6490else
6491 echo "$as_me: failed program was:" >&5
6492cat conftest.$ac_ext >&5
6493ac_lo= ac_hi=
6494fi
6495rm -f conftest.$ac_objext conftest.$ac_ext
6496fi
6497rm -f conftest.$ac_objext conftest.$ac_ext
6498# Binary search between lo and hi bounds.
6499while test "x$ac_lo" != "x$ac_hi"; do
6500 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6501 cat >conftest.$ac_ext <<_ACEOF
6502#line $LINENO "configure"
6503#include "confdefs.h"
6504$ac_includes_default
6505#ifdef F77_DUMMY_MAIN
6506# ifdef __cplusplus
6507 extern "C"
6508# endif
6509 int F77_DUMMY_MAIN() { return 1; }
6510#endif
6511int
6512main ()
6513{
6514static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6515test_array [0] = 0
6516
6517 ;
6518 return 0;
6519}
6520_ACEOF
6521rm -f conftest.$ac_objext
6522if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6523 (eval $ac_compile) 2>&5
6524 ac_status=$?
6525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6526 (exit $ac_status); } &&
6527 { ac_try='test -s conftest.$ac_objext'
6528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6529 (eval $ac_try) 2>&5
6530 ac_status=$?
6531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6532 (exit $ac_status); }; }; then
6533 ac_hi=$ac_mid
6534else
6535 echo "$as_me: failed program was:" >&5
6536cat conftest.$ac_ext >&5
6537ac_lo=`expr '(' $ac_mid ')' + 1`
6538fi
6539rm -f conftest.$ac_objext conftest.$ac_ext
6540done
6541case $ac_lo in
6542?*) ac_cv_sizeof_char=$ac_lo;;
6543'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6544echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6545 { (exit 1); exit 1; }; } ;;
6546esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006547else
6548 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006549 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6550echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6551 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006552else
Martin v. Löwis11437992002-04-12 09:54:03 +00006553 cat >conftest.$ac_ext <<_ACEOF
6554#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006555#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006556$ac_includes_default
6557long longval () { return (long) (sizeof (char)); }
6558unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006559#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006560#include <stdlib.h>
6561#ifdef F77_DUMMY_MAIN
6562# ifdef __cplusplus
6563 extern "C"
6564# endif
6565 int F77_DUMMY_MAIN() { return 1; }
6566#endif
6567int
6568main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006569{
Martin v. Löwis11437992002-04-12 09:54:03 +00006570
6571 FILE *f = fopen ("conftest.val", "w");
6572 if (! f)
6573 exit (1);
6574 if (((long) (sizeof (char))) < 0)
6575 {
6576 long i = longval ();
6577 if (i != ((long) (sizeof (char))))
6578 exit (1);
6579 fprintf (f, "%ld\n", i);
6580 }
6581 else
6582 {
6583 unsigned long i = ulongval ();
6584 if (i != ((long) (sizeof (char))))
6585 exit (1);
6586 fprintf (f, "%lu\n", i);
6587 }
6588 exit (ferror (f) || fclose (f) != 0);
6589
6590 ;
6591 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006592}
Martin v. Löwis11437992002-04-12 09:54:03 +00006593_ACEOF
6594rm -f conftest$ac_exeext
6595if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6596 (eval $ac_link) 2>&5
6597 ac_status=$?
6598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6599 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6601 (eval $ac_try) 2>&5
6602 ac_status=$?
6603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6604 (exit $ac_status); }; }; then
6605 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006606else
Martin v. Löwis11437992002-04-12 09:54:03 +00006607 echo "$as_me: program exited with status $ac_status" >&5
6608echo "$as_me: failed program was:" >&5
6609cat conftest.$ac_ext >&5
6610( exit $ac_status )
6611{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6612echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6613 { (exit 1); exit 1; }; }
6614fi
6615rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6616fi
6617fi
6618rm -f conftest.val
6619else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006620 ac_cv_sizeof_char=0
6621fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006622fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006623echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6624echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6625cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006626#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006627_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006628
6629
Martin v. Löwis11437992002-04-12 09:54:03 +00006630echo "$as_me:$LINENO: checking for short" >&5
6631echo $ECHO_N "checking for short... $ECHO_C" >&6
6632if test "${ac_cv_type_short+set}" = set; then
6633 echo $ECHO_N "(cached) $ECHO_C" >&6
6634else
6635 cat >conftest.$ac_ext <<_ACEOF
6636#line $LINENO "configure"
6637#include "confdefs.h"
6638$ac_includes_default
6639#ifdef F77_DUMMY_MAIN
6640# ifdef __cplusplus
6641 extern "C"
6642# endif
6643 int F77_DUMMY_MAIN() { return 1; }
6644#endif
6645int
6646main ()
6647{
6648if ((short *) 0)
6649 return 0;
6650if (sizeof (short))
6651 return 0;
6652 ;
6653 return 0;
6654}
6655_ACEOF
6656rm -f conftest.$ac_objext
6657if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6658 (eval $ac_compile) 2>&5
6659 ac_status=$?
6660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6661 (exit $ac_status); } &&
6662 { ac_try='test -s conftest.$ac_objext'
6663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6664 (eval $ac_try) 2>&5
6665 ac_status=$?
6666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6667 (exit $ac_status); }; }; then
6668 ac_cv_type_short=yes
6669else
6670 echo "$as_me: failed program was:" >&5
6671cat conftest.$ac_ext >&5
6672ac_cv_type_short=no
6673fi
6674rm -f conftest.$ac_objext conftest.$ac_ext
6675fi
6676echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6677echo "${ECHO_T}$ac_cv_type_short" >&6
6678
6679echo "$as_me:$LINENO: checking size of short" >&5
6680echo $ECHO_N "checking size of short... $ECHO_C" >&6
6681if test "${ac_cv_sizeof_short+set}" = set; then
6682 echo $ECHO_N "(cached) $ECHO_C" >&6
6683else
6684 if test "$ac_cv_type_short" = yes; then
6685 # The cast to unsigned long works around a bug in the HP C Compiler
6686 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6687 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6688 # This bug is HP SR number 8606223364.
6689 if test "$cross_compiling" = yes; then
6690 # Depending upon the size, compute the lo and hi bounds.
6691cat >conftest.$ac_ext <<_ACEOF
6692#line $LINENO "configure"
6693#include "confdefs.h"
6694$ac_includes_default
6695#ifdef F77_DUMMY_MAIN
6696# ifdef __cplusplus
6697 extern "C"
6698# endif
6699 int F77_DUMMY_MAIN() { return 1; }
6700#endif
6701int
6702main ()
6703{
6704static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6705test_array [0] = 0
6706
6707 ;
6708 return 0;
6709}
6710_ACEOF
6711rm -f conftest.$ac_objext
6712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6713 (eval $ac_compile) 2>&5
6714 ac_status=$?
6715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6716 (exit $ac_status); } &&
6717 { ac_try='test -s conftest.$ac_objext'
6718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6719 (eval $ac_try) 2>&5
6720 ac_status=$?
6721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6722 (exit $ac_status); }; }; then
6723 ac_lo=0 ac_mid=0
6724 while :; do
6725 cat >conftest.$ac_ext <<_ACEOF
6726#line $LINENO "configure"
6727#include "confdefs.h"
6728$ac_includes_default
6729#ifdef F77_DUMMY_MAIN
6730# ifdef __cplusplus
6731 extern "C"
6732# endif
6733 int F77_DUMMY_MAIN() { return 1; }
6734#endif
6735int
6736main ()
6737{
6738static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6739test_array [0] = 0
6740
6741 ;
6742 return 0;
6743}
6744_ACEOF
6745rm -f conftest.$ac_objext
6746if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6747 (eval $ac_compile) 2>&5
6748 ac_status=$?
6749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6750 (exit $ac_status); } &&
6751 { ac_try='test -s conftest.$ac_objext'
6752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6753 (eval $ac_try) 2>&5
6754 ac_status=$?
6755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6756 (exit $ac_status); }; }; then
6757 ac_hi=$ac_mid; break
6758else
6759 echo "$as_me: failed program was:" >&5
6760cat conftest.$ac_ext >&5
6761ac_lo=`expr $ac_mid + 1`
6762 if test $ac_lo -le $ac_mid; then
6763 ac_lo= ac_hi=
6764 break
6765 fi
6766 ac_mid=`expr 2 '*' $ac_mid + 1`
6767fi
6768rm -f conftest.$ac_objext conftest.$ac_ext
6769 done
6770else
6771 echo "$as_me: failed program was:" >&5
6772cat conftest.$ac_ext >&5
6773cat >conftest.$ac_ext <<_ACEOF
6774#line $LINENO "configure"
6775#include "confdefs.h"
6776$ac_includes_default
6777#ifdef F77_DUMMY_MAIN
6778# ifdef __cplusplus
6779 extern "C"
6780# endif
6781 int F77_DUMMY_MAIN() { return 1; }
6782#endif
6783int
6784main ()
6785{
6786static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6787test_array [0] = 0
6788
6789 ;
6790 return 0;
6791}
6792_ACEOF
6793rm -f conftest.$ac_objext
6794if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6795 (eval $ac_compile) 2>&5
6796 ac_status=$?
6797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6798 (exit $ac_status); } &&
6799 { ac_try='test -s conftest.$ac_objext'
6800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6801 (eval $ac_try) 2>&5
6802 ac_status=$?
6803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6804 (exit $ac_status); }; }; then
6805 ac_hi=-1 ac_mid=-1
6806 while :; do
6807 cat >conftest.$ac_ext <<_ACEOF
6808#line $LINENO "configure"
6809#include "confdefs.h"
6810$ac_includes_default
6811#ifdef F77_DUMMY_MAIN
6812# ifdef __cplusplus
6813 extern "C"
6814# endif
6815 int F77_DUMMY_MAIN() { return 1; }
6816#endif
6817int
6818main ()
6819{
6820static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6821test_array [0] = 0
6822
6823 ;
6824 return 0;
6825}
6826_ACEOF
6827rm -f conftest.$ac_objext
6828if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6829 (eval $ac_compile) 2>&5
6830 ac_status=$?
6831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6832 (exit $ac_status); } &&
6833 { ac_try='test -s conftest.$ac_objext'
6834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6835 (eval $ac_try) 2>&5
6836 ac_status=$?
6837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6838 (exit $ac_status); }; }; then
6839 ac_lo=$ac_mid; break
6840else
6841 echo "$as_me: failed program was:" >&5
6842cat conftest.$ac_ext >&5
6843ac_hi=`expr '(' $ac_mid ')' - 1`
6844 if test $ac_mid -le $ac_hi; then
6845 ac_lo= ac_hi=
6846 break
6847 fi
6848 ac_mid=`expr 2 '*' $ac_mid`
6849fi
6850rm -f conftest.$ac_objext conftest.$ac_ext
6851 done
6852else
6853 echo "$as_me: failed program was:" >&5
6854cat conftest.$ac_ext >&5
6855ac_lo= ac_hi=
6856fi
6857rm -f conftest.$ac_objext conftest.$ac_ext
6858fi
6859rm -f conftest.$ac_objext conftest.$ac_ext
6860# Binary search between lo and hi bounds.
6861while test "x$ac_lo" != "x$ac_hi"; do
6862 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6863 cat >conftest.$ac_ext <<_ACEOF
6864#line $LINENO "configure"
6865#include "confdefs.h"
6866$ac_includes_default
6867#ifdef F77_DUMMY_MAIN
6868# ifdef __cplusplus
6869 extern "C"
6870# endif
6871 int F77_DUMMY_MAIN() { return 1; }
6872#endif
6873int
6874main ()
6875{
6876static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6877test_array [0] = 0
6878
6879 ;
6880 return 0;
6881}
6882_ACEOF
6883rm -f conftest.$ac_objext
6884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6885 (eval $ac_compile) 2>&5
6886 ac_status=$?
6887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6888 (exit $ac_status); } &&
6889 { ac_try='test -s conftest.$ac_objext'
6890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6891 (eval $ac_try) 2>&5
6892 ac_status=$?
6893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6894 (exit $ac_status); }; }; then
6895 ac_hi=$ac_mid
6896else
6897 echo "$as_me: failed program was:" >&5
6898cat conftest.$ac_ext >&5
6899ac_lo=`expr '(' $ac_mid ')' + 1`
6900fi
6901rm -f conftest.$ac_objext conftest.$ac_ext
6902done
6903case $ac_lo in
6904?*) ac_cv_sizeof_short=$ac_lo;;
6905'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6906echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6907 { (exit 1); exit 1; }; } ;;
6908esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006909else
6910 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006911 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6912echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6913 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006914else
Martin v. Löwis11437992002-04-12 09:54:03 +00006915 cat >conftest.$ac_ext <<_ACEOF
6916#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006917#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006918$ac_includes_default
6919long longval () { return (long) (sizeof (short)); }
6920unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006921#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006922#include <stdlib.h>
6923#ifdef F77_DUMMY_MAIN
6924# ifdef __cplusplus
6925 extern "C"
6926# endif
6927 int F77_DUMMY_MAIN() { return 1; }
6928#endif
6929int
6930main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006931{
Martin v. Löwis11437992002-04-12 09:54:03 +00006932
6933 FILE *f = fopen ("conftest.val", "w");
6934 if (! f)
6935 exit (1);
6936 if (((long) (sizeof (short))) < 0)
6937 {
6938 long i = longval ();
6939 if (i != ((long) (sizeof (short))))
6940 exit (1);
6941 fprintf (f, "%ld\n", i);
6942 }
6943 else
6944 {
6945 unsigned long i = ulongval ();
6946 if (i != ((long) (sizeof (short))))
6947 exit (1);
6948 fprintf (f, "%lu\n", i);
6949 }
6950 exit (ferror (f) || fclose (f) != 0);
6951
6952 ;
6953 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006954}
Martin v. Löwis11437992002-04-12 09:54:03 +00006955_ACEOF
6956rm -f conftest$ac_exeext
6957if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6958 (eval $ac_link) 2>&5
6959 ac_status=$?
6960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6961 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6963 (eval $ac_try) 2>&5
6964 ac_status=$?
6965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6966 (exit $ac_status); }; }; then
6967 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006968else
Martin v. Löwis11437992002-04-12 09:54:03 +00006969 echo "$as_me: program exited with status $ac_status" >&5
6970echo "$as_me: failed program was:" >&5
6971cat conftest.$ac_ext >&5
6972( exit $ac_status )
6973{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6974echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6975 { (exit 1); exit 1; }; }
6976fi
6977rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6978fi
6979fi
6980rm -f conftest.val
6981else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006982 ac_cv_sizeof_short=0
6983fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006984fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006985echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6986echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6987cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006988#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006989_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006990
6991
Martin v. Löwis11437992002-04-12 09:54:03 +00006992echo "$as_me:$LINENO: checking for float" >&5
6993echo $ECHO_N "checking for float... $ECHO_C" >&6
6994if test "${ac_cv_type_float+set}" = set; then
6995 echo $ECHO_N "(cached) $ECHO_C" >&6
6996else
6997 cat >conftest.$ac_ext <<_ACEOF
6998#line $LINENO "configure"
6999#include "confdefs.h"
7000$ac_includes_default
7001#ifdef F77_DUMMY_MAIN
7002# ifdef __cplusplus
7003 extern "C"
7004# endif
7005 int F77_DUMMY_MAIN() { return 1; }
7006#endif
7007int
7008main ()
7009{
7010if ((float *) 0)
7011 return 0;
7012if (sizeof (float))
7013 return 0;
7014 ;
7015 return 0;
7016}
7017_ACEOF
7018rm -f conftest.$ac_objext
7019if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7020 (eval $ac_compile) 2>&5
7021 ac_status=$?
7022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7023 (exit $ac_status); } &&
7024 { ac_try='test -s conftest.$ac_objext'
7025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7026 (eval $ac_try) 2>&5
7027 ac_status=$?
7028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7029 (exit $ac_status); }; }; then
7030 ac_cv_type_float=yes
7031else
7032 echo "$as_me: failed program was:" >&5
7033cat conftest.$ac_ext >&5
7034ac_cv_type_float=no
7035fi
7036rm -f conftest.$ac_objext conftest.$ac_ext
7037fi
7038echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7039echo "${ECHO_T}$ac_cv_type_float" >&6
7040
7041echo "$as_me:$LINENO: checking size of float" >&5
7042echo $ECHO_N "checking size of float... $ECHO_C" >&6
7043if test "${ac_cv_sizeof_float+set}" = set; then
7044 echo $ECHO_N "(cached) $ECHO_C" >&6
7045else
7046 if test "$ac_cv_type_float" = yes; then
7047 # The cast to unsigned long works around a bug in the HP C Compiler
7048 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7049 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7050 # This bug is HP SR number 8606223364.
7051 if test "$cross_compiling" = yes; then
7052 # Depending upon the size, compute the lo and hi bounds.
7053cat >conftest.$ac_ext <<_ACEOF
7054#line $LINENO "configure"
7055#include "confdefs.h"
7056$ac_includes_default
7057#ifdef F77_DUMMY_MAIN
7058# ifdef __cplusplus
7059 extern "C"
7060# endif
7061 int F77_DUMMY_MAIN() { return 1; }
7062#endif
7063int
7064main ()
7065{
7066static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7067test_array [0] = 0
7068
7069 ;
7070 return 0;
7071}
7072_ACEOF
7073rm -f conftest.$ac_objext
7074if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7075 (eval $ac_compile) 2>&5
7076 ac_status=$?
7077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7078 (exit $ac_status); } &&
7079 { ac_try='test -s conftest.$ac_objext'
7080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7081 (eval $ac_try) 2>&5
7082 ac_status=$?
7083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7084 (exit $ac_status); }; }; then
7085 ac_lo=0 ac_mid=0
7086 while :; do
7087 cat >conftest.$ac_ext <<_ACEOF
7088#line $LINENO "configure"
7089#include "confdefs.h"
7090$ac_includes_default
7091#ifdef F77_DUMMY_MAIN
7092# ifdef __cplusplus
7093 extern "C"
7094# endif
7095 int F77_DUMMY_MAIN() { return 1; }
7096#endif
7097int
7098main ()
7099{
7100static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7101test_array [0] = 0
7102
7103 ;
7104 return 0;
7105}
7106_ACEOF
7107rm -f conftest.$ac_objext
7108if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7109 (eval $ac_compile) 2>&5
7110 ac_status=$?
7111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7112 (exit $ac_status); } &&
7113 { ac_try='test -s conftest.$ac_objext'
7114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7115 (eval $ac_try) 2>&5
7116 ac_status=$?
7117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7118 (exit $ac_status); }; }; then
7119 ac_hi=$ac_mid; break
7120else
7121 echo "$as_me: failed program was:" >&5
7122cat conftest.$ac_ext >&5
7123ac_lo=`expr $ac_mid + 1`
7124 if test $ac_lo -le $ac_mid; then
7125 ac_lo= ac_hi=
7126 break
7127 fi
7128 ac_mid=`expr 2 '*' $ac_mid + 1`
7129fi
7130rm -f conftest.$ac_objext conftest.$ac_ext
7131 done
7132else
7133 echo "$as_me: failed program was:" >&5
7134cat conftest.$ac_ext >&5
7135cat >conftest.$ac_ext <<_ACEOF
7136#line $LINENO "configure"
7137#include "confdefs.h"
7138$ac_includes_default
7139#ifdef F77_DUMMY_MAIN
7140# ifdef __cplusplus
7141 extern "C"
7142# endif
7143 int F77_DUMMY_MAIN() { return 1; }
7144#endif
7145int
7146main ()
7147{
7148static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7149test_array [0] = 0
7150
7151 ;
7152 return 0;
7153}
7154_ACEOF
7155rm -f conftest.$ac_objext
7156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7157 (eval $ac_compile) 2>&5
7158 ac_status=$?
7159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7160 (exit $ac_status); } &&
7161 { ac_try='test -s conftest.$ac_objext'
7162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7163 (eval $ac_try) 2>&5
7164 ac_status=$?
7165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7166 (exit $ac_status); }; }; then
7167 ac_hi=-1 ac_mid=-1
7168 while :; do
7169 cat >conftest.$ac_ext <<_ACEOF
7170#line $LINENO "configure"
7171#include "confdefs.h"
7172$ac_includes_default
7173#ifdef F77_DUMMY_MAIN
7174# ifdef __cplusplus
7175 extern "C"
7176# endif
7177 int F77_DUMMY_MAIN() { return 1; }
7178#endif
7179int
7180main ()
7181{
7182static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7183test_array [0] = 0
7184
7185 ;
7186 return 0;
7187}
7188_ACEOF
7189rm -f conftest.$ac_objext
7190if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7191 (eval $ac_compile) 2>&5
7192 ac_status=$?
7193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7194 (exit $ac_status); } &&
7195 { ac_try='test -s conftest.$ac_objext'
7196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7197 (eval $ac_try) 2>&5
7198 ac_status=$?
7199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7200 (exit $ac_status); }; }; then
7201 ac_lo=$ac_mid; break
7202else
7203 echo "$as_me: failed program was:" >&5
7204cat conftest.$ac_ext >&5
7205ac_hi=`expr '(' $ac_mid ')' - 1`
7206 if test $ac_mid -le $ac_hi; then
7207 ac_lo= ac_hi=
7208 break
7209 fi
7210 ac_mid=`expr 2 '*' $ac_mid`
7211fi
7212rm -f conftest.$ac_objext conftest.$ac_ext
7213 done
7214else
7215 echo "$as_me: failed program was:" >&5
7216cat conftest.$ac_ext >&5
7217ac_lo= ac_hi=
7218fi
7219rm -f conftest.$ac_objext conftest.$ac_ext
7220fi
7221rm -f conftest.$ac_objext conftest.$ac_ext
7222# Binary search between lo and hi bounds.
7223while test "x$ac_lo" != "x$ac_hi"; do
7224 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7225 cat >conftest.$ac_ext <<_ACEOF
7226#line $LINENO "configure"
7227#include "confdefs.h"
7228$ac_includes_default
7229#ifdef F77_DUMMY_MAIN
7230# ifdef __cplusplus
7231 extern "C"
7232# endif
7233 int F77_DUMMY_MAIN() { return 1; }
7234#endif
7235int
7236main ()
7237{
7238static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7239test_array [0] = 0
7240
7241 ;
7242 return 0;
7243}
7244_ACEOF
7245rm -f conftest.$ac_objext
7246if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7247 (eval $ac_compile) 2>&5
7248 ac_status=$?
7249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7250 (exit $ac_status); } &&
7251 { ac_try='test -s conftest.$ac_objext'
7252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7253 (eval $ac_try) 2>&5
7254 ac_status=$?
7255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7256 (exit $ac_status); }; }; then
7257 ac_hi=$ac_mid
7258else
7259 echo "$as_me: failed program was:" >&5
7260cat conftest.$ac_ext >&5
7261ac_lo=`expr '(' $ac_mid ')' + 1`
7262fi
7263rm -f conftest.$ac_objext conftest.$ac_ext
7264done
7265case $ac_lo in
7266?*) ac_cv_sizeof_float=$ac_lo;;
7267'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7268echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7269 { (exit 1); exit 1; }; } ;;
7270esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007271else
7272 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007273 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7274echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7275 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007276else
Martin v. Löwis11437992002-04-12 09:54:03 +00007277 cat >conftest.$ac_ext <<_ACEOF
7278#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007279#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007280$ac_includes_default
7281long longval () { return (long) (sizeof (float)); }
7282unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007283#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007284#include <stdlib.h>
7285#ifdef F77_DUMMY_MAIN
7286# ifdef __cplusplus
7287 extern "C"
7288# endif
7289 int F77_DUMMY_MAIN() { return 1; }
7290#endif
7291int
7292main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007293{
Martin v. Löwis11437992002-04-12 09:54:03 +00007294
7295 FILE *f = fopen ("conftest.val", "w");
7296 if (! f)
7297 exit (1);
7298 if (((long) (sizeof (float))) < 0)
7299 {
7300 long i = longval ();
7301 if (i != ((long) (sizeof (float))))
7302 exit (1);
7303 fprintf (f, "%ld\n", i);
7304 }
7305 else
7306 {
7307 unsigned long i = ulongval ();
7308 if (i != ((long) (sizeof (float))))
7309 exit (1);
7310 fprintf (f, "%lu\n", i);
7311 }
7312 exit (ferror (f) || fclose (f) != 0);
7313
7314 ;
7315 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007316}
Martin v. Löwis11437992002-04-12 09:54:03 +00007317_ACEOF
7318rm -f conftest$ac_exeext
7319if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7320 (eval $ac_link) 2>&5
7321 ac_status=$?
7322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7323 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7325 (eval $ac_try) 2>&5
7326 ac_status=$?
7327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7328 (exit $ac_status); }; }; then
7329 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007330else
Martin v. Löwis11437992002-04-12 09:54:03 +00007331 echo "$as_me: program exited with status $ac_status" >&5
7332echo "$as_me: failed program was:" >&5
7333cat conftest.$ac_ext >&5
7334( exit $ac_status )
7335{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7336echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7337 { (exit 1); exit 1; }; }
7338fi
7339rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7340fi
7341fi
7342rm -f conftest.val
7343else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007344 ac_cv_sizeof_float=0
7345fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007346fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007347echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7348echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7349cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007350#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007351_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007352
7353
Martin v. Löwis11437992002-04-12 09:54:03 +00007354echo "$as_me:$LINENO: checking for double" >&5
7355echo $ECHO_N "checking for double... $ECHO_C" >&6
7356if test "${ac_cv_type_double+set}" = set; then
7357 echo $ECHO_N "(cached) $ECHO_C" >&6
7358else
7359 cat >conftest.$ac_ext <<_ACEOF
7360#line $LINENO "configure"
7361#include "confdefs.h"
7362$ac_includes_default
7363#ifdef F77_DUMMY_MAIN
7364# ifdef __cplusplus
7365 extern "C"
7366# endif
7367 int F77_DUMMY_MAIN() { return 1; }
7368#endif
7369int
7370main ()
7371{
7372if ((double *) 0)
7373 return 0;
7374if (sizeof (double))
7375 return 0;
7376 ;
7377 return 0;
7378}
7379_ACEOF
7380rm -f conftest.$ac_objext
7381if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7382 (eval $ac_compile) 2>&5
7383 ac_status=$?
7384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7385 (exit $ac_status); } &&
7386 { ac_try='test -s conftest.$ac_objext'
7387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7388 (eval $ac_try) 2>&5
7389 ac_status=$?
7390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7391 (exit $ac_status); }; }; then
7392 ac_cv_type_double=yes
7393else
7394 echo "$as_me: failed program was:" >&5
7395cat conftest.$ac_ext >&5
7396ac_cv_type_double=no
7397fi
7398rm -f conftest.$ac_objext conftest.$ac_ext
7399fi
7400echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7401echo "${ECHO_T}$ac_cv_type_double" >&6
7402
7403echo "$as_me:$LINENO: checking size of double" >&5
7404echo $ECHO_N "checking size of double... $ECHO_C" >&6
7405if test "${ac_cv_sizeof_double+set}" = set; then
7406 echo $ECHO_N "(cached) $ECHO_C" >&6
7407else
7408 if test "$ac_cv_type_double" = yes; then
7409 # The cast to unsigned long works around a bug in the HP C Compiler
7410 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7411 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7412 # This bug is HP SR number 8606223364.
7413 if test "$cross_compiling" = yes; then
7414 # Depending upon the size, compute the lo and hi bounds.
7415cat >conftest.$ac_ext <<_ACEOF
7416#line $LINENO "configure"
7417#include "confdefs.h"
7418$ac_includes_default
7419#ifdef F77_DUMMY_MAIN
7420# ifdef __cplusplus
7421 extern "C"
7422# endif
7423 int F77_DUMMY_MAIN() { return 1; }
7424#endif
7425int
7426main ()
7427{
7428static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7429test_array [0] = 0
7430
7431 ;
7432 return 0;
7433}
7434_ACEOF
7435rm -f conftest.$ac_objext
7436if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7437 (eval $ac_compile) 2>&5
7438 ac_status=$?
7439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7440 (exit $ac_status); } &&
7441 { ac_try='test -s conftest.$ac_objext'
7442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7443 (eval $ac_try) 2>&5
7444 ac_status=$?
7445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7446 (exit $ac_status); }; }; then
7447 ac_lo=0 ac_mid=0
7448 while :; do
7449 cat >conftest.$ac_ext <<_ACEOF
7450#line $LINENO "configure"
7451#include "confdefs.h"
7452$ac_includes_default
7453#ifdef F77_DUMMY_MAIN
7454# ifdef __cplusplus
7455 extern "C"
7456# endif
7457 int F77_DUMMY_MAIN() { return 1; }
7458#endif
7459int
7460main ()
7461{
7462static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7463test_array [0] = 0
7464
7465 ;
7466 return 0;
7467}
7468_ACEOF
7469rm -f conftest.$ac_objext
7470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7471 (eval $ac_compile) 2>&5
7472 ac_status=$?
7473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7474 (exit $ac_status); } &&
7475 { ac_try='test -s conftest.$ac_objext'
7476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7477 (eval $ac_try) 2>&5
7478 ac_status=$?
7479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7480 (exit $ac_status); }; }; then
7481 ac_hi=$ac_mid; break
7482else
7483 echo "$as_me: failed program was:" >&5
7484cat conftest.$ac_ext >&5
7485ac_lo=`expr $ac_mid + 1`
7486 if test $ac_lo -le $ac_mid; then
7487 ac_lo= ac_hi=
7488 break
7489 fi
7490 ac_mid=`expr 2 '*' $ac_mid + 1`
7491fi
7492rm -f conftest.$ac_objext conftest.$ac_ext
7493 done
7494else
7495 echo "$as_me: failed program was:" >&5
7496cat conftest.$ac_ext >&5
7497cat >conftest.$ac_ext <<_ACEOF
7498#line $LINENO "configure"
7499#include "confdefs.h"
7500$ac_includes_default
7501#ifdef F77_DUMMY_MAIN
7502# ifdef __cplusplus
7503 extern "C"
7504# endif
7505 int F77_DUMMY_MAIN() { return 1; }
7506#endif
7507int
7508main ()
7509{
7510static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7511test_array [0] = 0
7512
7513 ;
7514 return 0;
7515}
7516_ACEOF
7517rm -f conftest.$ac_objext
7518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7519 (eval $ac_compile) 2>&5
7520 ac_status=$?
7521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7522 (exit $ac_status); } &&
7523 { ac_try='test -s conftest.$ac_objext'
7524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7525 (eval $ac_try) 2>&5
7526 ac_status=$?
7527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7528 (exit $ac_status); }; }; then
7529 ac_hi=-1 ac_mid=-1
7530 while :; do
7531 cat >conftest.$ac_ext <<_ACEOF
7532#line $LINENO "configure"
7533#include "confdefs.h"
7534$ac_includes_default
7535#ifdef F77_DUMMY_MAIN
7536# ifdef __cplusplus
7537 extern "C"
7538# endif
7539 int F77_DUMMY_MAIN() { return 1; }
7540#endif
7541int
7542main ()
7543{
7544static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7545test_array [0] = 0
7546
7547 ;
7548 return 0;
7549}
7550_ACEOF
7551rm -f conftest.$ac_objext
7552if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7553 (eval $ac_compile) 2>&5
7554 ac_status=$?
7555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7556 (exit $ac_status); } &&
7557 { ac_try='test -s conftest.$ac_objext'
7558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7559 (eval $ac_try) 2>&5
7560 ac_status=$?
7561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7562 (exit $ac_status); }; }; then
7563 ac_lo=$ac_mid; break
7564else
7565 echo "$as_me: failed program was:" >&5
7566cat conftest.$ac_ext >&5
7567ac_hi=`expr '(' $ac_mid ')' - 1`
7568 if test $ac_mid -le $ac_hi; then
7569 ac_lo= ac_hi=
7570 break
7571 fi
7572 ac_mid=`expr 2 '*' $ac_mid`
7573fi
7574rm -f conftest.$ac_objext conftest.$ac_ext
7575 done
7576else
7577 echo "$as_me: failed program was:" >&5
7578cat conftest.$ac_ext >&5
7579ac_lo= ac_hi=
7580fi
7581rm -f conftest.$ac_objext conftest.$ac_ext
7582fi
7583rm -f conftest.$ac_objext conftest.$ac_ext
7584# Binary search between lo and hi bounds.
7585while test "x$ac_lo" != "x$ac_hi"; do
7586 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7587 cat >conftest.$ac_ext <<_ACEOF
7588#line $LINENO "configure"
7589#include "confdefs.h"
7590$ac_includes_default
7591#ifdef F77_DUMMY_MAIN
7592# ifdef __cplusplus
7593 extern "C"
7594# endif
7595 int F77_DUMMY_MAIN() { return 1; }
7596#endif
7597int
7598main ()
7599{
7600static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7601test_array [0] = 0
7602
7603 ;
7604 return 0;
7605}
7606_ACEOF
7607rm -f conftest.$ac_objext
7608if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7609 (eval $ac_compile) 2>&5
7610 ac_status=$?
7611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7612 (exit $ac_status); } &&
7613 { ac_try='test -s conftest.$ac_objext'
7614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7615 (eval $ac_try) 2>&5
7616 ac_status=$?
7617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7618 (exit $ac_status); }; }; then
7619 ac_hi=$ac_mid
7620else
7621 echo "$as_me: failed program was:" >&5
7622cat conftest.$ac_ext >&5
7623ac_lo=`expr '(' $ac_mid ')' + 1`
7624fi
7625rm -f conftest.$ac_objext conftest.$ac_ext
7626done
7627case $ac_lo in
7628?*) ac_cv_sizeof_double=$ac_lo;;
7629'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7630echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7631 { (exit 1); exit 1; }; } ;;
7632esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007633else
7634 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007635 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7636echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7637 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007638else
Martin v. Löwis11437992002-04-12 09:54:03 +00007639 cat >conftest.$ac_ext <<_ACEOF
7640#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007641#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007642$ac_includes_default
7643long longval () { return (long) (sizeof (double)); }
7644unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007645#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007646#include <stdlib.h>
7647#ifdef F77_DUMMY_MAIN
7648# ifdef __cplusplus
7649 extern "C"
7650# endif
7651 int F77_DUMMY_MAIN() { return 1; }
7652#endif
7653int
7654main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007655{
Martin v. Löwis11437992002-04-12 09:54:03 +00007656
7657 FILE *f = fopen ("conftest.val", "w");
7658 if (! f)
7659 exit (1);
7660 if (((long) (sizeof (double))) < 0)
7661 {
7662 long i = longval ();
7663 if (i != ((long) (sizeof (double))))
7664 exit (1);
7665 fprintf (f, "%ld\n", i);
7666 }
7667 else
7668 {
7669 unsigned long i = ulongval ();
7670 if (i != ((long) (sizeof (double))))
7671 exit (1);
7672 fprintf (f, "%lu\n", i);
7673 }
7674 exit (ferror (f) || fclose (f) != 0);
7675
7676 ;
7677 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007678}
Martin v. Löwis11437992002-04-12 09:54:03 +00007679_ACEOF
7680rm -f conftest$ac_exeext
7681if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7682 (eval $ac_link) 2>&5
7683 ac_status=$?
7684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7685 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7687 (eval $ac_try) 2>&5
7688 ac_status=$?
7689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7690 (exit $ac_status); }; }; then
7691 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007692else
Martin v. Löwis11437992002-04-12 09:54:03 +00007693 echo "$as_me: program exited with status $ac_status" >&5
7694echo "$as_me: failed program was:" >&5
7695cat conftest.$ac_ext >&5
7696( exit $ac_status )
7697{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7698echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7699 { (exit 1); exit 1; }; }
7700fi
7701rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7702fi
7703fi
7704rm -f conftest.val
7705else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007706 ac_cv_sizeof_double=0
7707fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007708fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007709echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7710echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7711cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007712#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007713_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007714
7715
Martin v. Löwis11437992002-04-12 09:54:03 +00007716echo "$as_me:$LINENO: checking for fpos_t" >&5
7717echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7718if test "${ac_cv_type_fpos_t+set}" = set; then
7719 echo $ECHO_N "(cached) $ECHO_C" >&6
7720else
7721 cat >conftest.$ac_ext <<_ACEOF
7722#line $LINENO "configure"
7723#include "confdefs.h"
7724$ac_includes_default
7725#ifdef F77_DUMMY_MAIN
7726# ifdef __cplusplus
7727 extern "C"
7728# endif
7729 int F77_DUMMY_MAIN() { return 1; }
7730#endif
7731int
7732main ()
7733{
7734if ((fpos_t *) 0)
7735 return 0;
7736if (sizeof (fpos_t))
7737 return 0;
7738 ;
7739 return 0;
7740}
7741_ACEOF
7742rm -f conftest.$ac_objext
7743if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7744 (eval $ac_compile) 2>&5
7745 ac_status=$?
7746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7747 (exit $ac_status); } &&
7748 { ac_try='test -s conftest.$ac_objext'
7749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7750 (eval $ac_try) 2>&5
7751 ac_status=$?
7752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7753 (exit $ac_status); }; }; then
7754 ac_cv_type_fpos_t=yes
7755else
7756 echo "$as_me: failed program was:" >&5
7757cat conftest.$ac_ext >&5
7758ac_cv_type_fpos_t=no
7759fi
7760rm -f conftest.$ac_objext conftest.$ac_ext
7761fi
7762echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7763echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7764
7765echo "$as_me:$LINENO: checking size of fpos_t" >&5
7766echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7767if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7768 echo $ECHO_N "(cached) $ECHO_C" >&6
7769else
7770 if test "$ac_cv_type_fpos_t" = yes; then
7771 # The cast to unsigned long works around a bug in the HP C Compiler
7772 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7773 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7774 # This bug is HP SR number 8606223364.
7775 if test "$cross_compiling" = yes; then
7776 # Depending upon the size, compute the lo and hi bounds.
7777cat >conftest.$ac_ext <<_ACEOF
7778#line $LINENO "configure"
7779#include "confdefs.h"
7780$ac_includes_default
7781#ifdef F77_DUMMY_MAIN
7782# ifdef __cplusplus
7783 extern "C"
7784# endif
7785 int F77_DUMMY_MAIN() { return 1; }
7786#endif
7787int
7788main ()
7789{
7790static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7791test_array [0] = 0
7792
7793 ;
7794 return 0;
7795}
7796_ACEOF
7797rm -f conftest.$ac_objext
7798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7799 (eval $ac_compile) 2>&5
7800 ac_status=$?
7801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7802 (exit $ac_status); } &&
7803 { ac_try='test -s conftest.$ac_objext'
7804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7805 (eval $ac_try) 2>&5
7806 ac_status=$?
7807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7808 (exit $ac_status); }; }; then
7809 ac_lo=0 ac_mid=0
7810 while :; do
7811 cat >conftest.$ac_ext <<_ACEOF
7812#line $LINENO "configure"
7813#include "confdefs.h"
7814$ac_includes_default
7815#ifdef F77_DUMMY_MAIN
7816# ifdef __cplusplus
7817 extern "C"
7818# endif
7819 int F77_DUMMY_MAIN() { return 1; }
7820#endif
7821int
7822main ()
7823{
7824static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7825test_array [0] = 0
7826
7827 ;
7828 return 0;
7829}
7830_ACEOF
7831rm -f conftest.$ac_objext
7832if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7833 (eval $ac_compile) 2>&5
7834 ac_status=$?
7835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7836 (exit $ac_status); } &&
7837 { ac_try='test -s conftest.$ac_objext'
7838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7839 (eval $ac_try) 2>&5
7840 ac_status=$?
7841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7842 (exit $ac_status); }; }; then
7843 ac_hi=$ac_mid; break
7844else
7845 echo "$as_me: failed program was:" >&5
7846cat conftest.$ac_ext >&5
7847ac_lo=`expr $ac_mid + 1`
7848 if test $ac_lo -le $ac_mid; then
7849 ac_lo= ac_hi=
7850 break
7851 fi
7852 ac_mid=`expr 2 '*' $ac_mid + 1`
7853fi
7854rm -f conftest.$ac_objext conftest.$ac_ext
7855 done
7856else
7857 echo "$as_me: failed program was:" >&5
7858cat conftest.$ac_ext >&5
7859cat >conftest.$ac_ext <<_ACEOF
7860#line $LINENO "configure"
7861#include "confdefs.h"
7862$ac_includes_default
7863#ifdef F77_DUMMY_MAIN
7864# ifdef __cplusplus
7865 extern "C"
7866# endif
7867 int F77_DUMMY_MAIN() { return 1; }
7868#endif
7869int
7870main ()
7871{
7872static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7873test_array [0] = 0
7874
7875 ;
7876 return 0;
7877}
7878_ACEOF
7879rm -f conftest.$ac_objext
7880if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7881 (eval $ac_compile) 2>&5
7882 ac_status=$?
7883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7884 (exit $ac_status); } &&
7885 { ac_try='test -s conftest.$ac_objext'
7886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7887 (eval $ac_try) 2>&5
7888 ac_status=$?
7889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7890 (exit $ac_status); }; }; then
7891 ac_hi=-1 ac_mid=-1
7892 while :; do
7893 cat >conftest.$ac_ext <<_ACEOF
7894#line $LINENO "configure"
7895#include "confdefs.h"
7896$ac_includes_default
7897#ifdef F77_DUMMY_MAIN
7898# ifdef __cplusplus
7899 extern "C"
7900# endif
7901 int F77_DUMMY_MAIN() { return 1; }
7902#endif
7903int
7904main ()
7905{
7906static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7907test_array [0] = 0
7908
7909 ;
7910 return 0;
7911}
7912_ACEOF
7913rm -f conftest.$ac_objext
7914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7915 (eval $ac_compile) 2>&5
7916 ac_status=$?
7917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7918 (exit $ac_status); } &&
7919 { ac_try='test -s conftest.$ac_objext'
7920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7921 (eval $ac_try) 2>&5
7922 ac_status=$?
7923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7924 (exit $ac_status); }; }; then
7925 ac_lo=$ac_mid; break
7926else
7927 echo "$as_me: failed program was:" >&5
7928cat conftest.$ac_ext >&5
7929ac_hi=`expr '(' $ac_mid ')' - 1`
7930 if test $ac_mid -le $ac_hi; then
7931 ac_lo= ac_hi=
7932 break
7933 fi
7934 ac_mid=`expr 2 '*' $ac_mid`
7935fi
7936rm -f conftest.$ac_objext conftest.$ac_ext
7937 done
7938else
7939 echo "$as_me: failed program was:" >&5
7940cat conftest.$ac_ext >&5
7941ac_lo= ac_hi=
7942fi
7943rm -f conftest.$ac_objext conftest.$ac_ext
7944fi
7945rm -f conftest.$ac_objext conftest.$ac_ext
7946# Binary search between lo and hi bounds.
7947while test "x$ac_lo" != "x$ac_hi"; do
7948 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7949 cat >conftest.$ac_ext <<_ACEOF
7950#line $LINENO "configure"
7951#include "confdefs.h"
7952$ac_includes_default
7953#ifdef F77_DUMMY_MAIN
7954# ifdef __cplusplus
7955 extern "C"
7956# endif
7957 int F77_DUMMY_MAIN() { return 1; }
7958#endif
7959int
7960main ()
7961{
7962static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7963test_array [0] = 0
7964
7965 ;
7966 return 0;
7967}
7968_ACEOF
7969rm -f conftest.$ac_objext
7970if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7971 (eval $ac_compile) 2>&5
7972 ac_status=$?
7973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7974 (exit $ac_status); } &&
7975 { ac_try='test -s conftest.$ac_objext'
7976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7977 (eval $ac_try) 2>&5
7978 ac_status=$?
7979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7980 (exit $ac_status); }; }; then
7981 ac_hi=$ac_mid
7982else
7983 echo "$as_me: failed program was:" >&5
7984cat conftest.$ac_ext >&5
7985ac_lo=`expr '(' $ac_mid ')' + 1`
7986fi
7987rm -f conftest.$ac_objext conftest.$ac_ext
7988done
7989case $ac_lo in
7990?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7991'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7992echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7993 { (exit 1); exit 1; }; } ;;
7994esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007995else
7996 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7998echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7999 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008000else
Martin v. Löwis11437992002-04-12 09:54:03 +00008001 cat >conftest.$ac_ext <<_ACEOF
8002#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008003#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008004$ac_includes_default
8005long longval () { return (long) (sizeof (fpos_t)); }
8006unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008007#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008008#include <stdlib.h>
8009#ifdef F77_DUMMY_MAIN
8010# ifdef __cplusplus
8011 extern "C"
8012# endif
8013 int F77_DUMMY_MAIN() { return 1; }
8014#endif
8015int
8016main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008017{
Martin v. Löwis11437992002-04-12 09:54:03 +00008018
8019 FILE *f = fopen ("conftest.val", "w");
8020 if (! f)
8021 exit (1);
8022 if (((long) (sizeof (fpos_t))) < 0)
8023 {
8024 long i = longval ();
8025 if (i != ((long) (sizeof (fpos_t))))
8026 exit (1);
8027 fprintf (f, "%ld\n", i);
8028 }
8029 else
8030 {
8031 unsigned long i = ulongval ();
8032 if (i != ((long) (sizeof (fpos_t))))
8033 exit (1);
8034 fprintf (f, "%lu\n", i);
8035 }
8036 exit (ferror (f) || fclose (f) != 0);
8037
8038 ;
8039 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008040}
Martin v. Löwis11437992002-04-12 09:54:03 +00008041_ACEOF
8042rm -f conftest$ac_exeext
8043if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8044 (eval $ac_link) 2>&5
8045 ac_status=$?
8046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8047 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8049 (eval $ac_try) 2>&5
8050 ac_status=$?
8051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8052 (exit $ac_status); }; }; then
8053 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008054else
Martin v. Löwis11437992002-04-12 09:54:03 +00008055 echo "$as_me: program exited with status $ac_status" >&5
8056echo "$as_me: failed program was:" >&5
8057cat conftest.$ac_ext >&5
8058( exit $ac_status )
8059{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8060echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8061 { (exit 1); exit 1; }; }
8062fi
8063rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8064fi
8065fi
8066rm -f conftest.val
8067else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008068 ac_cv_sizeof_fpos_t=0
8069fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008070fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008071echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8072echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8073cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008074#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008075_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008076
Michael W. Hudson54241132001-12-07 15:38:26 +00008077
8078
Martin v. Löwis11437992002-04-12 09:54:03 +00008079echo "$as_me:$LINENO: checking for long long support" >&5
8080echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008081have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008082cat >conftest.$ac_ext <<_ACEOF
8083#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008084#include "confdefs.h"
8085
Martin v. Löwis11437992002-04-12 09:54:03 +00008086#ifdef F77_DUMMY_MAIN
8087# ifdef __cplusplus
8088 extern "C"
8089# endif
8090 int F77_DUMMY_MAIN() { return 1; }
8091#endif
8092int
8093main ()
8094{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008095long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008096 ;
8097 return 0;
8098}
8099_ACEOF
8100rm -f conftest.$ac_objext
8101if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8102 (eval $ac_compile) 2>&5
8103 ac_status=$?
8104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8105 (exit $ac_status); } &&
8106 { ac_try='test -s conftest.$ac_objext'
8107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8108 (eval $ac_try) 2>&5
8109 ac_status=$?
8110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8111 (exit $ac_status); }; }; then
8112
8113
8114cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008115#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008116_ACEOF
8117
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008118 have_long_long=yes
8119
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008120else
Martin v. Löwis11437992002-04-12 09:54:03 +00008121 echo "$as_me: failed program was:" >&5
8122cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008123fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008124rm -f conftest.$ac_objext conftest.$ac_ext
8125echo "$as_me:$LINENO: result: $have_long_long" >&5
8126echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008127if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008128echo "$as_me:$LINENO: checking for long long" >&5
8129echo $ECHO_N "checking for long long... $ECHO_C" >&6
8130if test "${ac_cv_type_long_long+set}" = set; then
8131 echo $ECHO_N "(cached) $ECHO_C" >&6
8132else
8133 cat >conftest.$ac_ext <<_ACEOF
8134#line $LINENO "configure"
8135#include "confdefs.h"
8136$ac_includes_default
8137#ifdef F77_DUMMY_MAIN
8138# ifdef __cplusplus
8139 extern "C"
8140# endif
8141 int F77_DUMMY_MAIN() { return 1; }
8142#endif
8143int
8144main ()
8145{
8146if ((long long *) 0)
8147 return 0;
8148if (sizeof (long long))
8149 return 0;
8150 ;
8151 return 0;
8152}
8153_ACEOF
8154rm -f conftest.$ac_objext
8155if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8156 (eval $ac_compile) 2>&5
8157 ac_status=$?
8158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8159 (exit $ac_status); } &&
8160 { ac_try='test -s conftest.$ac_objext'
8161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8162 (eval $ac_try) 2>&5
8163 ac_status=$?
8164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8165 (exit $ac_status); }; }; then
8166 ac_cv_type_long_long=yes
8167else
8168 echo "$as_me: failed program was:" >&5
8169cat conftest.$ac_ext >&5
8170ac_cv_type_long_long=no
8171fi
8172rm -f conftest.$ac_objext conftest.$ac_ext
8173fi
8174echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8175echo "${ECHO_T}$ac_cv_type_long_long" >&6
8176
8177echo "$as_me:$LINENO: checking size of long long" >&5
8178echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8179if test "${ac_cv_sizeof_long_long+set}" = set; then
8180 echo $ECHO_N "(cached) $ECHO_C" >&6
8181else
8182 if test "$ac_cv_type_long_long" = yes; then
8183 # The cast to unsigned long works around a bug in the HP C Compiler
8184 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8185 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8186 # This bug is HP SR number 8606223364.
8187 if test "$cross_compiling" = yes; then
8188 # Depending upon the size, compute the lo and hi bounds.
8189cat >conftest.$ac_ext <<_ACEOF
8190#line $LINENO "configure"
8191#include "confdefs.h"
8192$ac_includes_default
8193#ifdef F77_DUMMY_MAIN
8194# ifdef __cplusplus
8195 extern "C"
8196# endif
8197 int F77_DUMMY_MAIN() { return 1; }
8198#endif
8199int
8200main ()
8201{
8202static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8203test_array [0] = 0
8204
8205 ;
8206 return 0;
8207}
8208_ACEOF
8209rm -f conftest.$ac_objext
8210if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8211 (eval $ac_compile) 2>&5
8212 ac_status=$?
8213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8214 (exit $ac_status); } &&
8215 { ac_try='test -s conftest.$ac_objext'
8216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8217 (eval $ac_try) 2>&5
8218 ac_status=$?
8219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8220 (exit $ac_status); }; }; then
8221 ac_lo=0 ac_mid=0
8222 while :; do
8223 cat >conftest.$ac_ext <<_ACEOF
8224#line $LINENO "configure"
8225#include "confdefs.h"
8226$ac_includes_default
8227#ifdef F77_DUMMY_MAIN
8228# ifdef __cplusplus
8229 extern "C"
8230# endif
8231 int F77_DUMMY_MAIN() { return 1; }
8232#endif
8233int
8234main ()
8235{
8236static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8237test_array [0] = 0
8238
8239 ;
8240 return 0;
8241}
8242_ACEOF
8243rm -f conftest.$ac_objext
8244if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8245 (eval $ac_compile) 2>&5
8246 ac_status=$?
8247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8248 (exit $ac_status); } &&
8249 { ac_try='test -s conftest.$ac_objext'
8250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8251 (eval $ac_try) 2>&5
8252 ac_status=$?
8253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8254 (exit $ac_status); }; }; then
8255 ac_hi=$ac_mid; break
8256else
8257 echo "$as_me: failed program was:" >&5
8258cat conftest.$ac_ext >&5
8259ac_lo=`expr $ac_mid + 1`
8260 if test $ac_lo -le $ac_mid; then
8261 ac_lo= ac_hi=
8262 break
8263 fi
8264 ac_mid=`expr 2 '*' $ac_mid + 1`
8265fi
8266rm -f conftest.$ac_objext conftest.$ac_ext
8267 done
8268else
8269 echo "$as_me: failed program was:" >&5
8270cat conftest.$ac_ext >&5
8271cat >conftest.$ac_ext <<_ACEOF
8272#line $LINENO "configure"
8273#include "confdefs.h"
8274$ac_includes_default
8275#ifdef F77_DUMMY_MAIN
8276# ifdef __cplusplus
8277 extern "C"
8278# endif
8279 int F77_DUMMY_MAIN() { return 1; }
8280#endif
8281int
8282main ()
8283{
8284static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8285test_array [0] = 0
8286
8287 ;
8288 return 0;
8289}
8290_ACEOF
8291rm -f conftest.$ac_objext
8292if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8293 (eval $ac_compile) 2>&5
8294 ac_status=$?
8295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8296 (exit $ac_status); } &&
8297 { ac_try='test -s conftest.$ac_objext'
8298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8299 (eval $ac_try) 2>&5
8300 ac_status=$?
8301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8302 (exit $ac_status); }; }; then
8303 ac_hi=-1 ac_mid=-1
8304 while :; do
8305 cat >conftest.$ac_ext <<_ACEOF
8306#line $LINENO "configure"
8307#include "confdefs.h"
8308$ac_includes_default
8309#ifdef F77_DUMMY_MAIN
8310# ifdef __cplusplus
8311 extern "C"
8312# endif
8313 int F77_DUMMY_MAIN() { return 1; }
8314#endif
8315int
8316main ()
8317{
8318static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8319test_array [0] = 0
8320
8321 ;
8322 return 0;
8323}
8324_ACEOF
8325rm -f conftest.$ac_objext
8326if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8327 (eval $ac_compile) 2>&5
8328 ac_status=$?
8329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8330 (exit $ac_status); } &&
8331 { ac_try='test -s conftest.$ac_objext'
8332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8333 (eval $ac_try) 2>&5
8334 ac_status=$?
8335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8336 (exit $ac_status); }; }; then
8337 ac_lo=$ac_mid; break
8338else
8339 echo "$as_me: failed program was:" >&5
8340cat conftest.$ac_ext >&5
8341ac_hi=`expr '(' $ac_mid ')' - 1`
8342 if test $ac_mid -le $ac_hi; then
8343 ac_lo= ac_hi=
8344 break
8345 fi
8346 ac_mid=`expr 2 '*' $ac_mid`
8347fi
8348rm -f conftest.$ac_objext conftest.$ac_ext
8349 done
8350else
8351 echo "$as_me: failed program was:" >&5
8352cat conftest.$ac_ext >&5
8353ac_lo= ac_hi=
8354fi
8355rm -f conftest.$ac_objext conftest.$ac_ext
8356fi
8357rm -f conftest.$ac_objext conftest.$ac_ext
8358# Binary search between lo and hi bounds.
8359while test "x$ac_lo" != "x$ac_hi"; do
8360 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8361 cat >conftest.$ac_ext <<_ACEOF
8362#line $LINENO "configure"
8363#include "confdefs.h"
8364$ac_includes_default
8365#ifdef F77_DUMMY_MAIN
8366# ifdef __cplusplus
8367 extern "C"
8368# endif
8369 int F77_DUMMY_MAIN() { return 1; }
8370#endif
8371int
8372main ()
8373{
8374static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8375test_array [0] = 0
8376
8377 ;
8378 return 0;
8379}
8380_ACEOF
8381rm -f conftest.$ac_objext
8382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8383 (eval $ac_compile) 2>&5
8384 ac_status=$?
8385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8386 (exit $ac_status); } &&
8387 { ac_try='test -s conftest.$ac_objext'
8388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8389 (eval $ac_try) 2>&5
8390 ac_status=$?
8391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8392 (exit $ac_status); }; }; then
8393 ac_hi=$ac_mid
8394else
8395 echo "$as_me: failed program was:" >&5
8396cat conftest.$ac_ext >&5
8397ac_lo=`expr '(' $ac_mid ')' + 1`
8398fi
8399rm -f conftest.$ac_objext conftest.$ac_ext
8400done
8401case $ac_lo in
8402?*) ac_cv_sizeof_long_long=$ac_lo;;
8403'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8404echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8405 { (exit 1); exit 1; }; } ;;
8406esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008407else
8408 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008409 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8410echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8411 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008412else
Martin v. Löwis11437992002-04-12 09:54:03 +00008413 cat >conftest.$ac_ext <<_ACEOF
8414#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008415#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008416$ac_includes_default
8417long longval () { return (long) (sizeof (long long)); }
8418unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008419#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008420#include <stdlib.h>
8421#ifdef F77_DUMMY_MAIN
8422# ifdef __cplusplus
8423 extern "C"
8424# endif
8425 int F77_DUMMY_MAIN() { return 1; }
8426#endif
8427int
8428main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008429{
Martin v. Löwis11437992002-04-12 09:54:03 +00008430
8431 FILE *f = fopen ("conftest.val", "w");
8432 if (! f)
8433 exit (1);
8434 if (((long) (sizeof (long long))) < 0)
8435 {
8436 long i = longval ();
8437 if (i != ((long) (sizeof (long long))))
8438 exit (1);
8439 fprintf (f, "%ld\n", i);
8440 }
8441 else
8442 {
8443 unsigned long i = ulongval ();
8444 if (i != ((long) (sizeof (long long))))
8445 exit (1);
8446 fprintf (f, "%lu\n", i);
8447 }
8448 exit (ferror (f) || fclose (f) != 0);
8449
8450 ;
8451 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008452}
Martin v. Löwis11437992002-04-12 09:54:03 +00008453_ACEOF
8454rm -f conftest$ac_exeext
8455if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8456 (eval $ac_link) 2>&5
8457 ac_status=$?
8458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8459 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8461 (eval $ac_try) 2>&5
8462 ac_status=$?
8463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8464 (exit $ac_status); }; }; then
8465 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008466else
Martin v. Löwis11437992002-04-12 09:54:03 +00008467 echo "$as_me: program exited with status $ac_status" >&5
8468echo "$as_me: failed program was:" >&5
8469cat conftest.$ac_ext >&5
8470( exit $ac_status )
8471{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8472echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8473 { (exit 1); exit 1; }; }
8474fi
8475rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8476fi
8477fi
8478rm -f conftest.val
8479else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008480 ac_cv_sizeof_long_long=0
8481fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008482fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008483echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8484echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8485cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008486#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008487_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008488
Michael W. Hudson54241132001-12-07 15:38:26 +00008489
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008490fi
8491
Martin v. Löwis11437992002-04-12 09:54:03 +00008492echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8493echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008494have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008495cat >conftest.$ac_ext <<_ACEOF
8496#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008497#include "confdefs.h"
8498
Martin v. Löwis11437992002-04-12 09:54:03 +00008499#ifdef F77_DUMMY_MAIN
8500# ifdef __cplusplus
8501 extern "C"
8502# endif
8503 int F77_DUMMY_MAIN() { return 1; }
8504#endif
8505int
8506main ()
8507{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008508uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008509 ;
8510 return 0;
8511}
8512_ACEOF
8513rm -f conftest.$ac_objext
8514if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8515 (eval $ac_compile) 2>&5
8516 ac_status=$?
8517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8518 (exit $ac_status); } &&
8519 { ac_try='test -s conftest.$ac_objext'
8520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8521 (eval $ac_try) 2>&5
8522 ac_status=$?
8523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8524 (exit $ac_status); }; }; then
8525
8526
8527cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008528#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008529_ACEOF
8530
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008531 have_uintptr_t=yes
8532
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008533else
Martin v. Löwis11437992002-04-12 09:54:03 +00008534 echo "$as_me: failed program was:" >&5
8535cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008536fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008537rm -f conftest.$ac_objext conftest.$ac_ext
8538echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8539echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008540if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008541echo "$as_me:$LINENO: checking for uintptr_t" >&5
8542echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8543if test "${ac_cv_type_uintptr_t+set}" = set; then
8544 echo $ECHO_N "(cached) $ECHO_C" >&6
8545else
8546 cat >conftest.$ac_ext <<_ACEOF
8547#line $LINENO "configure"
8548#include "confdefs.h"
8549$ac_includes_default
8550#ifdef F77_DUMMY_MAIN
8551# ifdef __cplusplus
8552 extern "C"
8553# endif
8554 int F77_DUMMY_MAIN() { return 1; }
8555#endif
8556int
8557main ()
8558{
8559if ((uintptr_t *) 0)
8560 return 0;
8561if (sizeof (uintptr_t))
8562 return 0;
8563 ;
8564 return 0;
8565}
8566_ACEOF
8567rm -f conftest.$ac_objext
8568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8569 (eval $ac_compile) 2>&5
8570 ac_status=$?
8571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8572 (exit $ac_status); } &&
8573 { ac_try='test -s conftest.$ac_objext'
8574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8575 (eval $ac_try) 2>&5
8576 ac_status=$?
8577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8578 (exit $ac_status); }; }; then
8579 ac_cv_type_uintptr_t=yes
8580else
8581 echo "$as_me: failed program was:" >&5
8582cat conftest.$ac_ext >&5
8583ac_cv_type_uintptr_t=no
8584fi
8585rm -f conftest.$ac_objext conftest.$ac_ext
8586fi
8587echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8588echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8589
8590echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8591echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8592if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8593 echo $ECHO_N "(cached) $ECHO_C" >&6
8594else
8595 if test "$ac_cv_type_uintptr_t" = yes; then
8596 # The cast to unsigned long works around a bug in the HP C Compiler
8597 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8598 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8599 # This bug is HP SR number 8606223364.
8600 if test "$cross_compiling" = yes; then
8601 # Depending upon the size, compute the lo and hi bounds.
8602cat >conftest.$ac_ext <<_ACEOF
8603#line $LINENO "configure"
8604#include "confdefs.h"
8605$ac_includes_default
8606#ifdef F77_DUMMY_MAIN
8607# ifdef __cplusplus
8608 extern "C"
8609# endif
8610 int F77_DUMMY_MAIN() { return 1; }
8611#endif
8612int
8613main ()
8614{
8615static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8616test_array [0] = 0
8617
8618 ;
8619 return 0;
8620}
8621_ACEOF
8622rm -f conftest.$ac_objext
8623if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8624 (eval $ac_compile) 2>&5
8625 ac_status=$?
8626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8627 (exit $ac_status); } &&
8628 { ac_try='test -s conftest.$ac_objext'
8629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8630 (eval $ac_try) 2>&5
8631 ac_status=$?
8632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8633 (exit $ac_status); }; }; then
8634 ac_lo=0 ac_mid=0
8635 while :; do
8636 cat >conftest.$ac_ext <<_ACEOF
8637#line $LINENO "configure"
8638#include "confdefs.h"
8639$ac_includes_default
8640#ifdef F77_DUMMY_MAIN
8641# ifdef __cplusplus
8642 extern "C"
8643# endif
8644 int F77_DUMMY_MAIN() { return 1; }
8645#endif
8646int
8647main ()
8648{
8649static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8650test_array [0] = 0
8651
8652 ;
8653 return 0;
8654}
8655_ACEOF
8656rm -f conftest.$ac_objext
8657if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8658 (eval $ac_compile) 2>&5
8659 ac_status=$?
8660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8661 (exit $ac_status); } &&
8662 { ac_try='test -s conftest.$ac_objext'
8663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8664 (eval $ac_try) 2>&5
8665 ac_status=$?
8666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8667 (exit $ac_status); }; }; then
8668 ac_hi=$ac_mid; break
8669else
8670 echo "$as_me: failed program was:" >&5
8671cat conftest.$ac_ext >&5
8672ac_lo=`expr $ac_mid + 1`
8673 if test $ac_lo -le $ac_mid; then
8674 ac_lo= ac_hi=
8675 break
8676 fi
8677 ac_mid=`expr 2 '*' $ac_mid + 1`
8678fi
8679rm -f conftest.$ac_objext conftest.$ac_ext
8680 done
8681else
8682 echo "$as_me: failed program was:" >&5
8683cat conftest.$ac_ext >&5
8684cat >conftest.$ac_ext <<_ACEOF
8685#line $LINENO "configure"
8686#include "confdefs.h"
8687$ac_includes_default
8688#ifdef F77_DUMMY_MAIN
8689# ifdef __cplusplus
8690 extern "C"
8691# endif
8692 int F77_DUMMY_MAIN() { return 1; }
8693#endif
8694int
8695main ()
8696{
8697static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8698test_array [0] = 0
8699
8700 ;
8701 return 0;
8702}
8703_ACEOF
8704rm -f conftest.$ac_objext
8705if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8706 (eval $ac_compile) 2>&5
8707 ac_status=$?
8708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8709 (exit $ac_status); } &&
8710 { ac_try='test -s conftest.$ac_objext'
8711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8712 (eval $ac_try) 2>&5
8713 ac_status=$?
8714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8715 (exit $ac_status); }; }; then
8716 ac_hi=-1 ac_mid=-1
8717 while :; do
8718 cat >conftest.$ac_ext <<_ACEOF
8719#line $LINENO "configure"
8720#include "confdefs.h"
8721$ac_includes_default
8722#ifdef F77_DUMMY_MAIN
8723# ifdef __cplusplus
8724 extern "C"
8725# endif
8726 int F77_DUMMY_MAIN() { return 1; }
8727#endif
8728int
8729main ()
8730{
8731static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8732test_array [0] = 0
8733
8734 ;
8735 return 0;
8736}
8737_ACEOF
8738rm -f conftest.$ac_objext
8739if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8740 (eval $ac_compile) 2>&5
8741 ac_status=$?
8742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8743 (exit $ac_status); } &&
8744 { ac_try='test -s conftest.$ac_objext'
8745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8746 (eval $ac_try) 2>&5
8747 ac_status=$?
8748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8749 (exit $ac_status); }; }; then
8750 ac_lo=$ac_mid; break
8751else
8752 echo "$as_me: failed program was:" >&5
8753cat conftest.$ac_ext >&5
8754ac_hi=`expr '(' $ac_mid ')' - 1`
8755 if test $ac_mid -le $ac_hi; then
8756 ac_lo= ac_hi=
8757 break
8758 fi
8759 ac_mid=`expr 2 '*' $ac_mid`
8760fi
8761rm -f conftest.$ac_objext conftest.$ac_ext
8762 done
8763else
8764 echo "$as_me: failed program was:" >&5
8765cat conftest.$ac_ext >&5
8766ac_lo= ac_hi=
8767fi
8768rm -f conftest.$ac_objext conftest.$ac_ext
8769fi
8770rm -f conftest.$ac_objext conftest.$ac_ext
8771# Binary search between lo and hi bounds.
8772while test "x$ac_lo" != "x$ac_hi"; do
8773 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8774 cat >conftest.$ac_ext <<_ACEOF
8775#line $LINENO "configure"
8776#include "confdefs.h"
8777$ac_includes_default
8778#ifdef F77_DUMMY_MAIN
8779# ifdef __cplusplus
8780 extern "C"
8781# endif
8782 int F77_DUMMY_MAIN() { return 1; }
8783#endif
8784int
8785main ()
8786{
8787static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8788test_array [0] = 0
8789
8790 ;
8791 return 0;
8792}
8793_ACEOF
8794rm -f conftest.$ac_objext
8795if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8796 (eval $ac_compile) 2>&5
8797 ac_status=$?
8798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799 (exit $ac_status); } &&
8800 { ac_try='test -s conftest.$ac_objext'
8801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8802 (eval $ac_try) 2>&5
8803 ac_status=$?
8804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8805 (exit $ac_status); }; }; then
8806 ac_hi=$ac_mid
8807else
8808 echo "$as_me: failed program was:" >&5
8809cat conftest.$ac_ext >&5
8810ac_lo=`expr '(' $ac_mid ')' + 1`
8811fi
8812rm -f conftest.$ac_objext conftest.$ac_ext
8813done
8814case $ac_lo in
8815?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8816'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8817echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8818 { (exit 1); exit 1; }; } ;;
8819esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008820else
8821 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008822 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8823echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8824 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008825else
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 cat >conftest.$ac_ext <<_ACEOF
8827#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008828#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008829$ac_includes_default
8830long longval () { return (long) (sizeof (uintptr_t)); }
8831unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008832#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008833#include <stdlib.h>
8834#ifdef F77_DUMMY_MAIN
8835# ifdef __cplusplus
8836 extern "C"
8837# endif
8838 int F77_DUMMY_MAIN() { return 1; }
8839#endif
8840int
8841main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008842{
Martin v. Löwis11437992002-04-12 09:54:03 +00008843
8844 FILE *f = fopen ("conftest.val", "w");
8845 if (! f)
8846 exit (1);
8847 if (((long) (sizeof (uintptr_t))) < 0)
8848 {
8849 long i = longval ();
8850 if (i != ((long) (sizeof (uintptr_t))))
8851 exit (1);
8852 fprintf (f, "%ld\n", i);
8853 }
8854 else
8855 {
8856 unsigned long i = ulongval ();
8857 if (i != ((long) (sizeof (uintptr_t))))
8858 exit (1);
8859 fprintf (f, "%lu\n", i);
8860 }
8861 exit (ferror (f) || fclose (f) != 0);
8862
8863 ;
8864 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008865}
Martin v. Löwis11437992002-04-12 09:54:03 +00008866_ACEOF
8867rm -f conftest$ac_exeext
8868if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8869 (eval $ac_link) 2>&5
8870 ac_status=$?
8871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8872 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8874 (eval $ac_try) 2>&5
8875 ac_status=$?
8876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8877 (exit $ac_status); }; }; then
8878 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008879else
Martin v. Löwis11437992002-04-12 09:54:03 +00008880 echo "$as_me: program exited with status $ac_status" >&5
8881echo "$as_me: failed program was:" >&5
8882cat conftest.$ac_ext >&5
8883( exit $ac_status )
8884{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8885echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8886 { (exit 1); exit 1; }; }
8887fi
8888rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8889fi
8890fi
8891rm -f conftest.val
8892else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008893 ac_cv_sizeof_uintptr_t=0
8894fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008895fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008896echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8897echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8898cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008899#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008900_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008901
Michael W. Hudson54241132001-12-07 15:38:26 +00008902
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008903fi
8904
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008905# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008906echo "$as_me:$LINENO: checking size of off_t" >&5
8907echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8908if test "${ac_cv_sizeof_off_t+set}" = set; then
8909 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008910else
8911 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008912 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008913else
Martin v. Löwis11437992002-04-12 09:54:03 +00008914 cat >conftest.$ac_ext <<_ACEOF
8915#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008916#include "confdefs.h"
8917#include <stdio.h>
8918#include <sys/types.h>
8919main()
8920{
8921 FILE *f=fopen("conftestval", "w");
8922 if (!f) exit(1);
8923 fprintf(f, "%d\n", sizeof(off_t));
8924 exit(0);
8925}
Martin v. Löwis11437992002-04-12 09:54:03 +00008926_ACEOF
8927rm -f conftest$ac_exeext
8928if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8929 (eval $ac_link) 2>&5
8930 ac_status=$?
8931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8932 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8934 (eval $ac_try) 2>&5
8935 ac_status=$?
8936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8937 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008938 ac_cv_sizeof_off_t=`cat conftestval`
8939else
Martin v. Löwis11437992002-04-12 09:54:03 +00008940 echo "$as_me: program exited with status $ac_status" >&5
8941echo "$as_me: failed program was:" >&5
8942cat conftest.$ac_ext >&5
8943( exit $ac_status )
8944ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008945fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008946rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008947fi
8948
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008949fi
8950
Martin v. Löwis11437992002-04-12 09:54:03 +00008951echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8952echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8953
8954cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008955#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008956_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008957
Michael W. Hudson54241132001-12-07 15:38:26 +00008958
Martin v. Löwis11437992002-04-12 09:54:03 +00008959echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8960echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008961if test "$have_long_long" = yes -a \
8962 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8963 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008964
Martin v. Löwis11437992002-04-12 09:54:03 +00008965cat >>confdefs.h <<\_ACEOF
8966#define HAVE_LARGEFILE_SUPPORT 1
8967_ACEOF
8968
8969 echo "$as_me:$LINENO: result: yes" >&5
8970echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008971else
Martin v. Löwis11437992002-04-12 09:54:03 +00008972 echo "$as_me:$LINENO: result: no" >&5
8973echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008974fi
8975
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008976# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008977echo "$as_me:$LINENO: checking size of time_t" >&5
8978echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8979if test "${ac_cv_sizeof_time_t+set}" = set; then
8980 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008981else
8982 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008983 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008984else
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 cat >conftest.$ac_ext <<_ACEOF
8986#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008987#include "confdefs.h"
8988#include <stdio.h>
8989#include <time.h>
8990main()
8991{
8992 FILE *f=fopen("conftestval", "w");
8993 if (!f) exit(1);
8994 fprintf(f, "%d\n", sizeof(time_t));
8995 exit(0);
8996}
Martin v. Löwis11437992002-04-12 09:54:03 +00008997_ACEOF
8998rm -f conftest$ac_exeext
8999if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9000 (eval $ac_link) 2>&5
9001 ac_status=$?
9002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9003 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9005 (eval $ac_try) 2>&5
9006 ac_status=$?
9007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9008 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009009 ac_cv_sizeof_time_t=`cat conftestval`
9010else
Martin v. Löwis11437992002-04-12 09:54:03 +00009011 echo "$as_me: program exited with status $ac_status" >&5
9012echo "$as_me: failed program was:" >&5
9013cat conftest.$ac_ext >&5
9014( exit $ac_status )
9015ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009016fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009017rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009018fi
9019
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009020fi
9021
Martin v. Löwis11437992002-04-12 09:54:03 +00009022echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9023echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9024
9025cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009026#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009027_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009028
Michael W. Hudson54241132001-12-07 15:38:26 +00009029
9030
Trent Mick635f6fb2000-08-23 21:33:05 +00009031# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009032ac_save_cc="$CC"
9033if test "$ac_cv_kpthread" = "yes"
9034then CC="$CC -Kpthread"
9035fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009036echo "$as_me:$LINENO: checking for pthread_t" >&5
9037echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009038have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009039cat >conftest.$ac_ext <<_ACEOF
9040#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009041#include "confdefs.h"
9042#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009043#ifdef F77_DUMMY_MAIN
9044# ifdef __cplusplus
9045 extern "C"
9046# endif
9047 int F77_DUMMY_MAIN() { return 1; }
9048#endif
9049int
9050main ()
9051{
Guido van Rossum12580492000-09-24 16:47:19 +00009052pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009053 ;
9054 return 0;
9055}
9056_ACEOF
9057rm -f conftest.$ac_objext
9058if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9059 (eval $ac_compile) 2>&5
9060 ac_status=$?
9061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9062 (exit $ac_status); } &&
9063 { ac_try='test -s conftest.$ac_objext'
9064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9065 (eval $ac_try) 2>&5
9066 ac_status=$?
9067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9068 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009069 have_pthread_t=yes
9070else
Martin v. Löwis11437992002-04-12 09:54:03 +00009071 echo "$as_me: failed program was:" >&5
9072cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009073fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009074rm -f conftest.$ac_objext conftest.$ac_ext
9075echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9076echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009077if test "$have_pthread_t" = yes ; then
9078 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009079 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9080echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9081 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9082 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009083else
9084 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009085 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009086else
Martin v. Löwis11437992002-04-12 09:54:03 +00009087 cat >conftest.$ac_ext <<_ACEOF
9088#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009089#include "confdefs.h"
9090#include <stdio.h>
9091 #include <pthread.h>
9092 main()
9093 {
9094 FILE *f=fopen("conftestval", "w");
9095 if (!f) exit(1);
9096 fprintf(f, "%d\n", sizeof(pthread_t));
9097 exit(0);
9098 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009099_ACEOF
9100rm -f conftest$ac_exeext
9101if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9102 (eval $ac_link) 2>&5
9103 ac_status=$?
9104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9105 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9107 (eval $ac_try) 2>&5
9108 ac_status=$?
9109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9110 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009111 ac_cv_sizeof_pthread_t=`cat conftestval`
9112else
Martin v. Löwis11437992002-04-12 09:54:03 +00009113 echo "$as_me: program exited with status $ac_status" >&5
9114echo "$as_me: failed program was:" >&5
9115cat conftest.$ac_ext >&5
9116( exit $ac_status )
9117ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009118fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009119rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009120fi
9121
Trent Mick635f6fb2000-08-23 21:33:05 +00009122fi
9123
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9125echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9126
9127cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009128#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009129_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009130
9131fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009132CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009133
Martin v. Löwis11437992002-04-12 09:54:03 +00009134echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9135echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009136# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9137if test "${enable_toolbox_glue+set}" = set; then
9138 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009139
Martin v. Löwis11437992002-04-12 09:54:03 +00009140fi;
Jack Jansene578a632001-08-15 01:27:14 +00009141
9142if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009143then
Jack Jansene578a632001-08-15 01:27:14 +00009144 case $ac_sys_system/$ac_sys_release in
9145 Darwin/*)
9146 enable_toolbox_glue="yes";;
9147 *)
9148 enable_toolbox_glue="no";;
9149 esac
9150fi
9151case "$enable_toolbox_glue" in
9152yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009153 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009154 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009155 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009156
9157cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009158#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009159_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009160
9161 ;;
9162*)
9163 extra_frameworks=""
9164 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009165 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009166 ;;
9167esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009168echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9169echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009170
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009171
9172case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009173 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009174 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009175 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009176 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9177 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009178 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009179 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009180 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009181 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9182 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009183esac
9184
Martin v. Löwis11437992002-04-12 09:54:03 +00009185echo "$as_me:$LINENO: checking for --enable-framework" >&5
9186echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009187if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009188then
Jack Jansenca06bc62001-08-03 15:32:23 +00009189 OPT="$OPT -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009190 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009191 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009192 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009193
Martin v. Löwis11437992002-04-12 09:54:03 +00009194cat >>confdefs.h <<\_ACEOF
9195#define WITH_NEXT_FRAMEWORK 1
9196_ACEOF
9197
9198 echo "$as_me:$LINENO: result: yes" >&5
9199echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009200else
Martin v. Löwis11437992002-04-12 09:54:03 +00009201 echo "$as_me:$LINENO: result: no" >&5
9202echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009203fi
9204
Martin v. Löwis11437992002-04-12 09:54:03 +00009205echo "$as_me:$LINENO: checking for dyld" >&5
9206echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009207case $ac_sys_system/$ac_sys_release in
9208 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009209
Martin v. Löwis11437992002-04-12 09:54:03 +00009210cat >>confdefs.h <<\_ACEOF
9211#define WITH_DYLD 1
9212_ACEOF
9213
9214 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9215echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009216 ;;
9217 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009218 echo "$as_me:$LINENO: result: no" >&5
9219echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009220 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009221esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009222
Guido van Rossum0a516c91994-09-12 10:58:40 +00009223# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009224
Michael W. Hudson54241132001-12-07 15:38:26 +00009225
9226
9227
9228
Guido van Rossum0a516c91994-09-12 10:58:40 +00009229# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009230# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009231echo "$as_me:$LINENO: checking SO" >&5
9232echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009233if test -z "$SO"
9234then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009235 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009236 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009237 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009238 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009239 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009240fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009241echo "$as_me:$LINENO: result: $SO" >&5
9242echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009243# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009244# -- "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 +00009245# (Shared libraries in this instance are shared modules to be loaded into
9246# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009247echo "$as_me:$LINENO: checking LDSHARED" >&5
9248echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009249if test -z "$LDSHARED"
9250then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009251 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009252 AIX*)
9253 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009254 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009255 ;;
9256 BeOS*)
9257 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009258 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009259 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009260 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009261 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009262 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009263 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00009264 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009265 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009266 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +00009267 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009268 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009269 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9270 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009271 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009272 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9273 if test "$enable_framework" ; then
9274 # Link against the framework. All externals should be defined.
9275 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9276 else
9277 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009278 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009279 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009280 Darwin/*)
9281 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9282 if test "$enable_framework" ; then
9283 # Link against the framework. All externals should be defined.
9284 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9285 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009286 # No framework, use the Python app as bundle-loader
9287 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9288 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009289 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009290 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009291 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009292 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009293 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009294 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009295 then
9296 LDSHARED="cc -shared ${LDFLAGS}"
9297 else
9298 LDSHARED="ld -Bshareable ${LDFLAGS}"
9299 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009300 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009301 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009302 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009303 then LDSHARED='$(CC) -shared'
9304 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009305 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009306 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009307 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009308 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009309 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009310 *) LDSHARED="ld";;
9311 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009312fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009313echo "$as_me:$LINENO: result: $LDSHARED" >&5
9314echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009315BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009316# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009317# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009318echo "$as_me:$LINENO: checking CCSHARED" >&5
9319echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009320if test -z "$CCSHARED"
9321then
Guido van Rossum07397971997-04-29 21:49:50 +00009322 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009323 SunOS*) if test "$GCC" = yes;
9324 then CCSHARED="-fPIC";
9325 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009326 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009327 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009328 else CCSHARED="+z";
9329 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009330 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009331 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009332 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009333 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009334 if test "$GCC" = "yes"
9335 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009336 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009337 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009338 SCO_SV*)
9339 if test "$GCC" = "yes"
9340 then CCSHARED="-fPIC"
9341 else CCSHARED="-Kpic -belf"
9342 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009343 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009344 IRIX*/6*) case $CC in
9345 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009346 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009347 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009348 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009349 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009350fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009351echo "$as_me:$LINENO: result: $CCSHARED" >&5
9352echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009353# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009354# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009355echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9356echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009357if test -z "$LINKFORSHARED"
9358then
Guido van Rossum07397971997-04-29 21:49:50 +00009359 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009360 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009361 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009362 LINKFORSHARED="-Wl,-E -Wl,+s";;
9363# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009364 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009365 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009366 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009367 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009368 # -u __dummy makes the linker aware of the objc runtime
9369 # in System.framework; otherwise, __objcInit (referenced in
9370 # crt1.o) gets erroneously defined as common, which breaks dynamic
9371 # loading of any modules which reference it in System.framework.
9372 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9373 # not used by the core itself but which needs to be in the core so
9374 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00009375 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009376 if test "$enable_framework"
9377 then
9378 LINKFORSHARED="$LINKFORSHARED -framework Python"
9379 fi
9380 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009381 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009382 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009383 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009385 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9386 then
9387 LINKFORSHARED="-Wl,--export-dynamic"
9388 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009389 SunOS/5*) case $CC in
9390 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009391 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009392 then
9393 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009394 fi;;
9395 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009396 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009397fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009398echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9399echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009400
Michael W. Hudson54241132001-12-07 15:38:26 +00009401
Martin v. Löwis11437992002-04-12 09:54:03 +00009402echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9403echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009404if test ! "$LIBRARY" = "$LDLIBRARY"
9405then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009406 case $ac_sys_system in
9407 CYGWIN*)
9408 # Cygwin needs CCSHARED when building extension DLLs
9409 # but not when building the interpreter DLL.
9410 CFLAGSFORSHARED='';;
9411 *)
9412 CFLAGSFORSHARED='$(CCSHARED)'
9413 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009414fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009415echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9416echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009417
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009418# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9419# library (with --enable-shared).
9420# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009421# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9422# if it is not required, since it creates a dependency of the shared library
9423# to LIBS. This, in turn, means that applications linking the shared libpython
9424# don't need to link LIBS explicitly. The default should be only changed
9425# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009426
9427echo "$as_me:$LINENO: checking SHLIBS" >&5
9428echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9429case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009430 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009431 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009432esac
9433echo "$as_me:$LINENO: result: $SHLIBS" >&5
9434echo "${ECHO_T}$SHLIBS" >&6
9435
9436
Guido van Rossum627b2d71993-12-24 10:39:16 +00009437# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009438
9439echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9440echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9441if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9442 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009443else
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009445LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009446cat >conftest.$ac_ext <<_ACEOF
9447#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009448#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009449
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009450/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009451#ifdef __cplusplus
9452extern "C"
9453#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009454/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009455 builtin and then its argument prototype would still apply. */
9456char dlopen ();
9457#ifdef F77_DUMMY_MAIN
9458# ifdef __cplusplus
9459 extern "C"
9460# endif
9461 int F77_DUMMY_MAIN() { return 1; }
9462#endif
9463int
9464main ()
9465{
9466dlopen ();
9467 ;
9468 return 0;
9469}
9470_ACEOF
9471rm -f conftest.$ac_objext conftest$ac_exeext
9472if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9473 (eval $ac_link) 2>&5
9474 ac_status=$?
9475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9476 (exit $ac_status); } &&
9477 { ac_try='test -s conftest$ac_exeext'
9478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9479 (eval $ac_try) 2>&5
9480 ac_status=$?
9481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9482 (exit $ac_status); }; }; then
9483 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009484else
Martin v. Löwis11437992002-04-12 09:54:03 +00009485 echo "$as_me: failed program was:" >&5
9486cat conftest.$ac_ext >&5
9487ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009488fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009489rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9490LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009491fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009492echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9493echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9494if test $ac_cv_lib_dl_dlopen = yes; then
9495 cat >>confdefs.h <<_ACEOF
9496#define HAVE_LIBDL 1
9497_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009498
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009499 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009500
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009501fi
9502 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009503
9504echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9505echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9506if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9507 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009508else
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009510LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009511cat >conftest.$ac_ext <<_ACEOF
9512#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009513#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009514
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009515/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009516#ifdef __cplusplus
9517extern "C"
9518#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009519/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 builtin and then its argument prototype would still apply. */
9521char shl_load ();
9522#ifdef F77_DUMMY_MAIN
9523# ifdef __cplusplus
9524 extern "C"
9525# endif
9526 int F77_DUMMY_MAIN() { return 1; }
9527#endif
9528int
9529main ()
9530{
9531shl_load ();
9532 ;
9533 return 0;
9534}
9535_ACEOF
9536rm -f conftest.$ac_objext conftest$ac_exeext
9537if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9538 (eval $ac_link) 2>&5
9539 ac_status=$?
9540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9541 (exit $ac_status); } &&
9542 { ac_try='test -s conftest$ac_exeext'
9543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9544 (eval $ac_try) 2>&5
9545 ac_status=$?
9546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9547 (exit $ac_status); }; }; then
9548 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009549else
Martin v. Löwis11437992002-04-12 09:54:03 +00009550 echo "$as_me: failed program was:" >&5
9551cat conftest.$ac_ext >&5
9552ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009554rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9555LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009556fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009557echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9558echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9559if test $ac_cv_lib_dld_shl_load = yes; then
9560 cat >>confdefs.h <<_ACEOF
9561#define HAVE_LIBDLD 1
9562_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009563
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009564 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009565
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009566fi
9567 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009568echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9569echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9570if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009571 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009572else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009573 ac_func_search_save_LIBS=$LIBS
9574ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009575cat >conftest.$ac_ext <<_ACEOF
9576#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009577#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009578
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009579/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009580#ifdef __cplusplus
9581extern "C"
9582#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009583/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009584 builtin and then its argument prototype would still apply. */
9585char sem_init ();
9586#ifdef F77_DUMMY_MAIN
9587# ifdef __cplusplus
9588 extern "C"
9589# endif
9590 int F77_DUMMY_MAIN() { return 1; }
9591#endif
9592int
9593main ()
9594{
9595sem_init ();
9596 ;
9597 return 0;
9598}
9599_ACEOF
9600rm -f conftest.$ac_objext conftest$ac_exeext
9601if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9602 (eval $ac_link) 2>&5
9603 ac_status=$?
9604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9605 (exit $ac_status); } &&
9606 { ac_try='test -s conftest$ac_exeext'
9607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9608 (eval $ac_try) 2>&5
9609 ac_status=$?
9610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9611 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009612 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009613else
Martin v. Löwis11437992002-04-12 09:54:03 +00009614 echo "$as_me: failed program was:" >&5
9615cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009616fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009617rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009618if test "$ac_cv_search_sem_init" = no; then
9619 for ac_lib in rt posix4; do
9620 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9621 cat >conftest.$ac_ext <<_ACEOF
9622#line $LINENO "configure"
9623#include "confdefs.h"
9624
9625/* Override any gcc2 internal prototype to avoid an error. */
9626#ifdef __cplusplus
9627extern "C"
9628#endif
9629/* We use char because int might match the return type of a gcc2
9630 builtin and then its argument prototype would still apply. */
9631char sem_init ();
9632#ifdef F77_DUMMY_MAIN
9633# ifdef __cplusplus
9634 extern "C"
9635# endif
9636 int F77_DUMMY_MAIN() { return 1; }
9637#endif
9638int
9639main ()
9640{
9641sem_init ();
9642 ;
9643 return 0;
9644}
Martin v. Löwis11437992002-04-12 09:54:03 +00009645_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009646rm -f conftest.$ac_objext conftest$ac_exeext
9647if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9648 (eval $ac_link) 2>&5
9649 ac_status=$?
9650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9651 (exit $ac_status); } &&
9652 { ac_try='test -s conftest$ac_exeext'
9653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9654 (eval $ac_try) 2>&5
9655 ac_status=$?
9656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9657 (exit $ac_status); }; }; then
9658 ac_cv_search_sem_init="-l$ac_lib"
9659break
9660else
9661 echo "$as_me: failed program was:" >&5
9662cat conftest.$ac_ext >&5
9663fi
9664rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9665 done
9666fi
9667LIBS=$ac_func_search_save_LIBS
9668fi
9669echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9670echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9671if test "$ac_cv_search_sem_init" != no; then
9672 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009673
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009674fi
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009675 # 'Real Time' functions on Solaris,
9676 # posix4 on Solaris 2.6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009677
9678# checks for system dependent C++ extensions support
9679case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9681echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9682 cat >conftest.$ac_ext <<_ACEOF
9683#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009684#include "confdefs.h"
9685#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009686#ifdef F77_DUMMY_MAIN
9687# ifdef __cplusplus
9688 extern "C"
9689# endif
9690 int F77_DUMMY_MAIN() { return 1; }
9691#endif
9692int
9693main ()
9694{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009695loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009696 ;
9697 return 0;
9698}
9699_ACEOF
9700rm -f conftest.$ac_objext conftest$ac_exeext
9701if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9702 (eval $ac_link) 2>&5
9703 ac_status=$?
9704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9705 (exit $ac_status); } &&
9706 { ac_try='test -s conftest$ac_exeext'
9707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9708 (eval $ac_try) 2>&5
9709 ac_status=$?
9710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9711 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009712
Martin v. Löwis11437992002-04-12 09:54:03 +00009713cat >>confdefs.h <<\_ACEOF
9714#define AIX_GENUINE_CPLUSPLUS 1
9715_ACEOF
9716
9717 echo "$as_me:$LINENO: result: yes" >&5
9718echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009719else
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 echo "$as_me: failed program was:" >&5
9721cat conftest.$ac_ext >&5
9722echo "$as_me:$LINENO: result: no" >&5
9723echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009724fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009725rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009726 *) ;;
9727esac
9728
Guido van Rossum70c7f481998-03-26 18:44:10 +00009729# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009730# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009731# BeOS' sockets are stashed in libnet.
9732case "$ac_sys_system" in
9733IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009734*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009735echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9736echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9737if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9738 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009739else
Martin v. Löwis11437992002-04-12 09:54:03 +00009740 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009741LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009742cat >conftest.$ac_ext <<_ACEOF
9743#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009744#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009745
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009746/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009747#ifdef __cplusplus
9748extern "C"
9749#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009750/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009751 builtin and then its argument prototype would still apply. */
9752char t_open ();
9753#ifdef F77_DUMMY_MAIN
9754# ifdef __cplusplus
9755 extern "C"
9756# endif
9757 int F77_DUMMY_MAIN() { return 1; }
9758#endif
9759int
9760main ()
9761{
9762t_open ();
9763 ;
9764 return 0;
9765}
9766_ACEOF
9767rm -f conftest.$ac_objext conftest$ac_exeext
9768if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9769 (eval $ac_link) 2>&5
9770 ac_status=$?
9771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9772 (exit $ac_status); } &&
9773 { ac_try='test -s conftest$ac_exeext'
9774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9775 (eval $ac_try) 2>&5
9776 ac_status=$?
9777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778 (exit $ac_status); }; }; then
9779 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009780else
Martin v. Löwis11437992002-04-12 09:54:03 +00009781 echo "$as_me: failed program was:" >&5
9782cat conftest.$ac_ext >&5
9783ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009784fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009785rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9786LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009787fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009788echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9789echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9790if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009791 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009792fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009793 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009794echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9795echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9796if test "${ac_cv_lib_socket_socket+set}" = set; then
9797 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009798else
Martin v. Löwis11437992002-04-12 09:54:03 +00009799 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009800LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009801cat >conftest.$ac_ext <<_ACEOF
9802#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009803#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009804
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009805/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009806#ifdef __cplusplus
9807extern "C"
9808#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009809/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 builtin and then its argument prototype would still apply. */
9811char socket ();
9812#ifdef F77_DUMMY_MAIN
9813# ifdef __cplusplus
9814 extern "C"
9815# endif
9816 int F77_DUMMY_MAIN() { return 1; }
9817#endif
9818int
9819main ()
9820{
9821socket ();
9822 ;
9823 return 0;
9824}
9825_ACEOF
9826rm -f conftest.$ac_objext conftest$ac_exeext
9827if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9828 (eval $ac_link) 2>&5
9829 ac_status=$?
9830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9831 (exit $ac_status); } &&
9832 { ac_try='test -s conftest$ac_exeext'
9833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9834 (eval $ac_try) 2>&5
9835 ac_status=$?
9836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9837 (exit $ac_status); }; }; then
9838 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009839else
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 echo "$as_me: failed program was:" >&5
9841cat conftest.$ac_ext >&5
9842ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009843fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009844rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9845LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009846fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009847echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9848echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9849if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009850 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009851fi
9852 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009853;;
9854esac
9855case "$ac_sys_system" in
9856BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009857echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9858echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9859if test "${ac_cv_lib_net_socket+set}" = set; then
9860 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009861else
Martin v. Löwis11437992002-04-12 09:54:03 +00009862 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009863LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009864cat >conftest.$ac_ext <<_ACEOF
9865#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009866#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009867
Guido van Rossumad678af1998-10-02 14:42:15 +00009868/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009869#ifdef __cplusplus
9870extern "C"
9871#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009872/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009873 builtin and then its argument prototype would still apply. */
9874char socket ();
9875#ifdef F77_DUMMY_MAIN
9876# ifdef __cplusplus
9877 extern "C"
9878# endif
9879 int F77_DUMMY_MAIN() { return 1; }
9880#endif
9881int
9882main ()
9883{
9884socket ();
9885 ;
9886 return 0;
9887}
9888_ACEOF
9889rm -f conftest.$ac_objext conftest$ac_exeext
9890if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9891 (eval $ac_link) 2>&5
9892 ac_status=$?
9893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9894 (exit $ac_status); } &&
9895 { ac_try='test -s conftest$ac_exeext'
9896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9897 (eval $ac_try) 2>&5
9898 ac_status=$?
9899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9900 (exit $ac_status); }; }; then
9901 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009902else
Martin v. Löwis11437992002-04-12 09:54:03 +00009903 echo "$as_me: failed program was:" >&5
9904cat conftest.$ac_ext >&5
9905ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009906fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009907rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9908LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009909fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009910echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9911echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9912if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009913 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009914fi
9915 # BeOS
9916;;
9917esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009918
Martin v. Löwis11437992002-04-12 09:54:03 +00009919echo "$as_me:$LINENO: checking for --with-libs" >&5
9920echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9921
Guido van Rossuma68acba1996-07-31 17:36:39 +00009922# Check whether --with-libs or --without-libs was given.
9923if test "${with_libs+set}" = set; then
9924 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009925
9926echo "$as_me:$LINENO: result: $withval" >&5
9927echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009928LIBS="$withval $LIBS"
9929
9930else
Martin v. Löwis11437992002-04-12 09:54:03 +00009931 echo "$as_me:$LINENO: result: no" >&5
9932echo "${ECHO_T}no" >&6
9933fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009934
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009935# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009936
9937
Martin v. Löwis11437992002-04-12 09:54:03 +00009938echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9939echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9940
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009941# Check whether --with-signal-module or --without-signal-module was given.
9942if test "${with_signal_module+set}" = set; then
9943 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009944
Martin v. Löwis11437992002-04-12 09:54:03 +00009945fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009946
9947if test -z "$with_signal_module"
9948then with_signal_module="yes"
9949fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009950echo "$as_me:$LINENO: result: $with_signal_module" >&5
9951echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009952
9953if test "${with_signal_module}" = "yes"; then
9954 USE_SIGNAL_MODULE=""
9955 SIGNAL_OBJS=""
9956else
9957 USE_SIGNAL_MODULE="#"
9958 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9959fi
9960
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009961# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009962
Barry Warsawc0d24d82000-06-29 16:12:00 +00009963USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009964
Martin v. Löwis11437992002-04-12 09:54:03 +00009965echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9966echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9967
Guido van Rossumec2f0731997-01-22 20:54:01 +00009968
9969# Check whether --with-dec-threads or --without-dec-threads was given.
9970if test "${with_dec_threads+set}" = set; then
9971 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009972
9973echo "$as_me:$LINENO: result: $withval" >&5
9974echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009975LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009976if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009977 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009978fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009979else
Martin v. Löwis11437992002-04-12 09:54:03 +00009980 echo "$as_me:$LINENO: result: no" >&5
9981echo "${ECHO_T}no" >&6
9982fi;
9983
9984# Templates for things AC_DEFINEd more than once.
9985# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009986
9987
Martin v. Löwis11437992002-04-12 09:54:03 +00009988
9989
9990
9991
9992
9993echo "$as_me:$LINENO: checking for --with-threads" >&5
9994echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9995
Guido van Rossumec2f0731997-01-22 20:54:01 +00009996# Check whether --with-threads or --without-threads was given.
9997if test "${with_threads+set}" = set; then
9998 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009999
Martin v. Löwis11437992002-04-12 09:54:03 +000010000fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010001
Barry Warsawc0d24d82000-06-29 16:12:00 +000010002# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010003
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010004# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010005if test "${with_thread+set}" = set; then
10006 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010007 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010008fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +000010009
10010if test -z "$with_threads"
10011then with_threads="yes"
10012fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010013echo "$as_me:$LINENO: result: $with_threads" >&5
10014echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +000010015
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010016
Barry Warsawc0d24d82000-06-29 16:12:00 +000010017if test "$with_threads" = "no"
10018then
10019 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010020elif test "$ac_cv_pthread_is_default" = yes
10021then
Martin v. Löwis11437992002-04-12 09:54:03 +000010022 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010023#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010024_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010025
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010026 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010027 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010028#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010029_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010030
10031 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010032 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010033elif test "$ac_cv_kpthread" = "yes"
10034then
10035 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010036 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010037#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010038_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010039
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010040 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010041 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010042else
10043 if test ! -z "$with_threads" -a -d "$with_threads"
10044 then LDFLAGS="$LDFLAGS -L$with_threads"
10045 fi
10046 if test ! -z "$withval" -a -d "$withval"
10047 then LDFLAGS="$LDFLAGS -L$withval"
10048 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010049
10050 # According to the POSIX spec, a pthreads implementation must
10051 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010052 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10053echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10054 cat >conftest.$ac_ext <<_ACEOF
10055#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010056#include "confdefs.h"
10057#include <unistd.h>
10058 #ifdef _POSIX_THREADS
10059 yes
10060 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010061
10062_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10064 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010065 unistd_defines_pthreads=yes
10066else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010067 unistd_defines_pthreads=no
10068fi
10069rm -f conftest*
10070
Martin v. Löwis11437992002-04-12 09:54:03 +000010071 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10072echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010073
Martin v. Löwis11437992002-04-12 09:54:03 +000010074 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010075#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010076_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010077
Martin v. Löwis11437992002-04-12 09:54:03 +000010078 if test "${ac_cv_header_cthreads_h+set}" = set; then
10079 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10080echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10081if test "${ac_cv_header_cthreads_h+set}" = set; then
10082 echo $ECHO_N "(cached) $ECHO_C" >&6
10083fi
10084echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10085echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010086else
Martin v. Löwis11437992002-04-12 09:54:03 +000010087 # Is the header compilable?
10088echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10089echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10090cat >conftest.$ac_ext <<_ACEOF
10091#line $LINENO "configure"
10092#include "confdefs.h"
10093$ac_includes_default
10094#include <cthreads.h>
10095_ACEOF
10096rm -f conftest.$ac_objext
10097if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10098 (eval $ac_compile) 2>&5
10099 ac_status=$?
10100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10101 (exit $ac_status); } &&
10102 { ac_try='test -s conftest.$ac_objext'
10103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10104 (eval $ac_try) 2>&5
10105 ac_status=$?
10106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10107 (exit $ac_status); }; }; then
10108 ac_header_compiler=yes
10109else
10110 echo "$as_me: failed program was:" >&5
10111cat conftest.$ac_ext >&5
10112ac_header_compiler=no
10113fi
10114rm -f conftest.$ac_objext conftest.$ac_ext
10115echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10116echo "${ECHO_T}$ac_header_compiler" >&6
10117
10118# Is the header present?
10119echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10120echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10121cat >conftest.$ac_ext <<_ACEOF
10122#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010123#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010124#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010125_ACEOF
10126if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10127 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10128 ac_status=$?
10129 egrep -v '^ *\+' conftest.er1 >conftest.err
10130 rm -f conftest.er1
10131 cat conftest.err >&5
10132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10133 (exit $ac_status); } >/dev/null; then
10134 if test -s conftest.err; then
10135 ac_cpp_err=$ac_c_preproc_warn_flag
10136 else
10137 ac_cpp_err=
10138 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010139else
Martin v. Löwis11437992002-04-12 09:54:03 +000010140 ac_cpp_err=yes
10141fi
10142if test -z "$ac_cpp_err"; then
10143 ac_header_preproc=yes
10144else
10145 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010146 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010147 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010148fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010149rm -f conftest.err conftest.$ac_ext
10150echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10151echo "${ECHO_T}$ac_header_preproc" >&6
10152
10153# So? What about this header?
10154case $ac_header_compiler:$ac_header_preproc in
10155 yes:no )
10156 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10157echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10158 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10159echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10160 no:yes )
10161 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10162echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10163 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10164echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10165 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10166echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10167esac
10168echo "$as_me:$LINENO: checking for cthreads.h" >&5
10169echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10170if test "${ac_cv_header_cthreads_h+set}" = set; then
10171 echo $ECHO_N "(cached) $ECHO_C" >&6
10172else
10173 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010174fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010175echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10176echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10177
10178fi
10179if test $ac_cv_header_cthreads_h = yes; then
10180 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010181#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010182_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010183
Martin v. Löwis11437992002-04-12 09:54:03 +000010184 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010185#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010186_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010187
Martin v. Löwis11437992002-04-12 09:54:03 +000010188
10189cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010190#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010191_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010192
10193 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010194 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010195else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010196
Martin v. Löwis11437992002-04-12 09:54:03 +000010197 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10198 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10199echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10200if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10201 echo $ECHO_N "(cached) $ECHO_C" >&6
10202fi
10203echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10204echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010205else
Martin v. Löwis11437992002-04-12 09:54:03 +000010206 # Is the header compilable?
10207echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10208echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10209cat >conftest.$ac_ext <<_ACEOF
10210#line $LINENO "configure"
10211#include "confdefs.h"
10212$ac_includes_default
10213#include <mach/cthreads.h>
10214_ACEOF
10215rm -f conftest.$ac_objext
10216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10217 (eval $ac_compile) 2>&5
10218 ac_status=$?
10219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10220 (exit $ac_status); } &&
10221 { ac_try='test -s conftest.$ac_objext'
10222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10223 (eval $ac_try) 2>&5
10224 ac_status=$?
10225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10226 (exit $ac_status); }; }; then
10227 ac_header_compiler=yes
10228else
10229 echo "$as_me: failed program was:" >&5
10230cat conftest.$ac_ext >&5
10231ac_header_compiler=no
10232fi
10233rm -f conftest.$ac_objext conftest.$ac_ext
10234echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10235echo "${ECHO_T}$ac_header_compiler" >&6
10236
10237# Is the header present?
10238echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10239echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10240cat >conftest.$ac_ext <<_ACEOF
10241#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010242#include "confdefs.h"
10243#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010244_ACEOF
10245if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10246 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10247 ac_status=$?
10248 egrep -v '^ *\+' conftest.er1 >conftest.err
10249 rm -f conftest.er1
10250 cat conftest.err >&5
10251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10252 (exit $ac_status); } >/dev/null; then
10253 if test -s conftest.err; then
10254 ac_cpp_err=$ac_c_preproc_warn_flag
10255 else
10256 ac_cpp_err=
10257 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010258else
Martin v. Löwis11437992002-04-12 09:54:03 +000010259 ac_cpp_err=yes
10260fi
10261if test -z "$ac_cpp_err"; then
10262 ac_header_preproc=yes
10263else
10264 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010265 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010267fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010268rm -f conftest.err conftest.$ac_ext
10269echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10270echo "${ECHO_T}$ac_header_preproc" >&6
10271
10272# So? What about this header?
10273case $ac_header_compiler:$ac_header_preproc in
10274 yes:no )
10275 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10276echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10277 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10278echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10279 no:yes )
10280 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10281echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10282 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10283echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10284 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10285echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10286esac
10287echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10288echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10289if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10290 echo $ECHO_N "(cached) $ECHO_C" >&6
10291else
10292 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010293fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010294echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10295echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10296
10297fi
10298if test $ac_cv_header_mach_cthreads_h = yes; then
10299 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010300#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010301_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010302
Martin v. Löwis11437992002-04-12 09:54:03 +000010303 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010304#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010305_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010306
Martin v. Löwis11437992002-04-12 09:54:03 +000010307
10308cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010309#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010310_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010311
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010312 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010313else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010314
Martin v. Löwis11437992002-04-12 09:54:03 +000010315 echo "$as_me:$LINENO: checking for --with-pth" >&5
10316echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10317
10318# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010319if test "${with_pth+set}" = set; then
10320 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010321 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010322echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010323 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010324#define WITH_THREAD 1
10325_ACEOF
10326
10327
10328cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010329#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010330_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010331
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010332 LIBS="-lpth $LIBS"
10333 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010334else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010335 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010336echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010337
10338 # Just looking for pthread_create in libpthread is not enough:
10339 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10340 # So we really have to include pthread.h, and then link.
10341 _libs=$LIBS
10342 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010343 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10344echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10345 cat >conftest.$ac_ext <<_ACEOF
10346#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010347#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010348#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010349
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010350void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010351#ifdef F77_DUMMY_MAIN
10352# ifdef __cplusplus
10353 extern "C"
10354# endif
10355 int F77_DUMMY_MAIN() { return 1; }
10356#endif
10357int
10358main ()
10359{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010360
10361pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010362 ;
10363 return 0;
10364}
10365_ACEOF
10366rm -f conftest.$ac_objext conftest$ac_exeext
10367if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10368 (eval $ac_link) 2>&5
10369 ac_status=$?
10370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10371 (exit $ac_status); } &&
10372 { ac_try='test -s conftest$ac_exeext'
10373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10374 (eval $ac_try) 2>&5
10375 ac_status=$?
10376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10377 (exit $ac_status); }; }; then
10378
10379 echo "$as_me:$LINENO: result: yes" >&5
10380echo "${ECHO_T}yes" >&6
10381 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010382#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010383_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010384
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010385 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010386 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010387else
Martin v. Löwis11437992002-04-12 09:54:03 +000010388 echo "$as_me: failed program was:" >&5
10389cat conftest.$ac_ext >&5
10390
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010391 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010392 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10393echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10394if test "${ac_cv_func_pthread_detach+set}" = set; then
10395 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010396else
Martin v. Löwis11437992002-04-12 09:54:03 +000010397 cat >conftest.$ac_ext <<_ACEOF
10398#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010399#include "confdefs.h"
10400/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010401 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010402#include <assert.h>
10403/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010404#ifdef __cplusplus
10405extern "C"
10406#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010407/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010408 builtin and then its argument prototype would still apply. */
10409char pthread_detach ();
10410char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010411
Martin v. Löwis11437992002-04-12 09:54:03 +000010412#ifdef F77_DUMMY_MAIN
10413# ifdef __cplusplus
10414 extern "C"
10415# endif
10416 int F77_DUMMY_MAIN() { return 1; }
10417#endif
10418int
10419main ()
10420{
Guido van Rossumad678af1998-10-02 14:42:15 +000010421/* The GNU C library defines this for functions which it implements
10422 to always fail with ENOSYS. Some functions are actually named
10423 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010424#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010425choke me
10426#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010427f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010428#endif
10429
Martin v. Löwis11437992002-04-12 09:54:03 +000010430 ;
10431 return 0;
10432}
10433_ACEOF
10434rm -f conftest.$ac_objext conftest$ac_exeext
10435if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10436 (eval $ac_link) 2>&5
10437 ac_status=$?
10438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10439 (exit $ac_status); } &&
10440 { ac_try='test -s conftest$ac_exeext'
10441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10442 (eval $ac_try) 2>&5
10443 ac_status=$?
10444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10445 (exit $ac_status); }; }; then
10446 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010447else
Martin v. Löwis11437992002-04-12 09:54:03 +000010448 echo "$as_me: failed program was:" >&5
10449cat conftest.$ac_ext >&5
10450ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010451fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010452rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010453fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010454echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10455echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10456if test $ac_cv_func_pthread_detach = yes; then
10457 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010458#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010459_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010460
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010461 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010462 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010463else
Guido van Rossumad678af1998-10-02 14:42:15 +000010464
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010465 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10466 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10467echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10468if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10469 echo $ECHO_N "(cached) $ECHO_C" >&6
10470fi
10471echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10472echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10473else
10474 # Is the header compilable?
10475echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10476echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10477cat >conftest.$ac_ext <<_ACEOF
10478#line $LINENO "configure"
10479#include "confdefs.h"
10480$ac_includes_default
10481#include <atheos/threads.h>
10482_ACEOF
10483rm -f conftest.$ac_objext
10484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10485 (eval $ac_compile) 2>&5
10486 ac_status=$?
10487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10488 (exit $ac_status); } &&
10489 { ac_try='test -s conftest.$ac_objext'
10490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10491 (eval $ac_try) 2>&5
10492 ac_status=$?
10493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10494 (exit $ac_status); }; }; then
10495 ac_header_compiler=yes
10496else
10497 echo "$as_me: failed program was:" >&5
10498cat conftest.$ac_ext >&5
10499ac_header_compiler=no
10500fi
10501rm -f conftest.$ac_objext conftest.$ac_ext
10502echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10503echo "${ECHO_T}$ac_header_compiler" >&6
10504
10505# Is the header present?
10506echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10507echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10508cat >conftest.$ac_ext <<_ACEOF
10509#line $LINENO "configure"
10510#include "confdefs.h"
10511#include <atheos/threads.h>
10512_ACEOF
10513if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10514 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10515 ac_status=$?
10516 egrep -v '^ *\+' conftest.er1 >conftest.err
10517 rm -f conftest.er1
10518 cat conftest.err >&5
10519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10520 (exit $ac_status); } >/dev/null; then
10521 if test -s conftest.err; then
10522 ac_cpp_err=$ac_c_preproc_warn_flag
10523 else
10524 ac_cpp_err=
10525 fi
10526else
10527 ac_cpp_err=yes
10528fi
10529if test -z "$ac_cpp_err"; then
10530 ac_header_preproc=yes
10531else
10532 echo "$as_me: failed program was:" >&5
10533 cat conftest.$ac_ext >&5
10534 ac_header_preproc=no
10535fi
10536rm -f conftest.err conftest.$ac_ext
10537echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10538echo "${ECHO_T}$ac_header_preproc" >&6
10539
10540# So? What about this header?
10541case $ac_header_compiler:$ac_header_preproc in
10542 yes:no )
10543 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10544echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10545 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10546echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10547 no:yes )
10548 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10549echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10550 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10551echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10552 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10553echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10554esac
10555echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10556echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10557if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10558 echo $ECHO_N "(cached) $ECHO_C" >&6
10559else
10560 ac_cv_header_atheos_threads_h=$ac_header_preproc
10561fi
10562echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10563echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10564
10565fi
10566if test $ac_cv_header_atheos_threads_h = yes; then
10567 cat >>confdefs.h <<\_ACEOF
10568#define WITH_THREAD 1
10569_ACEOF
10570
10571
10572cat >>confdefs.h <<\_ACEOF
10573#define ATHEOS_THREADS 1
10574_ACEOF
10575
10576 THREADOBJ="Python/thread.o"
10577else
10578
Martin v. Löwis11437992002-04-12 09:54:03 +000010579 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10580 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10581echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10582if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10583 echo $ECHO_N "(cached) $ECHO_C" >&6
10584fi
10585echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10586echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010587else
Martin v. Löwis11437992002-04-12 09:54:03 +000010588 # Is the header compilable?
10589echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10590echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10591cat >conftest.$ac_ext <<_ACEOF
10592#line $LINENO "configure"
10593#include "confdefs.h"
10594$ac_includes_default
10595#include <kernel/OS.h>
10596_ACEOF
10597rm -f conftest.$ac_objext
10598if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10599 (eval $ac_compile) 2>&5
10600 ac_status=$?
10601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10602 (exit $ac_status); } &&
10603 { ac_try='test -s conftest.$ac_objext'
10604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10605 (eval $ac_try) 2>&5
10606 ac_status=$?
10607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10608 (exit $ac_status); }; }; then
10609 ac_header_compiler=yes
10610else
10611 echo "$as_me: failed program was:" >&5
10612cat conftest.$ac_ext >&5
10613ac_header_compiler=no
10614fi
10615rm -f conftest.$ac_objext conftest.$ac_ext
10616echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10617echo "${ECHO_T}$ac_header_compiler" >&6
10618
10619# Is the header present?
10620echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10621echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10622cat >conftest.$ac_ext <<_ACEOF
10623#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010624#include "confdefs.h"
10625#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010626_ACEOF
10627if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10628 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10629 ac_status=$?
10630 egrep -v '^ *\+' conftest.er1 >conftest.err
10631 rm -f conftest.er1
10632 cat conftest.err >&5
10633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10634 (exit $ac_status); } >/dev/null; then
10635 if test -s conftest.err; then
10636 ac_cpp_err=$ac_c_preproc_warn_flag
10637 else
10638 ac_cpp_err=
10639 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010640else
Martin v. Löwis11437992002-04-12 09:54:03 +000010641 ac_cpp_err=yes
10642fi
10643if test -z "$ac_cpp_err"; then
10644 ac_header_preproc=yes
10645else
10646 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010647 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010648 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010649fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010650rm -f conftest.err conftest.$ac_ext
10651echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10652echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010653
Martin v. Löwis11437992002-04-12 09:54:03 +000010654# So? What about this header?
10655case $ac_header_compiler:$ac_header_preproc in
10656 yes:no )
10657 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10658echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10659 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10660echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10661 no:yes )
10662 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10663echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10664 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10665echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10666 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10667echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10668esac
10669echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10670echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10671if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10672 echo $ECHO_N "(cached) $ECHO_C" >&6
10673else
10674 ac_cv_header_kernel_OS_h=$ac_header_preproc
10675fi
10676echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10677echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10678
10679fi
10680if test $ac_cv_header_kernel_OS_h = yes; then
10681 cat >>confdefs.h <<\_ACEOF
10682#define WITH_THREAD 1
10683_ACEOF
10684
10685
10686cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010687#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010688_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010689
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010690 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010691else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010692
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10694echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10695if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10696 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010697else
Martin v. Löwis11437992002-04-12 09:54:03 +000010698 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010699LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010700cat >conftest.$ac_ext <<_ACEOF
10701#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010702#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010703
Greg Steinadf63d62000-07-05 10:38:09 +000010704/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010705#ifdef __cplusplus
10706extern "C"
10707#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010708/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010709 builtin and then its argument prototype would still apply. */
10710char pthread_create ();
10711#ifdef F77_DUMMY_MAIN
10712# ifdef __cplusplus
10713 extern "C"
10714# endif
10715 int F77_DUMMY_MAIN() { return 1; }
10716#endif
10717int
10718main ()
10719{
10720pthread_create ();
10721 ;
10722 return 0;
10723}
10724_ACEOF
10725rm -f conftest.$ac_objext conftest$ac_exeext
10726if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10727 (eval $ac_link) 2>&5
10728 ac_status=$?
10729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10730 (exit $ac_status); } &&
10731 { ac_try='test -s conftest$ac_exeext'
10732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10733 (eval $ac_try) 2>&5
10734 ac_status=$?
10735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10736 (exit $ac_status); }; }; then
10737 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010738else
Martin v. Löwis11437992002-04-12 09:54:03 +000010739 echo "$as_me: failed program was:" >&5
10740cat conftest.$ac_ext >&5
10741ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010742fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010743rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10744LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010745fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010746echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10747echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10748if test $ac_cv_lib_pthreads_pthread_create = yes; then
10749 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010750#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010751_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010752
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010753 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010754 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010755 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010756else
Greg Steinadf63d62000-07-05 10:38:09 +000010757
Martin v. Löwis11437992002-04-12 09:54:03 +000010758 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10759echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10760if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10761 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010762else
Martin v. Löwis11437992002-04-12 09:54:03 +000010763 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010764LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010765cat >conftest.$ac_ext <<_ACEOF
10766#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010767#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010768
Guido van Rossum49545951997-12-02 19:28:29 +000010769/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010770#ifdef __cplusplus
10771extern "C"
10772#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010773/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010774 builtin and then its argument prototype would still apply. */
10775char pthread_create ();
10776#ifdef F77_DUMMY_MAIN
10777# ifdef __cplusplus
10778 extern "C"
10779# endif
10780 int F77_DUMMY_MAIN() { return 1; }
10781#endif
10782int
10783main ()
10784{
10785pthread_create ();
10786 ;
10787 return 0;
10788}
10789_ACEOF
10790rm -f conftest.$ac_objext conftest$ac_exeext
10791if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10792 (eval $ac_link) 2>&5
10793 ac_status=$?
10794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10795 (exit $ac_status); } &&
10796 { ac_try='test -s conftest$ac_exeext'
10797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10798 (eval $ac_try) 2>&5
10799 ac_status=$?
10800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10801 (exit $ac_status); }; }; then
10802 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010803else
Martin v. Löwis11437992002-04-12 09:54:03 +000010804 echo "$as_me: failed program was:" >&5
10805cat conftest.$ac_ext >&5
10806ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010807fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010808rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10809LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010810fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010811echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10812echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10813if test $ac_cv_lib_c_r_pthread_create = yes; then
10814 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010815#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010816_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010817
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010818 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010819 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010820 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010821else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010822
Martin v. Löwis11437992002-04-12 09:54:03 +000010823 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10824echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10825if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10826 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010827else
Martin v. Löwis11437992002-04-12 09:54:03 +000010828 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010829LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010830cat >conftest.$ac_ext <<_ACEOF
10831#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010832#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010833
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010834/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010835#ifdef __cplusplus
10836extern "C"
10837#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010838/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010839 builtin and then its argument prototype would still apply. */
10840char __d6_pthread_create ();
10841#ifdef F77_DUMMY_MAIN
10842# ifdef __cplusplus
10843 extern "C"
10844# endif
10845 int F77_DUMMY_MAIN() { return 1; }
10846#endif
10847int
10848main ()
10849{
10850__d6_pthread_create ();
10851 ;
10852 return 0;
10853}
10854_ACEOF
10855rm -f conftest.$ac_objext conftest$ac_exeext
10856if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10857 (eval $ac_link) 2>&5
10858 ac_status=$?
10859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10860 (exit $ac_status); } &&
10861 { ac_try='test -s conftest$ac_exeext'
10862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10863 (eval $ac_try) 2>&5
10864 ac_status=$?
10865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10866 (exit $ac_status); }; }; then
10867 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010868else
Martin v. Löwis11437992002-04-12 09:54:03 +000010869 echo "$as_me: failed program was:" >&5
10870cat conftest.$ac_ext >&5
10871ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010872fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010873rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10874LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010875fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010876echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10877echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10878if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10879 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010880#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010881_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010882
Martin v. Löwis779ffc02002-12-02 22:17:01 +000010883 echo Systems with __d6_pthread_create are not supported anymore.
10884 echo See README
10885 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010886 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010887 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010888 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010889else
Guido van Rossum49545951997-12-02 19:28:29 +000010890
Martin v. Löwis11437992002-04-12 09:54:03 +000010891 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10892echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10893if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10894 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010895else
Martin v. Löwis11437992002-04-12 09:54:03 +000010896 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010897LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010898cat >conftest.$ac_ext <<_ACEOF
10899#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010900#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010901
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010902/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010903#ifdef __cplusplus
10904extern "C"
10905#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010906/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010907 builtin and then its argument prototype would still apply. */
10908char __pthread_create_system ();
10909#ifdef F77_DUMMY_MAIN
10910# ifdef __cplusplus
10911 extern "C"
10912# endif
10913 int F77_DUMMY_MAIN() { return 1; }
10914#endif
10915int
10916main ()
10917{
10918__pthread_create_system ();
10919 ;
10920 return 0;
10921}
10922_ACEOF
10923rm -f conftest.$ac_objext conftest$ac_exeext
10924if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10925 (eval $ac_link) 2>&5
10926 ac_status=$?
10927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10928 (exit $ac_status); } &&
10929 { ac_try='test -s conftest$ac_exeext'
10930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10931 (eval $ac_try) 2>&5
10932 ac_status=$?
10933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10934 (exit $ac_status); }; }; then
10935 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010936else
Martin v. Löwis11437992002-04-12 09:54:03 +000010937 echo "$as_me: failed program was:" >&5
10938cat conftest.$ac_ext >&5
10939ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010940fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010941rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10942LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010943fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010944echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10945echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10946if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10947 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010948#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010949_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010950
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010951 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010952 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010953 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010954else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010955
Martin v. Löwis11437992002-04-12 09:54:03 +000010956 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10957echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10958if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10959 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010960else
Martin v. Löwis11437992002-04-12 09:54:03 +000010961 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010962LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010963cat >conftest.$ac_ext <<_ACEOF
10964#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010965#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010966
Guido van Rossumb93a8621998-05-07 13:27:32 +000010967/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010968#ifdef __cplusplus
10969extern "C"
10970#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010971/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010972 builtin and then its argument prototype would still apply. */
10973char pthread_create ();
10974#ifdef F77_DUMMY_MAIN
10975# ifdef __cplusplus
10976 extern "C"
10977# endif
10978 int F77_DUMMY_MAIN() { return 1; }
10979#endif
10980int
10981main ()
10982{
10983pthread_create ();
10984 ;
10985 return 0;
10986}
10987_ACEOF
10988rm -f conftest.$ac_objext conftest$ac_exeext
10989if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10990 (eval $ac_link) 2>&5
10991 ac_status=$?
10992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10993 (exit $ac_status); } &&
10994 { ac_try='test -s conftest$ac_exeext'
10995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10996 (eval $ac_try) 2>&5
10997 ac_status=$?
10998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10999 (exit $ac_status); }; }; then
11000 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011001else
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 echo "$as_me: failed program was:" >&5
11003cat conftest.$ac_ext >&5
11004ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011005fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011006rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11007LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011008fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011009echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11010echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11011if test $ac_cv_lib_cma_pthread_create = yes; then
11012 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011013#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011014_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011015
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011016 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011017 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011018 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011019else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011020
Martin v. Löwis130fb172001-07-19 11:00:41 +000011021 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011022fi
11023
Guido van Rossum627b2d71993-12-24 10:39:16 +000011024
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011025fi
11026
Guido van Rossum0be3e491997-05-22 20:33:33 +000011027fi
11028
Guido van Rossum49545951997-12-02 19:28:29 +000011029fi
11030
Guido van Rossumb93a8621998-05-07 13:27:32 +000011031fi
11032
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011033fi
11034
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011035
Michael W. Hudson54241132001-12-07 15:38:26 +000011036fi
11037
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011038
11039fi
11040
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011041fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011042rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11043fi;
11044fi
11045
11046
11047fi
11048
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011049
Michael W. Hudson54241132001-12-07 15:38:26 +000011050
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011051 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011052 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011053
11054cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011055#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011056_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011057
11058 fi
11059
Martin v. Löwis11437992002-04-12 09:54:03 +000011060 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11061echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11062 if test "${ac_cv_pthread_system_supported+set}" = set; then
11063 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011064else
11065 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011066 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011067else
Martin v. Löwis11437992002-04-12 09:54:03 +000011068 cat >conftest.$ac_ext <<_ACEOF
11069#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011070#include "confdefs.h"
11071#include <pthread.h>
11072 void *foo(void *parm) {
11073 return NULL;
11074 }
11075 main() {
11076 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011077 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011078 if (pthread_attr_init(&attr)) exit(-1);
11079 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011080 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011081 exit(0);
11082 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011083_ACEOF
11084rm -f conftest$ac_exeext
11085if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11086 (eval $ac_link) 2>&5
11087 ac_status=$?
11088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11089 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11091 (eval $ac_try) 2>&5
11092 ac_status=$?
11093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11094 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011095 ac_cv_pthread_system_supported=yes
11096else
Martin v. Löwis11437992002-04-12 09:54:03 +000011097 echo "$as_me: program exited with status $ac_status" >&5
11098echo "$as_me: failed program was:" >&5
11099cat conftest.$ac_ext >&5
11100( exit $ac_status )
11101ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011103rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011104fi
11105
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011106fi
11107
Martin v. Löwis11437992002-04-12 09:54:03 +000011108 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11109echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011110 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011111
11112cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011113#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011114_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011115
11116 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011117
11118for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011119do
Martin v. Löwis11437992002-04-12 09:54:03 +000011120as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11121echo "$as_me:$LINENO: checking for $ac_func" >&5
11122echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11123if eval "test \"\${$as_ac_var+set}\" = set"; then
11124 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011125else
Martin v. Löwis11437992002-04-12 09:54:03 +000011126 cat >conftest.$ac_ext <<_ACEOF
11127#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011128#include "confdefs.h"
11129/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011130 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011131#include <assert.h>
11132/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011133#ifdef __cplusplus
11134extern "C"
11135#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011136/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011137 builtin and then its argument prototype would still apply. */
11138char $ac_func ();
11139char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011140
Martin v. Löwis11437992002-04-12 09:54:03 +000011141#ifdef F77_DUMMY_MAIN
11142# ifdef __cplusplus
11143 extern "C"
11144# endif
11145 int F77_DUMMY_MAIN() { return 1; }
11146#endif
11147int
11148main ()
11149{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011150/* The GNU C library defines this for functions which it implements
11151 to always fail with ENOSYS. Some functions are actually named
11152 something starting with __ and the normal name is an alias. */
11153#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11154choke me
11155#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011156f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011157#endif
11158
Martin v. Löwis11437992002-04-12 09:54:03 +000011159 ;
11160 return 0;
11161}
11162_ACEOF
11163rm -f conftest.$ac_objext conftest$ac_exeext
11164if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11165 (eval $ac_link) 2>&5
11166 ac_status=$?
11167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11168 (exit $ac_status); } &&
11169 { ac_try='test -s conftest$ac_exeext'
11170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11171 (eval $ac_try) 2>&5
11172 ac_status=$?
11173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11174 (exit $ac_status); }; }; then
11175 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011176else
Martin v. Löwis11437992002-04-12 09:54:03 +000011177 echo "$as_me: failed program was:" >&5
11178cat conftest.$ac_ext >&5
11179eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011180fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011181rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011182fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011183echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11184echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11185if test `eval echo '${'$as_ac_var'}'` = yes; then
11186 cat >>confdefs.h <<_ACEOF
11187#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11188_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011189
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011190fi
11191done
11192
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011193 fi
11194
Martin v. Löwis11437992002-04-12 09:54:03 +000011195 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11196echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11197if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11198 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011199else
Martin v. Löwis11437992002-04-12 09:54:03 +000011200 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011201LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011202cat >conftest.$ac_ext <<_ACEOF
11203#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011204#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011205
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011206/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011207#ifdef __cplusplus
11208extern "C"
11209#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011210/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011211 builtin and then its argument prototype would still apply. */
11212char usconfig ();
11213#ifdef F77_DUMMY_MAIN
11214# ifdef __cplusplus
11215 extern "C"
11216# endif
11217 int F77_DUMMY_MAIN() { return 1; }
11218#endif
11219int
11220main ()
11221{
11222usconfig ();
11223 ;
11224 return 0;
11225}
11226_ACEOF
11227rm -f conftest.$ac_objext conftest$ac_exeext
11228if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11229 (eval $ac_link) 2>&5
11230 ac_status=$?
11231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11232 (exit $ac_status); } &&
11233 { ac_try='test -s conftest$ac_exeext'
11234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11235 (eval $ac_try) 2>&5
11236 ac_status=$?
11237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11238 (exit $ac_status); }; }; then
11239 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011240else
Martin v. Löwis11437992002-04-12 09:54:03 +000011241 echo "$as_me: failed program was:" >&5
11242cat conftest.$ac_ext >&5
11243ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011244fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011245rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11246LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011247fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011248echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11249echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11250if test $ac_cv_lib_mpc_usconfig = yes; then
11251 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011252#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011253_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011254
Martin v. Löwis130fb172001-07-19 11:00:41 +000011255 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011256 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011257 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011258fi
11259
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011260
Neal Norwitza978ab02002-11-02 16:58:05 +000011261 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011262 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11263echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11264if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11265 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011266else
Martin v. Löwis11437992002-04-12 09:54:03 +000011267 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011268LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011269cat >conftest.$ac_ext <<_ACEOF
11270#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011271#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011272
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011273/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011274#ifdef __cplusplus
11275extern "C"
11276#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011277/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011278 builtin and then its argument prototype would still apply. */
11279char thr_create ();
11280#ifdef F77_DUMMY_MAIN
11281# ifdef __cplusplus
11282 extern "C"
11283# endif
11284 int F77_DUMMY_MAIN() { return 1; }
11285#endif
11286int
11287main ()
11288{
11289thr_create ();
11290 ;
11291 return 0;
11292}
11293_ACEOF
11294rm -f conftest.$ac_objext conftest$ac_exeext
11295if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11296 (eval $ac_link) 2>&5
11297 ac_status=$?
11298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11299 (exit $ac_status); } &&
11300 { ac_try='test -s conftest$ac_exeext'
11301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11302 (eval $ac_try) 2>&5
11303 ac_status=$?
11304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11305 (exit $ac_status); }; }; then
11306 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011307else
Martin v. Löwis11437992002-04-12 09:54:03 +000011308 echo "$as_me: failed program was:" >&5
11309cat conftest.$ac_ext >&5
11310ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011311fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011312rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11313LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011314fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011315echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11316echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11317if test $ac_cv_lib_thread_thr_create = yes; then
11318 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011319#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011320_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011321
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011322 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011323 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011324 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011325fi
11326
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011327 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011328
Martin v. Löwis130fb172001-07-19 11:00:41 +000011329 if test "$USE_THREAD_MODULE" != "#"
11330 then
11331 # If the above checks didn't disable threads, (at least) OSF1
11332 # needs this '-threads' argument during linking.
11333 case $ac_sys_system in
11334 OSF1) LDLAST=-threads;;
11335 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011336 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011337
11338 if test "$posix_threads" = yes -a \
11339 "$ac_sys_system" = "SunOS" -a \
11340 "$ac_sys_release" = "5.6"; then
11341
11342cat >>confdefs.h <<\_ACEOF
11343#define HAVE_PTHREAD_DESTRUCTOR 1
11344_ACEOF
11345
11346 fi
11347
Guido van Rossum627b2d71993-12-24 10:39:16 +000011348fi
11349
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011350# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011351
11352
11353echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11354echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011355# Check whether --enable-ipv6 or --disable-ipv6 was given.
11356if test "${enable_ipv6+set}" = set; then
11357 enableval="$enable_ipv6"
11358 case "$enableval" in
11359 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011360 echo "$as_me:$LINENO: result: no" >&5
11361echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011362 ipv6=no
11363 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011364 *) echo "$as_me:$LINENO: result: yes" >&5
11365echo "${ECHO_T}yes" >&6
11366 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011367#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011368_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011369
11370 ipv6=yes
11371 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011372 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011373else
Martin v. Löwis11437992002-04-12 09:54:03 +000011374
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011375 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011376 echo "$as_me:$LINENO: result: no" >&5
11377echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011378 ipv6=no
11379
11380else
Martin v. Löwis11437992002-04-12 09:54:03 +000011381 cat >conftest.$ac_ext <<_ACEOF
11382#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011383#include "confdefs.h"
11384 /* AF_INET6 available check */
11385#include <sys/types.h>
11386#include <sys/socket.h>
11387main()
11388{
11389 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11390 exit(1);
11391 else
11392 exit(0);
11393}
11394
Martin v. Löwis11437992002-04-12 09:54:03 +000011395_ACEOF
11396rm -f conftest$ac_exeext
11397if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11398 (eval $ac_link) 2>&5
11399 ac_status=$?
11400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11401 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11403 (eval $ac_try) 2>&5
11404 ac_status=$?
11405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11406 (exit $ac_status); }; }; then
11407 echo "$as_me:$LINENO: result: yes" >&5
11408echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011409 ipv6=yes
11410else
Martin v. Löwis11437992002-04-12 09:54:03 +000011411 echo "$as_me: program exited with status $ac_status" >&5
11412echo "$as_me: failed program was:" >&5
11413cat conftest.$ac_ext >&5
11414( exit $ac_status )
11415echo "$as_me:$LINENO: result: no" >&5
11416echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011417 ipv6=no
11418fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011419rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011420fi
11421
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011422if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011423 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11424echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11425 cat >conftest.$ac_ext <<_ACEOF
11426#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011427#include "confdefs.h"
11428#include <sys/types.h>
11429#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011430#ifdef F77_DUMMY_MAIN
11431# ifdef __cplusplus
11432 extern "C"
11433# endif
11434 int F77_DUMMY_MAIN() { return 1; }
11435#endif
11436int
11437main ()
11438{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011439struct sockaddr_in6 x;
11440x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011441 ;
11442 return 0;
11443}
11444_ACEOF
11445rm -f conftest.$ac_objext
11446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11447 (eval $ac_compile) 2>&5
11448 ac_status=$?
11449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11450 (exit $ac_status); } &&
11451 { ac_try='test -s conftest.$ac_objext'
11452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11453 (eval $ac_try) 2>&5
11454 ac_status=$?
11455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11456 (exit $ac_status); }; }; then
11457 echo "$as_me:$LINENO: result: yes" >&5
11458echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011459 ipv6=yes
11460else
Martin v. Löwis11437992002-04-12 09:54:03 +000011461 echo "$as_me: failed program was:" >&5
11462cat conftest.$ac_ext >&5
11463echo "$as_me:$LINENO: result: no" >&5
11464echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011465 ipv6=no
11466fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011467rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011468fi
11469
11470if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011471 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011472#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011473_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011474
11475fi
11476
Martin v. Löwis11437992002-04-12 09:54:03 +000011477fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011478
11479ipv6type=unknown
11480ipv6lib=none
11481ipv6trylibc=no
11482
11483if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011484 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11485echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011486 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11487 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011488 case $i in
11489 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011490 cat >conftest.$ac_ext <<_ACEOF
11491#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011492#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011493
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011494#include <netinet/in.h>
11495#ifdef IPV6_INRIA_VERSION
11496yes
11497#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011498_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011499if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11500 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011501 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011502fi
11503rm -f conftest*
11504
11505 ;;
11506 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011507 cat >conftest.$ac_ext <<_ACEOF
11508#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011509#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011510
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011511#include <netinet/in.h>
11512#ifdef __KAME__
11513yes
11514#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011515_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011516if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11517 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011518 ipv6type=$i;
11519 ipv6lib=inet6
11520 ipv6libdir=/usr/local/v6/lib
11521 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011522fi
11523rm -f conftest*
11524
11525 ;;
11526 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011527 cat >conftest.$ac_ext <<_ACEOF
11528#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011529#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011530
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011531#include <features.h>
11532#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11533yes
11534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011535_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011536if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11537 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011538 ipv6type=$i;
11539 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011540fi
11541rm -f conftest*
11542
11543 ;;
11544 linux-inet6)
11545 if test -d /usr/inet6; then
11546 ipv6type=$i
11547 ipv6lib=inet6
11548 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011549 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011550 fi
11551 ;;
11552 solaris)
11553 if test -f /etc/netconfig; then
11554 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11555 ipv6type=$i
11556 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011557 fi
11558 fi
11559 ;;
11560 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011561 cat >conftest.$ac_ext <<_ACEOF
11562#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011563#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011564
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011565#include <sys/param.h>
11566#ifdef _TOSHIBA_INET6
11567yes
11568#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011569_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011570if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11571 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011572 ipv6type=$i;
11573 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011574 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011575fi
11576rm -f conftest*
11577
11578 ;;
11579 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011580 cat >conftest.$ac_ext <<_ACEOF
11581#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011582#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011583
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011584#include </usr/local/v6/include/sys/v6config.h>
11585#ifdef __V6D__
11586yes
11587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011588_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011589if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11590 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011591 ipv6type=$i;
11592 ipv6lib=v6;
11593 ipv6libdir=/usr/local/v6/lib;
11594 OPT="-I/usr/local/v6/include $OPT"
11595fi
11596rm -f conftest*
11597
11598 ;;
11599 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011600 cat >conftest.$ac_ext <<_ACEOF
11601#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011602#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011603
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011604#include <sys/param.h>
11605#ifdef _ZETA_MINAMI_INET6
11606yes
11607#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011608_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011609if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11610 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011611 ipv6type=$i;
11612 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011613 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011614fi
11615rm -f conftest*
11616
11617 ;;
11618 esac
11619 if test "$ipv6type" != "unknown"; then
11620 break
11621 fi
11622 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011623 echo "$as_me:$LINENO: result: $ipv6type" >&5
11624echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011625fi
11626
11627if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11628 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11629 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11630 echo "using lib$ipv6lib"
11631 else
11632 if test $ipv6trylibc = "yes"; then
11633 echo "using libc"
11634 else
11635 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11636 echo "You need to fetch lib$ipv6lib.a from appropriate"
11637 echo 'ipv6 kit and compile beforehand.'
11638 exit 1
11639 fi
11640 fi
11641fi
11642
Jack Jansen7b8c7542002-04-14 20:12:41 +000011643# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011644echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11645echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011646
11647# Check whether --with-universal-newlines or --without-universal-newlines was given.
11648if test "${with_universal_newlines+set}" = set; then
11649 withval="$with_universal_newlines"
11650
11651fi;
11652
11653if test -z "$with_universal_newlines"
11654then with_universal_newlines="yes"
11655fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011656if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011657then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011658 echo --without-universal-newlines is unsupported, see README
11659 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011660else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011661
11662cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011663#define WITH_UNIVERSAL_NEWLINES 1
11664_ACEOF
11665
11666fi
11667echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11668echo "${ECHO_T}$with_universal_newlines" >&6
11669
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011670# Check for --with-doc-strings
11671echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11672echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11673
11674# Check whether --with-doc-strings or --without-doc-strings was given.
11675if test "${with_doc_strings+set}" = set; then
11676 withval="$with_doc_strings"
11677
11678fi;
11679
11680if test -z "$with_doc_strings"
11681then with_doc_strings="yes"
11682fi
11683if test "$with_doc_strings" != "no"
11684then
11685
11686cat >>confdefs.h <<\_ACEOF
11687#define WITH_DOC_STRINGS 1
11688_ACEOF
11689
11690fi
11691echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11692echo "${ECHO_T}$with_doc_strings" >&6
11693
Neil Schemenauera35c6882001-02-27 04:45:05 +000011694# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011695echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11696echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11697
Neil Schemenauera35c6882001-02-27 04:45:05 +000011698# Check whether --with-pymalloc or --without-pymalloc was given.
11699if test "${with_pymalloc+set}" = set; then
11700 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011701
Martin v. Löwis11437992002-04-12 09:54:03 +000011702fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011703
Neil Schemenauer16c22972002-03-22 15:34:49 +000011704if test -z "$with_pymalloc"
11705then with_pymalloc="yes"
11706fi
11707if test "$with_pymalloc" != "no"
11708then
Martin v. Löwis11437992002-04-12 09:54:03 +000011709
11710cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011711#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011712_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011713
11714fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011715echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11716echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011717
Barry Warsawef82cd72000-06-30 16:21:01 +000011718# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011719echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11720echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11721
Barry Warsawef82cd72000-06-30 16:21:01 +000011722# Check whether --with-wctype-functions or --without-wctype-functions was given.
11723if test "${with_wctype_functions+set}" = set; then
11724 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011725
Barry Warsawef82cd72000-06-30 16:21:01 +000011726if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011727then
11728
11729cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011730#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011731_ACEOF
11732
11733 echo "$as_me:$LINENO: result: yes" >&5
11734echo "${ECHO_T}yes" >&6
11735else echo "$as_me:$LINENO: result: no" >&5
11736echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011737fi
11738else
Martin v. Löwis11437992002-04-12 09:54:03 +000011739 echo "$as_me:$LINENO: result: no" >&5
11740echo "${ECHO_T}no" >&6
11741fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011742
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011743# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011744
Guido van Rossum98935bf2001-09-05 19:13:16 +000011745DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011746
Martin v. Löwis11437992002-04-12 09:54:03 +000011747echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11748echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11749
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011750# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011751if test "${with_sgi_dl+set}" = set; then
11752 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011753
11754echo "$as_me:$LINENO: result: $withval" >&5
11755echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011756echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011757exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011758
11759cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011760#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011761_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011762
Guido van Rossume97ee181999-12-20 21:27:22 +000011763DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011764dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011765if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011766then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011767else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11768echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11769 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011770fi
11771DLINCLDIR=${dldir}
11772LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011773else
Martin v. Löwis11437992002-04-12 09:54:03 +000011774 echo "$as_me:$LINENO: result: no" >&5
11775echo "${ECHO_T}no" >&6
11776fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011777
Martin v. Löwis11437992002-04-12 09:54:03 +000011778echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11779echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011780
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011781# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011782if test "${with_dl_dld+set}" = set; then
11783 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011784
11785echo "$as_me:$LINENO: result: $withval" >&5
11786echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011787echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011788exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011789
11790cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011791#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011792_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011793
Guido van Rossume97ee181999-12-20 21:27:22 +000011794DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011795dldir=`echo "$withval" | sed 's/,.*//'`
11796dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011797if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011798then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011799else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
11800echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
11801 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011802fi
11803DLINCLDIR=${dldir}
11804LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011805else
Martin v. Löwis11437992002-04-12 09:54:03 +000011806 echo "$as_me:$LINENO: result: no" >&5
11807echo "${ECHO_T}no" >&6
11808fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011809
Guido van Rossume97ee181999-12-20 21:27:22 +000011810# the dlopen() function means we might want to use dynload_shlib.o. some
11811# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011812
Thomas Wouters3a584202000-08-05 23:28:51 +000011813for ac_func in dlopen
11814do
Martin v. Löwis11437992002-04-12 09:54:03 +000011815as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11816echo "$as_me:$LINENO: checking for $ac_func" >&5
11817echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11818if eval "test \"\${$as_ac_var+set}\" = set"; then
11819 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011820else
Martin v. Löwis11437992002-04-12 09:54:03 +000011821 cat >conftest.$ac_ext <<_ACEOF
11822#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011823#include "confdefs.h"
11824/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011825 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011826#include <assert.h>
11827/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011828#ifdef __cplusplus
11829extern "C"
11830#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011831/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011832 builtin and then its argument prototype would still apply. */
11833char $ac_func ();
11834char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011835
Martin v. Löwis11437992002-04-12 09:54:03 +000011836#ifdef F77_DUMMY_MAIN
11837# ifdef __cplusplus
11838 extern "C"
11839# endif
11840 int F77_DUMMY_MAIN() { return 1; }
11841#endif
11842int
11843main ()
11844{
Guido van Rossume97ee181999-12-20 21:27:22 +000011845/* The GNU C library defines this for functions which it implements
11846 to always fail with ENOSYS. Some functions are actually named
11847 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011848#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011849choke me
11850#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011851f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011852#endif
11853
Martin v. Löwis11437992002-04-12 09:54:03 +000011854 ;
11855 return 0;
11856}
11857_ACEOF
11858rm -f conftest.$ac_objext conftest$ac_exeext
11859if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11860 (eval $ac_link) 2>&5
11861 ac_status=$?
11862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11863 (exit $ac_status); } &&
11864 { ac_try='test -s conftest$ac_exeext'
11865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11866 (eval $ac_try) 2>&5
11867 ac_status=$?
11868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11869 (exit $ac_status); }; }; then
11870 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011871else
Martin v. Löwis11437992002-04-12 09:54:03 +000011872 echo "$as_me: failed program was:" >&5
11873cat conftest.$ac_ext >&5
11874eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011875fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011876rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011877fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011878echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11879echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11880if test `eval echo '${'$as_ac_var'}'` = yes; then
11881 cat >>confdefs.h <<_ACEOF
11882#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11883_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011884
Guido van Rossume97ee181999-12-20 21:27:22 +000011885fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011886done
Guido van Rossume97ee181999-12-20 21:27:22 +000011887
Michael W. Hudson54241132001-12-07 15:38:26 +000011888
Guido van Rossume97ee181999-12-20 21:27:22 +000011889# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11890# loading of modules.
11891
Martin v. Löwis11437992002-04-12 09:54:03 +000011892echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11893echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011894if test -z "$DYNLOADFILE"
11895then
11896 case $ac_sys_system/$ac_sys_release in
11897 AIX*) DYNLOADFILE="dynload_aix.o";;
11898 BeOS*) DYNLOADFILE="dynload_beos.o";;
11899 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011900 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011901 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011902 *)
11903 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11904 # out any dynamic loading
11905 if test "$ac_cv_func_dlopen" = yes
11906 then DYNLOADFILE="dynload_shlib.o"
11907 else DYNLOADFILE="dynload_stub.o"
11908 fi
11909 ;;
11910 esac
11911fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011912echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11913echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011914if test "$DYNLOADFILE" != "dynload_stub.o"
11915then
Martin v. Löwis11437992002-04-12 09:54:03 +000011916
11917cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011918#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011919_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011920
11921fi
11922
Neil Schemenauer4e425612001-06-19 15:44:15 +000011923# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11924
Michael W. Hudson54241132001-12-07 15:38:26 +000011925
Martin v. Löwis11437992002-04-12 09:54:03 +000011926echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11927echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011928if test -z "$MACHDEP_OBJS"
11929then
Jack Jansene578a632001-08-15 01:27:14 +000011930 MACHDEP_OBJS=$extra_machdep_objs
11931else
11932 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011933fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011934echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11935echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011936
Guido van Rossum627b2d71993-12-24 10:39:16 +000011937# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
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
Martin v. Löwisd5843682002-11-21 20:41:28 +000012011for ac_func in alarm chown clock confstr ctermid execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000012012 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000012013 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012014 hstrerror inet_pton kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012015 mremap nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000012016 putenv readlink \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012017 select setegid seteuid setgid \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000012018 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012019 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012020 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000012021 truncate uname unsetenv utimes waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000012022do
Martin v. Löwis11437992002-04-12 09:54:03 +000012023as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12024echo "$as_me:$LINENO: checking for $ac_func" >&5
12025echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12026if eval "test \"\${$as_ac_var+set}\" = set"; then
12027 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012028else
Martin v. Löwis11437992002-04-12 09:54:03 +000012029 cat >conftest.$ac_ext <<_ACEOF
12030#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012031#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012032/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012033 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012034#include <assert.h>
12035/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012036#ifdef __cplusplus
12037extern "C"
12038#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012039/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012040 builtin and then its argument prototype would still apply. */
12041char $ac_func ();
12042char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012043
Martin v. Löwis11437992002-04-12 09:54:03 +000012044#ifdef F77_DUMMY_MAIN
12045# ifdef __cplusplus
12046 extern "C"
12047# endif
12048 int F77_DUMMY_MAIN() { return 1; }
12049#endif
12050int
12051main ()
12052{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012053/* The GNU C library defines this for functions which it implements
12054 to always fail with ENOSYS. Some functions are actually named
12055 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012056#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012057choke me
12058#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012059f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012060#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012061
Martin v. Löwis11437992002-04-12 09:54:03 +000012062 ;
12063 return 0;
12064}
12065_ACEOF
12066rm -f conftest.$ac_objext conftest$ac_exeext
12067if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12068 (eval $ac_link) 2>&5
12069 ac_status=$?
12070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12071 (exit $ac_status); } &&
12072 { ac_try='test -s conftest$ac_exeext'
12073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12074 (eval $ac_try) 2>&5
12075 ac_status=$?
12076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12077 (exit $ac_status); }; }; then
12078 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012079else
Martin v. Löwis11437992002-04-12 09:54:03 +000012080 echo "$as_me: failed program was:" >&5
12081cat conftest.$ac_ext >&5
12082eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012084rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012085fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012086echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12087echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12088if test `eval echo '${'$as_ac_var'}'` = yes; then
12089 cat >>confdefs.h <<_ACEOF
12090#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12091_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012092
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012093fi
12094done
12095
Michael W. Hudson54241132001-12-07 15:38:26 +000012096
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012097# For some functions, having a definition is not sufficient, since
12098# we want to take their address.
12099echo "$as_me:$LINENO: checking for chroot" >&5
12100echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12101cat >conftest.$ac_ext <<_ACEOF
12102#line $LINENO "configure"
12103#include "confdefs.h"
12104#include <unistd.h>
12105#ifdef F77_DUMMY_MAIN
12106# ifdef __cplusplus
12107 extern "C"
12108# endif
12109 int F77_DUMMY_MAIN() { return 1; }
12110#endif
12111int
12112main ()
12113{
12114void *x=chroot
12115 ;
12116 return 0;
12117}
12118_ACEOF
12119rm -f conftest.$ac_objext
12120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12121 (eval $ac_compile) 2>&5
12122 ac_status=$?
12123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12124 (exit $ac_status); } &&
12125 { ac_try='test -s conftest.$ac_objext'
12126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12127 (eval $ac_try) 2>&5
12128 ac_status=$?
12129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12130 (exit $ac_status); }; }; then
12131
12132cat >>confdefs.h <<\_ACEOF
12133#define HAVE_CHROOT 1
12134_ACEOF
12135
12136 echo "$as_me:$LINENO: result: yes" >&5
12137echo "${ECHO_T}yes" >&6
12138else
12139 echo "$as_me: failed program was:" >&5
12140cat conftest.$ac_ext >&5
12141echo "$as_me:$LINENO: result: no" >&5
12142echo "${ECHO_T}no" >&6
12143
12144fi
12145rm -f conftest.$ac_objext conftest.$ac_ext
12146echo "$as_me:$LINENO: checking for link" >&5
12147echo $ECHO_N "checking for link... $ECHO_C" >&6
12148cat >conftest.$ac_ext <<_ACEOF
12149#line $LINENO "configure"
12150#include "confdefs.h"
12151#include <unistd.h>
12152#ifdef F77_DUMMY_MAIN
12153# ifdef __cplusplus
12154 extern "C"
12155# endif
12156 int F77_DUMMY_MAIN() { return 1; }
12157#endif
12158int
12159main ()
12160{
12161void *x=link
12162 ;
12163 return 0;
12164}
12165_ACEOF
12166rm -f conftest.$ac_objext
12167if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12168 (eval $ac_compile) 2>&5
12169 ac_status=$?
12170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12171 (exit $ac_status); } &&
12172 { ac_try='test -s conftest.$ac_objext'
12173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12174 (eval $ac_try) 2>&5
12175 ac_status=$?
12176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12177 (exit $ac_status); }; }; then
12178
12179cat >>confdefs.h <<\_ACEOF
12180#define HAVE_LINK 1
12181_ACEOF
12182
12183 echo "$as_me:$LINENO: result: yes" >&5
12184echo "${ECHO_T}yes" >&6
12185else
12186 echo "$as_me: failed program was:" >&5
12187cat conftest.$ac_ext >&5
12188echo "$as_me:$LINENO: result: no" >&5
12189echo "${ECHO_T}no" >&6
12190
12191fi
12192rm -f conftest.$ac_objext conftest.$ac_ext
12193echo "$as_me:$LINENO: checking for symlink" >&5
12194echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12195cat >conftest.$ac_ext <<_ACEOF
12196#line $LINENO "configure"
12197#include "confdefs.h"
12198#include <unistd.h>
12199#ifdef F77_DUMMY_MAIN
12200# ifdef __cplusplus
12201 extern "C"
12202# endif
12203 int F77_DUMMY_MAIN() { return 1; }
12204#endif
12205int
12206main ()
12207{
12208void *x=symlink
12209 ;
12210 return 0;
12211}
12212_ACEOF
12213rm -f conftest.$ac_objext
12214if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12215 (eval $ac_compile) 2>&5
12216 ac_status=$?
12217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12218 (exit $ac_status); } &&
12219 { ac_try='test -s conftest.$ac_objext'
12220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12221 (eval $ac_try) 2>&5
12222 ac_status=$?
12223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12224 (exit $ac_status); }; }; then
12225
12226cat >>confdefs.h <<\_ACEOF
12227#define HAVE_SYMLINK 1
12228_ACEOF
12229
12230 echo "$as_me:$LINENO: result: yes" >&5
12231echo "${ECHO_T}yes" >&6
12232else
12233 echo "$as_me: failed program was:" >&5
12234cat conftest.$ac_ext >&5
12235echo "$as_me:$LINENO: result: no" >&5
12236echo "${ECHO_T}no" >&6
12237
12238fi
12239rm -f conftest.$ac_objext conftest.$ac_ext
12240
Martin v. Löwisd5843682002-11-21 20:41:28 +000012241# On some systems (eg. FreeBSD 5), we would find a definition of the
12242# functions ctermid_r, setgroups in the library, but no prototype
12243# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12244# address to avoid compiler warnings and potential miscompilations
12245# because of the missing prototypes.
12246
12247echo "$as_me:$LINENO: checking for ctermid_r" >&5
12248echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12249cat >conftest.$ac_ext <<_ACEOF
12250#line $LINENO "configure"
12251#include "confdefs.h"
12252
12253#include "confdefs.h"
12254#include <stdio.h>
12255
12256#ifdef F77_DUMMY_MAIN
12257# ifdef __cplusplus
12258 extern "C"
12259# endif
12260 int F77_DUMMY_MAIN() { return 1; }
12261#endif
12262int
12263main ()
12264{
12265void* p = ctermid_r
12266 ;
12267 return 0;
12268}
12269_ACEOF
12270rm -f conftest.$ac_objext
12271if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12272 (eval $ac_compile) 2>&5
12273 ac_status=$?
12274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12275 (exit $ac_status); } &&
12276 { ac_try='test -s conftest.$ac_objext'
12277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12278 (eval $ac_try) 2>&5
12279 ac_status=$?
12280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12281 (exit $ac_status); }; }; then
12282
12283cat >>confdefs.h <<\_ACEOF
12284#define HAVE_CTERMID_R 1
12285_ACEOF
12286
12287 echo "$as_me:$LINENO: result: yes" >&5
12288echo "${ECHO_T}yes" >&6
12289else
12290 echo "$as_me: failed program was:" >&5
12291cat conftest.$ac_ext >&5
12292echo "$as_me:$LINENO: result: no" >&5
12293echo "${ECHO_T}no" >&6
12294
12295fi
12296rm -f conftest.$ac_objext conftest.$ac_ext
12297
12298echo "$as_me:$LINENO: checking for setgroups" >&5
12299echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
12300cat >conftest.$ac_ext <<_ACEOF
12301#line $LINENO "configure"
12302#include "confdefs.h"
12303
12304#include "confdefs.h"
12305#include <unistd.h.h>
12306
12307#ifdef F77_DUMMY_MAIN
12308# ifdef __cplusplus
12309 extern "C"
12310# endif
12311 int F77_DUMMY_MAIN() { return 1; }
12312#endif
12313int
12314main ()
12315{
12316void* p = setgroups
12317 ;
12318 return 0;
12319}
12320_ACEOF
12321rm -f conftest.$ac_objext
12322if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12323 (eval $ac_compile) 2>&5
12324 ac_status=$?
12325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12326 (exit $ac_status); } &&
12327 { ac_try='test -s conftest.$ac_objext'
12328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12329 (eval $ac_try) 2>&5
12330 ac_status=$?
12331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12332 (exit $ac_status); }; }; then
12333
12334cat >>confdefs.h <<\_ACEOF
12335#define HAVE_SETGROUPS 1
12336_ACEOF
12337
12338 echo "$as_me:$LINENO: result: yes" >&5
12339echo "${ECHO_T}yes" >&6
12340else
12341 echo "$as_me: failed program was:" >&5
12342cat conftest.$ac_ext >&5
12343echo "$as_me:$LINENO: result: no" >&5
12344echo "${ECHO_T}no" >&6
12345
12346fi
12347rm -f conftest.$ac_objext conftest.$ac_ext
12348
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012349# check for openpty and forkpty
12350
Martin v. Löwis11437992002-04-12 09:54:03 +000012351
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012352for ac_func in openpty
12353do
Martin v. Löwis11437992002-04-12 09:54:03 +000012354as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12355echo "$as_me:$LINENO: checking for $ac_func" >&5
12356echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12357if eval "test \"\${$as_ac_var+set}\" = set"; then
12358 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012359else
Martin v. Löwis11437992002-04-12 09:54:03 +000012360 cat >conftest.$ac_ext <<_ACEOF
12361#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012362#include "confdefs.h"
12363/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012364 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012365#include <assert.h>
12366/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012367#ifdef __cplusplus
12368extern "C"
12369#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012370/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012371 builtin and then its argument prototype would still apply. */
12372char $ac_func ();
12373char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012374
Martin v. Löwis11437992002-04-12 09:54:03 +000012375#ifdef F77_DUMMY_MAIN
12376# ifdef __cplusplus
12377 extern "C"
12378# endif
12379 int F77_DUMMY_MAIN() { return 1; }
12380#endif
12381int
12382main ()
12383{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012384/* The GNU C library defines this for functions which it implements
12385 to always fail with ENOSYS. Some functions are actually named
12386 something starting with __ and the normal name is an alias. */
12387#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12388choke me
12389#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012390f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012391#endif
12392
Martin v. Löwis11437992002-04-12 09:54:03 +000012393 ;
12394 return 0;
12395}
12396_ACEOF
12397rm -f conftest.$ac_objext conftest$ac_exeext
12398if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12399 (eval $ac_link) 2>&5
12400 ac_status=$?
12401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12402 (exit $ac_status); } &&
12403 { ac_try='test -s conftest$ac_exeext'
12404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12405 (eval $ac_try) 2>&5
12406 ac_status=$?
12407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12408 (exit $ac_status); }; }; then
12409 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012410else
Martin v. Löwis11437992002-04-12 09:54:03 +000012411 echo "$as_me: failed program was:" >&5
12412cat conftest.$ac_ext >&5
12413eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012414fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012415rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012416fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012417echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12418echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12419if test `eval echo '${'$as_ac_var'}'` = yes; then
12420 cat >>confdefs.h <<_ACEOF
12421#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12422_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012423
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012424else
Martin v. Löwis11437992002-04-12 09:54:03 +000012425 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
12426echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
12427if test "${ac_cv_lib_util_openpty+set}" = set; then
12428 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012429else
Martin v. Löwis11437992002-04-12 09:54:03 +000012430 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012431LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012432cat >conftest.$ac_ext <<_ACEOF
12433#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012434#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012435
Fred Drake8cef4cf2000-06-28 16:40:38 +000012436/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012437#ifdef __cplusplus
12438extern "C"
12439#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012440/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012441 builtin and then its argument prototype would still apply. */
12442char openpty ();
12443#ifdef F77_DUMMY_MAIN
12444# ifdef __cplusplus
12445 extern "C"
12446# endif
12447 int F77_DUMMY_MAIN() { return 1; }
12448#endif
12449int
12450main ()
12451{
12452openpty ();
12453 ;
12454 return 0;
12455}
12456_ACEOF
12457rm -f conftest.$ac_objext conftest$ac_exeext
12458if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12459 (eval $ac_link) 2>&5
12460 ac_status=$?
12461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12462 (exit $ac_status); } &&
12463 { ac_try='test -s conftest$ac_exeext'
12464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12465 (eval $ac_try) 2>&5
12466 ac_status=$?
12467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12468 (exit $ac_status); }; }; then
12469 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012470else
Martin v. Löwis11437992002-04-12 09:54:03 +000012471 echo "$as_me: failed program was:" >&5
12472cat conftest.$ac_ext >&5
12473ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012474fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012475rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12476LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012477fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012478echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
12479echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
12480if test $ac_cv_lib_util_openpty = yes; then
12481 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012482#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012483_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012484 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012485fi
12486
12487fi
12488done
12489
Martin v. Löwis11437992002-04-12 09:54:03 +000012490
Fred Drake8cef4cf2000-06-28 16:40:38 +000012491for ac_func in forkpty
12492do
Martin v. Löwis11437992002-04-12 09:54:03 +000012493as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12494echo "$as_me:$LINENO: checking for $ac_func" >&5
12495echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12496if eval "test \"\${$as_ac_var+set}\" = set"; then
12497 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012498else
Martin v. Löwis11437992002-04-12 09:54:03 +000012499 cat >conftest.$ac_ext <<_ACEOF
12500#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012501#include "confdefs.h"
12502/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012503 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000012504#include <assert.h>
12505/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012506#ifdef __cplusplus
12507extern "C"
12508#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012509/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012510 builtin and then its argument prototype would still apply. */
12511char $ac_func ();
12512char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000012513
Martin v. Löwis11437992002-04-12 09:54:03 +000012514#ifdef F77_DUMMY_MAIN
12515# ifdef __cplusplus
12516 extern "C"
12517# endif
12518 int F77_DUMMY_MAIN() { return 1; }
12519#endif
12520int
12521main ()
12522{
Fred Drake8cef4cf2000-06-28 16:40:38 +000012523/* The GNU C library defines this for functions which it implements
12524 to always fail with ENOSYS. Some functions are actually named
12525 something starting with __ and the normal name is an alias. */
12526#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12527choke me
12528#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012529f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000012530#endif
12531
Martin v. Löwis11437992002-04-12 09:54:03 +000012532 ;
12533 return 0;
12534}
12535_ACEOF
12536rm -f conftest.$ac_objext conftest$ac_exeext
12537if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12538 (eval $ac_link) 2>&5
12539 ac_status=$?
12540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12541 (exit $ac_status); } &&
12542 { ac_try='test -s conftest$ac_exeext'
12543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12544 (eval $ac_try) 2>&5
12545 ac_status=$?
12546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12547 (exit $ac_status); }; }; then
12548 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012549else
Martin v. Löwis11437992002-04-12 09:54:03 +000012550 echo "$as_me: failed program was:" >&5
12551cat conftest.$ac_ext >&5
12552eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012553fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012554rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012555fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012556echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12557echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12558if test `eval echo '${'$as_ac_var'}'` = yes; then
12559 cat >>confdefs.h <<_ACEOF
12560#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12561_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012562
Fred Drake8cef4cf2000-06-28 16:40:38 +000012563else
Martin v. Löwis11437992002-04-12 09:54:03 +000012564 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
12565echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
12566if test "${ac_cv_lib_util_forkpty+set}" = set; then
12567 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012568else
Martin v. Löwis11437992002-04-12 09:54:03 +000012569 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012570LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012571cat >conftest.$ac_ext <<_ACEOF
12572#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012573#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012574
Fred Drake8cef4cf2000-06-28 16:40:38 +000012575/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012576#ifdef __cplusplus
12577extern "C"
12578#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012579/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012580 builtin and then its argument prototype would still apply. */
12581char forkpty ();
12582#ifdef F77_DUMMY_MAIN
12583# ifdef __cplusplus
12584 extern "C"
12585# endif
12586 int F77_DUMMY_MAIN() { return 1; }
12587#endif
12588int
12589main ()
12590{
12591forkpty ();
12592 ;
12593 return 0;
12594}
12595_ACEOF
12596rm -f conftest.$ac_objext conftest$ac_exeext
12597if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12598 (eval $ac_link) 2>&5
12599 ac_status=$?
12600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12601 (exit $ac_status); } &&
12602 { ac_try='test -s conftest$ac_exeext'
12603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12604 (eval $ac_try) 2>&5
12605 ac_status=$?
12606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12607 (exit $ac_status); }; }; then
12608 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012609else
Martin v. Löwis11437992002-04-12 09:54:03 +000012610 echo "$as_me: failed program was:" >&5
12611cat conftest.$ac_ext >&5
12612ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012613fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012614rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12615LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012616fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012617echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
12618echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
12619if test $ac_cv_lib_util_forkpty = yes; then
12620 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012621#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012622_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012623 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012624fi
12625
12626fi
12627done
12628
Jack Jansendd19cf82001-12-06 22:36:17 +000012629
Michael W. Hudson54241132001-12-07 15:38:26 +000012630# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012631
12632
12633
12634
12635
12636
Fred Drake8cef4cf2000-06-28 16:40:38 +000012637for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
12638do
Martin v. Löwis11437992002-04-12 09:54:03 +000012639as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12640echo "$as_me:$LINENO: checking for $ac_func" >&5
12641echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12642if eval "test \"\${$as_ac_var+set}\" = set"; then
12643 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012644else
Martin v. Löwis11437992002-04-12 09:54:03 +000012645 cat >conftest.$ac_ext <<_ACEOF
12646#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012647#include "confdefs.h"
12648/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012649 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012650#include <assert.h>
12651/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012652#ifdef __cplusplus
12653extern "C"
12654#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012655/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 builtin and then its argument prototype would still apply. */
12657char $ac_func ();
12658char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012659
Martin v. Löwis11437992002-04-12 09:54:03 +000012660#ifdef F77_DUMMY_MAIN
12661# ifdef __cplusplus
12662 extern "C"
12663# endif
12664 int F77_DUMMY_MAIN() { return 1; }
12665#endif
12666int
12667main ()
12668{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012669/* The GNU C library defines this for functions which it implements
12670 to always fail with ENOSYS. Some functions are actually named
12671 something starting with __ and the normal name is an alias. */
12672#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12673choke me
12674#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012675f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012676#endif
12677
Martin v. Löwis11437992002-04-12 09:54:03 +000012678 ;
12679 return 0;
12680}
12681_ACEOF
12682rm -f conftest.$ac_objext conftest$ac_exeext
12683if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12684 (eval $ac_link) 2>&5
12685 ac_status=$?
12686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12687 (exit $ac_status); } &&
12688 { ac_try='test -s conftest$ac_exeext'
12689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12690 (eval $ac_try) 2>&5
12691 ac_status=$?
12692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12693 (exit $ac_status); }; }; then
12694 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012695else
Martin v. Löwis11437992002-04-12 09:54:03 +000012696 echo "$as_me: failed program was:" >&5
12697cat conftest.$ac_ext >&5
12698eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012699fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012700rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012701fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012702echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12703echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12704if test `eval echo '${'$as_ac_var'}'` = yes; then
12705 cat >>confdefs.h <<_ACEOF
12706#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12707_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012708
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012709fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012710done
12711
Michael W. Hudson54241132001-12-07 15:38:26 +000012712
Martin v. Löwis11437992002-04-12 09:54:03 +000012713
12714
12715
12716
12717
Martin v. Löwis1142de32002-03-29 16:28:31 +000012718for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000012719do
Martin v. Löwis11437992002-04-12 09:54:03 +000012720as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12721echo "$as_me:$LINENO: checking for $ac_func" >&5
12722echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12723if eval "test \"\${$as_ac_var+set}\" = set"; then
12724 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012725else
Martin v. Löwis11437992002-04-12 09:54:03 +000012726 cat >conftest.$ac_ext <<_ACEOF
12727#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012728#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012729/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012730 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012731#include <assert.h>
12732/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012733#ifdef __cplusplus
12734extern "C"
12735#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012736/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012737 builtin and then its argument prototype would still apply. */
12738char $ac_func ();
12739char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012740
Martin v. Löwis11437992002-04-12 09:54:03 +000012741#ifdef F77_DUMMY_MAIN
12742# ifdef __cplusplus
12743 extern "C"
12744# endif
12745 int F77_DUMMY_MAIN() { return 1; }
12746#endif
12747int
12748main ()
12749{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012750/* The GNU C library defines this for functions which it implements
12751 to always fail with ENOSYS. Some functions are actually named
12752 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012753#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012754choke me
12755#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012756f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012757#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012758
Martin v. Löwis11437992002-04-12 09:54:03 +000012759 ;
12760 return 0;
12761}
12762_ACEOF
12763rm -f conftest.$ac_objext conftest$ac_exeext
12764if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12765 (eval $ac_link) 2>&5
12766 ac_status=$?
12767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12768 (exit $ac_status); } &&
12769 { ac_try='test -s conftest$ac_exeext'
12770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12771 (eval $ac_try) 2>&5
12772 ac_status=$?
12773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12774 (exit $ac_status); }; }; then
12775 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012776else
Martin v. Löwis11437992002-04-12 09:54:03 +000012777 echo "$as_me: failed program was:" >&5
12778cat conftest.$ac_ext >&5
12779eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012780fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012781rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000012782fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012783echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12784echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12785if test `eval echo '${'$as_ac_var'}'` = yes; then
12786 cat >>confdefs.h <<_ACEOF
12787#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12788_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000012789
Martin v. Löwis1142de32002-03-29 16:28:31 +000012790else
Martin v. Löwis11437992002-04-12 09:54:03 +000012791 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012792fi
12793done
12794
12795
Martin v. Löwis11437992002-04-12 09:54:03 +000012796
Martin v. Löwis1142de32002-03-29 16:28:31 +000012797for ac_func in getpgrp
12798do
Martin v. Löwis11437992002-04-12 09:54:03 +000012799as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12800echo "$as_me:$LINENO: checking for $ac_func" >&5
12801echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12802if eval "test \"\${$as_ac_var+set}\" = set"; then
12803 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000012804else
Martin v. Löwis11437992002-04-12 09:54:03 +000012805 cat >conftest.$ac_ext <<_ACEOF
12806#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012807#include "confdefs.h"
12808/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012809 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000012810#include <assert.h>
12811/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012812#ifdef __cplusplus
12813extern "C"
12814#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012815/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012816 builtin and then its argument prototype would still apply. */
12817char $ac_func ();
12818char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012819
Martin v. Löwis11437992002-04-12 09:54:03 +000012820#ifdef F77_DUMMY_MAIN
12821# ifdef __cplusplus
12822 extern "C"
12823# endif
12824 int F77_DUMMY_MAIN() { return 1; }
12825#endif
12826int
12827main ()
12828{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012829/* The GNU C library defines this for functions which it implements
12830 to always fail with ENOSYS. Some functions are actually named
12831 something starting with __ and the normal name is an alias. */
12832#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12833choke me
12834#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012835f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012836#endif
12837
Martin v. Löwis11437992002-04-12 09:54:03 +000012838 ;
12839 return 0;
12840}
12841_ACEOF
12842rm -f conftest.$ac_objext conftest$ac_exeext
12843if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12844 (eval $ac_link) 2>&5
12845 ac_status=$?
12846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12847 (exit $ac_status); } &&
12848 { ac_try='test -s conftest$ac_exeext'
12849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12850 (eval $ac_try) 2>&5
12851 ac_status=$?
12852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12853 (exit $ac_status); }; }; then
12854 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012855else
Martin v. Löwis11437992002-04-12 09:54:03 +000012856 echo "$as_me: failed program was:" >&5
12857cat conftest.$ac_ext >&5
12858eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012859fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012860rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012861fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012862echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12863echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12864if test `eval echo '${'$as_ac_var'}'` = yes; then
12865 cat >>confdefs.h <<_ACEOF
12866#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12867_ACEOF
12868 cat >conftest.$ac_ext <<_ACEOF
12869#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012870#include "confdefs.h"
12871#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012872#ifdef F77_DUMMY_MAIN
12873# ifdef __cplusplus
12874 extern "C"
12875# endif
12876 int F77_DUMMY_MAIN() { return 1; }
12877#endif
12878int
12879main ()
12880{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012881getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012882 ;
12883 return 0;
12884}
12885_ACEOF
12886rm -f conftest.$ac_objext
12887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12888 (eval $ac_compile) 2>&5
12889 ac_status=$?
12890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12891 (exit $ac_status); } &&
12892 { ac_try='test -s conftest.$ac_objext'
12893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12894 (eval $ac_try) 2>&5
12895 ac_status=$?
12896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12897 (exit $ac_status); }; }; then
12898
12899cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012900#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012901_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012902
Martin v. Löwis11437992002-04-12 09:54:03 +000012903
Guido van Rossumf78abae1997-01-21 22:02:36 +000012904else
Martin v. Löwis11437992002-04-12 09:54:03 +000012905 echo "$as_me: failed program was:" >&5
12906cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012907fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012908rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012909
Guido van Rossum627b2d71993-12-24 10:39:16 +000012910fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012911done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012912
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012913echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12914echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12915if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012916 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012917else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012918 if test "$cross_compiling" = yes; then
12919 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12920echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12921 { (exit 1); exit 1; }; }
12922else
Martin v. Löwis11437992002-04-12 09:54:03 +000012923 cat >conftest.$ac_ext <<_ACEOF
12924#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012925#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012926#if HAVE_UNISTD_H
12927# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012928#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012929
Martin v. Löwis11437992002-04-12 09:54:03 +000012930#ifdef F77_DUMMY_MAIN
12931# ifdef __cplusplus
12932 extern "C"
12933# endif
12934 int F77_DUMMY_MAIN() { return 1; }
12935#endif
12936int
12937main ()
12938{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012939/* If this system has a BSD-style setpgrp which takes arguments,
12940 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12941 exit successfully. */
12942 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012943 ;
12944 return 0;
12945}
12946_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012947rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012948if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12949 (eval $ac_link) 2>&5
12950 ac_status=$?
12951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012952 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12954 (eval $ac_try) 2>&5
12955 ac_status=$?
12956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12957 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012958 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012959else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012960 echo "$as_me: program exited with status $ac_status" >&5
12961echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012962cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012963( exit $ac_status )
12964ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012965fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012966rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012967fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012968fi
12969echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12970echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12971if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012972
12973cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012974#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012975_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012976
12977fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012978
Martin v. Löwis11437992002-04-12 09:54:03 +000012979
Thomas Wouters3a584202000-08-05 23:28:51 +000012980for ac_func in gettimeofday
12981do
Martin v. Löwis11437992002-04-12 09:54:03 +000012982as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12983echo "$as_me:$LINENO: checking for $ac_func" >&5
12984echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12985if eval "test \"\${$as_ac_var+set}\" = set"; then
12986 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012987else
Martin v. Löwis11437992002-04-12 09:54:03 +000012988 cat >conftest.$ac_ext <<_ACEOF
12989#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012990#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012991/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012992 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012993#include <assert.h>
12994/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012995#ifdef __cplusplus
12996extern "C"
12997#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012998/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012999 builtin and then its argument prototype would still apply. */
13000char $ac_func ();
13001char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013002
Martin v. Löwis11437992002-04-12 09:54:03 +000013003#ifdef F77_DUMMY_MAIN
13004# ifdef __cplusplus
13005 extern "C"
13006# endif
13007 int F77_DUMMY_MAIN() { return 1; }
13008#endif
13009int
13010main ()
13011{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013012/* The GNU C library defines this for functions which it implements
13013 to always fail with ENOSYS. Some functions are actually named
13014 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013015#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013016choke me
13017#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013018f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013019#endif
13020
Martin v. Löwis11437992002-04-12 09:54:03 +000013021 ;
13022 return 0;
13023}
13024_ACEOF
13025rm -f conftest.$ac_objext conftest$ac_exeext
13026if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13027 (eval $ac_link) 2>&5
13028 ac_status=$?
13029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13030 (exit $ac_status); } &&
13031 { ac_try='test -s conftest$ac_exeext'
13032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13033 (eval $ac_try) 2>&5
13034 ac_status=$?
13035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13036 (exit $ac_status); }; }; then
13037 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013038else
Martin v. Löwis11437992002-04-12 09:54:03 +000013039 echo "$as_me: failed program was:" >&5
13040cat conftest.$ac_ext >&5
13041eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013042fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013043rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013044fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013045echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13046echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13047if test `eval echo '${'$as_ac_var'}'` = yes; then
13048 cat >>confdefs.h <<_ACEOF
13049#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13050_ACEOF
13051 cat >conftest.$ac_ext <<_ACEOF
13052#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013053#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013054#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013055#ifdef F77_DUMMY_MAIN
13056# ifdef __cplusplus
13057 extern "C"
13058# endif
13059 int F77_DUMMY_MAIN() { return 1; }
13060#endif
13061int
13062main ()
13063{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013064gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013065 ;
13066 return 0;
13067}
13068_ACEOF
13069rm -f conftest.$ac_objext
13070if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13071 (eval $ac_compile) 2>&5
13072 ac_status=$?
13073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13074 (exit $ac_status); } &&
13075 { ac_try='test -s conftest.$ac_objext'
13076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13077 (eval $ac_try) 2>&5
13078 ac_status=$?
13079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13080 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013081 :
13082else
Martin v. Löwis11437992002-04-12 09:54:03 +000013083 echo "$as_me: failed program was:" >&5
13084cat conftest.$ac_ext >&5
13085
13086cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013087#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013088_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013089
Martin v. Löwis11437992002-04-12 09:54:03 +000013090
Guido van Rossum627b2d71993-12-24 10:39:16 +000013091fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013092rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013093
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013094fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013095done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013096
Michael W. Hudson54241132001-12-07 15:38:26 +000013097
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013098echo "$as_me:$LINENO: checking for major" >&5
13099echo $ECHO_N "checking for major... $ECHO_C" >&6
13100cat >conftest.$ac_ext <<_ACEOF
13101#line $LINENO "configure"
13102#include "confdefs.h"
13103
13104 #if defined(MAJOR_IN_MKDEV)
13105 #include <sys/mkdev.h>
13106 #elif defined(MAJOR_IN_SYSMACROS)
13107 #include <sys/sysmacros.h>
13108 #else
13109 #include <sys/types.h>
13110 #endif
13111
13112#ifdef F77_DUMMY_MAIN
13113# ifdef __cplusplus
13114 extern "C"
13115# endif
13116 int F77_DUMMY_MAIN() { return 1; }
13117#endif
13118int
13119main ()
13120{
13121
13122 makedev(major(0),minor(0));
13123
13124 ;
13125 return 0;
13126}
13127_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013128rm -f conftest.$ac_objext conftest$ac_exeext
13129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13130 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013131 ac_status=$?
13132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13133 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013134 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13136 (eval $ac_try) 2>&5
13137 ac_status=$?
13138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13139 (exit $ac_status); }; }; then
13140
13141
13142cat >>confdefs.h <<\_ACEOF
13143#define HAVE_DEVICE_MACROS 1
13144_ACEOF
13145
13146 echo "$as_me:$LINENO: result: yes" >&5
13147echo "${ECHO_T}yes" >&6
13148
13149else
13150 echo "$as_me: failed program was:" >&5
13151cat conftest.$ac_ext >&5
13152
13153 echo "$as_me:$LINENO: result: no" >&5
13154echo "${ECHO_T}no" >&6
13155
13156fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013157rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013158
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013159# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013160# for [no]getaddrinfo in netdb.h.
13161echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13162echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13163cat >conftest.$ac_ext <<_ACEOF
13164#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013165#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013166
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013167#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013168#include <sys/socket.h>
13169#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013170#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013171
Martin v. Löwis11437992002-04-12 09:54:03 +000013172#ifdef F77_DUMMY_MAIN
13173# ifdef __cplusplus
13174 extern "C"
13175# endif
13176 int F77_DUMMY_MAIN() { return 1; }
13177#endif
13178int
13179main ()
13180{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013181
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013182getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013183
Martin v. Löwis11437992002-04-12 09:54:03 +000013184 ;
13185 return 0;
13186}
13187_ACEOF
13188rm -f conftest.$ac_objext conftest$ac_exeext
13189if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13190 (eval $ac_link) 2>&5
13191 ac_status=$?
13192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13193 (exit $ac_status); } &&
13194 { ac_try='test -s conftest$ac_exeext'
13195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13196 (eval $ac_try) 2>&5
13197 ac_status=$?
13198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13199 (exit $ac_status); }; }; then
13200
13201echo "$as_me:$LINENO: result: yes" >&5
13202echo "${ECHO_T}yes" >&6
13203echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13204echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013205if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013206 echo "$as_me:$LINENO: result: buggy" >&5
13207echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013208buggygetaddrinfo=yes
13209else
Martin v. Löwis11437992002-04-12 09:54:03 +000013210 cat >conftest.$ac_ext <<_ACEOF
13211#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013212#include "confdefs.h"
13213
13214#include <sys/types.h>
13215#include <netdb.h>
13216#include <string.h>
13217#include <sys/socket.h>
13218#include <netinet/in.h>
13219
13220main()
13221{
13222 int passive, gaierr, inet4 = 0, inet6 = 0;
13223 struct addrinfo hints, *ai, *aitop;
13224 char straddr[INET6_ADDRSTRLEN], strport[16];
13225
13226 for (passive = 0; passive <= 1; passive++) {
13227 memset(&hints, 0, sizeof(hints));
13228 hints.ai_family = AF_UNSPEC;
13229 hints.ai_flags = passive ? AI_PASSIVE : 0;
13230 hints.ai_socktype = SOCK_STREAM;
13231 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13232 (void)gai_strerror(gaierr);
13233 goto bad;
13234 }
13235 for (ai = aitop; ai; ai = ai->ai_next) {
13236 if (ai->ai_addr == NULL ||
13237 ai->ai_addrlen == 0 ||
13238 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13239 straddr, sizeof(straddr), strport, sizeof(strport),
13240 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13241 goto bad;
13242 }
13243 switch (ai->ai_family) {
13244 case AF_INET:
13245 if (strcmp(strport, "54321") != 0) {
13246 goto bad;
13247 }
13248 if (passive) {
13249 if (strcmp(straddr, "0.0.0.0") != 0) {
13250 goto bad;
13251 }
13252 } else {
13253 if (strcmp(straddr, "127.0.0.1") != 0) {
13254 goto bad;
13255 }
13256 }
13257 inet4++;
13258 break;
13259 case AF_INET6:
13260 if (strcmp(strport, "54321") != 0) {
13261 goto bad;
13262 }
13263 if (passive) {
13264 if (strcmp(straddr, "::") != 0) {
13265 goto bad;
13266 }
13267 } else {
13268 if (strcmp(straddr, "::1") != 0) {
13269 goto bad;
13270 }
13271 }
13272 inet6++;
13273 break;
13274 case AF_UNSPEC:
13275 goto bad;
13276 break;
13277 default:
13278 /* another family support? */
13279 break;
13280 }
13281 }
13282 }
13283
13284 if (!(inet4 == 0 || inet4 == 2))
13285 goto bad;
13286 if (!(inet6 == 0 || inet6 == 2))
13287 goto bad;
13288
13289 if (aitop)
13290 freeaddrinfo(aitop);
13291 exit(0);
13292
13293 bad:
13294 if (aitop)
13295 freeaddrinfo(aitop);
13296 exit(1);
13297}
13298
Martin v. Löwis11437992002-04-12 09:54:03 +000013299_ACEOF
13300rm -f conftest$ac_exeext
13301if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13302 (eval $ac_link) 2>&5
13303 ac_status=$?
13304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13305 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13307 (eval $ac_try) 2>&5
13308 ac_status=$?
13309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13310 (exit $ac_status); }; }; then
13311 echo "$as_me:$LINENO: result: good" >&5
13312echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013313buggygetaddrinfo=no
13314else
Martin v. Löwis11437992002-04-12 09:54:03 +000013315 echo "$as_me: program exited with status $ac_status" >&5
13316echo "$as_me: failed program was:" >&5
13317cat conftest.$ac_ext >&5
13318( exit $ac_status )
13319echo "$as_me:$LINENO: result: buggy" >&5
13320echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013321buggygetaddrinfo=yes
13322fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013323rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013324fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013325else
Martin v. Löwis11437992002-04-12 09:54:03 +000013326 echo "$as_me: failed program was:" >&5
13327cat conftest.$ac_ext >&5
13328
13329echo "$as_me:$LINENO: result: no" >&5
13330echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013331buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013332
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013333fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013334rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013335
13336if test "$buggygetaddrinfo" = "yes"; then
13337 if test "$ipv6" = "yes"; then
13338 echo 'Fatal: You must get working getaddrinfo() function.'
13339 echo ' or you can specify "--disable-ipv6"'.
13340 exit 1
13341 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013342else
Martin v. Löwis11437992002-04-12 09:54:03 +000013343
13344cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013345#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013346_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013347
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013348fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013349
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013350for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013351do
Martin v. Löwis11437992002-04-12 09:54:03 +000013352as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13353echo "$as_me:$LINENO: checking for $ac_func" >&5
13354echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13355if eval "test \"\${$as_ac_var+set}\" = set"; then
13356 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013357else
Martin v. Löwis11437992002-04-12 09:54:03 +000013358 cat >conftest.$ac_ext <<_ACEOF
13359#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013360#include "confdefs.h"
13361/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013362 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013363#include <assert.h>
13364/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013365#ifdef __cplusplus
13366extern "C"
13367#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013368/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013369 builtin and then its argument prototype would still apply. */
13370char $ac_func ();
13371char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013372
Martin v. Löwis11437992002-04-12 09:54:03 +000013373#ifdef F77_DUMMY_MAIN
13374# ifdef __cplusplus
13375 extern "C"
13376# endif
13377 int F77_DUMMY_MAIN() { return 1; }
13378#endif
13379int
13380main ()
13381{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013382/* The GNU C library defines this for functions which it implements
13383 to always fail with ENOSYS. Some functions are actually named
13384 something starting with __ and the normal name is an alias. */
13385#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13386choke me
13387#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013388f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013389#endif
13390
Martin v. Löwis11437992002-04-12 09:54:03 +000013391 ;
13392 return 0;
13393}
13394_ACEOF
13395rm -f conftest.$ac_objext conftest$ac_exeext
13396if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13397 (eval $ac_link) 2>&5
13398 ac_status=$?
13399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13400 (exit $ac_status); } &&
13401 { ac_try='test -s conftest$ac_exeext'
13402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13403 (eval $ac_try) 2>&5
13404 ac_status=$?
13405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13406 (exit $ac_status); }; }; then
13407 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013408else
Martin v. Löwis11437992002-04-12 09:54:03 +000013409 echo "$as_me: failed program was:" >&5
13410cat conftest.$ac_ext >&5
13411eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013412fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013413rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013414fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013415echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13416echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13417if test `eval echo '${'$as_ac_var'}'` = yes; then
13418 cat >>confdefs.h <<_ACEOF
13419#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13420_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013421
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013422fi
13423done
13424
Michael W. Hudson54241132001-12-07 15:38:26 +000013425
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013426# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000013427echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13428echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13429if test "${ac_cv_header_time+set}" = set; then
13430 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013431else
Martin v. Löwis11437992002-04-12 09:54:03 +000013432 cat >conftest.$ac_ext <<_ACEOF
13433#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013434#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013435#include <sys/types.h>
13436#include <sys/time.h>
13437#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013438
13439#ifdef F77_DUMMY_MAIN
13440# ifdef __cplusplus
13441 extern "C"
13442# endif
13443 int F77_DUMMY_MAIN() { return 1; }
13444#endif
13445int
13446main ()
13447{
13448if ((struct tm *) 0)
13449return 0;
13450 ;
13451 return 0;
13452}
13453_ACEOF
13454rm -f conftest.$ac_objext
13455if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13456 (eval $ac_compile) 2>&5
13457 ac_status=$?
13458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13459 (exit $ac_status); } &&
13460 { ac_try='test -s conftest.$ac_objext'
13461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13462 (eval $ac_try) 2>&5
13463 ac_status=$?
13464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13465 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013466 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013467else
Martin v. Löwis11437992002-04-12 09:54:03 +000013468 echo "$as_me: failed program was:" >&5
13469cat conftest.$ac_ext >&5
13470ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013471fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013472rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013473fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013474echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
13475echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013476if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013477
13478cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013479#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013480_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013481
13482fi
13483
Martin v. Löwis11437992002-04-12 09:54:03 +000013484echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
13485echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
13486if test "${ac_cv_struct_tm+set}" = set; then
13487 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013488else
Martin v. Löwis11437992002-04-12 09:54:03 +000013489 cat >conftest.$ac_ext <<_ACEOF
13490#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013491#include "confdefs.h"
13492#include <sys/types.h>
13493#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013494
13495#ifdef F77_DUMMY_MAIN
13496# ifdef __cplusplus
13497 extern "C"
13498# endif
13499 int F77_DUMMY_MAIN() { return 1; }
13500#endif
13501int
13502main ()
13503{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013504struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000013505 ;
13506 return 0;
13507}
13508_ACEOF
13509rm -f conftest.$ac_objext
13510if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13511 (eval $ac_compile) 2>&5
13512 ac_status=$?
13513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13514 (exit $ac_status); } &&
13515 { ac_try='test -s conftest.$ac_objext'
13516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13517 (eval $ac_try) 2>&5
13518 ac_status=$?
13519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13520 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013521 ac_cv_struct_tm=time.h
13522else
Martin v. Löwis11437992002-04-12 09:54:03 +000013523 echo "$as_me: failed program was:" >&5
13524cat conftest.$ac_ext >&5
13525ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013526fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013527rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013528fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013529echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
13530echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013531if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013532
13533cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013534#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013535_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013536
13537fi
13538
Martin v. Löwis11437992002-04-12 09:54:03 +000013539echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13540echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
13541if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13542 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013543else
Martin v. Löwis11437992002-04-12 09:54:03 +000013544 cat >conftest.$ac_ext <<_ACEOF
13545#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013546#include "confdefs.h"
13547#include <sys/types.h>
13548#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013549
13550
13551#ifdef F77_DUMMY_MAIN
13552# ifdef __cplusplus
13553 extern "C"
13554# endif
13555 int F77_DUMMY_MAIN() { return 1; }
13556#endif
13557int
13558main ()
13559{
13560static struct tm ac_aggr;
13561if (ac_aggr.tm_zone)
13562return 0;
13563 ;
13564 return 0;
13565}
13566_ACEOF
13567rm -f conftest.$ac_objext
13568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13569 (eval $ac_compile) 2>&5
13570 ac_status=$?
13571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13572 (exit $ac_status); } &&
13573 { ac_try='test -s conftest.$ac_objext'
13574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13575 (eval $ac_try) 2>&5
13576 ac_status=$?
13577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13578 (exit $ac_status); }; }; then
13579 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013580else
Martin v. Löwis11437992002-04-12 09:54:03 +000013581 echo "$as_me: failed program was:" >&5
13582cat conftest.$ac_ext >&5
13583ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013584fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013585rm -f conftest.$ac_objext conftest.$ac_ext
13586fi
13587echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13588echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
13589if test $ac_cv_member_struct_tm_tm_zone = yes; then
13590
13591cat >>confdefs.h <<_ACEOF
13592#define HAVE_STRUCT_TM_TM_ZONE 1
13593_ACEOF
13594
13595
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013596fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013597
Martin v. Löwis11437992002-04-12 09:54:03 +000013598if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13599
13600cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013601#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013602_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013603
13604else
Martin v. Löwis11437992002-04-12 09:54:03 +000013605 echo "$as_me:$LINENO: checking for tzname" >&5
13606echo $ECHO_N "checking for tzname... $ECHO_C" >&6
13607if test "${ac_cv_var_tzname+set}" = set; then
13608 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013609else
Martin v. Löwis11437992002-04-12 09:54:03 +000013610 cat >conftest.$ac_ext <<_ACEOF
13611#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013612#include "confdefs.h"
13613#include <time.h>
13614#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013615extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013616#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013617
13618#ifdef F77_DUMMY_MAIN
13619# ifdef __cplusplus
13620 extern "C"
13621# endif
13622 int F77_DUMMY_MAIN() { return 1; }
13623#endif
13624int
13625main ()
13626{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013627atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000013628 ;
13629 return 0;
13630}
13631_ACEOF
13632rm -f conftest.$ac_objext conftest$ac_exeext
13633if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13634 (eval $ac_link) 2>&5
13635 ac_status=$?
13636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13637 (exit $ac_status); } &&
13638 { ac_try='test -s conftest$ac_exeext'
13639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13640 (eval $ac_try) 2>&5
13641 ac_status=$?
13642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13643 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013644 ac_cv_var_tzname=yes
13645else
Martin v. Löwis11437992002-04-12 09:54:03 +000013646 echo "$as_me: failed program was:" >&5
13647cat conftest.$ac_ext >&5
13648ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013649fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013650rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013651fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013652echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13653echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013654 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013655
13656cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013657#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013658_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013659
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013660 fi
13661fi
13662
Martin v. Löwis11437992002-04-12 09:54:03 +000013663echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
13664echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
13665if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
13666 echo $ECHO_N "(cached) $ECHO_C" >&6
13667else
13668 cat >conftest.$ac_ext <<_ACEOF
13669#line $LINENO "configure"
13670#include "confdefs.h"
13671$ac_includes_default
13672#ifdef F77_DUMMY_MAIN
13673# ifdef __cplusplus
13674 extern "C"
13675# endif
13676 int F77_DUMMY_MAIN() { return 1; }
13677#endif
13678int
13679main ()
13680{
13681static struct stat ac_aggr;
13682if (ac_aggr.st_rdev)
13683return 0;
13684 ;
13685 return 0;
13686}
13687_ACEOF
13688rm -f conftest.$ac_objext
13689if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13690 (eval $ac_compile) 2>&5
13691 ac_status=$?
13692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13693 (exit $ac_status); } &&
13694 { ac_try='test -s conftest.$ac_objext'
13695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13696 (eval $ac_try) 2>&5
13697 ac_status=$?
13698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13699 (exit $ac_status); }; }; then
13700 ac_cv_member_struct_stat_st_rdev=yes
13701else
13702 echo "$as_me: failed program was:" >&5
13703cat conftest.$ac_ext >&5
13704ac_cv_member_struct_stat_st_rdev=no
13705fi
13706rm -f conftest.$ac_objext conftest.$ac_ext
13707fi
13708echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
13709echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
13710if test $ac_cv_member_struct_stat_st_rdev = yes; then
13711
13712cat >>confdefs.h <<_ACEOF
13713#define HAVE_STRUCT_STAT_ST_RDEV 1
13714_ACEOF
13715
13716
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013717fi
13718
Martin v. Löwis11437992002-04-12 09:54:03 +000013719echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13720echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13721if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13722 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013723else
Martin v. Löwis11437992002-04-12 09:54:03 +000013724 cat >conftest.$ac_ext <<_ACEOF
13725#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013726#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013727$ac_includes_default
13728#ifdef F77_DUMMY_MAIN
13729# ifdef __cplusplus
13730 extern "C"
13731# endif
13732 int F77_DUMMY_MAIN() { return 1; }
13733#endif
13734int
13735main ()
13736{
13737static struct stat ac_aggr;
13738if (ac_aggr.st_blksize)
13739return 0;
13740 ;
13741 return 0;
13742}
13743_ACEOF
13744rm -f conftest.$ac_objext
13745if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13746 (eval $ac_compile) 2>&5
13747 ac_status=$?
13748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13749 (exit $ac_status); } &&
13750 { ac_try='test -s conftest.$ac_objext'
13751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13752 (eval $ac_try) 2>&5
13753 ac_status=$?
13754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13755 (exit $ac_status); }; }; then
13756 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013757else
Martin v. Löwis11437992002-04-12 09:54:03 +000013758 echo "$as_me: failed program was:" >&5
13759cat conftest.$ac_ext >&5
13760ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013761fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013762rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013763fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013764echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13765echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13766if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013767
Martin v. Löwis11437992002-04-12 09:54:03 +000013768cat >>confdefs.h <<_ACEOF
13769#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13770_ACEOF
13771
13772
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013773fi
13774
Martin v. Löwis11437992002-04-12 09:54:03 +000013775echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13776echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13777if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13778 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013779else
Martin v. Löwis11437992002-04-12 09:54:03 +000013780 cat >conftest.$ac_ext <<_ACEOF
13781#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013782#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013783$ac_includes_default
13784#ifdef F77_DUMMY_MAIN
13785# ifdef __cplusplus
13786 extern "C"
13787# endif
13788 int F77_DUMMY_MAIN() { return 1; }
13789#endif
13790int
13791main ()
13792{
13793static struct stat ac_aggr;
13794if (ac_aggr.st_blocks)
13795return 0;
13796 ;
13797 return 0;
13798}
13799_ACEOF
13800rm -f conftest.$ac_objext
13801if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13802 (eval $ac_compile) 2>&5
13803 ac_status=$?
13804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13805 (exit $ac_status); } &&
13806 { ac_try='test -s conftest.$ac_objext'
13807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13808 (eval $ac_try) 2>&5
13809 ac_status=$?
13810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13811 (exit $ac_status); }; }; then
13812 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013813else
Martin v. Löwis11437992002-04-12 09:54:03 +000013814 echo "$as_me: failed program was:" >&5
13815cat conftest.$ac_ext >&5
13816ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013817fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013818rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013819fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013820echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13821echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13822if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013823
Martin v. Löwis11437992002-04-12 09:54:03 +000013824cat >>confdefs.h <<_ACEOF
13825#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13826_ACEOF
13827
13828
13829cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013830#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013831_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013832
13833else
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013835fi
13836
Michael W. Hudson54241132001-12-07 15:38:26 +000013837
Martin v. Löwis11437992002-04-12 09:54:03 +000013838
13839echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13840echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13841if test "${ac_cv_header_time_altzone+set}" = set; then
13842 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013843else
Martin v. Löwis11437992002-04-12 09:54:03 +000013844 cat >conftest.$ac_ext <<_ACEOF
13845#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013846#include "confdefs.h"
13847#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013848#ifdef F77_DUMMY_MAIN
13849# ifdef __cplusplus
13850 extern "C"
13851# endif
13852 int F77_DUMMY_MAIN() { return 1; }
13853#endif
13854int
13855main ()
13856{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013857return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013858 ;
13859 return 0;
13860}
13861_ACEOF
13862rm -f conftest.$ac_objext
13863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13864 (eval $ac_compile) 2>&5
13865 ac_status=$?
13866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13867 (exit $ac_status); } &&
13868 { ac_try='test -s conftest.$ac_objext'
13869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13870 (eval $ac_try) 2>&5
13871 ac_status=$?
13872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13873 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013874 ac_cv_header_time_altzone=yes
13875else
Martin v. Löwis11437992002-04-12 09:54:03 +000013876 echo "$as_me: failed program was:" >&5
13877cat conftest.$ac_ext >&5
13878ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013879fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013880rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013881fi
13882
Martin v. Löwis11437992002-04-12 09:54:03 +000013883echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13884echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013885if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013886
13887cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013888#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013889_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013890
13891fi
13892
Guido van Rossumda88dad1995-01-26 00:46:29 +000013893was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013894echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13895echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13896cat >conftest.$ac_ext <<_ACEOF
13897#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013898#include "confdefs.h"
13899
13900#include <sys/types.h>
13901#include <sys/select.h>
13902#include <sys/time.h>
13903
Martin v. Löwis11437992002-04-12 09:54:03 +000013904#ifdef F77_DUMMY_MAIN
13905# ifdef __cplusplus
13906 extern "C"
13907# endif
13908 int F77_DUMMY_MAIN() { return 1; }
13909#endif
13910int
13911main ()
13912{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013913;
Martin v. Löwis11437992002-04-12 09:54:03 +000013914 ;
13915 return 0;
13916}
13917_ACEOF
13918rm -f conftest.$ac_objext
13919if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13920 (eval $ac_compile) 2>&5
13921 ac_status=$?
13922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13923 (exit $ac_status); } &&
13924 { ac_try='test -s conftest.$ac_objext'
13925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13926 (eval $ac_try) 2>&5
13927 ac_status=$?
13928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13929 (exit $ac_status); }; }; then
13930
13931
13932cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013933#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013934_ACEOF
13935
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013936 was_it_defined=yes
13937
Guido van Rossumf78abae1997-01-21 22:02:36 +000013938else
Martin v. Löwis11437992002-04-12 09:54:03 +000013939 echo "$as_me: failed program was:" >&5
13940cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013941fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013942rm -f conftest.$ac_objext conftest.$ac_ext
13943echo "$as_me:$LINENO: result: $was_it_defined" >&5
13944echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013945
Martin v. Löwis11437992002-04-12 09:54:03 +000013946echo "$as_me:$LINENO: checking for addrinfo" >&5
13947echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13948if test "${ac_cv_struct_addrinfo+set}" = set; then
13949 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013950else
Martin v. Löwis11437992002-04-12 09:54:03 +000013951 cat >conftest.$ac_ext <<_ACEOF
13952#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013953#include "confdefs.h"
13954
13955# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013956#ifdef F77_DUMMY_MAIN
13957# ifdef __cplusplus
13958 extern "C"
13959# endif
13960 int F77_DUMMY_MAIN() { return 1; }
13961#endif
13962int
13963main ()
13964{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013965struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013966 ;
13967 return 0;
13968}
13969_ACEOF
13970rm -f conftest.$ac_objext
13971if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13972 (eval $ac_compile) 2>&5
13973 ac_status=$?
13974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13975 (exit $ac_status); } &&
13976 { ac_try='test -s conftest.$ac_objext'
13977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13978 (eval $ac_try) 2>&5
13979 ac_status=$?
13980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13981 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013982 ac_cv_struct_addrinfo=yes
13983else
Martin v. Löwis11437992002-04-12 09:54:03 +000013984 echo "$as_me: failed program was:" >&5
13985cat conftest.$ac_ext >&5
13986ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013987fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013988rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013989fi
13990
Martin v. Löwis11437992002-04-12 09:54:03 +000013991echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13992echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013993if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013994
13995cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013996#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013997_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013998
13999fi
14000
Martin v. Löwis11437992002-04-12 09:54:03 +000014001echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
14002echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
14003if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
14004 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014005else
Martin v. Löwis11437992002-04-12 09:54:03 +000014006 cat >conftest.$ac_ext <<_ACEOF
14007#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014008#include "confdefs.h"
14009
14010# include <sys/types.h>
14011# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014012#ifdef F77_DUMMY_MAIN
14013# ifdef __cplusplus
14014 extern "C"
14015# endif
14016 int F77_DUMMY_MAIN() { return 1; }
14017#endif
14018int
14019main ()
14020{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014021struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014022 ;
14023 return 0;
14024}
14025_ACEOF
14026rm -f conftest.$ac_objext
14027if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14028 (eval $ac_compile) 2>&5
14029 ac_status=$?
14030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14031 (exit $ac_status); } &&
14032 { ac_try='test -s conftest.$ac_objext'
14033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14034 (eval $ac_try) 2>&5
14035 ac_status=$?
14036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14037 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014038 ac_cv_struct_sockaddr_storage=yes
14039else
Martin v. Löwis11437992002-04-12 09:54:03 +000014040 echo "$as_me: failed program was:" >&5
14041cat conftest.$ac_ext >&5
14042ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014043fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014044rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014045fi
14046
Martin v. Löwis11437992002-04-12 09:54:03 +000014047echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14048echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014049if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014050
14051cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014052#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014053_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014054
14055fi
14056
Guido van Rossum627b2d71993-12-24 10:39:16 +000014057# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014058
Michael W. Hudson54241132001-12-07 15:38:26 +000014059
Martin v. Löwis11437992002-04-12 09:54:03 +000014060echo "$as_me:$LINENO: checking whether char is unsigned" >&5
14061echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
14062if test "${ac_cv_c_char_unsigned+set}" = set; then
14063 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000014064else
Martin v. Löwis11437992002-04-12 09:54:03 +000014065 cat >conftest.$ac_ext <<_ACEOF
14066#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000014067#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014068$ac_includes_default
14069#ifdef F77_DUMMY_MAIN
14070# ifdef __cplusplus
14071 extern "C"
14072# endif
14073 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014075int
14076main ()
14077{
14078static int test_array [1 - 2 * !(((char) -1) < 0)];
14079test_array [0] = 0
14080
14081 ;
14082 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014083}
Martin v. Löwis11437992002-04-12 09:54:03 +000014084_ACEOF
14085rm -f conftest.$ac_objext
14086if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14087 (eval $ac_compile) 2>&5
14088 ac_status=$?
14089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14090 (exit $ac_status); } &&
14091 { ac_try='test -s conftest.$ac_objext'
14092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14093 (eval $ac_try) 2>&5
14094 ac_status=$?
14095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14096 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000014097 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014098else
14099 echo "$as_me: failed program was:" >&5
14100cat conftest.$ac_ext >&5
14101ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014103rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014104fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014105echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
14106echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014107if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014108 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014109#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014110_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014111
14112fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014113
Martin v. Löwis11437992002-04-12 09:54:03 +000014114echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
14115echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14116if test "${ac_cv_prog_cc_stdc+set}" = set; then
14117 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014118else
Martin v. Löwis11437992002-04-12 09:54:03 +000014119 ac_cv_prog_cc_stdc=no
14120ac_save_CC=$CC
14121cat >conftest.$ac_ext <<_ACEOF
14122#line $LINENO "configure"
14123#include "confdefs.h"
14124#include <stdarg.h>
14125#include <stdio.h>
14126#include <sys/types.h>
14127#include <sys/stat.h>
14128/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14129struct buf { int x; };
14130FILE * (*rcsopen) (struct buf *, struct stat *, int);
14131static char *e (p, i)
14132 char **p;
14133 int i;
14134{
14135 return p[i];
14136}
14137static char *f (char * (*g) (char **, int), char **p, ...)
14138{
14139 char *s;
14140 va_list v;
14141 va_start (v,p);
14142 s = g (p, va_arg (v,int));
14143 va_end (v);
14144 return s;
14145}
14146int test (int i, double x);
14147struct s1 {int (*f) (int a);};
14148struct s2 {int (*f) (double a);};
14149int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14150int argc;
14151char **argv;
14152#ifdef F77_DUMMY_MAIN
14153# ifdef __cplusplus
14154 extern "C"
14155# endif
14156 int F77_DUMMY_MAIN() { return 1; }
14157#endif
14158int
14159main ()
14160{
14161return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14162 ;
14163 return 0;
14164}
14165_ACEOF
14166# Don't try gcc -ansi; that turns off useful extensions and
14167# breaks some systems' header files.
14168# AIX -qlanglvl=ansi
14169# Ultrix and OSF/1 -std1
14170# HP-UX 10.20 and later -Ae
14171# HP-UX older versions -Aa -D_HPUX_SOURCE
14172# SVR4 -Xc -D__EXTENSIONS__
14173for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14174do
14175 CC="$ac_save_CC $ac_arg"
14176 rm -f conftest.$ac_objext
14177if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14178 (eval $ac_compile) 2>&5
14179 ac_status=$?
14180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14181 (exit $ac_status); } &&
14182 { ac_try='test -s conftest.$ac_objext'
14183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14184 (eval $ac_try) 2>&5
14185 ac_status=$?
14186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14187 (exit $ac_status); }; }; then
14188 ac_cv_prog_cc_stdc=$ac_arg
14189break
14190else
14191 echo "$as_me: failed program was:" >&5
14192cat conftest.$ac_ext >&5
14193fi
14194rm -f conftest.$ac_objext
14195done
14196rm -f conftest.$ac_ext conftest.$ac_objext
14197CC=$ac_save_CC
14198
14199fi
14200
14201case "x$ac_cv_prog_cc_stdc" in
14202 x|xno)
14203 echo "$as_me:$LINENO: result: none needed" >&5
14204echo "${ECHO_T}none needed" >&6 ;;
14205 *)
14206 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14207echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14208 CC="$CC $ac_cv_prog_cc_stdc" ;;
14209esac
14210
14211echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14212echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14213if test "${ac_cv_c_const+set}" = set; then
14214 echo $ECHO_N "(cached) $ECHO_C" >&6
14215else
14216 cat >conftest.$ac_ext <<_ACEOF
14217#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014218#include "confdefs.h"
14219
Martin v. Löwis11437992002-04-12 09:54:03 +000014220#ifdef F77_DUMMY_MAIN
14221# ifdef __cplusplus
14222 extern "C"
14223# endif
14224 int F77_DUMMY_MAIN() { return 1; }
14225#endif
14226int
14227main ()
14228{
14229/* FIXME: Include the comments suggested by Paul. */
14230#ifndef __cplusplus
14231 /* Ultrix mips cc rejects this. */
14232 typedef int charset[2];
14233 const charset x;
14234 /* SunOS 4.1.1 cc rejects this. */
14235 char const *const *ccp;
14236 char **p;
14237 /* NEC SVR4.0.2 mips cc rejects this. */
14238 struct point {int x, y;};
14239 static struct point const zero = {0,0};
14240 /* AIX XL C 1.02.0.0 rejects this.
14241 It does not let you subtract one const X* pointer from another in
14242 an arm of an if-expression whose if-part is not a constant
14243 expression */
14244 const char *g = "string";
14245 ccp = &g + (g ? g-g : 0);
14246 /* HPUX 7.0 cc rejects these. */
14247 ++ccp;
14248 p = (char**) ccp;
14249 ccp = (char const *const *) p;
14250 { /* SCO 3.2v4 cc rejects this. */
14251 char *t;
14252 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014253
Martin v. Löwis11437992002-04-12 09:54:03 +000014254 *t++ = 0;
14255 }
14256 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14257 int x[] = {25, 17};
14258 const int *foo = &x[0];
14259 ++foo;
14260 }
14261 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14262 typedef const int *iptr;
14263 iptr p = 0;
14264 ++p;
14265 }
14266 { /* AIX XL C 1.02.0.0 rejects this saying
14267 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14268 struct s { int j; const int *ap[3]; };
14269 struct s *b; b->j = 5;
14270 }
14271 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14272 const int foo = 10;
14273 }
14274#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014275
Martin v. Löwis11437992002-04-12 09:54:03 +000014276 ;
14277 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014278}
Martin v. Löwis11437992002-04-12 09:54:03 +000014279_ACEOF
14280rm -f conftest.$ac_objext
14281if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14282 (eval $ac_compile) 2>&5
14283 ac_status=$?
14284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14285 (exit $ac_status); } &&
14286 { ac_try='test -s conftest.$ac_objext'
14287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14288 (eval $ac_try) 2>&5
14289 ac_status=$?
14290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14291 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014292 ac_cv_c_const=yes
14293else
Martin v. Löwis11437992002-04-12 09:54:03 +000014294 echo "$as_me: failed program was:" >&5
14295cat conftest.$ac_ext >&5
14296ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014297fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014298rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014299fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014300echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14301echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014302if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014303
14304cat >>confdefs.h <<\_ACEOF
14305#define const
14306_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014307
14308fi
14309
Michael W. Hudson54241132001-12-07 15:38:26 +000014310
Guido van Rossumda88dad1995-01-26 00:46:29 +000014311works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014312echo "$as_me:$LINENO: checking for working volatile" >&5
14313echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14314cat >conftest.$ac_ext <<_ACEOF
14315#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014316#include "confdefs.h"
14317
Martin v. Löwis11437992002-04-12 09:54:03 +000014318#ifdef F77_DUMMY_MAIN
14319# ifdef __cplusplus
14320 extern "C"
14321# endif
14322 int F77_DUMMY_MAIN() { return 1; }
14323#endif
14324int
14325main ()
14326{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014327volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014328 ;
14329 return 0;
14330}
14331_ACEOF
14332rm -f conftest.$ac_objext
14333if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14334 (eval $ac_compile) 2>&5
14335 ac_status=$?
14336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14337 (exit $ac_status); } &&
14338 { ac_try='test -s conftest.$ac_objext'
14339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14340 (eval $ac_try) 2>&5
14341 ac_status=$?
14342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14343 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014344 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014345else
Martin v. Löwis11437992002-04-12 09:54:03 +000014346 echo "$as_me: failed program was:" >&5
14347cat conftest.$ac_ext >&5
14348
14349cat >>confdefs.h <<\_ACEOF
14350#define volatile
14351_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014352
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014353
Guido van Rossum627b2d71993-12-24 10:39:16 +000014354fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014355rm -f conftest.$ac_objext conftest.$ac_ext
14356echo "$as_me:$LINENO: result: $works" >&5
14357echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014358
Guido van Rossumda88dad1995-01-26 00:46:29 +000014359works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014360echo "$as_me:$LINENO: checking for working signed char" >&5
14361echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14362cat >conftest.$ac_ext <<_ACEOF
14363#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014364#include "confdefs.h"
14365
Martin v. Löwis11437992002-04-12 09:54:03 +000014366#ifdef F77_DUMMY_MAIN
14367# ifdef __cplusplus
14368 extern "C"
14369# endif
14370 int F77_DUMMY_MAIN() { return 1; }
14371#endif
14372int
14373main ()
14374{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014375signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014376 ;
14377 return 0;
14378}
14379_ACEOF
14380rm -f conftest.$ac_objext
14381if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14382 (eval $ac_compile) 2>&5
14383 ac_status=$?
14384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14385 (exit $ac_status); } &&
14386 { ac_try='test -s conftest.$ac_objext'
14387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14388 (eval $ac_try) 2>&5
14389 ac_status=$?
14390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14391 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014392 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014393else
Martin v. Löwis11437992002-04-12 09:54:03 +000014394 echo "$as_me: failed program was:" >&5
14395cat conftest.$ac_ext >&5
14396
14397cat >>confdefs.h <<\_ACEOF
14398#define signed
14399_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000014400
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014401
Guido van Rossum7f43da71994-08-01 12:15:30 +000014402fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014403rm -f conftest.$ac_objext conftest.$ac_ext
14404echo "$as_me:$LINENO: result: $works" >&5
14405echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014406
Guido van Rossumda88dad1995-01-26 00:46:29 +000014407have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014408echo "$as_me:$LINENO: checking for prototypes" >&5
14409echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
14410cat >conftest.$ac_ext <<_ACEOF
14411#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014412#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014413int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014414#ifdef F77_DUMMY_MAIN
14415# ifdef __cplusplus
14416 extern "C"
14417# endif
14418 int F77_DUMMY_MAIN() { return 1; }
14419#endif
14420int
14421main ()
14422{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014423return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014424 ;
14425 return 0;
14426}
14427_ACEOF
14428rm -f conftest.$ac_objext
14429if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14430 (eval $ac_compile) 2>&5
14431 ac_status=$?
14432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14433 (exit $ac_status); } &&
14434 { ac_try='test -s conftest.$ac_objext'
14435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14436 (eval $ac_try) 2>&5
14437 ac_status=$?
14438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14439 (exit $ac_status); }; }; then
14440
14441
14442cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014443#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014444_ACEOF
14445
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014446 have_prototypes=yes
14447
Guido van Rossumf78abae1997-01-21 22:02:36 +000014448else
Martin v. Löwis11437992002-04-12 09:54:03 +000014449 echo "$as_me: failed program was:" >&5
14450cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014451fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014452rm -f conftest.$ac_objext conftest.$ac_ext
14453echo "$as_me:$LINENO: result: $have_prototypes" >&5
14454echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014455
Guido van Rossumda88dad1995-01-26 00:46:29 +000014456works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014457echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
14458echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
14459cat >conftest.$ac_ext <<_ACEOF
14460#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014461#include "confdefs.h"
14462
14463#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014464int foo(int x, ...) {
14465 va_list va;
14466 va_start(va, x);
14467 va_arg(va, int);
14468 va_arg(va, char *);
14469 va_arg(va, double);
14470 return 0;
14471}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014472
Martin v. Löwis11437992002-04-12 09:54:03 +000014473#ifdef F77_DUMMY_MAIN
14474# ifdef __cplusplus
14475 extern "C"
14476# endif
14477 int F77_DUMMY_MAIN() { return 1; }
14478#endif
14479int
14480main ()
14481{
Guido van Rossum90eea071996-08-30 20:58:57 +000014482return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014483 ;
14484 return 0;
14485}
14486_ACEOF
14487rm -f conftest.$ac_objext
14488if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14489 (eval $ac_compile) 2>&5
14490 ac_status=$?
14491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14492 (exit $ac_status); } &&
14493 { ac_try='test -s conftest.$ac_objext'
14494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14495 (eval $ac_try) 2>&5
14496 ac_status=$?
14497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14498 (exit $ac_status); }; }; then
14499
14500
14501cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014502#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014503_ACEOF
14504
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014505 works=yes
14506
Guido van Rossumf78abae1997-01-21 22:02:36 +000014507else
Martin v. Löwis11437992002-04-12 09:54:03 +000014508 echo "$as_me: failed program was:" >&5
14509cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000014510fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014511rm -f conftest.$ac_objext conftest.$ac_ext
14512echo "$as_me:$LINENO: result: $works" >&5
14513echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014514
Guido van Rossumda88dad1995-01-26 00:46:29 +000014515if test "$have_prototypes" = yes; then
14516bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014517echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
14518echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
14519cat >conftest.$ac_ext <<_ACEOF
14520#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014521#include "confdefs.h"
14522#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014523#ifdef F77_DUMMY_MAIN
14524# ifdef __cplusplus
14525 extern "C"
14526# endif
14527 int F77_DUMMY_MAIN() { return 1; }
14528#endif
14529int
14530main ()
14531{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014532char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000014533 ;
14534 return 0;
14535}
14536_ACEOF
14537rm -f conftest.$ac_objext
14538if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14539 (eval $ac_compile) 2>&5
14540 ac_status=$?
14541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14542 (exit $ac_status); } &&
14543 { ac_try='test -s conftest.$ac_objext'
14544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14545 (eval $ac_try) 2>&5
14546 ac_status=$?
14547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14548 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014549 :
14550else
Martin v. Löwis11437992002-04-12 09:54:03 +000014551 echo "$as_me: failed program was:" >&5
14552cat conftest.$ac_ext >&5
14553
14554cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014555#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014556_ACEOF
14557
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014558 bad_prototypes=yes
14559
Guido van Rossum627b2d71993-12-24 10:39:16 +000014560fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014561rm -f conftest.$ac_objext conftest.$ac_ext
14562echo "$as_me:$LINENO: result: $bad_prototypes" >&5
14563echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014564fi
14565
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014566# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000014567echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
14568echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
14569cat >conftest.$ac_ext <<_ACEOF
14570#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014571#include "confdefs.h"
14572#include <sys/types.h>
14573#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014574#ifdef F77_DUMMY_MAIN
14575# ifdef __cplusplus
14576 extern "C"
14577# endif
14578 int F77_DUMMY_MAIN() { return 1; }
14579#endif
14580int
14581main ()
14582{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014583struct sockaddr x;
14584x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014585 ;
14586 return 0;
14587}
14588_ACEOF
14589rm -f conftest.$ac_objext
14590if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14591 (eval $ac_compile) 2>&5
14592 ac_status=$?
14593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14594 (exit $ac_status); } &&
14595 { ac_try='test -s conftest.$ac_objext'
14596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14597 (eval $ac_try) 2>&5
14598 ac_status=$?
14599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14600 (exit $ac_status); }; }; then
14601 echo "$as_me:$LINENO: result: yes" >&5
14602echo "${ECHO_T}yes" >&6
14603
14604cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014605#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014606_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014607
14608else
Martin v. Löwis11437992002-04-12 09:54:03 +000014609 echo "$as_me: failed program was:" >&5
14610cat conftest.$ac_ext >&5
14611echo "$as_me:$LINENO: result: no" >&5
14612echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014613fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014614rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014615
Guido van Rossumda88dad1995-01-26 00:46:29 +000014616va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014617echo "$as_me:$LINENO: checking whether va_list is an array" >&5
14618echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
14619cat >conftest.$ac_ext <<_ACEOF
14620#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014621#include "confdefs.h"
14622
14623#ifdef HAVE_STDARG_PROTOTYPES
14624#include <stdarg.h>
14625#else
14626#include <varargs.h>
14627#endif
14628
Martin v. Löwis11437992002-04-12 09:54:03 +000014629#ifdef F77_DUMMY_MAIN
14630# ifdef __cplusplus
14631 extern "C"
14632# endif
14633 int F77_DUMMY_MAIN() { return 1; }
14634#endif
14635int
14636main ()
14637{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014638va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000014639 ;
14640 return 0;
14641}
14642_ACEOF
14643rm -f conftest.$ac_objext
14644if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14645 (eval $ac_compile) 2>&5
14646 ac_status=$?
14647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14648 (exit $ac_status); } &&
14649 { ac_try='test -s conftest.$ac_objext'
14650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14651 (eval $ac_try) 2>&5
14652 ac_status=$?
14653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14654 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014655 :
14656else
Martin v. Löwis11437992002-04-12 09:54:03 +000014657 echo "$as_me: failed program was:" >&5
14658cat conftest.$ac_ext >&5
14659
14660
14661cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014662#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014663_ACEOF
14664
Guido van Rossumda88dad1995-01-26 00:46:29 +000014665 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014666
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014667fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014668rm -f conftest.$ac_objext conftest.$ac_ext
14669echo "$as_me:$LINENO: result: $va_list_is_array" >&5
14670echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014671
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014672# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014673
14674
14675
14676echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
14677echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
14678if test "${ac_cv_func_gethostbyname_r+set}" = set; then
14679 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014680else
Martin v. Löwis11437992002-04-12 09:54:03 +000014681 cat >conftest.$ac_ext <<_ACEOF
14682#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014683#include "confdefs.h"
14684/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014685 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014686#include <assert.h>
14687/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014688#ifdef __cplusplus
14689extern "C"
14690#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014691/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014692 builtin and then its argument prototype would still apply. */
14693char gethostbyname_r ();
14694char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014695
Martin v. Löwis11437992002-04-12 09:54:03 +000014696#ifdef F77_DUMMY_MAIN
14697# ifdef __cplusplus
14698 extern "C"
14699# endif
14700 int F77_DUMMY_MAIN() { return 1; }
14701#endif
14702int
14703main ()
14704{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014705/* The GNU C library defines this for functions which it implements
14706 to always fail with ENOSYS. Some functions are actually named
14707 something starting with __ and the normal name is an alias. */
14708#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
14709choke me
14710#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014711f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014712#endif
14713
Martin v. Löwis11437992002-04-12 09:54:03 +000014714 ;
14715 return 0;
14716}
14717_ACEOF
14718rm -f conftest.$ac_objext conftest$ac_exeext
14719if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14720 (eval $ac_link) 2>&5
14721 ac_status=$?
14722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14723 (exit $ac_status); } &&
14724 { ac_try='test -s conftest$ac_exeext'
14725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14726 (eval $ac_try) 2>&5
14727 ac_status=$?
14728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14729 (exit $ac_status); }; }; then
14730 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014731else
Martin v. Löwis11437992002-04-12 09:54:03 +000014732 echo "$as_me: failed program was:" >&5
14733cat conftest.$ac_ext >&5
14734ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014735fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014736rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014737fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014738echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
14739echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
14740if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014741
Martin v. Löwis11437992002-04-12 09:54:03 +000014742 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014743#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014744_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014745
Martin v. Löwis11437992002-04-12 09:54:03 +000014746 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
14747echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014748 OLD_CFLAGS=$CFLAGS
14749 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014750 cat >conftest.$ac_ext <<_ACEOF
14751#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014752#include "confdefs.h"
14753
14754# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014755
14756#ifdef F77_DUMMY_MAIN
14757# ifdef __cplusplus
14758 extern "C"
14759# endif
14760 int F77_DUMMY_MAIN() { return 1; }
14761#endif
14762int
14763main ()
14764{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014765
14766 char *name;
14767 struct hostent *he, *res;
14768 char buffer[2048];
14769 int buflen = 2048;
14770 int h_errnop;
14771
14772 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014773
14774 ;
14775 return 0;
14776}
14777_ACEOF
14778rm -f conftest.$ac_objext
14779if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14780 (eval $ac_compile) 2>&5
14781 ac_status=$?
14782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14783 (exit $ac_status); } &&
14784 { ac_try='test -s conftest.$ac_objext'
14785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14786 (eval $ac_try) 2>&5
14787 ac_status=$?
14788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14789 (exit $ac_status); }; }; then
14790
14791 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014792#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014793_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014794
Martin v. Löwis11437992002-04-12 09:54:03 +000014795
14796cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014797#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014798_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014799
Martin v. Löwis11437992002-04-12 09:54:03 +000014800 echo "$as_me:$LINENO: result: yes" >&5
14801echo "${ECHO_T}yes" >&6
14802
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014803else
Martin v. Löwis11437992002-04-12 09:54:03 +000014804 echo "$as_me: failed program was:" >&5
14805cat conftest.$ac_ext >&5
14806
14807 echo "$as_me:$LINENO: result: no" >&5
14808echo "${ECHO_T}no" >&6
14809 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14810echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14811 cat >conftest.$ac_ext <<_ACEOF
14812#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014813#include "confdefs.h"
14814
14815# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014816
14817#ifdef F77_DUMMY_MAIN
14818# ifdef __cplusplus
14819 extern "C"
14820# endif
14821 int F77_DUMMY_MAIN() { return 1; }
14822#endif
14823int
14824main ()
14825{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014826
14827 char *name;
14828 struct hostent *he;
14829 char buffer[2048];
14830 int buflen = 2048;
14831 int h_errnop;
14832
14833 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014834
14835 ;
14836 return 0;
14837}
14838_ACEOF
14839rm -f conftest.$ac_objext
14840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14841 (eval $ac_compile) 2>&5
14842 ac_status=$?
14843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14844 (exit $ac_status); } &&
14845 { ac_try='test -s conftest.$ac_objext'
14846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14847 (eval $ac_try) 2>&5
14848 ac_status=$?
14849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14850 (exit $ac_status); }; }; then
14851
14852 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014853#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014854_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014855
Martin v. Löwis11437992002-04-12 09:54:03 +000014856
14857cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014858#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014859_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014860
Martin v. Löwis11437992002-04-12 09:54:03 +000014861 echo "$as_me:$LINENO: result: yes" >&5
14862echo "${ECHO_T}yes" >&6
14863
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014864else
Martin v. Löwis11437992002-04-12 09:54:03 +000014865 echo "$as_me: failed program was:" >&5
14866cat conftest.$ac_ext >&5
14867
14868 echo "$as_me:$LINENO: result: no" >&5
14869echo "${ECHO_T}no" >&6
14870 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14871echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14872 cat >conftest.$ac_ext <<_ACEOF
14873#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014874#include "confdefs.h"
14875
14876# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014877
14878#ifdef F77_DUMMY_MAIN
14879# ifdef __cplusplus
14880 extern "C"
14881# endif
14882 int F77_DUMMY_MAIN() { return 1; }
14883#endif
14884int
14885main ()
14886{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014887
14888 char *name;
14889 struct hostent *he;
14890 struct hostent_data data;
14891
14892 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014893
14894 ;
14895 return 0;
14896}
14897_ACEOF
14898rm -f conftest.$ac_objext
14899if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14900 (eval $ac_compile) 2>&5
14901 ac_status=$?
14902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14903 (exit $ac_status); } &&
14904 { ac_try='test -s conftest.$ac_objext'
14905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14906 (eval $ac_try) 2>&5
14907 ac_status=$?
14908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14909 (exit $ac_status); }; }; then
14910
14911 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014912#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014913_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014914
Martin v. Löwis11437992002-04-12 09:54:03 +000014915
14916cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014917#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014918_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014919
Martin v. Löwis11437992002-04-12 09:54:03 +000014920 echo "$as_me:$LINENO: result: yes" >&5
14921echo "${ECHO_T}yes" >&6
14922
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014923else
Martin v. Löwis11437992002-04-12 09:54:03 +000014924 echo "$as_me: failed program was:" >&5
14925cat conftest.$ac_ext >&5
14926
14927 echo "$as_me:$LINENO: result: no" >&5
14928echo "${ECHO_T}no" >&6
14929
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014930fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014931rm -f conftest.$ac_objext conftest.$ac_ext
14932
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014933fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014934rm -f conftest.$ac_objext conftest.$ac_ext
14935
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014936fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014937rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014938 CFLAGS=$OLD_CFLAGS
14939
14940else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014941
Martin v. Löwis11437992002-04-12 09:54:03 +000014942
14943for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014944do
Martin v. Löwis11437992002-04-12 09:54:03 +000014945as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14946echo "$as_me:$LINENO: checking for $ac_func" >&5
14947echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14948if eval "test \"\${$as_ac_var+set}\" = set"; then
14949 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014950else
Martin v. Löwis11437992002-04-12 09:54:03 +000014951 cat >conftest.$ac_ext <<_ACEOF
14952#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014953#include "confdefs.h"
14954/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014956#include <assert.h>
14957/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014958#ifdef __cplusplus
14959extern "C"
14960#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014961/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014962 builtin and then its argument prototype would still apply. */
14963char $ac_func ();
14964char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014965
Martin v. Löwis11437992002-04-12 09:54:03 +000014966#ifdef F77_DUMMY_MAIN
14967# ifdef __cplusplus
14968 extern "C"
14969# endif
14970 int F77_DUMMY_MAIN() { return 1; }
14971#endif
14972int
14973main ()
14974{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014975/* The GNU C library defines this for functions which it implements
14976 to always fail with ENOSYS. Some functions are actually named
14977 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014978#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014979choke me
14980#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014981f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014982#endif
14983
Martin v. Löwis11437992002-04-12 09:54:03 +000014984 ;
14985 return 0;
14986}
14987_ACEOF
14988rm -f conftest.$ac_objext conftest$ac_exeext
14989if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14990 (eval $ac_link) 2>&5
14991 ac_status=$?
14992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14993 (exit $ac_status); } &&
14994 { ac_try='test -s conftest$ac_exeext'
14995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14996 (eval $ac_try) 2>&5
14997 ac_status=$?
14998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14999 (exit $ac_status); }; }; then
15000 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015001else
Martin v. Löwis11437992002-04-12 09:54:03 +000015002 echo "$as_me: failed program was:" >&5
15003cat conftest.$ac_ext >&5
15004eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015005fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015006rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015007fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015008echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15009echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15010if test `eval echo '${'$as_ac_var'}'` = yes; then
15011 cat >>confdefs.h <<_ACEOF
15012#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15013_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015014
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015015fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015016done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015017
Michael W. Hudson54241132001-12-07 15:38:26 +000015018
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015019fi
15020
Michael W. Hudson54241132001-12-07 15:38:26 +000015021
15022
15023
15024
15025
15026
Guido van Rossum627b2d71993-12-24 10:39:16 +000015027# checks for system services
15028# (none yet)
15029
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015030# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015031echo "$as_me:$LINENO: checking for __fpu_control" >&5
15032echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15033if test "${ac_cv_func___fpu_control+set}" = set; then
15034 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015035else
Martin v. Löwis11437992002-04-12 09:54:03 +000015036 cat >conftest.$ac_ext <<_ACEOF
15037#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015038#include "confdefs.h"
15039/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015040 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015041#include <assert.h>
15042/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015043#ifdef __cplusplus
15044extern "C"
15045#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015046/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015047 builtin and then its argument prototype would still apply. */
15048char __fpu_control ();
15049char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015050
Martin v. Löwis11437992002-04-12 09:54:03 +000015051#ifdef F77_DUMMY_MAIN
15052# ifdef __cplusplus
15053 extern "C"
15054# endif
15055 int F77_DUMMY_MAIN() { return 1; }
15056#endif
15057int
15058main ()
15059{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015060/* The GNU C library defines this for functions which it implements
15061 to always fail with ENOSYS. Some functions are actually named
15062 something starting with __ and the normal name is an alias. */
15063#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
15064choke me
15065#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015066f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015067#endif
15068
Martin v. Löwis11437992002-04-12 09:54:03 +000015069 ;
15070 return 0;
15071}
15072_ACEOF
15073rm -f conftest.$ac_objext conftest$ac_exeext
15074if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15075 (eval $ac_link) 2>&5
15076 ac_status=$?
15077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15078 (exit $ac_status); } &&
15079 { ac_try='test -s conftest$ac_exeext'
15080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15081 (eval $ac_try) 2>&5
15082 ac_status=$?
15083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15084 (exit $ac_status); }; }; then
15085 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015086else
Martin v. Löwis11437992002-04-12 09:54:03 +000015087 echo "$as_me: failed program was:" >&5
15088cat conftest.$ac_ext >&5
15089ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015090fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015091rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015092fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015093echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
15094echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
15095if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015096 :
15097else
Martin v. Löwis11437992002-04-12 09:54:03 +000015098
15099echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
15100echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
15101if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
15102 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015103else
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015105LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015106cat >conftest.$ac_ext <<_ACEOF
15107#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015108#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015109
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015110/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015111#ifdef __cplusplus
15112extern "C"
15113#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015114/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015115 builtin and then its argument prototype would still apply. */
15116char __fpu_control ();
15117#ifdef F77_DUMMY_MAIN
15118# ifdef __cplusplus
15119 extern "C"
15120# endif
15121 int F77_DUMMY_MAIN() { return 1; }
15122#endif
15123int
15124main ()
15125{
15126__fpu_control ();
15127 ;
15128 return 0;
15129}
15130_ACEOF
15131rm -f conftest.$ac_objext conftest$ac_exeext
15132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15133 (eval $ac_link) 2>&5
15134 ac_status=$?
15135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15136 (exit $ac_status); } &&
15137 { ac_try='test -s conftest$ac_exeext'
15138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15139 (eval $ac_try) 2>&5
15140 ac_status=$?
15141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15142 (exit $ac_status); }; }; then
15143 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015144else
Martin v. Löwis11437992002-04-12 09:54:03 +000015145 echo "$as_me: failed program was:" >&5
15146cat conftest.$ac_ext >&5
15147ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015148fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015149rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15150LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015151fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015152echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15153echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15154if test $ac_cv_lib_ieee___fpu_control = yes; then
15155 cat >>confdefs.h <<_ACEOF
15156#define HAVE_LIBIEEE 1
15157_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015158
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015159 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015160
Guido van Rossum627b2d71993-12-24 10:39:16 +000015161fi
15162
Michael W. Hudson54241132001-12-07 15:38:26 +000015163
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015164fi
15165
Michael W. Hudson54241132001-12-07 15:38:26 +000015166
Guido van Rossum7f253911997-05-09 02:42:48 +000015167# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015168echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15169echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15170
Guido van Rossum7f253911997-05-09 02:42:48 +000015171# Check whether --with-fpectl or --without-fpectl was given.
15172if test "${with_fpectl+set}" = set; then
15173 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015174
Guido van Rossum7f253911997-05-09 02:42:48 +000015175if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015176then
15177
15178cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015179#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015180_ACEOF
15181
15182 echo "$as_me:$LINENO: result: yes" >&5
15183echo "${ECHO_T}yes" >&6
15184else echo "$as_me:$LINENO: result: no" >&5
15185echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015186fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015187else
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 echo "$as_me:$LINENO: result: no" >&5
15189echo "${ECHO_T}no" >&6
15190fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015191
Guido van Rossum7f43da71994-08-01 12:15:30 +000015192# check for --with-libm=...
15193
Guido van Rossum563e7081996-09-10 18:20:48 +000015194case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015195Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015196BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015197*) LIBM=-lm
15198esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015199echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15200echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15201
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015202# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015203if test "${with_libm+set}" = set; then
15204 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015205
Guido van Rossum7f253911997-05-09 02:42:48 +000015206if test "$withval" = no
15207then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015208 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15209echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015210elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015211then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015212 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15213echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15214else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15215echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15216 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015217fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015218else
Martin v. Löwis11437992002-04-12 09:54:03 +000015219 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15220echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15221fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015222
15223# check for --with-libc=...
15224
Martin v. Löwis11437992002-04-12 09:54:03 +000015225echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15226echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15227
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015228# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015229if test "${with_libc+set}" = set; then
15230 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015231
Guido van Rossum7f253911997-05-09 02:42:48 +000015232if test "$withval" = no
15233then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015234 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15235echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015236elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015237then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015238 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
15239echo "${ECHO_T}set LIBC=\"$withval\"" >&6
15240else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
15241echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
15242 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015243fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015244else
Martin v. Löwis11437992002-04-12 09:54:03 +000015245 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
15246echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
15247fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015248
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015249# check for hypot() in math library
15250LIBS_SAVE=$LIBS
15251LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000015252
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015253for ac_func in hypot
15254do
Martin v. Löwis11437992002-04-12 09:54:03 +000015255as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15256echo "$as_me:$LINENO: checking for $ac_func" >&5
15257echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15258if eval "test \"\${$as_ac_var+set}\" = set"; then
15259 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015260else
Martin v. Löwis11437992002-04-12 09:54:03 +000015261 cat >conftest.$ac_ext <<_ACEOF
15262#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015263#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015264/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015265 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015266#include <assert.h>
15267/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015268#ifdef __cplusplus
15269extern "C"
15270#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015271/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015272 builtin and then its argument prototype would still apply. */
15273char $ac_func ();
15274char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015275
Martin v. Löwis11437992002-04-12 09:54:03 +000015276#ifdef F77_DUMMY_MAIN
15277# ifdef __cplusplus
15278 extern "C"
15279# endif
15280 int F77_DUMMY_MAIN() { return 1; }
15281#endif
15282int
15283main ()
15284{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015285/* The GNU C library defines this for functions which it implements
15286 to always fail with ENOSYS. Some functions are actually named
15287 something starting with __ and the normal name is an alias. */
15288#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15289choke me
15290#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015291f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015292#endif
15293
Martin v. Löwis11437992002-04-12 09:54:03 +000015294 ;
15295 return 0;
15296}
15297_ACEOF
15298rm -f conftest.$ac_objext conftest$ac_exeext
15299if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15300 (eval $ac_link) 2>&5
15301 ac_status=$?
15302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15303 (exit $ac_status); } &&
15304 { ac_try='test -s conftest$ac_exeext'
15305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15306 (eval $ac_try) 2>&5
15307 ac_status=$?
15308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15309 (exit $ac_status); }; }; then
15310 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015311else
Martin v. Löwis11437992002-04-12 09:54:03 +000015312 echo "$as_me: failed program was:" >&5
15313cat conftest.$ac_ext >&5
15314eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015315fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015316rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015317fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015318echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15319echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15320if test `eval echo '${'$as_ac_var'}'` = yes; then
15321 cat >>confdefs.h <<_ACEOF
15322#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15323_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015324
Michael W. Hudson54241132001-12-07 15:38:26 +000015325else
Martin v. Löwis11437992002-04-12 09:54:03 +000015326 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015327fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015328done
15329
Michael W. Hudson54241132001-12-07 15:38:26 +000015330
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015331LIBS=$LIBS_SAVE
15332
Guido van Rossumef2255b2000-03-10 22:30:29 +000015333# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015334if test "${ac_cv_header_wchar_h+set}" = set; then
15335 echo "$as_me:$LINENO: checking for wchar.h" >&5
15336echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15337if test "${ac_cv_header_wchar_h+set}" = set; then
15338 echo $ECHO_N "(cached) $ECHO_C" >&6
15339fi
15340echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15341echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015342else
Martin v. Löwis11437992002-04-12 09:54:03 +000015343 # Is the header compilable?
15344echo "$as_me:$LINENO: checking wchar.h usability" >&5
15345echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15346cat >conftest.$ac_ext <<_ACEOF
15347#line $LINENO "configure"
15348#include "confdefs.h"
15349$ac_includes_default
15350#include <wchar.h>
15351_ACEOF
15352rm -f conftest.$ac_objext
15353if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15354 (eval $ac_compile) 2>&5
15355 ac_status=$?
15356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15357 (exit $ac_status); } &&
15358 { ac_try='test -s conftest.$ac_objext'
15359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15360 (eval $ac_try) 2>&5
15361 ac_status=$?
15362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15363 (exit $ac_status); }; }; then
15364 ac_header_compiler=yes
15365else
15366 echo "$as_me: failed program was:" >&5
15367cat conftest.$ac_ext >&5
15368ac_header_compiler=no
15369fi
15370rm -f conftest.$ac_objext conftest.$ac_ext
15371echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15372echo "${ECHO_T}$ac_header_compiler" >&6
15373
15374# Is the header present?
15375echo "$as_me:$LINENO: checking wchar.h presence" >&5
15376echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
15377cat >conftest.$ac_ext <<_ACEOF
15378#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015379#include "confdefs.h"
15380#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015381_ACEOF
15382if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15383 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15384 ac_status=$?
15385 egrep -v '^ *\+' conftest.er1 >conftest.err
15386 rm -f conftest.er1
15387 cat conftest.err >&5
15388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15389 (exit $ac_status); } >/dev/null; then
15390 if test -s conftest.err; then
15391 ac_cpp_err=$ac_c_preproc_warn_flag
15392 else
15393 ac_cpp_err=
15394 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015395else
Martin v. Löwis11437992002-04-12 09:54:03 +000015396 ac_cpp_err=yes
15397fi
15398if test -z "$ac_cpp_err"; then
15399 ac_header_preproc=yes
15400else
15401 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000015402 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015403 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015404fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015405rm -f conftest.err conftest.$ac_ext
15406echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15407echo "${ECHO_T}$ac_header_preproc" >&6
15408
15409# So? What about this header?
15410case $ac_header_compiler:$ac_header_preproc in
15411 yes:no )
15412 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
15413echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15414 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15415echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15416 no:yes )
15417 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
15418echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
15419 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
15420echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
15421 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15422echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15423esac
15424echo "$as_me:$LINENO: checking for wchar.h" >&5
15425echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15426if test "${ac_cv_header_wchar_h+set}" = set; then
15427 echo $ECHO_N "(cached) $ECHO_C" >&6
15428else
15429 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000015430fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015431echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15432echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
15433
15434fi
15435if test $ac_cv_header_wchar_h = yes; then
15436
15437
15438cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015439#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015440_ACEOF
15441
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015442 wchar_h="yes"
15443
Guido van Rossumef2255b2000-03-10 22:30:29 +000015444else
Martin v. Löwis11437992002-04-12 09:54:03 +000015445 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015446
15447fi
15448
Michael W. Hudson54241132001-12-07 15:38:26 +000015449
Martin v. Löwis11437992002-04-12 09:54:03 +000015450
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015451# determine wchar_t size
15452if test "$wchar_h" = yes
15453then
Martin v. Löwis11437992002-04-12 09:54:03 +000015454 echo "$as_me:$LINENO: checking for wchar_t" >&5
15455echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
15456if test "${ac_cv_type_wchar_t+set}" = set; then
15457 echo $ECHO_N "(cached) $ECHO_C" >&6
15458else
15459 cat >conftest.$ac_ext <<_ACEOF
15460#line $LINENO "configure"
15461#include "confdefs.h"
15462#include <wchar.h>
15463
15464#ifdef F77_DUMMY_MAIN
15465# ifdef __cplusplus
15466 extern "C"
15467# endif
15468 int F77_DUMMY_MAIN() { return 1; }
15469#endif
15470int
15471main ()
15472{
15473if ((wchar_t *) 0)
15474 return 0;
15475if (sizeof (wchar_t))
15476 return 0;
15477 ;
15478 return 0;
15479}
15480_ACEOF
15481rm -f conftest.$ac_objext
15482if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15483 (eval $ac_compile) 2>&5
15484 ac_status=$?
15485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15486 (exit $ac_status); } &&
15487 { ac_try='test -s conftest.$ac_objext'
15488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15489 (eval $ac_try) 2>&5
15490 ac_status=$?
15491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15492 (exit $ac_status); }; }; then
15493 ac_cv_type_wchar_t=yes
15494else
15495 echo "$as_me: failed program was:" >&5
15496cat conftest.$ac_ext >&5
15497ac_cv_type_wchar_t=no
15498fi
15499rm -f conftest.$ac_objext conftest.$ac_ext
15500fi
15501echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
15502echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
15503
15504echo "$as_me:$LINENO: checking size of wchar_t" >&5
15505echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
15506if test "${ac_cv_sizeof_wchar_t+set}" = set; then
15507 echo $ECHO_N "(cached) $ECHO_C" >&6
15508else
15509 if test "$ac_cv_type_wchar_t" = yes; then
15510 # The cast to unsigned long works around a bug in the HP C Compiler
15511 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15512 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15513 # This bug is HP SR number 8606223364.
15514 if test "$cross_compiling" = yes; then
15515 # Depending upon the size, compute the lo and hi bounds.
15516cat >conftest.$ac_ext <<_ACEOF
15517#line $LINENO "configure"
15518#include "confdefs.h"
15519#include <wchar.h>
15520
15521#ifdef F77_DUMMY_MAIN
15522# ifdef __cplusplus
15523 extern "C"
15524# endif
15525 int F77_DUMMY_MAIN() { return 1; }
15526#endif
15527int
15528main ()
15529{
15530static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
15531test_array [0] = 0
15532
15533 ;
15534 return 0;
15535}
15536_ACEOF
15537rm -f conftest.$ac_objext
15538if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15539 (eval $ac_compile) 2>&5
15540 ac_status=$?
15541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15542 (exit $ac_status); } &&
15543 { ac_try='test -s conftest.$ac_objext'
15544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15545 (eval $ac_try) 2>&5
15546 ac_status=$?
15547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15548 (exit $ac_status); }; }; then
15549 ac_lo=0 ac_mid=0
15550 while :; do
15551 cat >conftest.$ac_ext <<_ACEOF
15552#line $LINENO "configure"
15553#include "confdefs.h"
15554#include <wchar.h>
15555
15556#ifdef F77_DUMMY_MAIN
15557# ifdef __cplusplus
15558 extern "C"
15559# endif
15560 int F77_DUMMY_MAIN() { return 1; }
15561#endif
15562int
15563main ()
15564{
15565static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15566test_array [0] = 0
15567
15568 ;
15569 return 0;
15570}
15571_ACEOF
15572rm -f conftest.$ac_objext
15573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15574 (eval $ac_compile) 2>&5
15575 ac_status=$?
15576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15577 (exit $ac_status); } &&
15578 { ac_try='test -s conftest.$ac_objext'
15579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15580 (eval $ac_try) 2>&5
15581 ac_status=$?
15582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15583 (exit $ac_status); }; }; then
15584 ac_hi=$ac_mid; break
15585else
15586 echo "$as_me: failed program was:" >&5
15587cat conftest.$ac_ext >&5
15588ac_lo=`expr $ac_mid + 1`
15589 if test $ac_lo -le $ac_mid; then
15590 ac_lo= ac_hi=
15591 break
15592 fi
15593 ac_mid=`expr 2 '*' $ac_mid + 1`
15594fi
15595rm -f conftest.$ac_objext conftest.$ac_ext
15596 done
15597else
15598 echo "$as_me: failed program was:" >&5
15599cat conftest.$ac_ext >&5
15600cat >conftest.$ac_ext <<_ACEOF
15601#line $LINENO "configure"
15602#include "confdefs.h"
15603#include <wchar.h>
15604
15605#ifdef F77_DUMMY_MAIN
15606# ifdef __cplusplus
15607 extern "C"
15608# endif
15609 int F77_DUMMY_MAIN() { return 1; }
15610#endif
15611int
15612main ()
15613{
15614static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
15615test_array [0] = 0
15616
15617 ;
15618 return 0;
15619}
15620_ACEOF
15621rm -f conftest.$ac_objext
15622if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15623 (eval $ac_compile) 2>&5
15624 ac_status=$?
15625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15626 (exit $ac_status); } &&
15627 { ac_try='test -s conftest.$ac_objext'
15628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15629 (eval $ac_try) 2>&5
15630 ac_status=$?
15631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15632 (exit $ac_status); }; }; then
15633 ac_hi=-1 ac_mid=-1
15634 while :; do
15635 cat >conftest.$ac_ext <<_ACEOF
15636#line $LINENO "configure"
15637#include "confdefs.h"
15638#include <wchar.h>
15639
15640#ifdef F77_DUMMY_MAIN
15641# ifdef __cplusplus
15642 extern "C"
15643# endif
15644 int F77_DUMMY_MAIN() { return 1; }
15645#endif
15646int
15647main ()
15648{
15649static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
15650test_array [0] = 0
15651
15652 ;
15653 return 0;
15654}
15655_ACEOF
15656rm -f conftest.$ac_objext
15657if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15658 (eval $ac_compile) 2>&5
15659 ac_status=$?
15660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15661 (exit $ac_status); } &&
15662 { ac_try='test -s conftest.$ac_objext'
15663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15664 (eval $ac_try) 2>&5
15665 ac_status=$?
15666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15667 (exit $ac_status); }; }; then
15668 ac_lo=$ac_mid; break
15669else
15670 echo "$as_me: failed program was:" >&5
15671cat conftest.$ac_ext >&5
15672ac_hi=`expr '(' $ac_mid ')' - 1`
15673 if test $ac_mid -le $ac_hi; then
15674 ac_lo= ac_hi=
15675 break
15676 fi
15677 ac_mid=`expr 2 '*' $ac_mid`
15678fi
15679rm -f conftest.$ac_objext conftest.$ac_ext
15680 done
15681else
15682 echo "$as_me: failed program was:" >&5
15683cat conftest.$ac_ext >&5
15684ac_lo= ac_hi=
15685fi
15686rm -f conftest.$ac_objext conftest.$ac_ext
15687fi
15688rm -f conftest.$ac_objext conftest.$ac_ext
15689# Binary search between lo and hi bounds.
15690while test "x$ac_lo" != "x$ac_hi"; do
15691 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15692 cat >conftest.$ac_ext <<_ACEOF
15693#line $LINENO "configure"
15694#include "confdefs.h"
15695#include <wchar.h>
15696
15697#ifdef F77_DUMMY_MAIN
15698# ifdef __cplusplus
15699 extern "C"
15700# endif
15701 int F77_DUMMY_MAIN() { return 1; }
15702#endif
15703int
15704main ()
15705{
15706static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15707test_array [0] = 0
15708
15709 ;
15710 return 0;
15711}
15712_ACEOF
15713rm -f conftest.$ac_objext
15714if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15715 (eval $ac_compile) 2>&5
15716 ac_status=$?
15717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15718 (exit $ac_status); } &&
15719 { ac_try='test -s conftest.$ac_objext'
15720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15721 (eval $ac_try) 2>&5
15722 ac_status=$?
15723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15724 (exit $ac_status); }; }; then
15725 ac_hi=$ac_mid
15726else
15727 echo "$as_me: failed program was:" >&5
15728cat conftest.$ac_ext >&5
15729ac_lo=`expr '(' $ac_mid ')' + 1`
15730fi
15731rm -f conftest.$ac_objext conftest.$ac_ext
15732done
15733case $ac_lo in
15734?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15735'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15736echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15737 { (exit 1); exit 1; }; } ;;
15738esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015739else
15740 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015741 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15742echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15743 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015744else
Martin v. Löwis11437992002-04-12 09:54:03 +000015745 cat >conftest.$ac_ext <<_ACEOF
15746#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015747#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015748#include <wchar.h>
15749
15750long longval () { return (long) (sizeof (wchar_t)); }
15751unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015752#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015753#include <stdlib.h>
15754#ifdef F77_DUMMY_MAIN
15755# ifdef __cplusplus
15756 extern "C"
15757# endif
15758 int F77_DUMMY_MAIN() { return 1; }
15759#endif
15760int
15761main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015762{
Martin v. Löwis11437992002-04-12 09:54:03 +000015763
15764 FILE *f = fopen ("conftest.val", "w");
15765 if (! f)
15766 exit (1);
15767 if (((long) (sizeof (wchar_t))) < 0)
15768 {
15769 long i = longval ();
15770 if (i != ((long) (sizeof (wchar_t))))
15771 exit (1);
15772 fprintf (f, "%ld\n", i);
15773 }
15774 else
15775 {
15776 unsigned long i = ulongval ();
15777 if (i != ((long) (sizeof (wchar_t))))
15778 exit (1);
15779 fprintf (f, "%lu\n", i);
15780 }
15781 exit (ferror (f) || fclose (f) != 0);
15782
15783 ;
15784 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015785}
Martin v. Löwis11437992002-04-12 09:54:03 +000015786_ACEOF
15787rm -f conftest$ac_exeext
15788if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15789 (eval $ac_link) 2>&5
15790 ac_status=$?
15791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15792 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15794 (eval $ac_try) 2>&5
15795 ac_status=$?
15796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15797 (exit $ac_status); }; }; then
15798 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015799else
Martin v. Löwis11437992002-04-12 09:54:03 +000015800 echo "$as_me: program exited with status $ac_status" >&5
15801echo "$as_me: failed program was:" >&5
15802cat conftest.$ac_ext >&5
15803( exit $ac_status )
15804{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15805echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15806 { (exit 1); exit 1; }; }
15807fi
15808rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15809fi
15810fi
15811rm -f conftest.val
15812else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015813 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015814fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015815fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015816echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15817echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15818cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015819#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015820_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015821
Michael W. Hudson54241132001-12-07 15:38:26 +000015822
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015823fi
15824
Martin v. Löwis11437992002-04-12 09:54:03 +000015825echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15826echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015827# Check whether --enable-unicode or --disable-unicode was given.
15828if test "${enable_unicode+set}" = set; then
15829 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015830
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015831else
15832 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015833fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015834
15835if test $enable_unicode = yes
15836then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015837 # Without any arguments, Py_UNICODE defaults to two-byte mode
15838 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015839fi
15840
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015841
15842
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015843case "$enable_unicode" in
15844ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015845 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015846#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015847_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015848
15849 ;;
15850ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015851 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015852#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015853_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015854
15855 ;;
15856esac
15857
Michael W. Hudson54241132001-12-07 15:38:26 +000015858
Martin v. Löwis11437992002-04-12 09:54:03 +000015859
15860
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015861
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015862if test "$enable_unicode" = "no"
15863then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015864 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015865 echo "$as_me:$LINENO: result: not used" >&5
15866echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015867else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015868 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015869
15870cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015871#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015872_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015873
15874 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15875 then
15876 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015877
Martin v. Löwis11437992002-04-12 09:54:03 +000015878cat >>confdefs.h <<\_ACEOF
15879#define HAVE_USABLE_WCHAR_T 1
15880_ACEOF
15881
15882 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015883#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015884_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015885
15886 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15887 then
15888 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015889 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015890#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015891_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015892
15893 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15894 then
15895 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015896 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015897#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015898_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015899
15900 else
15901 PY_UNICODE_TYPE="no type found"
15902 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015903 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15904echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015905fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015906
15907# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015908echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15909echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15910if test "${ac_cv_c_bigendian+set}" = set; then
15911 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015912else
Martin v. Löwis11437992002-04-12 09:54:03 +000015913 # See if sys/param.h defines the BYTE_ORDER macro.
15914cat >conftest.$ac_ext <<_ACEOF
15915#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015916#include "confdefs.h"
15917#include <sys/types.h>
15918#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015919
Martin v. Löwis11437992002-04-12 09:54:03 +000015920#ifdef F77_DUMMY_MAIN
15921# ifdef __cplusplus
15922 extern "C"
15923# endif
15924 int F77_DUMMY_MAIN() { return 1; }
15925#endif
15926int
15927main ()
15928{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015929#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15930 bogus endian macros
15931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015932
15933 ;
15934 return 0;
15935}
15936_ACEOF
15937rm -f conftest.$ac_objext
15938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15939 (eval $ac_compile) 2>&5
15940 ac_status=$?
15941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15942 (exit $ac_status); } &&
15943 { ac_try='test -s conftest.$ac_objext'
15944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15945 (eval $ac_try) 2>&5
15946 ac_status=$?
15947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15948 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015949 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015950cat >conftest.$ac_ext <<_ACEOF
15951#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015952#include "confdefs.h"
15953#include <sys/types.h>
15954#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015955
Martin v. Löwis11437992002-04-12 09:54:03 +000015956#ifdef F77_DUMMY_MAIN
15957# ifdef __cplusplus
15958 extern "C"
15959# endif
15960 int F77_DUMMY_MAIN() { return 1; }
15961#endif
15962int
15963main ()
15964{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015965#if BYTE_ORDER != BIG_ENDIAN
15966 not big endian
15967#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015968
15969 ;
15970 return 0;
15971}
15972_ACEOF
15973rm -f conftest.$ac_objext
15974if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15975 (eval $ac_compile) 2>&5
15976 ac_status=$?
15977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15978 (exit $ac_status); } &&
15979 { ac_try='test -s conftest.$ac_objext'
15980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15981 (eval $ac_try) 2>&5
15982 ac_status=$?
15983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15984 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015985 ac_cv_c_bigendian=yes
15986else
Martin v. Löwis11437992002-04-12 09:54:03 +000015987 echo "$as_me: failed program was:" >&5
15988cat conftest.$ac_ext >&5
15989ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015990fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015991rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015992else
Martin v. Löwis11437992002-04-12 09:54:03 +000015993 echo "$as_me: failed program was:" >&5
15994cat conftest.$ac_ext >&5
15995# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015996if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015997 # try to guess the endianess by grep'ing values into an object file
15998 ac_cv_c_bigendian=unknown
15999 cat >conftest.$ac_ext <<_ACEOF
16000#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016001#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016002short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16003short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16004void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
16005short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16006short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16007void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
16008#ifdef F77_DUMMY_MAIN
16009# ifdef __cplusplus
16010 extern "C"
16011# endif
16012 int F77_DUMMY_MAIN() { return 1; }
16013#endif
16014int
16015main ()
16016{
16017 _ascii (); _ebcdic ();
16018 ;
16019 return 0;
16020}
16021_ACEOF
16022rm -f conftest.$ac_objext
16023if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16024 (eval $ac_compile) 2>&5
16025 ac_status=$?
16026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16027 (exit $ac_status); } &&
16028 { ac_try='test -s conftest.$ac_objext'
16029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16030 (eval $ac_try) 2>&5
16031 ac_status=$?
16032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16033 (exit $ac_status); }; }; then
16034 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
16035 ac_cv_c_bigendian=yes
16036fi
16037if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16038 if test "$ac_cv_c_bigendian" = unknown; then
16039 ac_cv_c_bigendian=no
16040 else
16041 # finding both strings is unlikely to happen, but who knows?
16042 ac_cv_c_bigendian=unknown
16043 fi
16044fi
16045else
16046 echo "$as_me: failed program was:" >&5
16047cat conftest.$ac_ext >&5
16048fi
16049rm -f conftest.$ac_objext conftest.$ac_ext
16050else
16051 cat >conftest.$ac_ext <<_ACEOF
16052#line $LINENO "configure"
16053#include "confdefs.h"
16054int
16055main ()
16056{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016057 /* Are we little or big endian? From Harbison&Steele. */
16058 union
16059 {
16060 long l;
16061 char c[sizeof (long)];
16062 } u;
16063 u.l = 1;
16064 exit (u.c[sizeof (long) - 1] == 1);
16065}
Martin v. Löwis11437992002-04-12 09:54:03 +000016066_ACEOF
16067rm -f conftest$ac_exeext
16068if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16069 (eval $ac_link) 2>&5
16070 ac_status=$?
16071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16072 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16074 (eval $ac_try) 2>&5
16075 ac_status=$?
16076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16077 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016078 ac_cv_c_bigendian=no
16079else
Martin v. Löwis11437992002-04-12 09:54:03 +000016080 echo "$as_me: program exited with status $ac_status" >&5
16081echo "$as_me: failed program was:" >&5
16082cat conftest.$ac_ext >&5
16083( exit $ac_status )
16084ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016085fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016086rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016087fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016088fi
16089rm -f conftest.$ac_objext conftest.$ac_ext
16090fi
16091echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16092echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16093case $ac_cv_c_bigendian in
16094 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016095
Martin v. Löwis11437992002-04-12 09:54:03 +000016096cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016097#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016098_ACEOF
16099 ;;
16100 no)
16101 ;;
16102 *)
16103 { { echo "$as_me:$LINENO: error: unknown endianess
16104presetting ac_cv_c_bigendian=no (or yes) will help" >&5
16105echo "$as_me: error: unknown endianess
16106presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16107 { (exit 1); exit 1; }; } ;;
16108esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016109
Michael W. Hudson54241132001-12-07 15:38:26 +000016110
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016111# Check whether right shifting a negative integer extends the sign bit
16112# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016113echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16114echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16115if test "${ac_cv_rshift_extends_sign+set}" = set; then
16116 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016117else
Martin v. Löwis11437992002-04-12 09:54:03 +000016118
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016119if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016120 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016121else
Martin v. Löwis11437992002-04-12 09:54:03 +000016122 cat >conftest.$ac_ext <<_ACEOF
16123#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016124#include "confdefs.h"
16125
16126int main()
16127{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016128 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016129}
16130
Martin v. Löwis11437992002-04-12 09:54:03 +000016131_ACEOF
16132rm -f conftest$ac_exeext
16133if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16134 (eval $ac_link) 2>&5
16135 ac_status=$?
16136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16137 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16139 (eval $ac_try) 2>&5
16140 ac_status=$?
16141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16142 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016143 ac_cv_rshift_extends_sign=yes
16144else
Martin v. Löwis11437992002-04-12 09:54:03 +000016145 echo "$as_me: program exited with status $ac_status" >&5
16146echo "$as_me: failed program was:" >&5
16147cat conftest.$ac_ext >&5
16148( exit $ac_status )
16149ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016150fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016151rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16152fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016153fi
16154
Martin v. Löwis11437992002-04-12 09:54:03 +000016155echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16156echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016157if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016158then
Martin v. Löwis11437992002-04-12 09:54:03 +000016159
16160cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016161#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016162_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016163
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016164fi
16165
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016166# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016167echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16168echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16169if test "${ac_cv_have_getc_unlocked+set}" = set; then
16170 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016171else
Martin v. Löwis11437992002-04-12 09:54:03 +000016172
16173cat >conftest.$ac_ext <<_ACEOF
16174#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016175#include "confdefs.h"
16176#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016177#ifdef F77_DUMMY_MAIN
16178# ifdef __cplusplus
16179 extern "C"
16180# endif
16181 int F77_DUMMY_MAIN() { return 1; }
16182#endif
16183int
16184main ()
16185{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016186
16187 FILE *f = fopen("/dev/null", "r");
16188 flockfile(f);
16189 getc_unlocked(f);
16190 funlockfile(f);
16191
Martin v. Löwis11437992002-04-12 09:54:03 +000016192 ;
16193 return 0;
16194}
16195_ACEOF
16196rm -f conftest.$ac_objext conftest$ac_exeext
16197if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16198 (eval $ac_link) 2>&5
16199 ac_status=$?
16200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16201 (exit $ac_status); } &&
16202 { ac_try='test -s conftest$ac_exeext'
16203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16204 (eval $ac_try) 2>&5
16205 ac_status=$?
16206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16207 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016208 ac_cv_have_getc_unlocked=yes
16209else
Martin v. Löwis11437992002-04-12 09:54:03 +000016210 echo "$as_me: failed program was:" >&5
16211cat conftest.$ac_ext >&5
16212ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016213fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016214rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016215fi
16216
Martin v. Löwis11437992002-04-12 09:54:03 +000016217echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16218echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016219if test "$ac_cv_have_getc_unlocked" = yes
16220then
Martin v. Löwis11437992002-04-12 09:54:03 +000016221
16222cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016223#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016224_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016225
16226fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016227
Martin v. Löwis0daad592001-09-30 21:09:59 +000016228# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000016229echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
16230echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
16231if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
16232 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000016233else
Martin v. Löwis11437992002-04-12 09:54:03 +000016234 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000016235LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016236cat >conftest.$ac_ext <<_ACEOF
16237#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000016238#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016239
Guido van Rossum353ae582001-07-10 16:45:32 +000016240/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016241#ifdef __cplusplus
16242extern "C"
16243#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000016244/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016245 builtin and then its argument prototype would still apply. */
16246char rl_pre_input_hook ();
16247#ifdef F77_DUMMY_MAIN
16248# ifdef __cplusplus
16249 extern "C"
16250# endif
16251 int F77_DUMMY_MAIN() { return 1; }
16252#endif
16253int
16254main ()
16255{
16256rl_pre_input_hook ();
16257 ;
16258 return 0;
16259}
16260_ACEOF
16261rm -f conftest.$ac_objext conftest$ac_exeext
16262if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16263 (eval $ac_link) 2>&5
16264 ac_status=$?
16265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16266 (exit $ac_status); } &&
16267 { ac_try='test -s conftest$ac_exeext'
16268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16269 (eval $ac_try) 2>&5
16270 ac_status=$?
16271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16272 (exit $ac_status); }; }; then
16273 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016274else
Martin v. Löwis11437992002-04-12 09:54:03 +000016275 echo "$as_me: failed program was:" >&5
16276cat conftest.$ac_ext >&5
16277ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016278fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016279rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16280LIBS=$ac_check_lib_save_LIBS
16281fi
16282echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16283echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16284if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016285
Martin v. Löwis11437992002-04-12 09:54:03 +000016286cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016287#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016288_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016289
Martin v. Löwis0daad592001-09-30 21:09:59 +000016290fi
16291
Michael W. Hudson54241132001-12-07 15:38:26 +000016292
Martin v. Löwis0daad592001-09-30 21:09:59 +000016293# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016294echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16295echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16296if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16297 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016298else
Martin v. Löwis11437992002-04-12 09:54:03 +000016299 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016300LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016301cat >conftest.$ac_ext <<_ACEOF
16302#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016303#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016304
Martin v. Löwis0daad592001-09-30 21:09:59 +000016305/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016306#ifdef __cplusplus
16307extern "C"
16308#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016309/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016310 builtin and then its argument prototype would still apply. */
16311char rl_completion_matches ();
16312#ifdef F77_DUMMY_MAIN
16313# ifdef __cplusplus
16314 extern "C"
16315# endif
16316 int F77_DUMMY_MAIN() { return 1; }
16317#endif
16318int
16319main ()
16320{
16321rl_completion_matches ();
16322 ;
16323 return 0;
16324}
16325_ACEOF
16326rm -f conftest.$ac_objext conftest$ac_exeext
16327if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16328 (eval $ac_link) 2>&5
16329 ac_status=$?
16330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16331 (exit $ac_status); } &&
16332 { ac_try='test -s conftest$ac_exeext'
16333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16334 (eval $ac_try) 2>&5
16335 ac_status=$?
16336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16337 (exit $ac_status); }; }; then
16338 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000016339else
Martin v. Löwis11437992002-04-12 09:54:03 +000016340 echo "$as_me: failed program was:" >&5
16341cat conftest.$ac_ext >&5
16342ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000016343fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016344rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16345LIBS=$ac_check_lib_save_LIBS
16346fi
16347echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
16348echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
16349if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016350
Martin v. Löwis11437992002-04-12 09:54:03 +000016351cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016352#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016353_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016354
Guido van Rossum353ae582001-07-10 16:45:32 +000016355fi
16356
Jack Jansendd19cf82001-12-06 22:36:17 +000016357
Martin v. Löwis11437992002-04-12 09:54:03 +000016358echo "$as_me:$LINENO: checking for broken nice()" >&5
16359echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
16360if test "${ac_cv_broken_nice+set}" = set; then
16361 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016362else
Martin v. Löwis11437992002-04-12 09:54:03 +000016363
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016364if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016365 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016366else
Martin v. Löwis11437992002-04-12 09:54:03 +000016367 cat >conftest.$ac_ext <<_ACEOF
16368#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016369#include "confdefs.h"
16370
16371int main()
16372{
16373 int val1 = nice(1);
16374 if (val1 != -1 && val1 == nice(2))
16375 exit(0);
16376 exit(1);
16377}
16378
Martin v. Löwis11437992002-04-12 09:54:03 +000016379_ACEOF
16380rm -f conftest$ac_exeext
16381if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16382 (eval $ac_link) 2>&5
16383 ac_status=$?
16384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16385 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16387 (eval $ac_try) 2>&5
16388 ac_status=$?
16389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16390 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016391 ac_cv_broken_nice=yes
16392else
Martin v. Löwis11437992002-04-12 09:54:03 +000016393 echo "$as_me: program exited with status $ac_status" >&5
16394echo "$as_me: failed program was:" >&5
16395cat conftest.$ac_ext >&5
16396( exit $ac_status )
16397ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016398fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016399rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16400fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016401fi
16402
Martin v. Löwis11437992002-04-12 09:54:03 +000016403echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
16404echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016405if test "$ac_cv_broken_nice" = yes
16406then
Martin v. Löwis11437992002-04-12 09:54:03 +000016407
16408cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016409#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016410_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016411
16412fi
16413
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016414# Look for subsecond timestamps in struct stat
16415echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
16416echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
16417if test "${ac_cv_stat_tv_nsec+set}" = set; then
16418 echo $ECHO_N "(cached) $ECHO_C" >&6
16419else
16420 cat >conftest.$ac_ext <<_ACEOF
16421#line $LINENO "configure"
16422#include "confdefs.h"
16423#include <sys/stat.h>
16424#ifdef F77_DUMMY_MAIN
16425# ifdef __cplusplus
16426 extern "C"
16427# endif
16428 int F77_DUMMY_MAIN() { return 1; }
16429#endif
16430int
16431main ()
16432{
16433
16434struct stat st;
16435st.st_mtim.tv_nsec = 1;
16436
16437 ;
16438 return 0;
16439}
16440_ACEOF
16441rm -f conftest.$ac_objext
16442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16443 (eval $ac_compile) 2>&5
16444 ac_status=$?
16445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16446 (exit $ac_status); } &&
16447 { ac_try='test -s conftest.$ac_objext'
16448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16449 (eval $ac_try) 2>&5
16450 ac_status=$?
16451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16452 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016453 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016454else
16455 echo "$as_me: failed program was:" >&5
16456cat conftest.$ac_ext >&5
16457ac_cv_stat_tv_nsec=no
16458fi
16459rm -f conftest.$ac_objext conftest.$ac_ext
16460fi
16461
16462echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
16463echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
16464if test "$ac_cv_stat_tv_nsec" = yes
16465then
16466
16467cat >>confdefs.h <<\_ACEOF
16468#define HAVE_STAT_TV_NSEC 1
16469_ACEOF
16470
16471fi
16472
Jack Jansen666b1e72001-10-31 12:11:48 +000016473# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000016474echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
16475echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
16476if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
16477 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016478else
Martin v. Löwis11437992002-04-12 09:54:03 +000016479 cat >conftest.$ac_ext <<_ACEOF
16480#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016481#include "confdefs.h"
16482#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016483#ifdef F77_DUMMY_MAIN
16484# ifdef __cplusplus
16485 extern "C"
16486# endif
16487 int F77_DUMMY_MAIN() { return 1; }
16488#endif
16489int
16490main ()
16491{
Jack Jansen666b1e72001-10-31 12:11:48 +000016492
16493 int rtn;
16494 rtn = mvwdelch(0,0,0);
16495
Martin v. Löwis11437992002-04-12 09:54:03 +000016496 ;
16497 return 0;
16498}
16499_ACEOF
16500rm -f conftest.$ac_objext
16501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16502 (eval $ac_compile) 2>&5
16503 ac_status=$?
16504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16505 (exit $ac_status); } &&
16506 { ac_try='test -s conftest.$ac_objext'
16507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16508 (eval $ac_try) 2>&5
16509 ac_status=$?
16510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16511 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016512 ac_cv_mvwdelch_is_expression=yes
16513else
Martin v. Löwis11437992002-04-12 09:54:03 +000016514 echo "$as_me: failed program was:" >&5
16515cat conftest.$ac_ext >&5
16516ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016517fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016518rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016519fi
16520
Martin v. Löwis11437992002-04-12 09:54:03 +000016521echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
16522echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016523
16524if test "$ac_cv_mvwdelch_is_expression" = yes
16525then
Martin v. Löwis11437992002-04-12 09:54:03 +000016526
16527cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016528#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016529_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016530
16531fi
16532
Martin v. Löwis11437992002-04-12 09:54:03 +000016533echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
16534echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
16535if test "${ac_cv_window_has_flags+set}" = set; then
16536 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016537else
Martin v. Löwis11437992002-04-12 09:54:03 +000016538 cat >conftest.$ac_ext <<_ACEOF
16539#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016540#include "confdefs.h"
16541#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016542#ifdef F77_DUMMY_MAIN
16543# ifdef __cplusplus
16544 extern "C"
16545# endif
16546 int F77_DUMMY_MAIN() { return 1; }
16547#endif
16548int
16549main ()
16550{
Jack Jansen666b1e72001-10-31 12:11:48 +000016551
16552 WINDOW *w;
16553 w->_flags = 0;
16554
Martin v. Löwis11437992002-04-12 09:54:03 +000016555 ;
16556 return 0;
16557}
16558_ACEOF
16559rm -f conftest.$ac_objext
16560if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16561 (eval $ac_compile) 2>&5
16562 ac_status=$?
16563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16564 (exit $ac_status); } &&
16565 { ac_try='test -s conftest.$ac_objext'
16566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16567 (eval $ac_try) 2>&5
16568 ac_status=$?
16569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16570 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016571 ac_cv_window_has_flags=yes
16572else
Martin v. Löwis11437992002-04-12 09:54:03 +000016573 echo "$as_me: failed program was:" >&5
16574cat conftest.$ac_ext >&5
16575ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016576fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016577rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016578fi
16579
Martin v. Löwis11437992002-04-12 09:54:03 +000016580echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
16581echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016582
Jack Jansen666b1e72001-10-31 12:11:48 +000016583
16584if test "$ac_cv_window_has_flags" = yes
16585then
Martin v. Löwis11437992002-04-12 09:54:03 +000016586
16587cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016588#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016589_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016590
16591fi
16592
Martin v. Löwis11437992002-04-12 09:54:03 +000016593echo "$as_me:$LINENO: checking for socklen_t" >&5
16594echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
16595if test "${ac_cv_type_socklen_t+set}" = set; then
16596 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000016597else
Martin v. Löwis11437992002-04-12 09:54:03 +000016598 cat >conftest.$ac_ext <<_ACEOF
16599#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000016600#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000016601
16602#ifdef HAVE_SYS_TYPES_H
16603#include <sys/types.h>
16604#endif
16605#ifdef HAVE_SYS_SOCKET_H
16606#include <sys/socket.h>
16607#endif
16608
16609
Martin v. Löwis11437992002-04-12 09:54:03 +000016610#ifdef F77_DUMMY_MAIN
16611# ifdef __cplusplus
16612 extern "C"
16613# endif
16614 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016615#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016616int
16617main ()
16618{
16619if ((socklen_t *) 0)
16620 return 0;
16621if (sizeof (socklen_t))
16622 return 0;
16623 ;
16624 return 0;
16625}
16626_ACEOF
16627rm -f conftest.$ac_objext
16628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16629 (eval $ac_compile) 2>&5
16630 ac_status=$?
16631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16632 (exit $ac_status); } &&
16633 { ac_try='test -s conftest.$ac_objext'
16634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16635 (eval $ac_try) 2>&5
16636 ac_status=$?
16637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16638 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016639 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000016640else
Martin v. Löwis11437992002-04-12 09:54:03 +000016641 echo "$as_me: failed program was:" >&5
16642cat conftest.$ac_ext >&5
16643ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000016644fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016645rm -f conftest.$ac_objext conftest.$ac_ext
16646fi
16647echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
16648echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
16649if test $ac_cv_type_socklen_t = yes; then
16650 :
16651else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016652
Martin v. Löwis01c04012002-11-11 14:58:44 +000016653cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016654#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000016655_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016656
16657fi
16658
Michael W. Hudson54241132001-12-07 15:38:26 +000016659
Michael W. Hudson54241132001-12-07 15:38:26 +000016660
16661
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016662for h in `(cd $srcdir;echo Python/thread_*.h)`
16663do
16664 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16665done
16666
Michael W. Hudson54241132001-12-07 15:38:26 +000016667
Jack Jansen0b06be72002-06-21 14:48:38 +000016668SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000016669echo "$as_me:$LINENO: checking for build directories" >&5
16670echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016671for dir in $SRCDIRS; do
16672 if test ! -d $dir; then
16673 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016674 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016675done
Martin v. Löwis11437992002-04-12 09:54:03 +000016676echo "$as_me:$LINENO: result: done" >&5
16677echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000016678
Guido van Rossum627b2d71993-12-24 10:39:16 +000016679# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000016680ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016681
Martin v. Löwis11437992002-04-12 09:54:03 +000016682cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016683# This file is a shell script that caches the results of configure
16684# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016685# scripts and configure runs, see configure's option --config-cache.
16686# It is not useful on other systems. If it contains results you don't
16687# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016688#
Martin v. Löwis11437992002-04-12 09:54:03 +000016689# config.status only pays attention to the cache file if you give it
16690# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016691#
Martin v. Löwis11437992002-04-12 09:54:03 +000016692# `ac_cv_env_foo' variables (set or unset) will be overriden when
16693# loading this file, other *unset* `ac_cv_foo' will be assigned the
16694# following values.
16695
16696_ACEOF
16697
Guido van Rossumf78abae1997-01-21 22:02:36 +000016698# The following way of writing the cache mishandles newlines in values,
16699# but we know of no workaround that is simple, portable, and efficient.
16700# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016701# Ultrix sh set writes to stderr and can't be redirected directly,
16702# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000016703{
16704 (set) 2>&1 |
16705 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16706 *ac_space=\ *)
16707 # `set' does not quote correctly, so add quotes (double-quote
16708 # substitution turns \\\\ into \\, and sed turns \\ into \).
16709 sed -n \
16710 "s/'/'\\\\''/g;
16711 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16712 ;;
16713 *)
16714 # `set' quotes correctly as required by POSIX, so do not add quotes.
16715 sed -n \
16716 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16717 ;;
16718 esac;
16719} |
16720 sed '
16721 t clear
16722 : clear
16723 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16724 t end
16725 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16726 : end' >>confcache
16727if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016728 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016729 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16730 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016731 else
16732 echo "not updating unwritable cache $cache_file"
16733 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016734fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016735rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016736
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016737test "x$prefix" = xNONE && prefix=$ac_default_prefix
16738# Let make expand exec_prefix.
16739test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016740
Martin v. Löwis11437992002-04-12 09:54:03 +000016741# VPATH may cause trouble with some makes, so we remove $(srcdir),
16742# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16743# trailing colons and then remove the whole line if VPATH becomes empty
16744# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016745if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016746 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16747s/:*\$(srcdir):*/:/;
16748s/:*\${srcdir}:*/:/;
16749s/:*@srcdir@:*/:/;
16750s/^\([^=]*=[ ]*\):*/\1/;
16751s/:*$//;
16752s/^[^=]*=[ ]*$//;
16753}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016754fi
16755
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016756DEFS=-DHAVE_CONFIG_H
16757
Martin v. Löwis11437992002-04-12 09:54:03 +000016758
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016759: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016760ac_clean_files_save=$ac_clean_files
16761ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16762{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16763echo "$as_me: creating $CONFIG_STATUS" >&6;}
16764cat >$CONFIG_STATUS <<_ACEOF
16765#! $SHELL
16766# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016767# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016768# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016769# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016770
Martin v. Löwis11437992002-04-12 09:54:03 +000016771debug=false
16772SHELL=\${CONFIG_SHELL-$SHELL}
16773_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016774
Martin v. Löwis11437992002-04-12 09:54:03 +000016775cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016776
Martin v. Löwis11437992002-04-12 09:54:03 +000016777## --------------------- ##
16778## M4sh Initialization. ##
16779## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016780
Martin v. Löwis11437992002-04-12 09:54:03 +000016781# Be Bourne compatible
16782if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16783 emulate sh
16784 NULLCMD=:
16785elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16786 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016787fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016788
Martin v. Löwis11437992002-04-12 09:54:03 +000016789# NLS nuisances.
16790# Support unset when possible.
16791if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16792 as_unset=unset
16793else
16794 as_unset=false
16795fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016796
Martin v. Löwis11437992002-04-12 09:54:03 +000016797(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16798 { $as_unset LANG || test "${LANG+set}" != set; } ||
16799 { LANG=C; export LANG; }
16800(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16801 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16802 { LC_ALL=C; export LC_ALL; }
16803(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16804 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16805 { LC_TIME=C; export LC_TIME; }
16806(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16807 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16808 { LC_CTYPE=C; export LC_CTYPE; }
16809(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16810 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16811 { LANGUAGE=C; export LANGUAGE; }
16812(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16813 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16814 { LC_COLLATE=C; export LC_COLLATE; }
16815(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16816 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16817 { LC_NUMERIC=C; export LC_NUMERIC; }
16818(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16819 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16820 { LC_MESSAGES=C; export LC_MESSAGES; }
16821
16822
16823# Name of the executable.
16824as_me=`(basename "$0") 2>/dev/null ||
16825$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16826 X"$0" : 'X\(//\)$' \| \
16827 X"$0" : 'X\(/\)$' \| \
16828 . : '\(.\)' 2>/dev/null ||
16829echo X/"$0" |
16830 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16831 /^X\/\(\/\/\)$/{ s//\1/; q; }
16832 /^X\/\(\/\).*/{ s//\1/; q; }
16833 s/.*/./; q'`
16834
16835# PATH needs CR, and LINENO needs CR and PATH.
16836# Avoid depending upon Character Ranges.
16837as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16838as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16839as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16840as_cr_digits='0123456789'
16841as_cr_alnum=$as_cr_Letters$as_cr_digits
16842
16843# The user is always right.
16844if test "${PATH_SEPARATOR+set}" != set; then
16845 echo "#! /bin/sh" >conftest.sh
16846 echo "exit 0" >>conftest.sh
16847 chmod +x conftest.sh
16848 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16849 PATH_SEPARATOR=';'
16850 else
16851 PATH_SEPARATOR=:
16852 fi
16853 rm -f conftest.sh
16854fi
16855
16856
16857 as_lineno_1=$LINENO
16858 as_lineno_2=$LINENO
16859 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16860 test "x$as_lineno_1" != "x$as_lineno_2" &&
16861 test "x$as_lineno_3" = "x$as_lineno_2" || {
16862 # Find who we are. Look in the path if we contain no path at all
16863 # relative or not.
16864 case $0 in
16865 *[\\/]* ) as_myself=$0 ;;
16866 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16867for as_dir in $PATH
16868do
16869 IFS=$as_save_IFS
16870 test -z "$as_dir" && as_dir=.
16871 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16872done
16873
16874 ;;
16875 esac
16876 # We did not find ourselves, most probably we were run as `sh COMMAND'
16877 # in which case we are not to be found in the path.
16878 if test "x$as_myself" = x; then
16879 as_myself=$0
16880 fi
16881 if test ! -f "$as_myself"; then
16882 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16883echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16884 { (exit 1); exit 1; }; }
16885 fi
16886 case $CONFIG_SHELL in
16887 '')
16888 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16889for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16890do
16891 IFS=$as_save_IFS
16892 test -z "$as_dir" && as_dir=.
16893 for as_base in sh bash ksh sh5; do
16894 case $as_dir in
16895 /*)
16896 if ("$as_dir/$as_base" -c '
16897 as_lineno_1=$LINENO
16898 as_lineno_2=$LINENO
16899 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16900 test "x$as_lineno_1" != "x$as_lineno_2" &&
16901 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16902 CONFIG_SHELL=$as_dir/$as_base
16903 export CONFIG_SHELL
16904 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16905 fi;;
16906 esac
16907 done
16908done
16909;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016910 esac
16911
Martin v. Löwis11437992002-04-12 09:54:03 +000016912 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16913 # uniformly replaced by the line number. The first 'sed' inserts a
16914 # line-number line before each line; the second 'sed' does the real
16915 # work. The second script uses 'N' to pair each line-number line
16916 # with the numbered line, and appends trailing '-' during
16917 # substitution so that $LINENO is not a special case at line end.
16918 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16919 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16920 sed '=' <$as_myself |
16921 sed '
16922 N
16923 s,$,-,
16924 : loop
16925 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16926 t loop
16927 s,-$,,
16928 s,^['$as_cr_digits']*\n,,
16929 ' >$as_me.lineno &&
16930 chmod +x $as_me.lineno ||
16931 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16932echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16933 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016934
Martin v. Löwis11437992002-04-12 09:54:03 +000016935 # Don't try to exec as it changes $[0], causing all sort of problems
16936 # (the dirname of $[0] is not the place where we might find the
16937 # original and so on. Autoconf is especially sensible to this).
16938 . ./$as_me.lineno
16939 # Exit status is that of the last command.
16940 exit
16941}
16942
16943
16944case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16945 *c*,-n*) ECHO_N= ECHO_C='
16946' ECHO_T=' ' ;;
16947 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16948 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16949esac
16950
16951if expr a : '\(a\)' >/dev/null 2>&1; then
16952 as_expr=expr
16953else
16954 as_expr=false
16955fi
16956
16957rm -f conf$$ conf$$.exe conf$$.file
16958echo >conf$$.file
16959if ln -s conf$$.file conf$$ 2>/dev/null; then
16960 # We could just check for DJGPP; but this test a) works b) is more generic
16961 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16962 if test -f conf$$.exe; then
16963 # Don't use ln at all; we don't have any links
16964 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016965 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016966 as_ln_s='ln -s'
16967 fi
16968elif ln conf$$.file conf$$ 2>/dev/null; then
16969 as_ln_s=ln
16970else
16971 as_ln_s='cp -p'
16972fi
16973rm -f conf$$ conf$$.exe conf$$.file
16974
16975as_executable_p="test -f"
16976
16977# Sed expression to map a string onto a valid CPP name.
16978as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16979
16980# Sed expression to map a string onto a valid variable name.
16981as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16982
16983
16984# IFS
16985# We need space, tab and new line, in precisely that order.
16986as_nl='
16987'
16988IFS=" $as_nl"
16989
16990# CDPATH.
16991$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16992
16993exec 6>&1
16994
16995# Open the log real soon, to keep \$[0] and so on meaningful, and to
16996# report actual input values of CONFIG_FILES etc. instead of their
16997# values after options handling. Logging --version etc. is OK.
16998exec 5>>config.log
16999{
17000 echo
17001 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17002## Running $as_me. ##
17003_ASBOX
17004} >&5
17005cat >&5 <<_CSEOF
17006
Martin v. Löwis88afe662002-10-26 13:47:44 +000017007This file was extended by python $as_me 2.3, which was
Martin v. Löwis11437992002-04-12 09:54:03 +000017008generated by GNU Autoconf 2.53. Invocation command line was
17009
17010 CONFIG_FILES = $CONFIG_FILES
17011 CONFIG_HEADERS = $CONFIG_HEADERS
17012 CONFIG_LINKS = $CONFIG_LINKS
17013 CONFIG_COMMANDS = $CONFIG_COMMANDS
17014 $ $0 $@
17015
17016_CSEOF
17017echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17018echo >&5
17019_ACEOF
17020
17021# Files that config.status was made for.
17022if test -n "$ac_config_files"; then
17023 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17024fi
17025
17026if test -n "$ac_config_headers"; then
17027 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17028fi
17029
17030if test -n "$ac_config_links"; then
17031 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17032fi
17033
17034if test -n "$ac_config_commands"; then
17035 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17036fi
17037
17038cat >>$CONFIG_STATUS <<\_ACEOF
17039
17040ac_cs_usage="\
17041\`$as_me' instantiates files from templates according to the
17042current configuration.
17043
17044Usage: $0 [OPTIONS] [FILE]...
17045
17046 -h, --help print this help, then exit
17047 -V, --version print version number, then exit
17048 -d, --debug don't remove temporary files
17049 --recheck update $as_me by reconfiguring in the same conditions
17050 --file=FILE[:TEMPLATE]
17051 instantiate the configuration file FILE
17052 --header=FILE[:TEMPLATE]
17053 instantiate the configuration header FILE
17054
17055Configuration files:
17056$config_files
17057
17058Configuration headers:
17059$config_headers
17060
17061Report bugs to <bug-autoconf@gnu.org>."
17062_ACEOF
17063
17064cat >>$CONFIG_STATUS <<_ACEOF
17065ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017066python config.status 2.3
Martin v. Löwis11437992002-04-12 09:54:03 +000017067configured by $0, generated by GNU Autoconf 2.53,
17068 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17069
17070Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17071Free Software Foundation, Inc.
17072This config.status script is free software; the Free Software Foundation
17073gives unlimited permission to copy, distribute and modify it."
17074srcdir=$srcdir
17075INSTALL="$INSTALL"
17076_ACEOF
17077
17078cat >>$CONFIG_STATUS <<\_ACEOF
17079# If no file are specified by the user, then we need to provide default
17080# value. By we need to know if files were specified by the user.
17081ac_need_defaults=:
17082while test $# != 0
17083do
17084 case $1 in
17085 --*=*)
17086 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17087 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17088 shift
17089 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17090 shift
17091 ;;
17092 -*);;
17093 *) # This is not an option, so the user has probably given explicit
17094 # arguments.
17095 ac_need_defaults=false;;
17096 esac
17097
17098 case $1 in
17099 # Handling of the options.
17100_ACEOF
17101cat >>$CONFIG_STATUS <<_ACEOF
17102 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17103 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17104 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17105_ACEOF
17106cat >>$CONFIG_STATUS <<\_ACEOF
17107 --version | --vers* | -V )
17108 echo "$ac_cs_version"; exit 0 ;;
17109 --he | --h)
17110 # Conflict between --help and --header
17111 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17112Try \`$0 --help' for more information." >&5
17113echo "$as_me: error: ambiguous option: $1
17114Try \`$0 --help' for more information." >&2;}
17115 { (exit 1); exit 1; }; };;
17116 --help | --hel | -h )
17117 echo "$ac_cs_usage"; exit 0 ;;
17118 --debug | --d* | -d )
17119 debug=: ;;
17120 --file | --fil | --fi | --f )
17121 shift
17122 CONFIG_FILES="$CONFIG_FILES $1"
17123 ac_need_defaults=false;;
17124 --header | --heade | --head | --hea )
17125 shift
17126 CONFIG_HEADERS="$CONFIG_HEADERS $1"
17127 ac_need_defaults=false;;
17128
17129 # This is an error.
17130 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17131Try \`$0 --help' for more information." >&5
17132echo "$as_me: error: unrecognized option: $1
17133Try \`$0 --help' for more information." >&2;}
17134 { (exit 1); exit 1; }; } ;;
17135
17136 *) ac_config_targets="$ac_config_targets $1" ;;
17137
17138 esac
17139 shift
17140done
17141
17142_ACEOF
17143
17144
17145
17146
17147
17148cat >>$CONFIG_STATUS <<\_ACEOF
17149for ac_config_target in $ac_config_targets
17150do
17151 case "$ac_config_target" in
17152 # Handling of arguments.
17153 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17154 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
17155 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17156 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17157echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17158 { (exit 1); exit 1; }; };;
17159 esac
17160done
17161
17162# If the user did not use the arguments to specify the items to instantiate,
17163# then the envvar interface is used. Set only those that are not.
17164# We use the long form for the default assignment because of an extremely
17165# bizarre bug on SunOS 4.1.3.
17166if $ac_need_defaults; then
17167 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17168 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17169fi
17170
17171# Create a temporary directory, and hook for its removal unless debugging.
17172$debug ||
17173{
17174 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17175 trap '{ (exit 1); exit 1; }' 1 2 13 15
17176}
17177
17178# Create a (secure) tmp directory for tmp files.
17179: ${TMPDIR=/tmp}
17180{
17181 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17182 test -n "$tmp" && test -d "$tmp"
17183} ||
17184{
17185 tmp=$TMPDIR/cs$$-$RANDOM
17186 (umask 077 && mkdir $tmp)
17187} ||
17188{
17189 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17190 { (exit 1); exit 1; }
17191}
17192
17193_ACEOF
17194
17195cat >>$CONFIG_STATUS <<_ACEOF
17196
17197#
17198# CONFIG_FILES section.
17199#
17200
17201# No need to generate the scripts if there are no CONFIG_FILES.
17202# This happens for instance when ./config.status config.h
17203if test -n "\$CONFIG_FILES"; then
17204 # Protect against being on the right side of a sed subst in config.status.
17205 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17206 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17207s,@SHELL@,$SHELL,;t t
17208s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17209s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17210s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17211s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17212s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17213s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17214s,@exec_prefix@,$exec_prefix,;t t
17215s,@prefix@,$prefix,;t t
17216s,@program_transform_name@,$program_transform_name,;t t
17217s,@bindir@,$bindir,;t t
17218s,@sbindir@,$sbindir,;t t
17219s,@libexecdir@,$libexecdir,;t t
17220s,@datadir@,$datadir,;t t
17221s,@sysconfdir@,$sysconfdir,;t t
17222s,@sharedstatedir@,$sharedstatedir,;t t
17223s,@localstatedir@,$localstatedir,;t t
17224s,@libdir@,$libdir,;t t
17225s,@includedir@,$includedir,;t t
17226s,@oldincludedir@,$oldincludedir,;t t
17227s,@infodir@,$infodir,;t t
17228s,@mandir@,$mandir,;t t
17229s,@build_alias@,$build_alias,;t t
17230s,@host_alias@,$host_alias,;t t
17231s,@target_alias@,$target_alias,;t t
17232s,@DEFS@,$DEFS,;t t
17233s,@ECHO_C@,$ECHO_C,;t t
17234s,@ECHO_N@,$ECHO_N,;t t
17235s,@ECHO_T@,$ECHO_T,;t t
17236s,@LIBS@,$LIBS,;t t
17237s,@VERSION@,$VERSION,;t t
17238s,@SOVERSION@,$SOVERSION,;t t
17239s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
17240s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
17241s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
17242s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
17243s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
17244s,@MACHDEP@,$MACHDEP,;t t
17245s,@SGI_ABI@,$SGI_ABI,;t t
17246s,@CXX@,$CXX,;t t
17247s,@MAINOBJ@,$MAINOBJ,;t t
17248s,@EXEEXT@,$EXEEXT,;t t
17249s,@CC@,$CC,;t t
17250s,@CFLAGS@,$CFLAGS,;t t
17251s,@LDFLAGS@,$LDFLAGS,;t t
17252s,@CPPFLAGS@,$CPPFLAGS,;t t
17253s,@ac_ct_CC@,$ac_ct_CC,;t t
17254s,@OBJEXT@,$OBJEXT,;t t
17255s,@CPP@,$CPP,;t t
17256s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
17257s,@LIBRARY@,$LIBRARY,;t t
17258s,@LDLIBRARY@,$LDLIBRARY,;t t
17259s,@DLLLIBRARY@,$DLLLIBRARY,;t t
17260s,@BLDLIBRARY@,$BLDLIBRARY,;t t
17261s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
17262s,@INSTSONAME@,$INSTSONAME,;t t
17263s,@RUNSHARED@,$RUNSHARED,;t t
17264s,@LINKCC@,$LINKCC,;t t
17265s,@RANLIB@,$RANLIB,;t t
17266s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17267s,@AR@,$AR,;t t
17268s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17269s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17270s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17271s,@LN@,$LN,;t t
17272s,@OPT@,$OPT,;t t
17273s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
17274s,@SO@,$SO,;t t
17275s,@LDSHARED@,$LDSHARED,;t t
17276s,@BLDSHARED@,$BLDSHARED,;t t
17277s,@CCSHARED@,$CCSHARED,;t t
17278s,@LINKFORSHARED@,$LINKFORSHARED,;t t
17279s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017280s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017281s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
17282s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
17283s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
17284s,@LDLAST@,$LDLAST,;t t
17285s,@THREADOBJ@,$THREADOBJ,;t t
17286s,@DLINCLDIR@,$DLINCLDIR,;t t
17287s,@DYNLOADFILE@,$DYNLOADFILE,;t t
17288s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
17289s,@LIBOBJS@,$LIBOBJS,;t t
17290s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
17291s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
17292s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
17293s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
17294s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
17295s,@LIBM@,$LIBM,;t t
17296s,@LIBC@,$LIBC,;t t
17297s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
17298s,@THREADHEADERS@,$THREADHEADERS,;t t
17299s,@SRCDIRS@,$SRCDIRS,;t t
17300CEOF
17301
17302_ACEOF
17303
17304 cat >>$CONFIG_STATUS <<\_ACEOF
17305 # Split the substitutions into bite-sized pieces for seds with
17306 # small command number limits, like on Digital OSF/1 and HP-UX.
17307 ac_max_sed_lines=48
17308 ac_sed_frag=1 # Number of current file.
17309 ac_beg=1 # First line for current file.
17310 ac_end=$ac_max_sed_lines # Line after last line for current file.
17311 ac_more_lines=:
17312 ac_sed_cmds=
17313 while $ac_more_lines; do
17314 if test $ac_beg -gt 1; then
17315 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17316 else
17317 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17318 fi
17319 if test ! -s $tmp/subs.frag; then
17320 ac_more_lines=false
17321 else
17322 # The purpose of the label and of the branching condition is to
17323 # speed up the sed processing (if there are no `@' at all, there
17324 # is no need to browse any of the substitutions).
17325 # These are the two extra sed commands mentioned above.
17326 (echo ':t
17327 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17328 if test -z "$ac_sed_cmds"; then
17329 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17330 else
17331 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17332 fi
17333 ac_sed_frag=`expr $ac_sed_frag + 1`
17334 ac_beg=$ac_end
17335 ac_end=`expr $ac_end + $ac_max_sed_lines`
17336 fi
17337 done
17338 if test -z "$ac_sed_cmds"; then
17339 ac_sed_cmds=cat
17340 fi
17341fi # test -n "$CONFIG_FILES"
17342
17343_ACEOF
17344cat >>$CONFIG_STATUS <<\_ACEOF
17345for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17346 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17347 case $ac_file in
17348 - | *:- | *:-:* ) # input from stdin
17349 cat >$tmp/stdin
17350 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17351 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17352 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17353 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17354 * ) ac_file_in=$ac_file.in ;;
17355 esac
17356
17357 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17358 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17359$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17360 X"$ac_file" : 'X\(//\)[^/]' \| \
17361 X"$ac_file" : 'X\(//\)$' \| \
17362 X"$ac_file" : 'X\(/\)' \| \
17363 . : '\(.\)' 2>/dev/null ||
17364echo X"$ac_file" |
17365 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17366 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17367 /^X\(\/\/\)$/{ s//\1/; q; }
17368 /^X\(\/\).*/{ s//\1/; q; }
17369 s/.*/./; q'`
17370 { case "$ac_dir" in
17371 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17372 *) as_incr_dir=.;;
17373esac
17374as_dummy="$ac_dir"
17375for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17376 case $as_mkdir_dir in
17377 # Skip DOS drivespec
17378 ?:) as_incr_dir=$as_mkdir_dir ;;
17379 *)
17380 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17381 test -d "$as_incr_dir" ||
17382 mkdir "$as_incr_dir" ||
17383 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17384echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17385 { (exit 1); exit 1; }; }
17386 ;;
17387 esac
17388done; }
17389
17390 ac_builddir=.
17391
17392if test "$ac_dir" != .; then
17393 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17394 # A "../" for each directory in $ac_dir_suffix.
17395 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17396else
17397 ac_dir_suffix= ac_top_builddir=
17398fi
17399
17400case $srcdir in
17401 .) # No --srcdir option. We are building in place.
17402 ac_srcdir=.
17403 if test -z "$ac_top_builddir"; then
17404 ac_top_srcdir=.
17405 else
17406 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17407 fi ;;
17408 [\\/]* | ?:[\\/]* ) # Absolute path.
17409 ac_srcdir=$srcdir$ac_dir_suffix;
17410 ac_top_srcdir=$srcdir ;;
17411 *) # Relative path.
17412 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17413 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17414esac
17415# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
17416# absolute.
17417ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise3271202002-11-07 07:42:30 +000017418ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000017419ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
17420ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
17421
17422
17423 case $INSTALL in
17424 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17425 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
17426 esac
17427
17428 if test x"$ac_file" != x-; then
17429 { echo "$as_me:$LINENO: creating $ac_file" >&5
17430echo "$as_me: creating $ac_file" >&6;}
17431 rm -f "$ac_file"
17432 fi
17433 # Let's still pretend it is `configure' which instantiates (i.e., don't
17434 # use $as_me), people would be surprised to read:
17435 # /* config.h. Generated by config.status. */
17436 if test x"$ac_file" = x-; then
17437 configure_input=
17438 else
17439 configure_input="$ac_file. "
17440 fi
17441 configure_input=$configure_input"Generated from `echo $ac_file_in |
17442 sed 's,.*/,,'` by configure."
17443
17444 # First look for the input files in the build tree, otherwise in the
17445 # src tree.
17446 ac_file_inputs=`IFS=:
17447 for f in $ac_file_in; do
17448 case $f in
17449 -) echo $tmp/stdin ;;
17450 [\\/$]*)
17451 # Absolute (can't be DOS-style, as IFS=:)
17452 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17453echo "$as_me: error: cannot find input file: $f" >&2;}
17454 { (exit 1); exit 1; }; }
17455 echo $f;;
17456 *) # Relative
17457 if test -f "$f"; then
17458 # Build tree
17459 echo $f
17460 elif test -f "$srcdir/$f"; then
17461 # Source tree
17462 echo $srcdir/$f
17463 else
17464 # /dev/null tree
17465 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17466echo "$as_me: error: cannot find input file: $f" >&2;}
17467 { (exit 1); exit 1; }; }
17468 fi;;
17469 esac
17470 done` || { (exit 1); exit 1; }
17471_ACEOF
17472cat >>$CONFIG_STATUS <<_ACEOF
17473 sed "$ac_vpsub
17474$extrasub
17475_ACEOF
17476cat >>$CONFIG_STATUS <<\_ACEOF
17477:t
17478/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17479s,@configure_input@,$configure_input,;t t
17480s,@srcdir@,$ac_srcdir,;t t
17481s,@abs_srcdir@,$ac_abs_srcdir,;t t
17482s,@top_srcdir@,$ac_top_srcdir,;t t
17483s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17484s,@builddir@,$ac_builddir,;t t
17485s,@abs_builddir@,$ac_abs_builddir,;t t
17486s,@top_builddir@,$ac_top_builddir,;t t
17487s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17488s,@INSTALL@,$ac_INSTALL,;t t
17489" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17490 rm -f $tmp/stdin
17491 if test x"$ac_file" != x-; then
17492 mv $tmp/out $ac_file
17493 else
17494 cat $tmp/out
17495 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017496 fi
17497
Martin v. Löwis11437992002-04-12 09:54:03 +000017498done
17499_ACEOF
17500cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017501
Martin v. Löwis11437992002-04-12 09:54:03 +000017502#
17503# CONFIG_HEADER section.
17504#
Guido van Rossum627b2d71993-12-24 10:39:16 +000017505
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017506# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17507# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017508#
17509# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000017510ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17511ac_dB='[ ].*$,\1#\2'
17512ac_dC=' '
17513ac_dD=',;t'
17514# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17515ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17516ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017517ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000017518ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017519
Martin v. Löwis11437992002-04-12 09:54:03 +000017520for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000017521 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000017522 case $ac_file in
17523 - | *:- | *:-:* ) # input from stdin
17524 cat >$tmp/stdin
17525 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17526 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17527 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17528 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17529 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017530 esac
17531
Martin v. Löwis11437992002-04-12 09:54:03 +000017532 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17533echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017534
Martin v. Löwis11437992002-04-12 09:54:03 +000017535 # First look for the input files in the build tree, otherwise in the
17536 # src tree.
17537 ac_file_inputs=`IFS=:
17538 for f in $ac_file_in; do
17539 case $f in
17540 -) echo $tmp/stdin ;;
17541 [\\/$]*)
17542 # Absolute (can't be DOS-style, as IFS=:)
17543 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17544echo "$as_me: error: cannot find input file: $f" >&2;}
17545 { (exit 1); exit 1; }; }
17546 echo $f;;
17547 *) # Relative
17548 if test -f "$f"; then
17549 # Build tree
17550 echo $f
17551 elif test -f "$srcdir/$f"; then
17552 # Source tree
17553 echo $srcdir/$f
17554 else
17555 # /dev/null tree
17556 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17557echo "$as_me: error: cannot find input file: $f" >&2;}
17558 { (exit 1); exit 1; }; }
17559 fi;;
17560 esac
17561 done` || { (exit 1); exit 1; }
17562 # Remove the trailing spaces.
17563 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017564
Martin v. Löwis11437992002-04-12 09:54:03 +000017565_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017566
Martin v. Löwis11437992002-04-12 09:54:03 +000017567# Transform confdefs.h into two sed scripts, `conftest.defines' and
17568# `conftest.undefs', that substitutes the proper values into
17569# config.h.in to produce config.h. The first handles `#define'
17570# templates, and the second `#undef' templates.
17571# And first: Protect against being on the right side of a sed subst in
17572# config.status. Protect against being in an unquoted here document
17573# in config.status.
17574rm -f conftest.defines conftest.undefs
17575# Using a here document instead of a string reduces the quoting nightmare.
17576# Putting comments in sed scripts is not portable.
17577#
17578# `end' is used to avoid that the second main sed command (meant for
17579# 0-ary CPP macros) applies to n-ary macro definitions.
17580# See the Autoconf documentation for `clear'.
17581cat >confdef2sed.sed <<\_ACEOF
17582s/[\\&,]/\\&/g
17583s,[\\$`],\\&,g
17584t clear
17585: clear
17586s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
17587t end
17588s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
17589: end
17590_ACEOF
17591# If some macros were called several times there might be several times
17592# the same #defines, which is useless. Nevertheless, we may not want to
17593# sort them, since we want the *last* AC-DEFINE to be honored.
17594uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17595sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17596rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017597
17598# This sed command replaces #undef with comments. This is necessary, for
17599# example, in the case of _POSIX_SOURCE, which is predefined and required
17600# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017601cat >>conftest.undefs <<\_ACEOF
17602s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
17603_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017604
Martin v. Löwis11437992002-04-12 09:54:03 +000017605# Break up conftest.defines because some shells have a limit on the size
17606# of here documents, and old seds have small limits too (100 cmds).
17607echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
17608echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
17609echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17610echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017611rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000017612while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000017613do
Martin v. Löwis11437992002-04-12 09:54:03 +000017614 # Write a limited-size here document to $tmp/defines.sed.
17615 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17616 # Speed up: don't consider the non `#define' lines.
17617 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
17618 # Work around the forget-to-reset-the-flag bug.
17619 echo 't clr' >>$CONFIG_STATUS
17620 echo ': clr' >>$CONFIG_STATUS
17621 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017622 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017623 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17624 rm -f $tmp/in
17625 mv $tmp/out $tmp/in
17626' >>$CONFIG_STATUS
17627 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17628 rm -f conftest.defines
17629 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000017630done
Martin v. Löwis11437992002-04-12 09:54:03 +000017631rm -f conftest.defines
17632echo ' fi # egrep' >>$CONFIG_STATUS
17633echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017634
Martin v. Löwis11437992002-04-12 09:54:03 +000017635# Break up conftest.undefs because some shells have a limit on the size
17636# of here documents, and old seds have small limits too (100 cmds).
17637echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
17638rm -f conftest.tail
17639while grep . conftest.undefs >/dev/null
17640do
17641 # Write a limited-size here document to $tmp/undefs.sed.
17642 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17643 # Speed up: don't consider the non `#undef'
17644 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
17645 # Work around the forget-to-reset-the-flag bug.
17646 echo 't clr' >>$CONFIG_STATUS
17647 echo ': clr' >>$CONFIG_STATUS
17648 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
17649 echo 'CEOF
17650 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17651 rm -f $tmp/in
17652 mv $tmp/out $tmp/in
17653' >>$CONFIG_STATUS
17654 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17655 rm -f conftest.undefs
17656 mv conftest.tail conftest.undefs
17657done
17658rm -f conftest.undefs
17659
17660cat >>$CONFIG_STATUS <<\_ACEOF
17661 # Let's still pretend it is `configure' which instantiates (i.e., don't
17662 # use $as_me), people would be surprised to read:
17663 # /* config.h. Generated by config.status. */
17664 if test x"$ac_file" = x-; then
17665 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000017666 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017667 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000017668 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017669 cat $tmp/in >>$tmp/config.h
17670 rm -f $tmp/in
17671 if test x"$ac_file" != x-; then
17672 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17673 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17674echo "$as_me: $ac_file is unchanged" >&6;}
17675 else
17676 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17677$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17678 X"$ac_file" : 'X\(//\)[^/]' \| \
17679 X"$ac_file" : 'X\(//\)$' \| \
17680 X"$ac_file" : 'X\(/\)' \| \
17681 . : '\(.\)' 2>/dev/null ||
17682echo X"$ac_file" |
17683 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17684 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17685 /^X\(\/\/\)$/{ s//\1/; q; }
17686 /^X\(\/\).*/{ s//\1/; q; }
17687 s/.*/./; q'`
17688 { case "$ac_dir" in
17689 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17690 *) as_incr_dir=.;;
17691esac
17692as_dummy="$ac_dir"
17693for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17694 case $as_mkdir_dir in
17695 # Skip DOS drivespec
17696 ?:) as_incr_dir=$as_mkdir_dir ;;
17697 *)
17698 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17699 test -d "$as_incr_dir" ||
17700 mkdir "$as_incr_dir" ||
17701 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17702echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17703 { (exit 1); exit 1; }; }
17704 ;;
17705 esac
17706done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017707
Martin v. Löwis11437992002-04-12 09:54:03 +000017708 rm -f $ac_file
17709 mv $tmp/config.h $ac_file
17710 fi
17711 else
17712 cat $tmp/config.h
17713 rm -f $tmp/config.h
17714 fi
17715done
17716_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017717
Martin v. Löwis11437992002-04-12 09:54:03 +000017718cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017719
Martin v. Löwis11437992002-04-12 09:54:03 +000017720{ (exit 0); exit 0; }
17721_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017722chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000017723ac_clean_files=$ac_clean_files_save
17724
17725
17726# configure is writing to config.log, and then calls config.status.
17727# config.status does its own redirection, appending to config.log.
17728# Unfortunately, on DOS this fails, as config.log is still kept open
17729# by configure, so config.status won't be able to write to it; its
17730# output is simply discarded. So we exec the FD to /dev/null,
17731# effectively closing config.log, so it can be properly (re)opened and
17732# appended to by config.status. When coming back to configure, we
17733# need to make the FD available again.
17734if test "$no_create" != yes; then
17735 ac_cs_success=:
17736 exec 5>/dev/null
17737 $SHELL $CONFIG_STATUS || ac_cs_success=false
17738 exec 5>>config.log
17739 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17740 # would make configure fail if this is the last instruction.
17741 $ac_cs_success || { (exit 1); exit 1; }
17742fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017743
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017744
17745echo "creating Setup"
17746if test ! -f Modules/Setup
17747then
17748 cp $srcdir/Modules/Setup.dist Modules/Setup
17749fi
17750
17751echo "creating Setup.local"
17752if test ! -f Modules/Setup.local
17753then
17754 echo "# Edit this file for local setup changes" >Modules/Setup.local
17755fi
17756
17757echo "creating Makefile"
17758$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17759 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017760 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017761mv config.c Modules