blob: 2b8b404c71e77bf2de1496f6343a19faa106daf6 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002# From configure.in Revision: 1.368 .
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;;
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001344 # On FreeBSD 5.0, chroot and setgroups are not declared if _XOPEN_SOURCE
1345 # is define. Reported by M. Recht.
1346 FreeBSD/5.0*)
1347 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001348esac
1349
1350if test $define_xopen_source = yes
1351then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001352
1353cat >>confdefs.h <<\_ACEOF
1354#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001355_ACEOF
1356
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001357
1358 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1359 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1360 # several APIs are not declared. Since this is also needed in some
1361 # cases for HP-UX, we define it globally.
1362
1363
1364cat >>confdefs.h <<\_ACEOF
1365#define _XOPEN_SOURCE_EXTENDED 1
1366_ACEOF
1367
1368
1369cat >>confdefs.h <<\_ACEOF
1370#define _POSIX_C_SOURCE 200112L
1371_ACEOF
1372
1373
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001374fi
1375
Guido van Rossum91922671997-10-09 20:24:13 +00001376#
1377# SGI compilers allow the specification of the both the ABI and the
1378# ISA on the command line. Depending on the values of these switches,
1379# different and often incompatable code will be generated.
1380#
1381# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1382# thus supply support for various ABI/ISA combinations. The MACHDEP
1383# variable is also adjusted.
1384#
1385
1386if test ! -z "$SGI_ABI"
1387then
1388 CC="cc $SGI_ABI"
1389 LDFLAGS="$SGI_ABI $LDFLAGS"
1390 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1391fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001392echo "$as_me:$LINENO: result: $MACHDEP" >&5
1393echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001394
Guido van Rossum627b2d71993-12-24 10:39:16 +00001395# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001396echo "$as_me:$LINENO: checking for --without-gcc" >&5
1397echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1398
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001399# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001400if test "${with_gcc+set}" = set; then
1401 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001402
Guido van Rossum7f43da71994-08-01 12:15:30 +00001403 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001404 no) CC=cc
1405 without_gcc=yes;;
1406 yes) CC=gcc
1407 without_gcc=no;;
1408 *) CC=$withval
1409 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001410 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001411else
Martin v. Löwis11437992002-04-12 09:54:03 +00001412
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001413 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001414 AIX*) CC=cc_r
1415 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001416 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001417 case $BE_HOST_CPU in
1418 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001419 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001420 without_gcc=yes
Mark Hammond8235ea12002-07-19 06:55:41 +00001421 OPT="-O -export pragma"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001422 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001423 ;;
1424 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001425 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001426 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001427 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001428 ;;
1429 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1431echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1432 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001433 ;;
1434 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001435 AR="\$(srcdir)/Modules/ar_beos"
1436 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001437 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001438 Monterey*)
1439 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001440 without_gcc=;;
1441 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001442 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001443fi;
1444echo "$as_me:$LINENO: result: $without_gcc" >&5
1445echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001446
1447
Guido van Rossum95012191999-12-16 17:50:52 +00001448
Fred Drakea1a84e72001-03-06 05:52:16 +00001449MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001450echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1451echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1452
Guido van Rossum95012191999-12-16 17:50:52 +00001453# Check whether --with-cxx or --without-cxx was given.
1454if test "${with_cxx+set}" = set; then
1455 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001456
Martin v. Löwis22352952000-12-13 17:37:02 +00001457 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001458 case $withval in
1459 no) CXX=
1460 with_cxx=no;;
1461 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001462 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001463 with_cxx=$withval;;
1464 esac
1465else
Martin v. Löwis11437992002-04-12 09:54:03 +00001466
Guido van Rossum95012191999-12-16 17:50:52 +00001467 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001468 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001469
Martin v. Löwis11437992002-04-12 09:54:03 +00001470fi;
1471echo "$as_me:$LINENO: result: $with_cxx" >&5
1472echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001473
1474if test "$with_cxx" = "yes"
1475then
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1477echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1478 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001479fi
1480
1481
1482
1483
Martin v. Löwis11437992002-04-12 09:54:03 +00001484if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001485then
1486 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1487do
Martin v. Löwis11437992002-04-12 09:54:03 +00001488 # 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 +00001489set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001490echo "$as_me:$LINENO: checking for $ac_word" >&5
1491echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1492if test "${ac_cv_prog_CXX+set}" = set; then
1493 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001494else
1495 if test -n "$CXX"; then
1496 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1497else
Martin v. Löwis11437992002-04-12 09:54:03 +00001498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1499for as_dir in $PATH
1500do
1501 IFS=$as_save_IFS
1502 test -z "$as_dir" && as_dir=.
1503 for ac_exec_ext in '' $ac_executable_extensions; do
1504 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1505 ac_cv_prog_CXX="$ac_prog"
1506 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1507 break 2
1508 fi
1509done
1510done
1511
Martin v. Löwis22352952000-12-13 17:37:02 +00001512fi
1513fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001514CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001515if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 echo "$as_me:$LINENO: result: $CXX" >&5
1517echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001518else
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 echo "$as_me:$LINENO: result: no" >&5
1520echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001521fi
1522
Martin v. Löwis11437992002-04-12 09:54:03 +00001523 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001524done
1525test -n "$CXX" || CXX="notfound"
1526
1527 if test "$CXX" = "notfound"
1528 then
1529 CXX=
1530 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001531 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001532ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001533ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1534ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1535ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1536 cat >conftest.$ac_ext <<_ACEOF
1537#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001538#include "confdefs.h"
1539
Martin v. Löwis11437992002-04-12 09:54:03 +00001540#ifdef F77_DUMMY_MAIN
1541# ifdef __cplusplus
1542 extern "C"
1543# endif
1544 int F77_DUMMY_MAIN() { return 1; }
1545#endif
1546int
1547main ()
1548{
Michael W. Hudson54241132001-12-07 15:38:26 +00001549
Martin v. Löwis11437992002-04-12 09:54:03 +00001550 ;
1551 return 0;
1552}
1553_ACEOF
1554ac_clean_files_save=$ac_clean_files
1555ac_clean_files="$ac_clean_files a.out a.exe"
1556# Try to create an executable without -o first, disregard a.out.
1557# It will help us diagnose broken compilers, and finding out an intuition
1558# of exeext.
1559echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1560echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1561ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1562if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1563 (eval $ac_link_default) 2>&5
1564 ac_status=$?
1565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1566 (exit $ac_status); }; then
1567 # Find the output, starting from the most likely. This scheme is
1568# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1569# resort.
1570
1571# Be careful to initialize this variable, since it used to be cached.
1572# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1573ac_cv_exeext=
1574for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1575 ls a.out conftest 2>/dev/null;
1576 ls a.* conftest.* 2>/dev/null`; do
1577 case $ac_file in
1578 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1579 a.out ) # We found the default executable, but exeext='' is most
1580 # certainly right.
1581 break;;
1582 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1583 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1584 export ac_cv_exeext
1585 break;;
1586 * ) break;;
1587 esac
1588done
1589else
1590 echo "$as_me: failed program was:" >&5
1591cat conftest.$ac_ext >&5
1592{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1593echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1594 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001595fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001596
1597ac_exeext=$ac_cv_exeext
1598echo "$as_me:$LINENO: result: $ac_file" >&5
1599echo "${ECHO_T}$ac_file" >&6
1600
1601# Check the compiler produces executables we can run. If not, either
1602# the compiler is broken, or we cross compile.
1603echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1604echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1605# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1606# If not cross compiling, check that we can run a simple program.
1607if test "$cross_compiling" != yes; then
1608 if { ac_try='./$ac_file'
1609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1610 (eval $ac_try) 2>&5
1611 ac_status=$?
1612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1613 (exit $ac_status); }; }; then
1614 cross_compiling=no
1615 else
1616 if test "$cross_compiling" = maybe; then
1617 cross_compiling=yes
1618 else
1619 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1620If you meant to cross compile, use \`--host'." >&5
1621echo "$as_me: error: cannot run C++ compiled programs.
1622If you meant to cross compile, use \`--host'." >&2;}
1623 { (exit 1); exit 1; }; }
1624 fi
1625 fi
1626fi
1627echo "$as_me:$LINENO: result: yes" >&5
1628echo "${ECHO_T}yes" >&6
1629
1630rm -f a.out a.exe conftest$ac_cv_exeext
1631ac_clean_files=$ac_clean_files_save
1632# Check the compiler produces executables we can run. If not, either
1633# the compiler is broken, or we cross compile.
1634echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1635echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1636echo "$as_me:$LINENO: result: $cross_compiling" >&5
1637echo "${ECHO_T}$cross_compiling" >&6
1638
1639echo "$as_me:$LINENO: checking for suffix of executables" >&5
1640echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1641if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1642 (eval $ac_link) 2>&5
1643 ac_status=$?
1644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1645 (exit $ac_status); }; then
1646 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1647# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1648# work properly (i.e., refer to `conftest.exe'), while it won't with
1649# `rm'.
1650for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1651 case $ac_file in
1652 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1653 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1654 export ac_cv_exeext
1655 break;;
1656 * ) break;;
1657 esac
1658done
1659else
1660 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1661echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1662 { (exit 1); exit 1; }; }
1663fi
1664
1665rm -f conftest$ac_cv_exeext
1666echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1667echo "${ECHO_T}$ac_cv_exeext" >&6
1668
1669rm -f conftest.$ac_ext
1670EXEEXT=$ac_cv_exeext
1671ac_exeext=$EXEEXT
1672
1673 ac_ext=c
1674ac_cpp='$CPP $CPPFLAGS'
1675ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1676ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1677ac_compiler_gnu=$ac_cv_c_compiler_gnu
1678
1679
Martin v. Löwis22352952000-12-13 17:37:02 +00001680
1681 fi
1682fi
1683
Guido van Rossum8b131c51995-03-09 14:10:13 +00001684# If the user switches compilers, we can't believe the cache
1685if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1686then
Martin v. Löwis11437992002-04-12 09:54:03 +00001687 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1688(it is also a good idea to do 'make clean' before compiling)" >&5
1689echo "$as_me: error: cached CC is different -- throw away $cache_file
1690(it is also a good idea to do 'make clean' before compiling)" >&2;}
1691 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001692fi
1693
Martin v. Löwis11437992002-04-12 09:54:03 +00001694ac_ext=c
1695ac_cpp='$CPP $CPPFLAGS'
1696ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1697ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1698ac_compiler_gnu=$ac_cv_c_compiler_gnu
1699if test -n "$ac_tool_prefix"; then
1700 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1701set dummy ${ac_tool_prefix}gcc; ac_word=$2
1702echo "$as_me:$LINENO: checking for $ac_word" >&5
1703echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1704if test "${ac_cv_prog_CC+set}" = set; then
1705 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001706else
1707 if test -n "$CC"; then
1708 ac_cv_prog_CC="$CC" # Let the user override the test.
1709else
Martin v. Löwis11437992002-04-12 09:54:03 +00001710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1711for as_dir in $PATH
1712do
1713 IFS=$as_save_IFS
1714 test -z "$as_dir" && as_dir=.
1715 for ac_exec_ext in '' $ac_executable_extensions; do
1716 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1717 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1718 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1719 break 2
1720 fi
1721done
1722done
1723
Jack Jansendd19cf82001-12-06 22:36:17 +00001724fi
1725fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001726CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001727if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001728 echo "$as_me:$LINENO: result: $CC" >&5
1729echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001730else
Martin v. Löwis11437992002-04-12 09:54:03 +00001731 echo "$as_me:$LINENO: result: no" >&5
1732echo "${ECHO_T}no" >&6
1733fi
1734
1735fi
1736if test -z "$ac_cv_prog_CC"; then
1737 ac_ct_CC=$CC
1738 # Extract the first word of "gcc", so it can be a program name with args.
1739set dummy gcc; ac_word=$2
1740echo "$as_me:$LINENO: checking for $ac_word" >&5
1741echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1742if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1743 echo $ECHO_N "(cached) $ECHO_C" >&6
1744else
1745 if test -n "$ac_ct_CC"; then
1746 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1747else
1748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1749for as_dir in $PATH
1750do
1751 IFS=$as_save_IFS
1752 test -z "$as_dir" && as_dir=.
1753 for ac_exec_ext in '' $ac_executable_extensions; do
1754 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1755 ac_cv_prog_ac_ct_CC="gcc"
1756 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1757 break 2
1758 fi
1759done
1760done
1761
1762fi
1763fi
1764ac_ct_CC=$ac_cv_prog_ac_ct_CC
1765if test -n "$ac_ct_CC"; then
1766 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1767echo "${ECHO_T}$ac_ct_CC" >&6
1768else
1769 echo "$as_me:$LINENO: result: no" >&5
1770echo "${ECHO_T}no" >&6
1771fi
1772
1773 CC=$ac_ct_CC
1774else
1775 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001776fi
1777
Jack Jansendd19cf82001-12-06 22:36:17 +00001778if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001779 if test -n "$ac_tool_prefix"; then
1780 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1781set dummy ${ac_tool_prefix}cc; ac_word=$2
1782echo "$as_me:$LINENO: checking for $ac_word" >&5
1783echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1784if test "${ac_cv_prog_CC+set}" = set; then
1785 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001786else
1787 if test -n "$CC"; then
1788 ac_cv_prog_CC="$CC" # Let the user override the test.
1789else
Martin v. Löwis11437992002-04-12 09:54:03 +00001790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1791for as_dir in $PATH
1792do
1793 IFS=$as_save_IFS
1794 test -z "$as_dir" && as_dir=.
1795 for ac_exec_ext in '' $ac_executable_extensions; do
1796 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1797 ac_cv_prog_CC="${ac_tool_prefix}cc"
1798 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1799 break 2
1800 fi
1801done
1802done
1803
1804fi
1805fi
1806CC=$ac_cv_prog_CC
1807if test -n "$CC"; then
1808 echo "$as_me:$LINENO: result: $CC" >&5
1809echo "${ECHO_T}$CC" >&6
1810else
1811 echo "$as_me:$LINENO: result: no" >&5
1812echo "${ECHO_T}no" >&6
1813fi
1814
1815fi
1816if test -z "$ac_cv_prog_CC"; then
1817 ac_ct_CC=$CC
1818 # Extract the first word of "cc", so it can be a program name with args.
1819set dummy cc; ac_word=$2
1820echo "$as_me:$LINENO: checking for $ac_word" >&5
1821echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1822if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1823 echo $ECHO_N "(cached) $ECHO_C" >&6
1824else
1825 if test -n "$ac_ct_CC"; then
1826 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1827else
1828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1829for as_dir in $PATH
1830do
1831 IFS=$as_save_IFS
1832 test -z "$as_dir" && as_dir=.
1833 for ac_exec_ext in '' $ac_executable_extensions; do
1834 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1835 ac_cv_prog_ac_ct_CC="cc"
1836 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1837 break 2
1838 fi
1839done
1840done
1841
1842fi
1843fi
1844ac_ct_CC=$ac_cv_prog_ac_ct_CC
1845if test -n "$ac_ct_CC"; then
1846 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1847echo "${ECHO_T}$ac_ct_CC" >&6
1848else
1849 echo "$as_me:$LINENO: result: no" >&5
1850echo "${ECHO_T}no" >&6
1851fi
1852
1853 CC=$ac_ct_CC
1854else
1855 CC="$ac_cv_prog_CC"
1856fi
1857
1858fi
1859if test -z "$CC"; then
1860 # Extract the first word of "cc", so it can be a program name with args.
1861set dummy cc; ac_word=$2
1862echo "$as_me:$LINENO: checking for $ac_word" >&5
1863echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1864if test "${ac_cv_prog_CC+set}" = set; then
1865 echo $ECHO_N "(cached) $ECHO_C" >&6
1866else
1867 if test -n "$CC"; then
1868 ac_cv_prog_CC="$CC" # Let the user override the test.
1869else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001870 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1872for as_dir in $PATH
1873do
1874 IFS=$as_save_IFS
1875 test -z "$as_dir" && as_dir=.
1876 for ac_exec_ext in '' $ac_executable_extensions; do
1877 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1878 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1879 ac_prog_rejected=yes
1880 continue
1881 fi
1882 ac_cv_prog_CC="cc"
1883 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1884 break 2
1885 fi
1886done
1887done
1888
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001889if test $ac_prog_rejected = yes; then
1890 # We found a bogon in the path, so make sure we never use it.
1891 set dummy $ac_cv_prog_CC
1892 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001893 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001894 # We chose a different compiler from the bogus one.
1895 # However, it has the same basename, so the bogon will be chosen
1896 # first if we set CC to just the basename; use the full file name.
1897 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001898 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001899 shift
1900 ac_cv_prog_CC="$@"
1901 fi
1902fi
1903fi
1904fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001905CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001906if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001907 echo "$as_me:$LINENO: result: $CC" >&5
1908echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001909else
Martin v. Löwis11437992002-04-12 09:54:03 +00001910 echo "$as_me:$LINENO: result: no" >&5
1911echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001912fi
1913
Martin v. Löwis11437992002-04-12 09:54:03 +00001914fi
1915if test -z "$CC"; then
1916 if test -n "$ac_tool_prefix"; then
1917 for ac_prog in cl
1918 do
1919 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1920set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1921echo "$as_me:$LINENO: checking for $ac_word" >&5
1922echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1923if test "${ac_cv_prog_CC+set}" = set; then
1924 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001925else
1926 if test -n "$CC"; then
1927 ac_cv_prog_CC="$CC" # Let the user override the test.
1928else
Martin v. Löwis11437992002-04-12 09:54:03 +00001929as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1930for as_dir in $PATH
1931do
1932 IFS=$as_save_IFS
1933 test -z "$as_dir" && as_dir=.
1934 for ac_exec_ext in '' $ac_executable_extensions; do
1935 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1936 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1937 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1938 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001939 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001940done
1941done
1942
1943fi
1944fi
1945CC=$ac_cv_prog_CC
1946if test -n "$CC"; then
1947 echo "$as_me:$LINENO: result: $CC" >&5
1948echo "${ECHO_T}$CC" >&6
1949else
1950 echo "$as_me:$LINENO: result: no" >&5
1951echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001952fi
1953
Martin v. Löwis11437992002-04-12 09:54:03 +00001954 test -n "$CC" && break
1955 done
1956fi
1957if test -z "$CC"; then
1958 ac_ct_CC=$CC
1959 for ac_prog in cl
1960do
1961 # Extract the first word of "$ac_prog", so it can be a program name with args.
1962set dummy $ac_prog; ac_word=$2
1963echo "$as_me:$LINENO: checking for $ac_word" >&5
1964echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1965if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1966 echo $ECHO_N "(cached) $ECHO_C" >&6
1967else
1968 if test -n "$ac_ct_CC"; then
1969 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1970else
1971as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1972for as_dir in $PATH
1973do
1974 IFS=$as_save_IFS
1975 test -z "$as_dir" && as_dir=.
1976 for ac_exec_ext in '' $ac_executable_extensions; do
1977 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1978 ac_cv_prog_ac_ct_CC="$ac_prog"
1979 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1980 break 2
1981 fi
1982done
1983done
Jack Jansendd19cf82001-12-06 22:36:17 +00001984
Martin v. Löwis11437992002-04-12 09:54:03 +00001985fi
1986fi
1987ac_ct_CC=$ac_cv_prog_ac_ct_CC
1988if test -n "$ac_ct_CC"; then
1989 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1990echo "${ECHO_T}$ac_ct_CC" >&6
1991else
1992 echo "$as_me:$LINENO: result: no" >&5
1993echo "${ECHO_T}no" >&6
1994fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001995
Martin v. Löwis11437992002-04-12 09:54:03 +00001996 test -n "$ac_ct_CC" && break
1997done
Michael W. Hudson54241132001-12-07 15:38:26 +00001998
Martin v. Löwis11437992002-04-12 09:54:03 +00001999 CC=$ac_ct_CC
2000fi
2001
2002fi
2003
2004
2005test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2006echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2007 { (exit 1); exit 1; }; }
2008
2009# Provide some information about the compiler.
2010echo "$as_me:$LINENO:" \
2011 "checking for C compiler version" >&5
2012ac_compiler=`set X $ac_compile; echo $2`
2013{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2014 (eval $ac_compiler --version </dev/null >&5) 2>&5
2015 ac_status=$?
2016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2017 (exit $ac_status); }
2018{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2019 (eval $ac_compiler -v </dev/null >&5) 2>&5
2020 ac_status=$?
2021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2022 (exit $ac_status); }
2023{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2024 (eval $ac_compiler -V </dev/null >&5) 2>&5
2025 ac_status=$?
2026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2027 (exit $ac_status); }
2028
2029cat >conftest.$ac_ext <<_ACEOF
2030#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002031#include "confdefs.h"
2032
Martin v. Löwis11437992002-04-12 09:54:03 +00002033#ifdef F77_DUMMY_MAIN
2034# ifdef __cplusplus
2035 extern "C"
2036# endif
2037 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002039int
2040main ()
2041{
2042
2043 ;
2044 return 0;
2045}
2046_ACEOF
2047ac_clean_files_save=$ac_clean_files
2048ac_clean_files="$ac_clean_files a.out a.exe"
2049# Try to create an executable without -o first, disregard a.out.
2050# It will help us diagnose broken compilers, and finding out an intuition
2051# of exeext.
2052echo "$as_me:$LINENO: checking for C compiler default output" >&5
2053echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2054ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2055if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2056 (eval $ac_link_default) 2>&5
2057 ac_status=$?
2058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2059 (exit $ac_status); }; then
2060 # Find the output, starting from the most likely. This scheme is
2061# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2062# resort.
2063
2064# Be careful to initialize this variable, since it used to be cached.
2065# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2066ac_cv_exeext=
2067for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2068 ls a.out conftest 2>/dev/null;
2069 ls a.* conftest.* 2>/dev/null`; do
2070 case $ac_file in
2071 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2072 a.out ) # We found the default executable, but exeext='' is most
2073 # certainly right.
2074 break;;
2075 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2076 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2077 export ac_cv_exeext
2078 break;;
2079 * ) break;;
2080 esac
2081done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002082else
Martin v. Löwis11437992002-04-12 09:54:03 +00002083 echo "$as_me: failed program was:" >&5
2084cat conftest.$ac_ext >&5
2085{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2086echo "$as_me: error: C compiler cannot create executables" >&2;}
2087 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002088fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002089
Martin v. Löwis11437992002-04-12 09:54:03 +00002090ac_exeext=$ac_cv_exeext
2091echo "$as_me:$LINENO: result: $ac_file" >&5
2092echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002093
Martin v. Löwis11437992002-04-12 09:54:03 +00002094# Check the compiler produces executables we can run. If not, either
2095# the compiler is broken, or we cross compile.
2096echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2097echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2098# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2099# If not cross compiling, check that we can run a simple program.
2100if test "$cross_compiling" != yes; then
2101 if { ac_try='./$ac_file'
2102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2103 (eval $ac_try) 2>&5
2104 ac_status=$?
2105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2106 (exit $ac_status); }; }; then
2107 cross_compiling=no
2108 else
2109 if test "$cross_compiling" = maybe; then
2110 cross_compiling=yes
2111 else
2112 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2113If you meant to cross compile, use \`--host'." >&5
2114echo "$as_me: error: cannot run C compiled programs.
2115If you meant to cross compile, use \`--host'." >&2;}
2116 { (exit 1); exit 1; }; }
2117 fi
2118 fi
2119fi
2120echo "$as_me:$LINENO: result: yes" >&5
2121echo "${ECHO_T}yes" >&6
2122
2123rm -f a.out a.exe conftest$ac_cv_exeext
2124ac_clean_files=$ac_clean_files_save
2125# Check the compiler produces executables we can run. If not, either
2126# the compiler is broken, or we cross compile.
2127echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2128echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2129echo "$as_me:$LINENO: result: $cross_compiling" >&5
2130echo "${ECHO_T}$cross_compiling" >&6
2131
2132echo "$as_me:$LINENO: checking for suffix of executables" >&5
2133echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2134if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2135 (eval $ac_link) 2>&5
2136 ac_status=$?
2137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2138 (exit $ac_status); }; then
2139 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2140# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2141# work properly (i.e., refer to `conftest.exe'), while it won't with
2142# `rm'.
2143for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2144 case $ac_file in
2145 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2146 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2147 export ac_cv_exeext
2148 break;;
2149 * ) break;;
2150 esac
2151done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002152else
Martin v. Löwis11437992002-04-12 09:54:03 +00002153 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2154echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2155 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002156fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002157
Martin v. Löwis11437992002-04-12 09:54:03 +00002158rm -f conftest$ac_cv_exeext
2159echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2160echo "${ECHO_T}$ac_cv_exeext" >&6
2161
2162rm -f conftest.$ac_ext
2163EXEEXT=$ac_cv_exeext
2164ac_exeext=$EXEEXT
2165echo "$as_me:$LINENO: checking for suffix of object files" >&5
2166echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2167if test "${ac_cv_objext+set}" = set; then
2168 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002169else
Martin v. Löwis11437992002-04-12 09:54:03 +00002170 cat >conftest.$ac_ext <<_ACEOF
2171#line $LINENO "configure"
2172#include "confdefs.h"
2173
2174#ifdef F77_DUMMY_MAIN
2175# ifdef __cplusplus
2176 extern "C"
2177# endif
2178 int F77_DUMMY_MAIN() { return 1; }
2179#endif
2180int
2181main ()
2182{
2183
2184 ;
2185 return 0;
2186}
2187_ACEOF
2188rm -f conftest.o conftest.obj
2189if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2190 (eval $ac_compile) 2>&5
2191 ac_status=$?
2192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2193 (exit $ac_status); }; then
2194 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2195 case $ac_file in
2196 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2197 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2198 break;;
2199 esac
2200done
2201else
2202 echo "$as_me: failed program was:" >&5
2203cat conftest.$ac_ext >&5
2204{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2205echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2206 { (exit 1); exit 1; }; }
2207fi
2208
2209rm -f conftest.$ac_cv_objext conftest.$ac_ext
2210fi
2211echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2212echo "${ECHO_T}$ac_cv_objext" >&6
2213OBJEXT=$ac_cv_objext
2214ac_objext=$OBJEXT
2215echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2216echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2217if test "${ac_cv_c_compiler_gnu+set}" = set; then
2218 echo $ECHO_N "(cached) $ECHO_C" >&6
2219else
2220 cat >conftest.$ac_ext <<_ACEOF
2221#line $LINENO "configure"
2222#include "confdefs.h"
2223
2224#ifdef F77_DUMMY_MAIN
2225# ifdef __cplusplus
2226 extern "C"
2227# endif
2228 int F77_DUMMY_MAIN() { return 1; }
2229#endif
2230int
2231main ()
2232{
2233#ifndef __GNUC__
2234 choke me
2235#endif
2236
2237 ;
2238 return 0;
2239}
2240_ACEOF
2241rm -f conftest.$ac_objext
2242if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2243 (eval $ac_compile) 2>&5
2244 ac_status=$?
2245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2246 (exit $ac_status); } &&
2247 { ac_try='test -s conftest.$ac_objext'
2248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2249 (eval $ac_try) 2>&5
2250 ac_status=$?
2251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2252 (exit $ac_status); }; }; then
2253 ac_compiler_gnu=yes
2254else
2255 echo "$as_me: failed program was:" >&5
2256cat conftest.$ac_ext >&5
2257ac_compiler_gnu=no
2258fi
2259rm -f conftest.$ac_objext conftest.$ac_ext
2260ac_cv_c_compiler_gnu=$ac_compiler_gnu
2261
2262fi
2263echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2264echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2265GCC=`test $ac_compiler_gnu = yes && echo yes`
2266ac_test_CFLAGS=${CFLAGS+set}
2267ac_save_CFLAGS=$CFLAGS
2268CFLAGS="-g"
2269echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2270echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2271if test "${ac_cv_prog_cc_g+set}" = set; then
2272 echo $ECHO_N "(cached) $ECHO_C" >&6
2273else
2274 cat >conftest.$ac_ext <<_ACEOF
2275#line $LINENO "configure"
2276#include "confdefs.h"
2277
2278#ifdef F77_DUMMY_MAIN
2279# ifdef __cplusplus
2280 extern "C"
2281# endif
2282 int F77_DUMMY_MAIN() { return 1; }
2283#endif
2284int
2285main ()
2286{
2287
2288 ;
2289 return 0;
2290}
2291_ACEOF
2292rm -f conftest.$ac_objext
2293if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2294 (eval $ac_compile) 2>&5
2295 ac_status=$?
2296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2297 (exit $ac_status); } &&
2298 { ac_try='test -s conftest.$ac_objext'
2299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2300 (eval $ac_try) 2>&5
2301 ac_status=$?
2302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2303 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002304 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002305else
Martin v. Löwis11437992002-04-12 09:54:03 +00002306 echo "$as_me: failed program was:" >&5
2307cat conftest.$ac_ext >&5
2308ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002309fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002310rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002311fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002312echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2313echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002314if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002315 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002316elif test $ac_cv_prog_cc_g = yes; then
2317 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002318 CFLAGS="-g -O2"
2319 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002320 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002321 fi
2322else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002323 if test "$GCC" = yes; then
2324 CFLAGS="-O2"
2325 else
2326 CFLAGS=
2327 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002328fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002329# Some people use a C++ compiler to compile C. Since we use `exit',
2330# in C++ we need to declare it. In case someone uses the same compiler
2331# for both compiling C and C++ we need to have the C++ compiler decide
2332# the declaration of exit, since it's the most demanding environment.
2333cat >conftest.$ac_ext <<_ACEOF
2334#ifndef __cplusplus
2335 choke me
2336#endif
2337_ACEOF
2338rm -f conftest.$ac_objext
2339if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2340 (eval $ac_compile) 2>&5
2341 ac_status=$?
2342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2343 (exit $ac_status); } &&
2344 { ac_try='test -s conftest.$ac_objext'
2345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2346 (eval $ac_try) 2>&5
2347 ac_status=$?
2348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2349 (exit $ac_status); }; }; then
2350 for ac_declaration in \
2351 ''\
2352 '#include <stdlib.h>' \
2353 'extern "C" void std::exit (int) throw (); using std::exit;' \
2354 'extern "C" void std::exit (int); using std::exit;' \
2355 'extern "C" void exit (int) throw ();' \
2356 'extern "C" void exit (int);' \
2357 'void exit (int);'
2358do
2359 cat >conftest.$ac_ext <<_ACEOF
2360#line $LINENO "configure"
2361#include "confdefs.h"
2362#include <stdlib.h>
2363$ac_declaration
2364#ifdef F77_DUMMY_MAIN
2365# ifdef __cplusplus
2366 extern "C"
2367# endif
2368 int F77_DUMMY_MAIN() { return 1; }
2369#endif
2370int
2371main ()
2372{
2373exit (42);
2374 ;
2375 return 0;
2376}
2377_ACEOF
2378rm -f conftest.$ac_objext
2379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2380 (eval $ac_compile) 2>&5
2381 ac_status=$?
2382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2383 (exit $ac_status); } &&
2384 { ac_try='test -s conftest.$ac_objext'
2385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2386 (eval $ac_try) 2>&5
2387 ac_status=$?
2388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2389 (exit $ac_status); }; }; then
2390 :
2391else
2392 echo "$as_me: failed program was:" >&5
2393cat conftest.$ac_ext >&5
2394continue
2395fi
2396rm -f conftest.$ac_objext conftest.$ac_ext
2397 cat >conftest.$ac_ext <<_ACEOF
2398#line $LINENO "configure"
2399#include "confdefs.h"
2400$ac_declaration
2401#ifdef F77_DUMMY_MAIN
2402# ifdef __cplusplus
2403 extern "C"
2404# endif
2405 int F77_DUMMY_MAIN() { return 1; }
2406#endif
2407int
2408main ()
2409{
2410exit (42);
2411 ;
2412 return 0;
2413}
2414_ACEOF
2415rm -f conftest.$ac_objext
2416if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2417 (eval $ac_compile) 2>&5
2418 ac_status=$?
2419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2420 (exit $ac_status); } &&
2421 { ac_try='test -s conftest.$ac_objext'
2422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2423 (eval $ac_try) 2>&5
2424 ac_status=$?
2425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2426 (exit $ac_status); }; }; then
2427 break
2428else
2429 echo "$as_me: failed program was:" >&5
2430cat conftest.$ac_ext >&5
2431fi
2432rm -f conftest.$ac_objext conftest.$ac_ext
2433done
2434rm -f conftest*
2435if test -n "$ac_declaration"; then
2436 echo '#ifdef __cplusplus' >>confdefs.h
2437 echo $ac_declaration >>confdefs.h
2438 echo '#endif' >>confdefs.h
2439fi
2440
2441else
2442 echo "$as_me: failed program was:" >&5
2443cat conftest.$ac_ext >&5
2444fi
2445rm -f conftest.$ac_objext conftest.$ac_ext
2446ac_ext=c
2447ac_cpp='$CPP $CPPFLAGS'
2448ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2449ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2450ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002451
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002452
2453# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002454
2455ac_ext=c
2456ac_cpp='$CPP $CPPFLAGS'
2457ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2458ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2459ac_compiler_gnu=$ac_cv_c_compiler_gnu
2460echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2461echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002462# On Suns, sometimes $CPP names a directory.
2463if test -n "$CPP" && test -d "$CPP"; then
2464 CPP=
2465fi
2466if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 if test "${ac_cv_prog_CPP+set}" = set; then
2468 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002469else
Martin v. Löwis11437992002-04-12 09:54:03 +00002470 # Double quotes because CPP needs to be expanded
2471 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2472 do
2473 ac_preproc_ok=false
2474for ac_c_preproc_warn_flag in '' yes
2475do
2476 # Use a header file that comes with gcc, so configuring glibc
2477 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002478 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 # not just through cpp. "Syntax error" is here to catch this case.
2480 cat >conftest.$ac_ext <<_ACEOF
2481#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002482#include "confdefs.h"
2483#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 Syntax error
2485_ACEOF
2486if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2487 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2488 ac_status=$?
2489 egrep -v '^ *\+' conftest.er1 >conftest.err
2490 rm -f conftest.er1
2491 cat conftest.err >&5
2492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2493 (exit $ac_status); } >/dev/null; then
2494 if test -s conftest.err; then
2495 ac_cpp_err=$ac_c_preproc_warn_flag
2496 else
2497 ac_cpp_err=
2498 fi
2499else
2500 ac_cpp_err=yes
2501fi
2502if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002503 :
2504else
Martin v. Löwis11437992002-04-12 09:54:03 +00002505 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002506 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002507 # Broken: fails on valid input.
2508continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002509fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002510rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002511
Martin v. Löwis11437992002-04-12 09:54:03 +00002512 # OK, works on sane cases. Now check whether non-existent headers
2513 # can be detected and how.
2514 cat >conftest.$ac_ext <<_ACEOF
2515#line $LINENO "configure"
2516#include "confdefs.h"
2517#include <ac_nonexistent.h>
2518_ACEOF
2519if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2520 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2521 ac_status=$?
2522 egrep -v '^ *\+' conftest.er1 >conftest.err
2523 rm -f conftest.er1
2524 cat conftest.err >&5
2525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2526 (exit $ac_status); } >/dev/null; then
2527 if test -s conftest.err; then
2528 ac_cpp_err=$ac_c_preproc_warn_flag
2529 else
2530 ac_cpp_err=
2531 fi
2532else
2533 ac_cpp_err=yes
2534fi
2535if test -z "$ac_cpp_err"; then
2536 # Broken: success on invalid input.
2537continue
2538else
2539 echo "$as_me: failed program was:" >&5
2540 cat conftest.$ac_ext >&5
2541 # Passes both tests.
2542ac_preproc_ok=:
2543break
2544fi
2545rm -f conftest.err conftest.$ac_ext
2546
2547done
2548# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2549rm -f conftest.err conftest.$ac_ext
2550if $ac_preproc_ok; then
2551 break
2552fi
2553
2554 done
2555 ac_cv_prog_CPP=$CPP
2556
2557fi
2558 CPP=$ac_cv_prog_CPP
2559else
2560 ac_cv_prog_CPP=$CPP
2561fi
2562echo "$as_me:$LINENO: result: $CPP" >&5
2563echo "${ECHO_T}$CPP" >&6
2564ac_preproc_ok=false
2565for ac_c_preproc_warn_flag in '' yes
2566do
2567 # Use a header file that comes with gcc, so configuring glibc
2568 # with a fresh cross-compiler works.
2569 # On the NeXT, cc -E runs the code through the compiler's parser,
2570 # not just through cpp. "Syntax error" is here to catch this case.
2571 cat >conftest.$ac_ext <<_ACEOF
2572#line $LINENO "configure"
2573#include "confdefs.h"
2574#include <assert.h>
2575 Syntax error
2576_ACEOF
2577if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2578 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2579 ac_status=$?
2580 egrep -v '^ *\+' conftest.er1 >conftest.err
2581 rm -f conftest.er1
2582 cat conftest.err >&5
2583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2584 (exit $ac_status); } >/dev/null; then
2585 if test -s conftest.err; then
2586 ac_cpp_err=$ac_c_preproc_warn_flag
2587 else
2588 ac_cpp_err=
2589 fi
2590else
2591 ac_cpp_err=yes
2592fi
2593if test -z "$ac_cpp_err"; then
2594 :
2595else
2596 echo "$as_me: failed program was:" >&5
2597 cat conftest.$ac_ext >&5
2598 # Broken: fails on valid input.
2599continue
2600fi
2601rm -f conftest.err conftest.$ac_ext
2602
2603 # OK, works on sane cases. Now check whether non-existent headers
2604 # can be detected and how.
2605 cat >conftest.$ac_ext <<_ACEOF
2606#line $LINENO "configure"
2607#include "confdefs.h"
2608#include <ac_nonexistent.h>
2609_ACEOF
2610if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2611 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2612 ac_status=$?
2613 egrep -v '^ *\+' conftest.er1 >conftest.err
2614 rm -f conftest.er1
2615 cat conftest.err >&5
2616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2617 (exit $ac_status); } >/dev/null; then
2618 if test -s conftest.err; then
2619 ac_cpp_err=$ac_c_preproc_warn_flag
2620 else
2621 ac_cpp_err=
2622 fi
2623else
2624 ac_cpp_err=yes
2625fi
2626if test -z "$ac_cpp_err"; then
2627 # Broken: success on invalid input.
2628continue
2629else
2630 echo "$as_me: failed program was:" >&5
2631 cat conftest.$ac_ext >&5
2632 # Passes both tests.
2633ac_preproc_ok=:
2634break
2635fi
2636rm -f conftest.err conftest.$ac_ext
2637
2638done
2639# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2640rm -f conftest.err conftest.$ac_ext
2641if $ac_preproc_ok; then
2642 :
2643else
2644 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2645echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2646 { (exit 1); exit 1; }; }
2647fi
2648
2649ac_ext=c
2650ac_cpp='$CPP $CPPFLAGS'
2651ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2652ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2653ac_compiler_gnu=$ac_cv_c_compiler_gnu
2654
2655
2656
2657echo "$as_me:$LINENO: checking for AIX" >&5
2658echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2659cat >conftest.$ac_ext <<_ACEOF
2660#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002661#include "confdefs.h"
2662#ifdef _AIX
2663 yes
2664#endif
2665
Martin v. Löwis11437992002-04-12 09:54:03 +00002666_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002667if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2668 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 echo "$as_me:$LINENO: result: yes" >&5
2670echo "${ECHO_T}yes" >&6
2671cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002672#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002673_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002674
2675else
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 echo "$as_me:$LINENO: result: no" >&5
2677echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002678fi
2679rm -f conftest*
2680
Michael W. Hudson54241132001-12-07 15:38:26 +00002681
Martin v. Löwis11437992002-04-12 09:54:03 +00002682echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2683echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2684if test "${ac_cv_header_stdc+set}" = set; then
2685 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002686else
Martin v. Löwis11437992002-04-12 09:54:03 +00002687 cat >conftest.$ac_ext <<_ACEOF
2688#line $LINENO "configure"
2689#include "confdefs.h"
2690#include <stdlib.h>
2691#include <stdarg.h>
2692#include <string.h>
2693#include <float.h>
2694
2695_ACEOF
2696if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2697 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2698 ac_status=$?
2699 egrep -v '^ *\+' conftest.er1 >conftest.err
2700 rm -f conftest.er1
2701 cat conftest.err >&5
2702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2703 (exit $ac_status); } >/dev/null; then
2704 if test -s conftest.err; then
2705 ac_cpp_err=$ac_c_preproc_warn_flag
2706 else
2707 ac_cpp_err=
2708 fi
2709else
2710 ac_cpp_err=yes
2711fi
2712if test -z "$ac_cpp_err"; then
2713 ac_cv_header_stdc=yes
2714else
2715 echo "$as_me: failed program was:" >&5
2716 cat conftest.$ac_ext >&5
2717 ac_cv_header_stdc=no
2718fi
2719rm -f conftest.err conftest.$ac_ext
2720
2721if test $ac_cv_header_stdc = yes; then
2722 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2723 cat >conftest.$ac_ext <<_ACEOF
2724#line $LINENO "configure"
2725#include "confdefs.h"
2726#include <string.h>
2727
2728_ACEOF
2729if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2730 egrep "memchr" >/dev/null 2>&1; then
2731 :
2732else
2733 ac_cv_header_stdc=no
2734fi
2735rm -f conftest*
2736
2737fi
2738
2739if test $ac_cv_header_stdc = yes; then
2740 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2741 cat >conftest.$ac_ext <<_ACEOF
2742#line $LINENO "configure"
2743#include "confdefs.h"
2744#include <stdlib.h>
2745
2746_ACEOF
2747if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2748 egrep "free" >/dev/null 2>&1; then
2749 :
2750else
2751 ac_cv_header_stdc=no
2752fi
2753rm -f conftest*
2754
2755fi
2756
2757if test $ac_cv_header_stdc = yes; then
2758 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2759 if test "$cross_compiling" = yes; then
2760 :
2761else
2762 cat >conftest.$ac_ext <<_ACEOF
2763#line $LINENO "configure"
2764#include "confdefs.h"
2765#include <ctype.h>
2766#if ((' ' & 0x0FF) == 0x020)
2767# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2768# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2769#else
2770# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2771 || ('j' <= (c) && (c) <= 'r') \
2772 || ('s' <= (c) && (c) <= 'z'))
2773# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2774#endif
2775
2776#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2777int
2778main ()
2779{
2780 int i;
2781 for (i = 0; i < 256; i++)
2782 if (XOR (islower (i), ISLOWER (i))
2783 || toupper (i) != TOUPPER (i))
2784 exit(2);
2785 exit (0);
2786}
2787_ACEOF
2788rm -f conftest$ac_exeext
2789if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2790 (eval $ac_link) 2>&5
2791 ac_status=$?
2792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2793 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2795 (eval $ac_try) 2>&5
2796 ac_status=$?
2797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2798 (exit $ac_status); }; }; then
2799 :
2800else
2801 echo "$as_me: program exited with status $ac_status" >&5
2802echo "$as_me: failed program was:" >&5
2803cat conftest.$ac_ext >&5
2804( exit $ac_status )
2805ac_cv_header_stdc=no
2806fi
2807rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2808fi
2809fi
2810fi
2811echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2812echo "${ECHO_T}$ac_cv_header_stdc" >&6
2813if test $ac_cv_header_stdc = yes; then
2814
2815cat >>confdefs.h <<\_ACEOF
2816#define STDC_HEADERS 1
2817_ACEOF
2818
2819fi
2820
2821# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2832 inttypes.h stdint.h unistd.h
2833do
2834as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2835echo "$as_me:$LINENO: checking for $ac_header" >&5
2836echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2837if eval "test \"\${$as_ac_Header+set}\" = set"; then
2838 echo $ECHO_N "(cached) $ECHO_C" >&6
2839else
2840 cat >conftest.$ac_ext <<_ACEOF
2841#line $LINENO "configure"
2842#include "confdefs.h"
2843$ac_includes_default
2844
2845#include <$ac_header>
2846_ACEOF
2847rm -f conftest.$ac_objext
2848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2849 (eval $ac_compile) 2>&5
2850 ac_status=$?
2851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2852 (exit $ac_status); } &&
2853 { ac_try='test -s conftest.$ac_objext'
2854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2855 (eval $ac_try) 2>&5
2856 ac_status=$?
2857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2858 (exit $ac_status); }; }; then
2859 eval "$as_ac_Header=yes"
2860else
2861 echo "$as_me: failed program was:" >&5
2862cat conftest.$ac_ext >&5
2863eval "$as_ac_Header=no"
2864fi
2865rm -f conftest.$ac_objext conftest.$ac_ext
2866fi
2867echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2868echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2869if test `eval echo '${'$as_ac_Header'}'` = yes; then
2870 cat >>confdefs.h <<_ACEOF
2871#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2872_ACEOF
2873
2874fi
2875
2876done
2877
2878
2879if test "${ac_cv_header_minix_config_h+set}" = set; then
2880 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2881echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2882if test "${ac_cv_header_minix_config_h+set}" = set; then
2883 echo $ECHO_N "(cached) $ECHO_C" >&6
2884fi
2885echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2886echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2887else
2888 # Is the header compilable?
2889echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2890echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2891cat >conftest.$ac_ext <<_ACEOF
2892#line $LINENO "configure"
2893#include "confdefs.h"
2894$ac_includes_default
2895#include <minix/config.h>
2896_ACEOF
2897rm -f conftest.$ac_objext
2898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2899 (eval $ac_compile) 2>&5
2900 ac_status=$?
2901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2902 (exit $ac_status); } &&
2903 { ac_try='test -s conftest.$ac_objext'
2904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2905 (eval $ac_try) 2>&5
2906 ac_status=$?
2907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2908 (exit $ac_status); }; }; then
2909 ac_header_compiler=yes
2910else
2911 echo "$as_me: failed program was:" >&5
2912cat conftest.$ac_ext >&5
2913ac_header_compiler=no
2914fi
2915rm -f conftest.$ac_objext conftest.$ac_ext
2916echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2917echo "${ECHO_T}$ac_header_compiler" >&6
2918
2919# Is the header present?
2920echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2921echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2922cat >conftest.$ac_ext <<_ACEOF
2923#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002924#include "confdefs.h"
2925#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002926_ACEOF
2927if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2928 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2929 ac_status=$?
2930 egrep -v '^ *\+' conftest.er1 >conftest.err
2931 rm -f conftest.er1
2932 cat conftest.err >&5
2933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2934 (exit $ac_status); } >/dev/null; then
2935 if test -s conftest.err; then
2936 ac_cpp_err=$ac_c_preproc_warn_flag
2937 else
2938 ac_cpp_err=
2939 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002940else
Martin v. Löwis11437992002-04-12 09:54:03 +00002941 ac_cpp_err=yes
2942fi
2943if test -z "$ac_cpp_err"; then
2944 ac_header_preproc=yes
2945else
2946 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002947 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002948 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002949fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002950rm -f conftest.err conftest.$ac_ext
2951echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2952echo "${ECHO_T}$ac_header_preproc" >&6
2953
2954# So? What about this header?
2955case $ac_header_compiler:$ac_header_preproc in
2956 yes:no )
2957 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2958echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2959 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2960echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2961 no:yes )
2962 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2963echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2964 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2965echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2966 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2967echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2968esac
2969echo "$as_me:$LINENO: checking for minix/config.h" >&5
2970echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2971if test "${ac_cv_header_minix_config_h+set}" = set; then
2972 echo $ECHO_N "(cached) $ECHO_C" >&6
2973else
2974 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002975fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002976echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2977echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2978
2979fi
2980if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002981 MINIX=yes
2982else
Martin v. Löwis11437992002-04-12 09:54:03 +00002983 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002984fi
2985
Martin v. Löwis11437992002-04-12 09:54:03 +00002986
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002987if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002988
2989cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002990#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002991_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002992
Martin v. Löwis11437992002-04-12 09:54:03 +00002993
2994cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002995#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002996_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002997
Martin v. Löwis11437992002-04-12 09:54:03 +00002998
2999cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003000#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003001_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003002
3003fi
3004
3005
Michael W. Hudson54241132001-12-07 15:38:26 +00003006
Martin v. Löwis11437992002-04-12 09:54:03 +00003007echo "$as_me:$LINENO: checking for --with-suffix" >&5
3008echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003009
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003010# Check whether --with-suffix or --without-suffix was given.
3011if test "${with_suffix+set}" = set; then
3012 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003013
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003014 case $withval in
3015 no) EXEEXT=;;
3016 yes) EXEEXT=.exe;;
3017 *) EXEEXT=$withval;;
3018 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003019fi;
3020echo "$as_me:$LINENO: result: $EXEEXT" >&5
3021echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003022
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003023# Test whether we're running on a non-case-sensitive system, in which
3024# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003025
Martin v. Löwis11437992002-04-12 09:54:03 +00003026echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3027echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003028if test ! -d CaseSensitiveTestDir; then
3029mkdir CaseSensitiveTestDir
3030fi
3031
3032if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003033then
Martin v. Löwis11437992002-04-12 09:54:03 +00003034 echo "$as_me:$LINENO: result: yes" >&5
3035echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003036 BUILDEXEEXT=.exe
3037else
Martin v. Löwis11437992002-04-12 09:54:03 +00003038 echo "$as_me:$LINENO: result: no" >&5
3039echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003040 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003041fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003042rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003043
Guido van Rossumdd997f71998-10-07 19:58:26 +00003044case $MACHDEP in
3045bsdos*)
3046 case $CC in
3047 gcc) CC="$CC -D_HAVE_BSDI";;
3048 esac;;
3049esac
3050
Guido van Rossum24b1e751997-08-21 02:29:16 +00003051case $ac_sys_system in
3052hp*|HP*)
3053 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003054 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003055 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003056Monterey*)
3057 case $CC in
3058 cc) CC="$CC -Wl,-Bexport";;
3059 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003060SunOS*)
3061 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003062
3063cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003064#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003065_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003066
3067 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003068esac
3069
Michael W. Hudson54241132001-12-07 15:38:26 +00003070
3071
Martin v. Löwis11437992002-04-12 09:54:03 +00003072echo "$as_me:$LINENO: checking LIBRARY" >&5
3073echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003074if test -z "$LIBRARY"
3075then
3076 LIBRARY='libpython$(VERSION).a'
3077fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003078echo "$as_me:$LINENO: result: $LIBRARY" >&5
3079echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003080
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003081# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003082# name of the library into which to insert object files). BLDLIBRARY is also
3083# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3084# is blank as the main program is not linked directly against LDLIBRARY.
3085# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3086# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3087# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3088# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003089#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003090# RUNSHARED is used to run shared python without installed libraries
3091#
3092# INSTSONAME is the name of the shared library that will be use to install
3093# on the system - some systems like version suffix, others don't
3094
3095
Michael W. Hudson54241132001-12-07 15:38:26 +00003096
3097
3098
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003099
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003100LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003101BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003102INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003103DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003104LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003105RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003106
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003107# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003108# If CXX is set, and if it is needed to link a main function that was
3109# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3110# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003111# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003112# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003113
Martin v. Löwis11437992002-04-12 09:54:03 +00003114echo "$as_me:$LINENO: checking LINKCC" >&5
3115echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003116if test -z "$LINKCC"
3117then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003118 if test -z "$CXX"; then
3119 LINKCC="\$(PURIFY) \$(CC)"
3120 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003121 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003122 $CXX -c conftest.$ac_ext 2>&5
3123 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3124 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3125 then
3126 LINKCC="\$(PURIFY) \$(CC)"
3127 else
3128 LINKCC="\$(PURIFY) \$(CXX)"
3129 fi
3130 rm -fr conftest*
3131 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003132 case $ac_sys_system in
3133 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003134 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003135 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003136 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003137 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003138 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003139 esac
3140fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003141echo "$as_me:$LINENO: result: $LINKCC" >&5
3142echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003143
Martin v. Löwis11437992002-04-12 09:54:03 +00003144echo "$as_me:$LINENO: checking for --enable-shared" >&5
3145echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003146# Check whether --enable-shared or --disable-shared was given.
3147if test "${enable_shared+set}" = set; then
3148 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003149
Martin v. Löwis11437992002-04-12 09:54:03 +00003150fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003151
3152if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003153then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003154 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003155 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003156 enable_shared="yes";;
3157 *)
3158 enable_shared="no";;
3159 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003160fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003161echo "$as_me:$LINENO: result: $enable_shared" >&5
3162echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003163
3164
Martin v. Löwis11437992002-04-12 09:54:03 +00003165echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3166echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003167
Guido van Rossumb8552162001-09-05 14:58:11 +00003168# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3169# library that we build, but we do not want to link against it (we
3170# will find it with a -framework option). For this reason there is an
3171# extra variable BLDLIBRARY against which Python and the extension
3172# modules are linked, BLDLIBRARY. This is normally the same as
3173# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003174if test "$enable_framework"
3175then
3176 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3177 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3178 BLDLIBRARY=''
3179else
3180 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003181fi
Jack Jansene578a632001-08-15 01:27:14 +00003182
Martin v. Löwis1142de32002-03-29 16:28:31 +00003183# Other platforms follow
3184if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003185
3186cat >>confdefs.h <<\_ACEOF
3187#define Py_ENABLE_SHARED 1
3188_ACEOF
3189
Martin v. Löwis1142de32002-03-29 16:28:31 +00003190 case $ac_sys_system in
3191 BeOS*)
3192 LDLIBRARY='libpython$(VERSION).so'
3193 ;;
3194 CYGWIN*)
3195 LDLIBRARY='libpython$(VERSION).dll.a'
3196 DLLLIBRARY='libpython$(VERSION).dll'
3197 ;;
3198 SunOS*)
3199 LDLIBRARY='libpython$(VERSION).so'
3200 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3201 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3202 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003203 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003204 LDLIBRARY='libpython$(VERSION).so'
3205 BLDLIBRARY='-L. -lpython$(VERSION)'
3206 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3207 INSTSONAME="$LDLIBRARY".$SOVERSION
3208 ;;
3209 hp*|HP*)
3210 LDLIBRARY='libpython$(VERSION).sl'
3211 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3212 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3213 ;;
3214 OSF*)
3215 LDLIBRARY='libpython$(VERSION).so'
3216 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3217 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3218 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003219 atheos*)
3220 LDLIBRARY='libpython$(VERSION).so'
3221 BLDLIBRARY='-L. -lpython$(VERSION)'
3222 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3223 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003224 esac
3225 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3226 case $MACHDEP in
3227 dguxR4)
3228 LDLIBRARY='libpython$(VERSION).so'
3229 OPT="$OPT -pic"
3230 ;;
3231 esac
3232fi
3233
Martin v. Löwis11437992002-04-12 09:54:03 +00003234echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3235echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003236
Martin v. Löwis11437992002-04-12 09:54:03 +00003237if test -n "$ac_tool_prefix"; then
3238 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3239set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3240echo "$as_me:$LINENO: checking for $ac_word" >&5
3241echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3242if test "${ac_cv_prog_RANLIB+set}" = set; then
3243 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003244else
3245 if test -n "$RANLIB"; then
3246 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3247else
Martin v. Löwis11437992002-04-12 09:54:03 +00003248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3249for as_dir in $PATH
3250do
3251 IFS=$as_save_IFS
3252 test -z "$as_dir" && as_dir=.
3253 for ac_exec_ext in '' $ac_executable_extensions; do
3254 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3255 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3256 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3257 break 2
3258 fi
3259done
3260done
3261
Guido van Rossum627b2d71993-12-24 10:39:16 +00003262fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003263fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003264RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003265if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003266 echo "$as_me:$LINENO: result: $RANLIB" >&5
3267echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003268else
Martin v. Löwis11437992002-04-12 09:54:03 +00003269 echo "$as_me:$LINENO: result: no" >&5
3270echo "${ECHO_T}no" >&6
3271fi
3272
3273fi
3274if test -z "$ac_cv_prog_RANLIB"; then
3275 ac_ct_RANLIB=$RANLIB
3276 # Extract the first word of "ranlib", so it can be a program name with args.
3277set dummy ranlib; ac_word=$2
3278echo "$as_me:$LINENO: checking for $ac_word" >&5
3279echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3280if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3281 echo $ECHO_N "(cached) $ECHO_C" >&6
3282else
3283 if test -n "$ac_ct_RANLIB"; then
3284 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3285else
3286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3287for as_dir in $PATH
3288do
3289 IFS=$as_save_IFS
3290 test -z "$as_dir" && as_dir=.
3291 for ac_exec_ext in '' $ac_executable_extensions; do
3292 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3293 ac_cv_prog_ac_ct_RANLIB="ranlib"
3294 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3295 break 2
3296 fi
3297done
3298done
3299
3300 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3301fi
3302fi
3303ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3304if test -n "$ac_ct_RANLIB"; then
3305 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3306echo "${ECHO_T}$ac_ct_RANLIB" >&6
3307else
3308 echo "$as_me:$LINENO: result: no" >&5
3309echo "${ECHO_T}no" >&6
3310fi
3311
3312 RANLIB=$ac_ct_RANLIB
3313else
3314 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003315fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003316
3317
Guido van Rossum7f43da71994-08-01 12:15:30 +00003318for ac_prog in ar aal
3319do
Martin v. Löwis11437992002-04-12 09:54:03 +00003320 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003321set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003322echo "$as_me:$LINENO: checking for $ac_word" >&5
3323echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3324if test "${ac_cv_prog_AR+set}" = set; then
3325 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003326else
3327 if test -n "$AR"; then
3328 ac_cv_prog_AR="$AR" # Let the user override the test.
3329else
Martin v. Löwis11437992002-04-12 09:54:03 +00003330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3331for as_dir in $PATH
3332do
3333 IFS=$as_save_IFS
3334 test -z "$as_dir" && as_dir=.
3335 for ac_exec_ext in '' $ac_executable_extensions; do
3336 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3337 ac_cv_prog_AR="$ac_prog"
3338 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3339 break 2
3340 fi
3341done
3342done
3343
Guido van Rossum7f43da71994-08-01 12:15:30 +00003344fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003345fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003346AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003347if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003348 echo "$as_me:$LINENO: result: $AR" >&5
3349echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003350else
Martin v. Löwis11437992002-04-12 09:54:03 +00003351 echo "$as_me:$LINENO: result: no" >&5
3352echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003353fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003354
Martin v. Löwis11437992002-04-12 09:54:03 +00003355 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003356done
3357test -n "$AR" || AR="ar"
3358
Michael W. Hudson54241132001-12-07 15:38:26 +00003359
Neil Schemenauera42c8272001-03-31 00:01:55 +00003360case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003361bsdos*|hp*|HP*)
3362 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003363 if test -z "$INSTALL"
3364 then
3365 INSTALL="${srcdir}/install-sh -c"
3366 fi
3367esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003368ac_aux_dir=
3369for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3370 if test -f $ac_dir/install-sh; then
3371 ac_aux_dir=$ac_dir
3372 ac_install_sh="$ac_aux_dir/install-sh -c"
3373 break
3374 elif test -f $ac_dir/install.sh; then
3375 ac_aux_dir=$ac_dir
3376 ac_install_sh="$ac_aux_dir/install.sh -c"
3377 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003378 elif test -f $ac_dir/shtool; then
3379 ac_aux_dir=$ac_dir
3380 ac_install_sh="$ac_aux_dir/shtool install -c"
3381 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003382 fi
3383done
3384if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003385 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3386echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3387 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003388fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003389ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3390ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3391ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003392
3393# Find a good install program. We prefer a C program (faster),
3394# so one script is as good as another. But avoid the broken or
3395# incompatible versions:
3396# SysV /etc/install, /usr/sbin/install
3397# SunOS /usr/etc/install
3398# IRIX /sbin/install
3399# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003400# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003401# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3402# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3403# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3404# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003405echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3406echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003407if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003408if test "${ac_cv_path_install+set}" = set; then
3409 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003410else
Martin v. Löwis11437992002-04-12 09:54:03 +00003411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3412for as_dir in $PATH
3413do
3414 IFS=$as_save_IFS
3415 test -z "$as_dir" && as_dir=.
3416 # Account for people who put trailing slashes in PATH elements.
3417case $as_dir/ in
3418 ./ | .// | /cC/* | \
3419 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3420 /usr/ucb/* ) ;;
3421 *)
3422 # OSF1 and SCO ODT 3.0 have their own names for install.
3423 # Don't use installbsd from OSF since it installs stuff as root
3424 # by default.
3425 for ac_prog in ginstall scoinst install; do
3426 for ac_exec_ext in '' $ac_executable_extensions; do
3427 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3428 if test $ac_prog = install &&
3429 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3430 # AIX install. It has an incompatible calling convention.
3431 :
3432 elif test $ac_prog = install &&
3433 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3434 # program-specific install script used by HP pwplus--don't use.
3435 :
3436 else
3437 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3438 break 3
3439 fi
3440 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003441 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003442 done
3443 ;;
3444esac
3445done
3446
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003447
3448fi
3449 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003450 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003451 else
3452 # As a last resort, use the slow shell script. We don't cache a
3453 # path for INSTALL within a source directory, because that will
3454 # break other packages using the cache if that directory is
3455 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003456 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003457 fi
3458fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003459echo "$as_me:$LINENO: result: $INSTALL" >&5
3460echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003461
3462# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3463# It thinks the first close brace ends the variable substitution.
3464test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3465
Martin v. Löwis11437992002-04-12 09:54:03 +00003466test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003467
3468test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3469
Michael W. Hudson54241132001-12-07 15:38:26 +00003470
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003471# Not every filesystem supports hard links
3472
3473if test -z "$LN" ; then
3474 case $ac_sys_system in
3475 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003476 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003477 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003478 *) LN=ln;;
3479 esac
3480fi
3481
Fred Drake109d9862001-07-11 06:27:56 +00003482# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003483echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3484echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3485
Fred Drake109d9862001-07-11 06:27:56 +00003486# Check whether --with-pydebug or --without-pydebug was given.
3487if test "${with_pydebug+set}" = set; then
3488 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003489
Fred Drake109d9862001-07-11 06:27:56 +00003490if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003491then
3492
3493cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003494#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003495_ACEOF
3496
3497 echo "$as_me:$LINENO: result: yes" >&5
3498echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003499 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003500else echo "$as_me:$LINENO: result: no" >&5
3501echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003502fi
3503else
Martin v. Löwis11437992002-04-12 09:54:03 +00003504 echo "$as_me:$LINENO: result: no" >&5
3505echo "${ECHO_T}no" >&6
3506fi;
Fred Drake109d9862001-07-11 06:27:56 +00003507
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003508# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003509
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003510if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003511then
Neal Norwitzd957f392002-09-25 21:26:19 +00003512 case $GCC in
Guido van Rossumedca74a1997-07-18 23:29:40 +00003513 yes)
3514 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003515 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003516 if test "$Py_DEBUG" = 'true' ; then
3517 # Optimization messes up debuggers, so turn it off for
3518 # debug builds.
3519 OPT="-g -Wall -Wstrict-prototypes"
3520 else
3521 OPT="-g -O3 -Wall -Wstrict-prototypes"
3522 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003523 *)
Fred Drake109d9862001-07-11 06:27:56 +00003524 OPT="-O3 -Wall -Wstrict-prototypes";;
3525 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003526 case $ac_sys_system in
3527 SCO_SV*) OPT="$OPT -m486 -DSCO5";;
3528 esac
Fred Drake109d9862001-07-11 06:27:56 +00003529 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003530 *)
3531 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003532 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003533 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003534 SCO_SV*)
3535 CFLAGS="$CFLAGS -belf"
3536 OPT="-belf -O -Ki486 -DSCO5";;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003537 *)
3538 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003539 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003540 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003541 case $ac_sys_system in
3542 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003543 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003544 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003545fi
3546
Fred Drakee1ceaa02001-12-04 20:55:47 +00003547if test "$Py_DEBUG" = 'true'; then
3548 :
3549else
3550 OPT="-DNDEBUG $OPT"
3551fi
3552
Trent Mick635f6fb2000-08-23 21:33:05 +00003553# The current (beta) Monterey compiler dies with optimizations
3554case $ac_sys_system in
3555Monterey*) OPT="";;
3556esac
3557
Guido van Rossum563e7081996-09-10 18:20:48 +00003558if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003559then
3560 OPT="$OPT $ac_arch_flags"
3561fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003562
Martin v. Löwis11437992002-04-12 09:54:03 +00003563echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3564echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3565if test "${ac_cv_opt_olimit_ok+set}" = set; then
3566 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003567else
3568 ac_save_cc="$CC"
3569CC="$CC -OPT:Olimit=0"
3570if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003571 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003572else
Martin v. Löwis11437992002-04-12 09:54:03 +00003573 cat >conftest.$ac_ext <<_ACEOF
3574#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003575#include "confdefs.h"
3576int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003577_ACEOF
3578rm -f conftest$ac_exeext
3579if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3580 (eval $ac_link) 2>&5
3581 ac_status=$?
3582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3583 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3585 (eval $ac_try) 2>&5
3586 ac_status=$?
3587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3588 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003589 ac_cv_opt_olimit_ok=yes
3590else
Martin v. Löwis11437992002-04-12 09:54:03 +00003591 echo "$as_me: program exited with status $ac_status" >&5
3592echo "$as_me: failed program was:" >&5
3593cat conftest.$ac_ext >&5
3594( exit $ac_status )
3595ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003596fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003597rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003598fi
Guido van Rossum91922671997-10-09 20:24:13 +00003599CC="$ac_save_cc"
3600fi
3601
Martin v. Löwis11437992002-04-12 09:54:03 +00003602echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3603echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003604if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003605 case $ac_sys_system in
3606 Darwin*) OPT="$OPT" ;;
3607 *) OPT="$OPT -OPT:Olimit=0";;
3608 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003609else
Martin v. Löwis11437992002-04-12 09:54:03 +00003610 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3611echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3612 if test "${ac_cv_olimit_ok+set}" = set; then
3613 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003614else
3615 ac_save_cc="$CC"
3616 CC="$CC -Olimit 1500"
3617 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003618 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003619else
Martin v. Löwis11437992002-04-12 09:54:03 +00003620 cat >conftest.$ac_ext <<_ACEOF
3621#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003622#include "confdefs.h"
3623int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003624_ACEOF
3625rm -f conftest$ac_exeext
3626if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3627 (eval $ac_link) 2>&5
3628 ac_status=$?
3629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3630 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3632 (eval $ac_try) 2>&5
3633 ac_status=$?
3634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3635 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003636 ac_cv_olimit_ok=yes
3637else
Martin v. Löwis11437992002-04-12 09:54:03 +00003638 echo "$as_me: program exited with status $ac_status" >&5
3639echo "$as_me: failed program was:" >&5
3640cat conftest.$ac_ext >&5
3641( exit $ac_status )
3642ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003643fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003644rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003645fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003646 CC="$ac_save_cc"
3647fi
3648
Martin v. Löwis11437992002-04-12 09:54:03 +00003649 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3650echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003651 if test $ac_cv_olimit_ok = yes; then
3652 OPT="$OPT -Olimit 1500"
3653 fi
3654fi
3655
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003656# On some compilers, pthreads are available without further options
3657# (e.g. MacOS X). On some of these systems, the compiler will not
3658# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3659# So we have to see first whether pthreads are available without
3660# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003661echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3662echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3663if test "${ac_cv_pthread_is_default+set}" = set; then
3664 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003665else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003666 if test "$cross_compiling" = yes; then
3667 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003668else
Martin v. Löwis11437992002-04-12 09:54:03 +00003669 cat >conftest.$ac_ext <<_ACEOF
3670#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003671#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003672
Martin v. Löwis130fb172001-07-19 11:00:41 +00003673#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003674
3675void* routine(void* p){return NULL;}
3676
3677int main(){
3678 pthread_t p;
3679 if(pthread_create(&p,NULL,routine,NULL)!=0)
3680 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003681 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003682 return 0;
3683}
3684
Martin v. Löwis11437992002-04-12 09:54:03 +00003685_ACEOF
3686rm -f conftest$ac_exeext
3687if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3688 (eval $ac_link) 2>&5
3689 ac_status=$?
3690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3691 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3693 (eval $ac_try) 2>&5
3694 ac_status=$?
3695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3696 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003697 ac_cv_pthread_is_default=yes
3698else
Martin v. Löwis11437992002-04-12 09:54:03 +00003699 echo "$as_me: program exited with status $ac_status" >&5
3700echo "$as_me: failed program was:" >&5
3701cat conftest.$ac_ext >&5
3702( exit $ac_status )
3703ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003704fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003705rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003706fi
3707
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003708fi
3709
Martin v. Löwis11437992002-04-12 09:54:03 +00003710echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3711echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003712
Michael W. Hudson54241132001-12-07 15:38:26 +00003713
Martin v. Löwis11437992002-04-12 09:54:03 +00003714if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003715then
3716 ac_cv_kpthread=no
3717else
3718# -Kpthread, if available, provides the right #defines
3719# and linker options to make pthread_create available
3720# Some compilers won't report that they do not support -Kpthread,
3721# so we need to run a program to see whether it really made the
3722# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003723echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3724echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3725if test "${ac_cv_kpthread+set}" = set; then
3726 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003727else
3728 ac_save_cc="$CC"
3729CC="$CC -Kpthread"
3730if test "$cross_compiling" = yes; then
3731 ac_cv_kpthread=no
3732else
Martin v. Löwis11437992002-04-12 09:54:03 +00003733 cat >conftest.$ac_ext <<_ACEOF
3734#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003735#include "confdefs.h"
3736
3737#include <pthread.h>
3738
3739void* routine(void* p){return NULL;}
3740
3741int main(){
3742 pthread_t p;
3743 if(pthread_create(&p,NULL,routine,NULL)!=0)
3744 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003745 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003746 return 0;
3747}
3748
Martin v. Löwis11437992002-04-12 09:54:03 +00003749_ACEOF
3750rm -f conftest$ac_exeext
3751if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3752 (eval $ac_link) 2>&5
3753 ac_status=$?
3754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3755 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3757 (eval $ac_try) 2>&5
3758 ac_status=$?
3759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3760 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003761 ac_cv_kpthread=yes
3762else
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 echo "$as_me: program exited with status $ac_status" >&5
3764echo "$as_me: failed program was:" >&5
3765cat conftest.$ac_ext >&5
3766( exit $ac_status )
3767ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003768fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003769rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003770fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003771CC="$ac_save_cc"
3772fi
3773
Martin v. Löwis11437992002-04-12 09:54:03 +00003774echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3775echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003776fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003777
Michael W. Hudson54241132001-12-07 15:38:26 +00003778
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003779# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003780echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3781echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3782if test "${ac_cv_header_stdc+set}" = set; then
3783 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003784else
Martin v. Löwis11437992002-04-12 09:54:03 +00003785 cat >conftest.$ac_ext <<_ACEOF
3786#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003787#include "confdefs.h"
3788#include <stdlib.h>
3789#include <stdarg.h>
3790#include <string.h>
3791#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003792
3793_ACEOF
3794if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3795 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3796 ac_status=$?
3797 egrep -v '^ *\+' conftest.er1 >conftest.err
3798 rm -f conftest.er1
3799 cat conftest.err >&5
3800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3801 (exit $ac_status); } >/dev/null; then
3802 if test -s conftest.err; then
3803 ac_cpp_err=$ac_c_preproc_warn_flag
3804 else
3805 ac_cpp_err=
3806 fi
3807else
3808 ac_cpp_err=yes
3809fi
3810if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003811 ac_cv_header_stdc=yes
3812else
Martin v. Löwis11437992002-04-12 09:54:03 +00003813 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003814 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003815 ac_cv_header_stdc=no
3816fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003817rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003818
3819if test $ac_cv_header_stdc = yes; then
3820 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003821 cat >conftest.$ac_ext <<_ACEOF
3822#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003823#include "confdefs.h"
3824#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003825
3826_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3828 egrep "memchr" >/dev/null 2>&1; then
3829 :
3830else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003831 ac_cv_header_stdc=no
3832fi
3833rm -f conftest*
3834
3835fi
3836
3837if test $ac_cv_header_stdc = yes; then
3838 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003839 cat >conftest.$ac_ext <<_ACEOF
3840#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003841#include "confdefs.h"
3842#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003843
3844_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003845if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3846 egrep "free" >/dev/null 2>&1; then
3847 :
3848else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003849 ac_cv_header_stdc=no
3850fi
3851rm -f conftest*
3852
3853fi
3854
3855if test $ac_cv_header_stdc = yes; then
3856 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003857 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003858 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003859else
Martin v. Löwis11437992002-04-12 09:54:03 +00003860 cat >conftest.$ac_ext <<_ACEOF
3861#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003862#include "confdefs.h"
3863#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003864#if ((' ' & 0x0FF) == 0x020)
3865# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3866# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3867#else
3868# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3869 || ('j' <= (c) && (c) <= 'r') \
3870 || ('s' <= (c) && (c) <= 'z'))
3871# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3872#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003873
Martin v. Löwis11437992002-04-12 09:54:03 +00003874#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3875int
3876main ()
3877{
3878 int i;
3879 for (i = 0; i < 256; i++)
3880 if (XOR (islower (i), ISLOWER (i))
3881 || toupper (i) != TOUPPER (i))
3882 exit(2);
3883 exit (0);
3884}
3885_ACEOF
3886rm -f conftest$ac_exeext
3887if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3888 (eval $ac_link) 2>&5
3889 ac_status=$?
3890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3891 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3893 (eval $ac_try) 2>&5
3894 ac_status=$?
3895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3896 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003897 :
3898else
Martin v. Löwis11437992002-04-12 09:54:03 +00003899 echo "$as_me: program exited with status $ac_status" >&5
3900echo "$as_me: failed program was:" >&5
3901cat conftest.$ac_ext >&5
3902( exit $ac_status )
3903ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003904fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003905rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003906fi
3907fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003908fi
3909echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3910echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003911if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003912
3913cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003914#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003915_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003916
3917fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003918
Martin v. Löwis11437992002-04-12 09:54:03 +00003919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
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
Martin v. Löwis11437992002-04-12 09:54:03 +00003956for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003957libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003958signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003959sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003960sys/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 +00003961sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003962sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003963do
Martin v. Löwis11437992002-04-12 09:54:03 +00003964as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3965if eval "test \"\${$as_ac_Header+set}\" = set"; then
3966 echo "$as_me:$LINENO: checking for $ac_header" >&5
3967echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3968if eval "test \"\${$as_ac_Header+set}\" = set"; then
3969 echo $ECHO_N "(cached) $ECHO_C" >&6
3970fi
3971echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3972echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003973else
Martin v. Löwis11437992002-04-12 09:54:03 +00003974 # Is the header compilable?
3975echo "$as_me:$LINENO: checking $ac_header usability" >&5
3976echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3977cat >conftest.$ac_ext <<_ACEOF
3978#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003979#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003980$ac_includes_default
3981#include <$ac_header>
3982_ACEOF
3983rm -f conftest.$ac_objext
3984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3985 (eval $ac_compile) 2>&5
3986 ac_status=$?
3987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3988 (exit $ac_status); } &&
3989 { ac_try='test -s conftest.$ac_objext'
3990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3991 (eval $ac_try) 2>&5
3992 ac_status=$?
3993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3994 (exit $ac_status); }; }; then
3995 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003996else
Martin v. Löwis11437992002-04-12 09:54:03 +00003997 echo "$as_me: failed program was:" >&5
3998cat conftest.$ac_ext >&5
3999ac_header_compiler=no
4000fi
4001rm -f conftest.$ac_objext conftest.$ac_ext
4002echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4003echo "${ECHO_T}$ac_header_compiler" >&6
4004
4005# Is the header present?
4006echo "$as_me:$LINENO: checking $ac_header presence" >&5
4007echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4008cat >conftest.$ac_ext <<_ACEOF
4009#line $LINENO "configure"
4010#include "confdefs.h"
4011#include <$ac_header>
4012_ACEOF
4013if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4014 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4015 ac_status=$?
4016 egrep -v '^ *\+' conftest.er1 >conftest.err
4017 rm -f conftest.er1
4018 cat conftest.err >&5
4019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4020 (exit $ac_status); } >/dev/null; then
4021 if test -s conftest.err; then
4022 ac_cpp_err=$ac_c_preproc_warn_flag
4023 else
4024 ac_cpp_err=
4025 fi
4026else
4027 ac_cpp_err=yes
4028fi
4029if test -z "$ac_cpp_err"; then
4030 ac_header_preproc=yes
4031else
4032 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004033 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004034 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004035fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004036rm -f conftest.err conftest.$ac_ext
4037echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4038echo "${ECHO_T}$ac_header_preproc" >&6
4039
4040# So? What about this header?
4041case $ac_header_compiler:$ac_header_preproc in
4042 yes:no )
4043 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4044echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4045 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4046echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4047 no:yes )
4048 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4049echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4050 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4051echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4052 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4053echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4054esac
4055echo "$as_me:$LINENO: checking for $ac_header" >&5
4056echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4057if eval "test \"\${$as_ac_Header+set}\" = set"; then
4058 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004059else
Martin v. Löwis11437992002-04-12 09:54:03 +00004060 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004061fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004062echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4063echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4064
4065fi
4066if test `eval echo '${'$as_ac_Header'}'` = yes; then
4067 cat >>confdefs.h <<_ACEOF
4068#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4069_ACEOF
4070
4071fi
4072
Guido van Rossum627b2d71993-12-24 10:39:16 +00004073done
4074
Martin v. Löwis11437992002-04-12 09:54:03 +00004075
4076
4077
4078
4079
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004080ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004081for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4082 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4083echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4084echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4085if eval "test \"\${$as_ac_Header+set}\" = set"; then
4086 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004087else
Martin v. Löwis11437992002-04-12 09:54:03 +00004088 cat >conftest.$ac_ext <<_ACEOF
4089#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004090#include "confdefs.h"
4091#include <sys/types.h>
4092#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004093
4094#ifdef F77_DUMMY_MAIN
4095# ifdef __cplusplus
4096 extern "C"
4097# endif
4098 int F77_DUMMY_MAIN() { return 1; }
4099#endif
4100int
4101main ()
4102{
4103if ((DIR *) 0)
4104return 0;
4105 ;
4106 return 0;
4107}
4108_ACEOF
4109rm -f conftest.$ac_objext
4110if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4111 (eval $ac_compile) 2>&5
4112 ac_status=$?
4113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4114 (exit $ac_status); } &&
4115 { ac_try='test -s conftest.$ac_objext'
4116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4117 (eval $ac_try) 2>&5
4118 ac_status=$?
4119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4120 (exit $ac_status); }; }; then
4121 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004122else
Martin v. Löwis11437992002-04-12 09:54:03 +00004123 echo "$as_me: failed program was:" >&5
4124cat conftest.$ac_ext >&5
4125eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004126fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004127rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004128fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004129echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4130echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4131if test `eval echo '${'$as_ac_Header'}'` = yes; then
4132 cat >>confdefs.h <<_ACEOF
4133#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4134_ACEOF
4135
4136ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004137fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004138
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004139done
4140# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4141if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4143echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4144if test "${ac_cv_search_opendir+set}" = set; then
4145 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004146else
Martin v. Löwis11437992002-04-12 09:54:03 +00004147 ac_func_search_save_LIBS=$LIBS
4148ac_cv_search_opendir=no
4149cat >conftest.$ac_ext <<_ACEOF
4150#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004151#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004152
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004153/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004154#ifdef __cplusplus
4155extern "C"
4156#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004157/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004158 builtin and then its argument prototype would still apply. */
4159char opendir ();
4160#ifdef F77_DUMMY_MAIN
4161# ifdef __cplusplus
4162 extern "C"
4163# endif
4164 int F77_DUMMY_MAIN() { return 1; }
4165#endif
4166int
4167main ()
4168{
4169opendir ();
4170 ;
4171 return 0;
4172}
4173_ACEOF
4174rm -f conftest.$ac_objext conftest$ac_exeext
4175if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4176 (eval $ac_link) 2>&5
4177 ac_status=$?
4178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4179 (exit $ac_status); } &&
4180 { ac_try='test -s conftest$ac_exeext'
4181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4182 (eval $ac_try) 2>&5
4183 ac_status=$?
4184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4185 (exit $ac_status); }; }; then
4186 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004187else
Martin v. Löwis11437992002-04-12 09:54:03 +00004188 echo "$as_me: failed program was:" >&5
4189cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004190fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004191rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4192if test "$ac_cv_search_opendir" = no; then
4193 for ac_lib in dir; do
4194 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4195 cat >conftest.$ac_ext <<_ACEOF
4196#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004197#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004198
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004199/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004200#ifdef __cplusplus
4201extern "C"
4202#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004203/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004204 builtin and then its argument prototype would still apply. */
4205char opendir ();
4206#ifdef F77_DUMMY_MAIN
4207# ifdef __cplusplus
4208 extern "C"
4209# endif
4210 int F77_DUMMY_MAIN() { return 1; }
4211#endif
4212int
4213main ()
4214{
4215opendir ();
4216 ;
4217 return 0;
4218}
4219_ACEOF
4220rm -f conftest.$ac_objext conftest$ac_exeext
4221if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4222 (eval $ac_link) 2>&5
4223 ac_status=$?
4224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4225 (exit $ac_status); } &&
4226 { ac_try='test -s conftest$ac_exeext'
4227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4228 (eval $ac_try) 2>&5
4229 ac_status=$?
4230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4231 (exit $ac_status); }; }; then
4232 ac_cv_search_opendir="-l$ac_lib"
4233break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004234else
Martin v. Löwis11437992002-04-12 09:54:03 +00004235 echo "$as_me: failed program was:" >&5
4236cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004237fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004238rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4239 done
4240fi
4241LIBS=$ac_func_search_save_LIBS
4242fi
4243echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4244echo "${ECHO_T}$ac_cv_search_opendir" >&6
4245if test "$ac_cv_search_opendir" != no; then
4246 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004247
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004248fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004249
Michael W. Hudson54241132001-12-07 15:38:26 +00004250else
Martin v. Löwis11437992002-04-12 09:54:03 +00004251 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4252echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4253if test "${ac_cv_search_opendir+set}" = set; then
4254 echo $ECHO_N "(cached) $ECHO_C" >&6
4255else
4256 ac_func_search_save_LIBS=$LIBS
4257ac_cv_search_opendir=no
4258cat >conftest.$ac_ext <<_ACEOF
4259#line $LINENO "configure"
4260#include "confdefs.h"
4261
4262/* Override any gcc2 internal prototype to avoid an error. */
4263#ifdef __cplusplus
4264extern "C"
4265#endif
4266/* We use char because int might match the return type of a gcc2
4267 builtin and then its argument prototype would still apply. */
4268char opendir ();
4269#ifdef F77_DUMMY_MAIN
4270# ifdef __cplusplus
4271 extern "C"
4272# endif
4273 int F77_DUMMY_MAIN() { return 1; }
4274#endif
4275int
4276main ()
4277{
4278opendir ();
4279 ;
4280 return 0;
4281}
4282_ACEOF
4283rm -f conftest.$ac_objext conftest$ac_exeext
4284if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4285 (eval $ac_link) 2>&5
4286 ac_status=$?
4287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4288 (exit $ac_status); } &&
4289 { ac_try='test -s conftest$ac_exeext'
4290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4291 (eval $ac_try) 2>&5
4292 ac_status=$?
4293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4294 (exit $ac_status); }; }; then
4295 ac_cv_search_opendir="none required"
4296else
4297 echo "$as_me: failed program was:" >&5
4298cat conftest.$ac_ext >&5
4299fi
4300rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4301if test "$ac_cv_search_opendir" = no; then
4302 for ac_lib in x; do
4303 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4304 cat >conftest.$ac_ext <<_ACEOF
4305#line $LINENO "configure"
4306#include "confdefs.h"
4307
4308/* Override any gcc2 internal prototype to avoid an error. */
4309#ifdef __cplusplus
4310extern "C"
4311#endif
4312/* We use char because int might match the return type of a gcc2
4313 builtin and then its argument prototype would still apply. */
4314char opendir ();
4315#ifdef F77_DUMMY_MAIN
4316# ifdef __cplusplus
4317 extern "C"
4318# endif
4319 int F77_DUMMY_MAIN() { return 1; }
4320#endif
4321int
4322main ()
4323{
4324opendir ();
4325 ;
4326 return 0;
4327}
4328_ACEOF
4329rm -f conftest.$ac_objext conftest$ac_exeext
4330if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4331 (eval $ac_link) 2>&5
4332 ac_status=$?
4333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4334 (exit $ac_status); } &&
4335 { ac_try='test -s conftest$ac_exeext'
4336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4337 (eval $ac_try) 2>&5
4338 ac_status=$?
4339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4340 (exit $ac_status); }; }; then
4341 ac_cv_search_opendir="-l$ac_lib"
4342break
4343else
4344 echo "$as_me: failed program was:" >&5
4345cat conftest.$ac_ext >&5
4346fi
4347rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4348 done
4349fi
4350LIBS=$ac_func_search_save_LIBS
4351fi
4352echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4353echo "${ECHO_T}$ac_cv_search_opendir" >&6
4354if test "$ac_cv_search_opendir" != no; then
4355 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4356
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004357fi
4358
4359fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004360
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004361echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4362echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4363if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4364 echo $ECHO_N "(cached) $ECHO_C" >&6
4365else
4366 cat >conftest.$ac_ext <<_ACEOF
4367#line $LINENO "configure"
4368#include "confdefs.h"
4369#include <sys/types.h>
4370#ifdef F77_DUMMY_MAIN
4371# ifdef __cplusplus
4372 extern "C"
4373# endif
4374 int F77_DUMMY_MAIN() { return 1; }
4375#endif
4376int
4377main ()
4378{
4379return makedev(0, 0);
4380 ;
4381 return 0;
4382}
4383_ACEOF
4384rm -f conftest.$ac_objext conftest$ac_exeext
4385if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4386 (eval $ac_link) 2>&5
4387 ac_status=$?
4388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4389 (exit $ac_status); } &&
4390 { ac_try='test -s conftest$ac_exeext'
4391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4392 (eval $ac_try) 2>&5
4393 ac_status=$?
4394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4395 (exit $ac_status); }; }; then
4396 ac_cv_header_sys_types_h_makedev=yes
4397else
4398 echo "$as_me: failed program was:" >&5
4399cat conftest.$ac_ext >&5
4400ac_cv_header_sys_types_h_makedev=no
4401fi
4402rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4403
4404fi
4405echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4406echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4407
4408if test $ac_cv_header_sys_types_h_makedev = no; then
4409if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4410 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4411echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4412if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4413 echo $ECHO_N "(cached) $ECHO_C" >&6
4414fi
4415echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4416echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4417else
4418 # Is the header compilable?
4419echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4420echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4421cat >conftest.$ac_ext <<_ACEOF
4422#line $LINENO "configure"
4423#include "confdefs.h"
4424$ac_includes_default
4425#include <sys/mkdev.h>
4426_ACEOF
4427rm -f conftest.$ac_objext
4428if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4429 (eval $ac_compile) 2>&5
4430 ac_status=$?
4431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4432 (exit $ac_status); } &&
4433 { ac_try='test -s conftest.$ac_objext'
4434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4435 (eval $ac_try) 2>&5
4436 ac_status=$?
4437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4438 (exit $ac_status); }; }; then
4439 ac_header_compiler=yes
4440else
4441 echo "$as_me: failed program was:" >&5
4442cat conftest.$ac_ext >&5
4443ac_header_compiler=no
4444fi
4445rm -f conftest.$ac_objext conftest.$ac_ext
4446echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4447echo "${ECHO_T}$ac_header_compiler" >&6
4448
4449# Is the header present?
4450echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4451echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4452cat >conftest.$ac_ext <<_ACEOF
4453#line $LINENO "configure"
4454#include "confdefs.h"
4455#include <sys/mkdev.h>
4456_ACEOF
4457if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4458 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4459 ac_status=$?
4460 egrep -v '^ *\+' conftest.er1 >conftest.err
4461 rm -f conftest.er1
4462 cat conftest.err >&5
4463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4464 (exit $ac_status); } >/dev/null; then
4465 if test -s conftest.err; then
4466 ac_cpp_err=$ac_c_preproc_warn_flag
4467 else
4468 ac_cpp_err=
4469 fi
4470else
4471 ac_cpp_err=yes
4472fi
4473if test -z "$ac_cpp_err"; then
4474 ac_header_preproc=yes
4475else
4476 echo "$as_me: failed program was:" >&5
4477 cat conftest.$ac_ext >&5
4478 ac_header_preproc=no
4479fi
4480rm -f conftest.err conftest.$ac_ext
4481echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4482echo "${ECHO_T}$ac_header_preproc" >&6
4483
4484# So? What about this header?
4485case $ac_header_compiler:$ac_header_preproc in
4486 yes:no )
4487 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4488echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4489 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4490echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4491 no:yes )
4492 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4493echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4494 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4495echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4496 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4497echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4498esac
4499echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4500echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4501if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4502 echo $ECHO_N "(cached) $ECHO_C" >&6
4503else
4504 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4505fi
4506echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4507echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4508
4509fi
4510if test $ac_cv_header_sys_mkdev_h = yes; then
4511
4512cat >>confdefs.h <<\_ACEOF
4513#define MAJOR_IN_MKDEV 1
4514_ACEOF
4515
4516fi
4517
4518
4519
4520 if test $ac_cv_header_sys_mkdev_h = no; then
4521 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4522 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4523echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4524if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4525 echo $ECHO_N "(cached) $ECHO_C" >&6
4526fi
4527echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4528echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4529else
4530 # Is the header compilable?
4531echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4532echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4533cat >conftest.$ac_ext <<_ACEOF
4534#line $LINENO "configure"
4535#include "confdefs.h"
4536$ac_includes_default
4537#include <sys/sysmacros.h>
4538_ACEOF
4539rm -f conftest.$ac_objext
4540if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4541 (eval $ac_compile) 2>&5
4542 ac_status=$?
4543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4544 (exit $ac_status); } &&
4545 { ac_try='test -s conftest.$ac_objext'
4546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4547 (eval $ac_try) 2>&5
4548 ac_status=$?
4549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4550 (exit $ac_status); }; }; then
4551 ac_header_compiler=yes
4552else
4553 echo "$as_me: failed program was:" >&5
4554cat conftest.$ac_ext >&5
4555ac_header_compiler=no
4556fi
4557rm -f conftest.$ac_objext conftest.$ac_ext
4558echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4559echo "${ECHO_T}$ac_header_compiler" >&6
4560
4561# Is the header present?
4562echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4563echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4564cat >conftest.$ac_ext <<_ACEOF
4565#line $LINENO "configure"
4566#include "confdefs.h"
4567#include <sys/sysmacros.h>
4568_ACEOF
4569if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4570 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4571 ac_status=$?
4572 egrep -v '^ *\+' conftest.er1 >conftest.err
4573 rm -f conftest.er1
4574 cat conftest.err >&5
4575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4576 (exit $ac_status); } >/dev/null; then
4577 if test -s conftest.err; then
4578 ac_cpp_err=$ac_c_preproc_warn_flag
4579 else
4580 ac_cpp_err=
4581 fi
4582else
4583 ac_cpp_err=yes
4584fi
4585if test -z "$ac_cpp_err"; then
4586 ac_header_preproc=yes
4587else
4588 echo "$as_me: failed program was:" >&5
4589 cat conftest.$ac_ext >&5
4590 ac_header_preproc=no
4591fi
4592rm -f conftest.err conftest.$ac_ext
4593echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4594echo "${ECHO_T}$ac_header_preproc" >&6
4595
4596# So? What about this header?
4597case $ac_header_compiler:$ac_header_preproc in
4598 yes:no )
4599 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4600echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4601 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4602echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4603 no:yes )
4604 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4605echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4606 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4607echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4608 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4609echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4610esac
4611echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4612echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4613if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4614 echo $ECHO_N "(cached) $ECHO_C" >&6
4615else
4616 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4617fi
4618echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4619echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4620
4621fi
4622if test $ac_cv_header_sys_sysmacros_h = yes; then
4623
4624cat >>confdefs.h <<\_ACEOF
4625#define MAJOR_IN_SYSMACROS 1
4626_ACEOF
4627
4628fi
4629
4630
4631 fi
4632fi
4633
Michael W. Hudson54241132001-12-07 15:38:26 +00004634
Guido van Rossum627b2d71993-12-24 10:39:16 +00004635# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004636was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004637echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4638echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4639cat >conftest.$ac_ext <<_ACEOF
4640#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004641#include "confdefs.h"
4642#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004643
4644_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004645if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4646 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004647 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004648else
Martin v. Löwis11437992002-04-12 09:54:03 +00004649
4650
4651cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004652#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004653_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004654
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004655
Guido van Rossum627b2d71993-12-24 10:39:16 +00004656fi
4657rm -f conftest*
4658
Martin v. Löwis11437992002-04-12 09:54:03 +00004659echo "$as_me:$LINENO: result: $was_it_defined" >&5
4660echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004661
Neal Norwitz11690112002-07-30 01:08:28 +00004662# Check whether using makedev requires defining _OSF_SOURCE
4663echo "$as_me:$LINENO: checking for makedev" >&5
4664echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4665cat >conftest.$ac_ext <<_ACEOF
4666#line $LINENO "configure"
4667#include "confdefs.h"
4668 #include <sys/types.h>
4669#ifdef F77_DUMMY_MAIN
4670# ifdef __cplusplus
4671 extern "C"
4672# endif
4673 int F77_DUMMY_MAIN() { return 1; }
4674#endif
4675int
4676main ()
4677{
4678 makedev(0, 0)
4679 ;
4680 return 0;
4681}
4682_ACEOF
4683rm -f conftest.$ac_objext conftest$ac_exeext
4684if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4685 (eval $ac_link) 2>&5
4686 ac_status=$?
4687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4688 (exit $ac_status); } &&
4689 { ac_try='test -s conftest$ac_exeext'
4690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4691 (eval $ac_try) 2>&5
4692 ac_status=$?
4693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4694 (exit $ac_status); }; }; then
4695 ac_cv_has_makedev=yes
4696else
4697 echo "$as_me: failed program was:" >&5
4698cat conftest.$ac_ext >&5
4699ac_cv_has_makedev=no
4700fi
4701rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4702if test "$ac_cv_has_makedev" = "no"; then
4703 # we didn't link, try if _OSF_SOURCE will allow us to link
4704 cat >conftest.$ac_ext <<_ACEOF
4705#line $LINENO "configure"
4706#include "confdefs.h"
4707
4708 #define _OSF_SOURCE 1
4709 #include <sys/types.h>
4710
4711#ifdef F77_DUMMY_MAIN
4712# ifdef __cplusplus
4713 extern "C"
4714# endif
4715 int F77_DUMMY_MAIN() { return 1; }
4716#endif
4717int
4718main ()
4719{
4720 makedev(0, 0)
4721 ;
4722 return 0;
4723}
4724_ACEOF
4725rm -f conftest.$ac_objext conftest$ac_exeext
4726if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4727 (eval $ac_link) 2>&5
4728 ac_status=$?
4729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4730 (exit $ac_status); } &&
4731 { ac_try='test -s conftest$ac_exeext'
4732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4733 (eval $ac_try) 2>&5
4734 ac_status=$?
4735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4736 (exit $ac_status); }; }; then
4737 ac_cv_has_makedev=yes
4738else
4739 echo "$as_me: failed program was:" >&5
4740cat conftest.$ac_ext >&5
4741ac_cv_has_makedev=no
4742fi
4743rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4744 if test "$ac_cv_has_makedev" = "yes"; then
4745
4746cat >>confdefs.h <<\_ACEOF
4747#define _OSF_SOURCE 1
4748_ACEOF
4749
4750 fi
4751fi
4752echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4753echo "${ECHO_T}$ac_cv_has_makedev" >&6
4754if test "$ac_cv_has_makedev" = "yes"; then
4755
4756cat >>confdefs.h <<\_ACEOF
4757#define HAVE_MAKEDEV 1
4758_ACEOF
4759
4760fi
4761
Martin v. Löwis399a6892002-10-04 10:22:02 +00004762# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4763# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4764# defined, but the compiler does not support pragma redefine_extname,
4765# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4766# structures (such as rlimit64) without declaring them. As a
4767# work-around, disable LFS on such configurations
4768
4769use_lfs=yes
4770echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4771echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4772cat >conftest.$ac_ext <<_ACEOF
4773#line $LINENO "configure"
4774#include "confdefs.h"
4775
4776#define _LARGEFILE_SOURCE 1
4777#define _FILE_OFFSET_BITS 64
4778#include <sys/resource.h>
4779
4780#ifdef F77_DUMMY_MAIN
4781# ifdef __cplusplus
4782 extern "C"
4783# endif
4784 int F77_DUMMY_MAIN() { return 1; }
4785#endif
4786int
4787main ()
4788{
4789struct rlimit foo;
4790 ;
4791 return 0;
4792}
4793_ACEOF
4794rm -f conftest.$ac_objext
4795if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4796 (eval $ac_compile) 2>&5
4797 ac_status=$?
4798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4799 (exit $ac_status); } &&
4800 { ac_try='test -s conftest.$ac_objext'
4801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4802 (eval $ac_try) 2>&5
4803 ac_status=$?
4804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4805 (exit $ac_status); }; }; then
4806 sol_lfs_bug=no
4807else
4808 echo "$as_me: failed program was:" >&5
4809cat conftest.$ac_ext >&5
4810sol_lfs_bug=yes
4811fi
4812rm -f conftest.$ac_objext conftest.$ac_ext
4813echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4814echo "${ECHO_T}$sol_lfs_bug" >&6
4815if test "$sol_lfs_bug" = "yes"; then
4816 use_lfs=no
4817fi
4818
4819if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004820# Two defines needed to enable largefile support on various platforms
4821# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004822
Martin v. Löwis11437992002-04-12 09:54:03 +00004823cat >>confdefs.h <<\_ACEOF
4824#define _LARGEFILE_SOURCE 1
4825_ACEOF
4826
4827
4828cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004829#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004830_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004831
Martin v. Löwis399a6892002-10-04 10:22:02 +00004832fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004833
Guido van Rossum84e7b241996-08-19 21:59:00 +00004834# Add some code to confdefs.h so that the test for off_t works on SCO
4835cat >> confdefs.h <<\EOF
4836#if defined(SCO_DS)
4837#undef _OFF_T
4838#endif
4839EOF
4840
Guido van Rossumef2255b2000-03-10 22:30:29 +00004841# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004842echo "$as_me:$LINENO: checking for mode_t" >&5
4843echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4844if test "${ac_cv_type_mode_t+set}" = set; then
4845 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004846else
Martin v. Löwis11437992002-04-12 09:54:03 +00004847 cat >conftest.$ac_ext <<_ACEOF
4848#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004849#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004850$ac_includes_default
4851#ifdef F77_DUMMY_MAIN
4852# ifdef __cplusplus
4853 extern "C"
4854# endif
4855 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004856#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004857int
4858main ()
4859{
4860if ((mode_t *) 0)
4861 return 0;
4862if (sizeof (mode_t))
4863 return 0;
4864 ;
4865 return 0;
4866}
4867_ACEOF
4868rm -f conftest.$ac_objext
4869if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4870 (eval $ac_compile) 2>&5
4871 ac_status=$?
4872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4873 (exit $ac_status); } &&
4874 { ac_try='test -s conftest.$ac_objext'
4875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4876 (eval $ac_try) 2>&5
4877 ac_status=$?
4878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4879 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004880 ac_cv_type_mode_t=yes
4881else
Martin v. Löwis11437992002-04-12 09:54:03 +00004882 echo "$as_me: failed program was:" >&5
4883cat conftest.$ac_ext >&5
4884ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004885fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004886rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004887fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004888echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4889echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4890if test $ac_cv_type_mode_t = yes; then
4891 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004892else
Martin v. Löwis11437992002-04-12 09:54:03 +00004893
4894cat >>confdefs.h <<_ACEOF
4895#define mode_t int
4896_ACEOF
4897
4898fi
4899
4900echo "$as_me:$LINENO: checking for off_t" >&5
4901echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4902if test "${ac_cv_type_off_t+set}" = set; then
4903 echo $ECHO_N "(cached) $ECHO_C" >&6
4904else
4905 cat >conftest.$ac_ext <<_ACEOF
4906#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004907#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004908$ac_includes_default
4909#ifdef F77_DUMMY_MAIN
4910# ifdef __cplusplus
4911 extern "C"
4912# endif
4913 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004915int
4916main ()
4917{
4918if ((off_t *) 0)
4919 return 0;
4920if (sizeof (off_t))
4921 return 0;
4922 ;
4923 return 0;
4924}
4925_ACEOF
4926rm -f conftest.$ac_objext
4927if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4928 (eval $ac_compile) 2>&5
4929 ac_status=$?
4930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4931 (exit $ac_status); } &&
4932 { ac_try='test -s conftest.$ac_objext'
4933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4934 (eval $ac_try) 2>&5
4935 ac_status=$?
4936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4937 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004938 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004939else
Martin v. Löwis11437992002-04-12 09:54:03 +00004940 echo "$as_me: failed program was:" >&5
4941cat conftest.$ac_ext >&5
4942ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004943fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004944rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004945fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004946echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4947echo "${ECHO_T}$ac_cv_type_off_t" >&6
4948if test $ac_cv_type_off_t = yes; then
4949 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004950else
Martin v. Löwis11437992002-04-12 09:54:03 +00004951
4952cat >>confdefs.h <<_ACEOF
4953#define off_t long
4954_ACEOF
4955
4956fi
4957
4958echo "$as_me:$LINENO: checking for pid_t" >&5
4959echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4960if test "${ac_cv_type_pid_t+set}" = set; then
4961 echo $ECHO_N "(cached) $ECHO_C" >&6
4962else
4963 cat >conftest.$ac_ext <<_ACEOF
4964#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004965#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004966$ac_includes_default
4967#ifdef F77_DUMMY_MAIN
4968# ifdef __cplusplus
4969 extern "C"
4970# endif
4971 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004972#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004973int
4974main ()
4975{
4976if ((pid_t *) 0)
4977 return 0;
4978if (sizeof (pid_t))
4979 return 0;
4980 ;
4981 return 0;
4982}
4983_ACEOF
4984rm -f conftest.$ac_objext
4985if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4986 (eval $ac_compile) 2>&5
4987 ac_status=$?
4988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4989 (exit $ac_status); } &&
4990 { ac_try='test -s conftest.$ac_objext'
4991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4992 (eval $ac_try) 2>&5
4993 ac_status=$?
4994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4995 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004996 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004997else
Martin v. Löwis11437992002-04-12 09:54:03 +00004998 echo "$as_me: failed program was:" >&5
4999cat conftest.$ac_ext >&5
5000ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005001fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005002rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005003fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005004echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5005echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5006if test $ac_cv_type_pid_t = yes; then
5007 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005008else
Martin v. Löwis11437992002-04-12 09:54:03 +00005009
5010cat >>confdefs.h <<_ACEOF
5011#define pid_t int
5012_ACEOF
5013
5014fi
5015
5016echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5017echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5018if test "${ac_cv_type_signal+set}" = set; then
5019 echo $ECHO_N "(cached) $ECHO_C" >&6
5020else
5021 cat >conftest.$ac_ext <<_ACEOF
5022#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005023#include "confdefs.h"
5024#include <sys/types.h>
5025#include <signal.h>
5026#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005027# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005028#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005029#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005030extern "C" void (*signal (int, void (*)(int)))(int);
5031#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005032void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005033#endif
5034
Martin v. Löwis11437992002-04-12 09:54:03 +00005035#ifdef F77_DUMMY_MAIN
5036# ifdef __cplusplus
5037 extern "C"
5038# endif
5039 int F77_DUMMY_MAIN() { return 1; }
5040#endif
5041int
5042main ()
5043{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005044int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005045 ;
5046 return 0;
5047}
5048_ACEOF
5049rm -f conftest.$ac_objext
5050if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5051 (eval $ac_compile) 2>&5
5052 ac_status=$?
5053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5054 (exit $ac_status); } &&
5055 { ac_try='test -s conftest.$ac_objext'
5056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5057 (eval $ac_try) 2>&5
5058 ac_status=$?
5059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5060 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005061 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005062else
Martin v. Löwis11437992002-04-12 09:54:03 +00005063 echo "$as_me: failed program was:" >&5
5064cat conftest.$ac_ext >&5
5065ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005066fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005067rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005068fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005069echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5070echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005071
Martin v. Löwis11437992002-04-12 09:54:03 +00005072cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005073#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005074_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005075
Michael W. Hudson54241132001-12-07 15:38:26 +00005076
Martin v. Löwis11437992002-04-12 09:54:03 +00005077echo "$as_me:$LINENO: checking for size_t" >&5
5078echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5079if test "${ac_cv_type_size_t+set}" = set; then
5080 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005081else
Martin v. Löwis11437992002-04-12 09:54:03 +00005082 cat >conftest.$ac_ext <<_ACEOF
5083#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005084#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005085$ac_includes_default
5086#ifdef F77_DUMMY_MAIN
5087# ifdef __cplusplus
5088 extern "C"
5089# endif
5090 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005091#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005092int
5093main ()
5094{
5095if ((size_t *) 0)
5096 return 0;
5097if (sizeof (size_t))
5098 return 0;
5099 ;
5100 return 0;
5101}
5102_ACEOF
5103rm -f conftest.$ac_objext
5104if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5105 (eval $ac_compile) 2>&5
5106 ac_status=$?
5107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5108 (exit $ac_status); } &&
5109 { ac_try='test -s conftest.$ac_objext'
5110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5111 (eval $ac_try) 2>&5
5112 ac_status=$?
5113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5114 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005115 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005116else
Martin v. Löwis11437992002-04-12 09:54:03 +00005117 echo "$as_me: failed program was:" >&5
5118cat conftest.$ac_ext >&5
5119ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005120fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005121rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005122fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005123echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5124echo "${ECHO_T}$ac_cv_type_size_t" >&6
5125if test $ac_cv_type_size_t = yes; then
5126 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005127else
Martin v. Löwis11437992002-04-12 09:54:03 +00005128
5129cat >>confdefs.h <<_ACEOF
5130#define size_t unsigned
5131_ACEOF
5132
5133fi
5134
5135echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5136echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5137if test "${ac_cv_type_uid_t+set}" = set; then
5138 echo $ECHO_N "(cached) $ECHO_C" >&6
5139else
5140 cat >conftest.$ac_ext <<_ACEOF
5141#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005142#include "confdefs.h"
5143#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005144
5145_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005146if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5147 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005148 ac_cv_type_uid_t=yes
5149else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005150 ac_cv_type_uid_t=no
5151fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005152rm -f conftest*
5153
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005154fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005155echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5156echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005157if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005158
Martin v. Löwis11437992002-04-12 09:54:03 +00005159cat >>confdefs.h <<\_ACEOF
5160#define uid_t int
5161_ACEOF
5162
5163
5164cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005165#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005166_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005167
5168fi
5169
Jack Jansendd19cf82001-12-06 22:36:17 +00005170
Michael W. Hudson54241132001-12-07 15:38:26 +00005171# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005172echo "$as_me:$LINENO: checking for int" >&5
5173echo $ECHO_N "checking for int... $ECHO_C" >&6
5174if test "${ac_cv_type_int+set}" = set; then
5175 echo $ECHO_N "(cached) $ECHO_C" >&6
5176else
5177 cat >conftest.$ac_ext <<_ACEOF
5178#line $LINENO "configure"
5179#include "confdefs.h"
5180$ac_includes_default
5181#ifdef F77_DUMMY_MAIN
5182# ifdef __cplusplus
5183 extern "C"
5184# endif
5185 int F77_DUMMY_MAIN() { return 1; }
5186#endif
5187int
5188main ()
5189{
5190if ((int *) 0)
5191 return 0;
5192if (sizeof (int))
5193 return 0;
5194 ;
5195 return 0;
5196}
5197_ACEOF
5198rm -f conftest.$ac_objext
5199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5200 (eval $ac_compile) 2>&5
5201 ac_status=$?
5202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5203 (exit $ac_status); } &&
5204 { ac_try='test -s conftest.$ac_objext'
5205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5206 (eval $ac_try) 2>&5
5207 ac_status=$?
5208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5209 (exit $ac_status); }; }; then
5210 ac_cv_type_int=yes
5211else
5212 echo "$as_me: failed program was:" >&5
5213cat conftest.$ac_ext >&5
5214ac_cv_type_int=no
5215fi
5216rm -f conftest.$ac_objext conftest.$ac_ext
5217fi
5218echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5219echo "${ECHO_T}$ac_cv_type_int" >&6
5220
5221echo "$as_me:$LINENO: checking size of int" >&5
5222echo $ECHO_N "checking size of int... $ECHO_C" >&6
5223if test "${ac_cv_sizeof_int+set}" = set; then
5224 echo $ECHO_N "(cached) $ECHO_C" >&6
5225else
5226 if test "$ac_cv_type_int" = yes; then
5227 # The cast to unsigned long works around a bug in the HP C Compiler
5228 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5229 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5230 # This bug is HP SR number 8606223364.
5231 if test "$cross_compiling" = yes; then
5232 # Depending upon the size, compute the lo and hi bounds.
5233cat >conftest.$ac_ext <<_ACEOF
5234#line $LINENO "configure"
5235#include "confdefs.h"
5236$ac_includes_default
5237#ifdef F77_DUMMY_MAIN
5238# ifdef __cplusplus
5239 extern "C"
5240# endif
5241 int F77_DUMMY_MAIN() { return 1; }
5242#endif
5243int
5244main ()
5245{
5246static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5247test_array [0] = 0
5248
5249 ;
5250 return 0;
5251}
5252_ACEOF
5253rm -f conftest.$ac_objext
5254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5255 (eval $ac_compile) 2>&5
5256 ac_status=$?
5257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5258 (exit $ac_status); } &&
5259 { ac_try='test -s conftest.$ac_objext'
5260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5261 (eval $ac_try) 2>&5
5262 ac_status=$?
5263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5264 (exit $ac_status); }; }; then
5265 ac_lo=0 ac_mid=0
5266 while :; do
5267 cat >conftest.$ac_ext <<_ACEOF
5268#line $LINENO "configure"
5269#include "confdefs.h"
5270$ac_includes_default
5271#ifdef F77_DUMMY_MAIN
5272# ifdef __cplusplus
5273 extern "C"
5274# endif
5275 int F77_DUMMY_MAIN() { return 1; }
5276#endif
5277int
5278main ()
5279{
5280static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5281test_array [0] = 0
5282
5283 ;
5284 return 0;
5285}
5286_ACEOF
5287rm -f conftest.$ac_objext
5288if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5289 (eval $ac_compile) 2>&5
5290 ac_status=$?
5291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5292 (exit $ac_status); } &&
5293 { ac_try='test -s conftest.$ac_objext'
5294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5295 (eval $ac_try) 2>&5
5296 ac_status=$?
5297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5298 (exit $ac_status); }; }; then
5299 ac_hi=$ac_mid; break
5300else
5301 echo "$as_me: failed program was:" >&5
5302cat conftest.$ac_ext >&5
5303ac_lo=`expr $ac_mid + 1`
5304 if test $ac_lo -le $ac_mid; then
5305 ac_lo= ac_hi=
5306 break
5307 fi
5308 ac_mid=`expr 2 '*' $ac_mid + 1`
5309fi
5310rm -f conftest.$ac_objext conftest.$ac_ext
5311 done
5312else
5313 echo "$as_me: failed program was:" >&5
5314cat conftest.$ac_ext >&5
5315cat >conftest.$ac_ext <<_ACEOF
5316#line $LINENO "configure"
5317#include "confdefs.h"
5318$ac_includes_default
5319#ifdef F77_DUMMY_MAIN
5320# ifdef __cplusplus
5321 extern "C"
5322# endif
5323 int F77_DUMMY_MAIN() { return 1; }
5324#endif
5325int
5326main ()
5327{
5328static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5329test_array [0] = 0
5330
5331 ;
5332 return 0;
5333}
5334_ACEOF
5335rm -f conftest.$ac_objext
5336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5337 (eval $ac_compile) 2>&5
5338 ac_status=$?
5339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5340 (exit $ac_status); } &&
5341 { ac_try='test -s conftest.$ac_objext'
5342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5343 (eval $ac_try) 2>&5
5344 ac_status=$?
5345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5346 (exit $ac_status); }; }; then
5347 ac_hi=-1 ac_mid=-1
5348 while :; do
5349 cat >conftest.$ac_ext <<_ACEOF
5350#line $LINENO "configure"
5351#include "confdefs.h"
5352$ac_includes_default
5353#ifdef F77_DUMMY_MAIN
5354# ifdef __cplusplus
5355 extern "C"
5356# endif
5357 int F77_DUMMY_MAIN() { return 1; }
5358#endif
5359int
5360main ()
5361{
5362static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5363test_array [0] = 0
5364
5365 ;
5366 return 0;
5367}
5368_ACEOF
5369rm -f conftest.$ac_objext
5370if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5371 (eval $ac_compile) 2>&5
5372 ac_status=$?
5373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5374 (exit $ac_status); } &&
5375 { ac_try='test -s conftest.$ac_objext'
5376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5377 (eval $ac_try) 2>&5
5378 ac_status=$?
5379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5380 (exit $ac_status); }; }; then
5381 ac_lo=$ac_mid; break
5382else
5383 echo "$as_me: failed program was:" >&5
5384cat conftest.$ac_ext >&5
5385ac_hi=`expr '(' $ac_mid ')' - 1`
5386 if test $ac_mid -le $ac_hi; then
5387 ac_lo= ac_hi=
5388 break
5389 fi
5390 ac_mid=`expr 2 '*' $ac_mid`
5391fi
5392rm -f conftest.$ac_objext conftest.$ac_ext
5393 done
5394else
5395 echo "$as_me: failed program was:" >&5
5396cat conftest.$ac_ext >&5
5397ac_lo= ac_hi=
5398fi
5399rm -f conftest.$ac_objext conftest.$ac_ext
5400fi
5401rm -f conftest.$ac_objext conftest.$ac_ext
5402# Binary search between lo and hi bounds.
5403while test "x$ac_lo" != "x$ac_hi"; do
5404 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5405 cat >conftest.$ac_ext <<_ACEOF
5406#line $LINENO "configure"
5407#include "confdefs.h"
5408$ac_includes_default
5409#ifdef F77_DUMMY_MAIN
5410# ifdef __cplusplus
5411 extern "C"
5412# endif
5413 int F77_DUMMY_MAIN() { return 1; }
5414#endif
5415int
5416main ()
5417{
5418static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5419test_array [0] = 0
5420
5421 ;
5422 return 0;
5423}
5424_ACEOF
5425rm -f conftest.$ac_objext
5426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5427 (eval $ac_compile) 2>&5
5428 ac_status=$?
5429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5430 (exit $ac_status); } &&
5431 { ac_try='test -s conftest.$ac_objext'
5432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5433 (eval $ac_try) 2>&5
5434 ac_status=$?
5435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5436 (exit $ac_status); }; }; then
5437 ac_hi=$ac_mid
5438else
5439 echo "$as_me: failed program was:" >&5
5440cat conftest.$ac_ext >&5
5441ac_lo=`expr '(' $ac_mid ')' + 1`
5442fi
5443rm -f conftest.$ac_objext conftest.$ac_ext
5444done
5445case $ac_lo in
5446?*) ac_cv_sizeof_int=$ac_lo;;
5447'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5448echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5449 { (exit 1); exit 1; }; } ;;
5450esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005451else
5452 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005453 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5454echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5455 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005456else
Martin v. Löwis11437992002-04-12 09:54:03 +00005457 cat >conftest.$ac_ext <<_ACEOF
5458#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005459#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005460$ac_includes_default
5461long longval () { return (long) (sizeof (int)); }
5462unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005463#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005464#include <stdlib.h>
5465#ifdef F77_DUMMY_MAIN
5466# ifdef __cplusplus
5467 extern "C"
5468# endif
5469 int F77_DUMMY_MAIN() { return 1; }
5470#endif
5471int
5472main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005473{
Martin v. Löwis11437992002-04-12 09:54:03 +00005474
5475 FILE *f = fopen ("conftest.val", "w");
5476 if (! f)
5477 exit (1);
5478 if (((long) (sizeof (int))) < 0)
5479 {
5480 long i = longval ();
5481 if (i != ((long) (sizeof (int))))
5482 exit (1);
5483 fprintf (f, "%ld\n", i);
5484 }
5485 else
5486 {
5487 unsigned long i = ulongval ();
5488 if (i != ((long) (sizeof (int))))
5489 exit (1);
5490 fprintf (f, "%lu\n", i);
5491 }
5492 exit (ferror (f) || fclose (f) != 0);
5493
5494 ;
5495 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005496}
Martin v. Löwis11437992002-04-12 09:54:03 +00005497_ACEOF
5498rm -f conftest$ac_exeext
5499if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5500 (eval $ac_link) 2>&5
5501 ac_status=$?
5502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5503 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5505 (eval $ac_try) 2>&5
5506 ac_status=$?
5507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5508 (exit $ac_status); }; }; then
5509 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005510else
Martin v. Löwis11437992002-04-12 09:54:03 +00005511 echo "$as_me: program exited with status $ac_status" >&5
5512echo "$as_me: failed program was:" >&5
5513cat conftest.$ac_ext >&5
5514( exit $ac_status )
5515{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5516echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5517 { (exit 1); exit 1; }; }
5518fi
5519rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5520fi
5521fi
5522rm -f conftest.val
5523else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005524 ac_cv_sizeof_int=0
5525fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005526fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005527echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5528echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5529cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005530#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005531_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005532
5533
Martin v. Löwis11437992002-04-12 09:54:03 +00005534echo "$as_me:$LINENO: checking for long" >&5
5535echo $ECHO_N "checking for long... $ECHO_C" >&6
5536if test "${ac_cv_type_long+set}" = set; then
5537 echo $ECHO_N "(cached) $ECHO_C" >&6
5538else
5539 cat >conftest.$ac_ext <<_ACEOF
5540#line $LINENO "configure"
5541#include "confdefs.h"
5542$ac_includes_default
5543#ifdef F77_DUMMY_MAIN
5544# ifdef __cplusplus
5545 extern "C"
5546# endif
5547 int F77_DUMMY_MAIN() { return 1; }
5548#endif
5549int
5550main ()
5551{
5552if ((long *) 0)
5553 return 0;
5554if (sizeof (long))
5555 return 0;
5556 ;
5557 return 0;
5558}
5559_ACEOF
5560rm -f conftest.$ac_objext
5561if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5562 (eval $ac_compile) 2>&5
5563 ac_status=$?
5564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5565 (exit $ac_status); } &&
5566 { ac_try='test -s conftest.$ac_objext'
5567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5568 (eval $ac_try) 2>&5
5569 ac_status=$?
5570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5571 (exit $ac_status); }; }; then
5572 ac_cv_type_long=yes
5573else
5574 echo "$as_me: failed program was:" >&5
5575cat conftest.$ac_ext >&5
5576ac_cv_type_long=no
5577fi
5578rm -f conftest.$ac_objext conftest.$ac_ext
5579fi
5580echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5581echo "${ECHO_T}$ac_cv_type_long" >&6
5582
5583echo "$as_me:$LINENO: checking size of long" >&5
5584echo $ECHO_N "checking size of long... $ECHO_C" >&6
5585if test "${ac_cv_sizeof_long+set}" = set; then
5586 echo $ECHO_N "(cached) $ECHO_C" >&6
5587else
5588 if test "$ac_cv_type_long" = yes; then
5589 # The cast to unsigned long works around a bug in the HP C Compiler
5590 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5591 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5592 # This bug is HP SR number 8606223364.
5593 if test "$cross_compiling" = yes; then
5594 # Depending upon the size, compute the lo and hi bounds.
5595cat >conftest.$ac_ext <<_ACEOF
5596#line $LINENO "configure"
5597#include "confdefs.h"
5598$ac_includes_default
5599#ifdef F77_DUMMY_MAIN
5600# ifdef __cplusplus
5601 extern "C"
5602# endif
5603 int F77_DUMMY_MAIN() { return 1; }
5604#endif
5605int
5606main ()
5607{
5608static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5609test_array [0] = 0
5610
5611 ;
5612 return 0;
5613}
5614_ACEOF
5615rm -f conftest.$ac_objext
5616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5617 (eval $ac_compile) 2>&5
5618 ac_status=$?
5619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5620 (exit $ac_status); } &&
5621 { ac_try='test -s conftest.$ac_objext'
5622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5623 (eval $ac_try) 2>&5
5624 ac_status=$?
5625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5626 (exit $ac_status); }; }; then
5627 ac_lo=0 ac_mid=0
5628 while :; do
5629 cat >conftest.$ac_ext <<_ACEOF
5630#line $LINENO "configure"
5631#include "confdefs.h"
5632$ac_includes_default
5633#ifdef F77_DUMMY_MAIN
5634# ifdef __cplusplus
5635 extern "C"
5636# endif
5637 int F77_DUMMY_MAIN() { return 1; }
5638#endif
5639int
5640main ()
5641{
5642static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5643test_array [0] = 0
5644
5645 ;
5646 return 0;
5647}
5648_ACEOF
5649rm -f conftest.$ac_objext
5650if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5651 (eval $ac_compile) 2>&5
5652 ac_status=$?
5653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5654 (exit $ac_status); } &&
5655 { ac_try='test -s conftest.$ac_objext'
5656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5657 (eval $ac_try) 2>&5
5658 ac_status=$?
5659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5660 (exit $ac_status); }; }; then
5661 ac_hi=$ac_mid; break
5662else
5663 echo "$as_me: failed program was:" >&5
5664cat conftest.$ac_ext >&5
5665ac_lo=`expr $ac_mid + 1`
5666 if test $ac_lo -le $ac_mid; then
5667 ac_lo= ac_hi=
5668 break
5669 fi
5670 ac_mid=`expr 2 '*' $ac_mid + 1`
5671fi
5672rm -f conftest.$ac_objext conftest.$ac_ext
5673 done
5674else
5675 echo "$as_me: failed program was:" >&5
5676cat conftest.$ac_ext >&5
5677cat >conftest.$ac_ext <<_ACEOF
5678#line $LINENO "configure"
5679#include "confdefs.h"
5680$ac_includes_default
5681#ifdef F77_DUMMY_MAIN
5682# ifdef __cplusplus
5683 extern "C"
5684# endif
5685 int F77_DUMMY_MAIN() { return 1; }
5686#endif
5687int
5688main ()
5689{
5690static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5691test_array [0] = 0
5692
5693 ;
5694 return 0;
5695}
5696_ACEOF
5697rm -f conftest.$ac_objext
5698if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5699 (eval $ac_compile) 2>&5
5700 ac_status=$?
5701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5702 (exit $ac_status); } &&
5703 { ac_try='test -s conftest.$ac_objext'
5704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5705 (eval $ac_try) 2>&5
5706 ac_status=$?
5707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5708 (exit $ac_status); }; }; then
5709 ac_hi=-1 ac_mid=-1
5710 while :; do
5711 cat >conftest.$ac_ext <<_ACEOF
5712#line $LINENO "configure"
5713#include "confdefs.h"
5714$ac_includes_default
5715#ifdef F77_DUMMY_MAIN
5716# ifdef __cplusplus
5717 extern "C"
5718# endif
5719 int F77_DUMMY_MAIN() { return 1; }
5720#endif
5721int
5722main ()
5723{
5724static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5725test_array [0] = 0
5726
5727 ;
5728 return 0;
5729}
5730_ACEOF
5731rm -f conftest.$ac_objext
5732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5733 (eval $ac_compile) 2>&5
5734 ac_status=$?
5735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5736 (exit $ac_status); } &&
5737 { ac_try='test -s conftest.$ac_objext'
5738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5739 (eval $ac_try) 2>&5
5740 ac_status=$?
5741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5742 (exit $ac_status); }; }; then
5743 ac_lo=$ac_mid; break
5744else
5745 echo "$as_me: failed program was:" >&5
5746cat conftest.$ac_ext >&5
5747ac_hi=`expr '(' $ac_mid ')' - 1`
5748 if test $ac_mid -le $ac_hi; then
5749 ac_lo= ac_hi=
5750 break
5751 fi
5752 ac_mid=`expr 2 '*' $ac_mid`
5753fi
5754rm -f conftest.$ac_objext conftest.$ac_ext
5755 done
5756else
5757 echo "$as_me: failed program was:" >&5
5758cat conftest.$ac_ext >&5
5759ac_lo= ac_hi=
5760fi
5761rm -f conftest.$ac_objext conftest.$ac_ext
5762fi
5763rm -f conftest.$ac_objext conftest.$ac_ext
5764# Binary search between lo and hi bounds.
5765while test "x$ac_lo" != "x$ac_hi"; do
5766 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5767 cat >conftest.$ac_ext <<_ACEOF
5768#line $LINENO "configure"
5769#include "confdefs.h"
5770$ac_includes_default
5771#ifdef F77_DUMMY_MAIN
5772# ifdef __cplusplus
5773 extern "C"
5774# endif
5775 int F77_DUMMY_MAIN() { return 1; }
5776#endif
5777int
5778main ()
5779{
5780static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5781test_array [0] = 0
5782
5783 ;
5784 return 0;
5785}
5786_ACEOF
5787rm -f conftest.$ac_objext
5788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5789 (eval $ac_compile) 2>&5
5790 ac_status=$?
5791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5792 (exit $ac_status); } &&
5793 { ac_try='test -s conftest.$ac_objext'
5794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5795 (eval $ac_try) 2>&5
5796 ac_status=$?
5797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5798 (exit $ac_status); }; }; then
5799 ac_hi=$ac_mid
5800else
5801 echo "$as_me: failed program was:" >&5
5802cat conftest.$ac_ext >&5
5803ac_lo=`expr '(' $ac_mid ')' + 1`
5804fi
5805rm -f conftest.$ac_objext conftest.$ac_ext
5806done
5807case $ac_lo in
5808?*) ac_cv_sizeof_long=$ac_lo;;
5809'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5810echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5811 { (exit 1); exit 1; }; } ;;
5812esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005813else
5814 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005815 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5816echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5817 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005818else
Martin v. Löwis11437992002-04-12 09:54:03 +00005819 cat >conftest.$ac_ext <<_ACEOF
5820#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005821#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005822$ac_includes_default
5823long longval () { return (long) (sizeof (long)); }
5824unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005825#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005826#include <stdlib.h>
5827#ifdef F77_DUMMY_MAIN
5828# ifdef __cplusplus
5829 extern "C"
5830# endif
5831 int F77_DUMMY_MAIN() { return 1; }
5832#endif
5833int
5834main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005835{
Martin v. Löwis11437992002-04-12 09:54:03 +00005836
5837 FILE *f = fopen ("conftest.val", "w");
5838 if (! f)
5839 exit (1);
5840 if (((long) (sizeof (long))) < 0)
5841 {
5842 long i = longval ();
5843 if (i != ((long) (sizeof (long))))
5844 exit (1);
5845 fprintf (f, "%ld\n", i);
5846 }
5847 else
5848 {
5849 unsigned long i = ulongval ();
5850 if (i != ((long) (sizeof (long))))
5851 exit (1);
5852 fprintf (f, "%lu\n", i);
5853 }
5854 exit (ferror (f) || fclose (f) != 0);
5855
5856 ;
5857 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005858}
Martin v. Löwis11437992002-04-12 09:54:03 +00005859_ACEOF
5860rm -f conftest$ac_exeext
5861if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5862 (eval $ac_link) 2>&5
5863 ac_status=$?
5864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5865 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5867 (eval $ac_try) 2>&5
5868 ac_status=$?
5869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5870 (exit $ac_status); }; }; then
5871 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005872else
Martin v. Löwis11437992002-04-12 09:54:03 +00005873 echo "$as_me: program exited with status $ac_status" >&5
5874echo "$as_me: failed program was:" >&5
5875cat conftest.$ac_ext >&5
5876( exit $ac_status )
5877{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5878echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5879 { (exit 1); exit 1; }; }
5880fi
5881rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5882fi
5883fi
5884rm -f conftest.val
5885else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005886 ac_cv_sizeof_long=0
5887fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005888fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005889echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5890echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5891cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005892#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005893_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005894
5895
Martin v. Löwis11437992002-04-12 09:54:03 +00005896echo "$as_me:$LINENO: checking for void *" >&5
5897echo $ECHO_N "checking for void *... $ECHO_C" >&6
5898if test "${ac_cv_type_void_p+set}" = set; then
5899 echo $ECHO_N "(cached) $ECHO_C" >&6
5900else
5901 cat >conftest.$ac_ext <<_ACEOF
5902#line $LINENO "configure"
5903#include "confdefs.h"
5904$ac_includes_default
5905#ifdef F77_DUMMY_MAIN
5906# ifdef __cplusplus
5907 extern "C"
5908# endif
5909 int F77_DUMMY_MAIN() { return 1; }
5910#endif
5911int
5912main ()
5913{
5914if ((void * *) 0)
5915 return 0;
5916if (sizeof (void *))
5917 return 0;
5918 ;
5919 return 0;
5920}
5921_ACEOF
5922rm -f conftest.$ac_objext
5923if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5924 (eval $ac_compile) 2>&5
5925 ac_status=$?
5926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5927 (exit $ac_status); } &&
5928 { ac_try='test -s conftest.$ac_objext'
5929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5930 (eval $ac_try) 2>&5
5931 ac_status=$?
5932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5933 (exit $ac_status); }; }; then
5934 ac_cv_type_void_p=yes
5935else
5936 echo "$as_me: failed program was:" >&5
5937cat conftest.$ac_ext >&5
5938ac_cv_type_void_p=no
5939fi
5940rm -f conftest.$ac_objext conftest.$ac_ext
5941fi
5942echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5943echo "${ECHO_T}$ac_cv_type_void_p" >&6
5944
5945echo "$as_me:$LINENO: checking size of void *" >&5
5946echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5947if test "${ac_cv_sizeof_void_p+set}" = set; then
5948 echo $ECHO_N "(cached) $ECHO_C" >&6
5949else
5950 if test "$ac_cv_type_void_p" = yes; then
5951 # The cast to unsigned long works around a bug in the HP C Compiler
5952 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5953 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5954 # This bug is HP SR number 8606223364.
5955 if test "$cross_compiling" = yes; then
5956 # Depending upon the size, compute the lo and hi bounds.
5957cat >conftest.$ac_ext <<_ACEOF
5958#line $LINENO "configure"
5959#include "confdefs.h"
5960$ac_includes_default
5961#ifdef F77_DUMMY_MAIN
5962# ifdef __cplusplus
5963 extern "C"
5964# endif
5965 int F77_DUMMY_MAIN() { return 1; }
5966#endif
5967int
5968main ()
5969{
5970static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5971test_array [0] = 0
5972
5973 ;
5974 return 0;
5975}
5976_ACEOF
5977rm -f conftest.$ac_objext
5978if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5979 (eval $ac_compile) 2>&5
5980 ac_status=$?
5981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5982 (exit $ac_status); } &&
5983 { ac_try='test -s conftest.$ac_objext'
5984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5985 (eval $ac_try) 2>&5
5986 ac_status=$?
5987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5988 (exit $ac_status); }; }; then
5989 ac_lo=0 ac_mid=0
5990 while :; do
5991 cat >conftest.$ac_ext <<_ACEOF
5992#line $LINENO "configure"
5993#include "confdefs.h"
5994$ac_includes_default
5995#ifdef F77_DUMMY_MAIN
5996# ifdef __cplusplus
5997 extern "C"
5998# endif
5999 int F77_DUMMY_MAIN() { return 1; }
6000#endif
6001int
6002main ()
6003{
6004static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6005test_array [0] = 0
6006
6007 ;
6008 return 0;
6009}
6010_ACEOF
6011rm -f conftest.$ac_objext
6012if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6013 (eval $ac_compile) 2>&5
6014 ac_status=$?
6015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6016 (exit $ac_status); } &&
6017 { ac_try='test -s conftest.$ac_objext'
6018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6019 (eval $ac_try) 2>&5
6020 ac_status=$?
6021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6022 (exit $ac_status); }; }; then
6023 ac_hi=$ac_mid; break
6024else
6025 echo "$as_me: failed program was:" >&5
6026cat conftest.$ac_ext >&5
6027ac_lo=`expr $ac_mid + 1`
6028 if test $ac_lo -le $ac_mid; then
6029 ac_lo= ac_hi=
6030 break
6031 fi
6032 ac_mid=`expr 2 '*' $ac_mid + 1`
6033fi
6034rm -f conftest.$ac_objext conftest.$ac_ext
6035 done
6036else
6037 echo "$as_me: failed program was:" >&5
6038cat conftest.$ac_ext >&5
6039cat >conftest.$ac_ext <<_ACEOF
6040#line $LINENO "configure"
6041#include "confdefs.h"
6042$ac_includes_default
6043#ifdef F77_DUMMY_MAIN
6044# ifdef __cplusplus
6045 extern "C"
6046# endif
6047 int F77_DUMMY_MAIN() { return 1; }
6048#endif
6049int
6050main ()
6051{
6052static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6053test_array [0] = 0
6054
6055 ;
6056 return 0;
6057}
6058_ACEOF
6059rm -f conftest.$ac_objext
6060if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6061 (eval $ac_compile) 2>&5
6062 ac_status=$?
6063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6064 (exit $ac_status); } &&
6065 { ac_try='test -s conftest.$ac_objext'
6066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6067 (eval $ac_try) 2>&5
6068 ac_status=$?
6069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6070 (exit $ac_status); }; }; then
6071 ac_hi=-1 ac_mid=-1
6072 while :; do
6073 cat >conftest.$ac_ext <<_ACEOF
6074#line $LINENO "configure"
6075#include "confdefs.h"
6076$ac_includes_default
6077#ifdef F77_DUMMY_MAIN
6078# ifdef __cplusplus
6079 extern "C"
6080# endif
6081 int F77_DUMMY_MAIN() { return 1; }
6082#endif
6083int
6084main ()
6085{
6086static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6087test_array [0] = 0
6088
6089 ;
6090 return 0;
6091}
6092_ACEOF
6093rm -f conftest.$ac_objext
6094if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6095 (eval $ac_compile) 2>&5
6096 ac_status=$?
6097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6098 (exit $ac_status); } &&
6099 { ac_try='test -s conftest.$ac_objext'
6100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6101 (eval $ac_try) 2>&5
6102 ac_status=$?
6103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6104 (exit $ac_status); }; }; then
6105 ac_lo=$ac_mid; break
6106else
6107 echo "$as_me: failed program was:" >&5
6108cat conftest.$ac_ext >&5
6109ac_hi=`expr '(' $ac_mid ')' - 1`
6110 if test $ac_mid -le $ac_hi; then
6111 ac_lo= ac_hi=
6112 break
6113 fi
6114 ac_mid=`expr 2 '*' $ac_mid`
6115fi
6116rm -f conftest.$ac_objext conftest.$ac_ext
6117 done
6118else
6119 echo "$as_me: failed program was:" >&5
6120cat conftest.$ac_ext >&5
6121ac_lo= ac_hi=
6122fi
6123rm -f conftest.$ac_objext conftest.$ac_ext
6124fi
6125rm -f conftest.$ac_objext conftest.$ac_ext
6126# Binary search between lo and hi bounds.
6127while test "x$ac_lo" != "x$ac_hi"; do
6128 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6129 cat >conftest.$ac_ext <<_ACEOF
6130#line $LINENO "configure"
6131#include "confdefs.h"
6132$ac_includes_default
6133#ifdef F77_DUMMY_MAIN
6134# ifdef __cplusplus
6135 extern "C"
6136# endif
6137 int F77_DUMMY_MAIN() { return 1; }
6138#endif
6139int
6140main ()
6141{
6142static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6143test_array [0] = 0
6144
6145 ;
6146 return 0;
6147}
6148_ACEOF
6149rm -f conftest.$ac_objext
6150if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6151 (eval $ac_compile) 2>&5
6152 ac_status=$?
6153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6154 (exit $ac_status); } &&
6155 { ac_try='test -s conftest.$ac_objext'
6156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6157 (eval $ac_try) 2>&5
6158 ac_status=$?
6159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6160 (exit $ac_status); }; }; then
6161 ac_hi=$ac_mid
6162else
6163 echo "$as_me: failed program was:" >&5
6164cat conftest.$ac_ext >&5
6165ac_lo=`expr '(' $ac_mid ')' + 1`
6166fi
6167rm -f conftest.$ac_objext conftest.$ac_ext
6168done
6169case $ac_lo in
6170?*) ac_cv_sizeof_void_p=$ac_lo;;
6171'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6172echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6173 { (exit 1); exit 1; }; } ;;
6174esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006175else
6176 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006177 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6178echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6179 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006180else
Martin v. Löwis11437992002-04-12 09:54:03 +00006181 cat >conftest.$ac_ext <<_ACEOF
6182#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006183#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006184$ac_includes_default
6185long longval () { return (long) (sizeof (void *)); }
6186unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006187#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006188#include <stdlib.h>
6189#ifdef F77_DUMMY_MAIN
6190# ifdef __cplusplus
6191 extern "C"
6192# endif
6193 int F77_DUMMY_MAIN() { return 1; }
6194#endif
6195int
6196main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006197{
Martin v. Löwis11437992002-04-12 09:54:03 +00006198
6199 FILE *f = fopen ("conftest.val", "w");
6200 if (! f)
6201 exit (1);
6202 if (((long) (sizeof (void *))) < 0)
6203 {
6204 long i = longval ();
6205 if (i != ((long) (sizeof (void *))))
6206 exit (1);
6207 fprintf (f, "%ld\n", i);
6208 }
6209 else
6210 {
6211 unsigned long i = ulongval ();
6212 if (i != ((long) (sizeof (void *))))
6213 exit (1);
6214 fprintf (f, "%lu\n", i);
6215 }
6216 exit (ferror (f) || fclose (f) != 0);
6217
6218 ;
6219 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006220}
Martin v. Löwis11437992002-04-12 09:54:03 +00006221_ACEOF
6222rm -f conftest$ac_exeext
6223if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6224 (eval $ac_link) 2>&5
6225 ac_status=$?
6226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6227 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6229 (eval $ac_try) 2>&5
6230 ac_status=$?
6231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6232 (exit $ac_status); }; }; then
6233 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006234else
Martin v. Löwis11437992002-04-12 09:54:03 +00006235 echo "$as_me: program exited with status $ac_status" >&5
6236echo "$as_me: failed program was:" >&5
6237cat conftest.$ac_ext >&5
6238( exit $ac_status )
6239{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6240echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6241 { (exit 1); exit 1; }; }
6242fi
6243rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6244fi
6245fi
6246rm -f conftest.val
6247else
Guido van Rossumad678af1998-10-02 14:42:15 +00006248 ac_cv_sizeof_void_p=0
6249fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006250fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006251echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6252echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6253cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006254#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006255_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006256
6257
Martin v. Löwis11437992002-04-12 09:54:03 +00006258echo "$as_me:$LINENO: checking for char" >&5
6259echo $ECHO_N "checking for char... $ECHO_C" >&6
6260if test "${ac_cv_type_char+set}" = set; then
6261 echo $ECHO_N "(cached) $ECHO_C" >&6
6262else
6263 cat >conftest.$ac_ext <<_ACEOF
6264#line $LINENO "configure"
6265#include "confdefs.h"
6266$ac_includes_default
6267#ifdef F77_DUMMY_MAIN
6268# ifdef __cplusplus
6269 extern "C"
6270# endif
6271 int F77_DUMMY_MAIN() { return 1; }
6272#endif
6273int
6274main ()
6275{
6276if ((char *) 0)
6277 return 0;
6278if (sizeof (char))
6279 return 0;
6280 ;
6281 return 0;
6282}
6283_ACEOF
6284rm -f conftest.$ac_objext
6285if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6286 (eval $ac_compile) 2>&5
6287 ac_status=$?
6288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6289 (exit $ac_status); } &&
6290 { ac_try='test -s conftest.$ac_objext'
6291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6292 (eval $ac_try) 2>&5
6293 ac_status=$?
6294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6295 (exit $ac_status); }; }; then
6296 ac_cv_type_char=yes
6297else
6298 echo "$as_me: failed program was:" >&5
6299cat conftest.$ac_ext >&5
6300ac_cv_type_char=no
6301fi
6302rm -f conftest.$ac_objext conftest.$ac_ext
6303fi
6304echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6305echo "${ECHO_T}$ac_cv_type_char" >&6
6306
6307echo "$as_me:$LINENO: checking size of char" >&5
6308echo $ECHO_N "checking size of char... $ECHO_C" >&6
6309if test "${ac_cv_sizeof_char+set}" = set; then
6310 echo $ECHO_N "(cached) $ECHO_C" >&6
6311else
6312 if test "$ac_cv_type_char" = yes; then
6313 # The cast to unsigned long works around a bug in the HP C Compiler
6314 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6315 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6316 # This bug is HP SR number 8606223364.
6317 if test "$cross_compiling" = yes; then
6318 # Depending upon the size, compute the lo and hi bounds.
6319cat >conftest.$ac_ext <<_ACEOF
6320#line $LINENO "configure"
6321#include "confdefs.h"
6322$ac_includes_default
6323#ifdef F77_DUMMY_MAIN
6324# ifdef __cplusplus
6325 extern "C"
6326# endif
6327 int F77_DUMMY_MAIN() { return 1; }
6328#endif
6329int
6330main ()
6331{
6332static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6333test_array [0] = 0
6334
6335 ;
6336 return 0;
6337}
6338_ACEOF
6339rm -f conftest.$ac_objext
6340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6341 (eval $ac_compile) 2>&5
6342 ac_status=$?
6343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6344 (exit $ac_status); } &&
6345 { ac_try='test -s conftest.$ac_objext'
6346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6347 (eval $ac_try) 2>&5
6348 ac_status=$?
6349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6350 (exit $ac_status); }; }; then
6351 ac_lo=0 ac_mid=0
6352 while :; do
6353 cat >conftest.$ac_ext <<_ACEOF
6354#line $LINENO "configure"
6355#include "confdefs.h"
6356$ac_includes_default
6357#ifdef F77_DUMMY_MAIN
6358# ifdef __cplusplus
6359 extern "C"
6360# endif
6361 int F77_DUMMY_MAIN() { return 1; }
6362#endif
6363int
6364main ()
6365{
6366static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6367test_array [0] = 0
6368
6369 ;
6370 return 0;
6371}
6372_ACEOF
6373rm -f conftest.$ac_objext
6374if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6375 (eval $ac_compile) 2>&5
6376 ac_status=$?
6377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6378 (exit $ac_status); } &&
6379 { ac_try='test -s conftest.$ac_objext'
6380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6381 (eval $ac_try) 2>&5
6382 ac_status=$?
6383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6384 (exit $ac_status); }; }; then
6385 ac_hi=$ac_mid; break
6386else
6387 echo "$as_me: failed program was:" >&5
6388cat conftest.$ac_ext >&5
6389ac_lo=`expr $ac_mid + 1`
6390 if test $ac_lo -le $ac_mid; then
6391 ac_lo= ac_hi=
6392 break
6393 fi
6394 ac_mid=`expr 2 '*' $ac_mid + 1`
6395fi
6396rm -f conftest.$ac_objext conftest.$ac_ext
6397 done
6398else
6399 echo "$as_me: failed program was:" >&5
6400cat conftest.$ac_ext >&5
6401cat >conftest.$ac_ext <<_ACEOF
6402#line $LINENO "configure"
6403#include "confdefs.h"
6404$ac_includes_default
6405#ifdef F77_DUMMY_MAIN
6406# ifdef __cplusplus
6407 extern "C"
6408# endif
6409 int F77_DUMMY_MAIN() { return 1; }
6410#endif
6411int
6412main ()
6413{
6414static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6415test_array [0] = 0
6416
6417 ;
6418 return 0;
6419}
6420_ACEOF
6421rm -f conftest.$ac_objext
6422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6423 (eval $ac_compile) 2>&5
6424 ac_status=$?
6425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6426 (exit $ac_status); } &&
6427 { ac_try='test -s conftest.$ac_objext'
6428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6429 (eval $ac_try) 2>&5
6430 ac_status=$?
6431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6432 (exit $ac_status); }; }; then
6433 ac_hi=-1 ac_mid=-1
6434 while :; do
6435 cat >conftest.$ac_ext <<_ACEOF
6436#line $LINENO "configure"
6437#include "confdefs.h"
6438$ac_includes_default
6439#ifdef F77_DUMMY_MAIN
6440# ifdef __cplusplus
6441 extern "C"
6442# endif
6443 int F77_DUMMY_MAIN() { return 1; }
6444#endif
6445int
6446main ()
6447{
6448static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6449test_array [0] = 0
6450
6451 ;
6452 return 0;
6453}
6454_ACEOF
6455rm -f conftest.$ac_objext
6456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6457 (eval $ac_compile) 2>&5
6458 ac_status=$?
6459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6460 (exit $ac_status); } &&
6461 { ac_try='test -s conftest.$ac_objext'
6462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6463 (eval $ac_try) 2>&5
6464 ac_status=$?
6465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6466 (exit $ac_status); }; }; then
6467 ac_lo=$ac_mid; break
6468else
6469 echo "$as_me: failed program was:" >&5
6470cat conftest.$ac_ext >&5
6471ac_hi=`expr '(' $ac_mid ')' - 1`
6472 if test $ac_mid -le $ac_hi; then
6473 ac_lo= ac_hi=
6474 break
6475 fi
6476 ac_mid=`expr 2 '*' $ac_mid`
6477fi
6478rm -f conftest.$ac_objext conftest.$ac_ext
6479 done
6480else
6481 echo "$as_me: failed program was:" >&5
6482cat conftest.$ac_ext >&5
6483ac_lo= ac_hi=
6484fi
6485rm -f conftest.$ac_objext conftest.$ac_ext
6486fi
6487rm -f conftest.$ac_objext conftest.$ac_ext
6488# Binary search between lo and hi bounds.
6489while test "x$ac_lo" != "x$ac_hi"; do
6490 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6491 cat >conftest.$ac_ext <<_ACEOF
6492#line $LINENO "configure"
6493#include "confdefs.h"
6494$ac_includes_default
6495#ifdef F77_DUMMY_MAIN
6496# ifdef __cplusplus
6497 extern "C"
6498# endif
6499 int F77_DUMMY_MAIN() { return 1; }
6500#endif
6501int
6502main ()
6503{
6504static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6505test_array [0] = 0
6506
6507 ;
6508 return 0;
6509}
6510_ACEOF
6511rm -f conftest.$ac_objext
6512if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6513 (eval $ac_compile) 2>&5
6514 ac_status=$?
6515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6516 (exit $ac_status); } &&
6517 { ac_try='test -s conftest.$ac_objext'
6518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6519 (eval $ac_try) 2>&5
6520 ac_status=$?
6521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6522 (exit $ac_status); }; }; then
6523 ac_hi=$ac_mid
6524else
6525 echo "$as_me: failed program was:" >&5
6526cat conftest.$ac_ext >&5
6527ac_lo=`expr '(' $ac_mid ')' + 1`
6528fi
6529rm -f conftest.$ac_objext conftest.$ac_ext
6530done
6531case $ac_lo in
6532?*) ac_cv_sizeof_char=$ac_lo;;
6533'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6534echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6535 { (exit 1); exit 1; }; } ;;
6536esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006537else
6538 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006539 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6540echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6541 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006542else
Martin v. Löwis11437992002-04-12 09:54:03 +00006543 cat >conftest.$ac_ext <<_ACEOF
6544#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006545#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006546$ac_includes_default
6547long longval () { return (long) (sizeof (char)); }
6548unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006549#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006550#include <stdlib.h>
6551#ifdef F77_DUMMY_MAIN
6552# ifdef __cplusplus
6553 extern "C"
6554# endif
6555 int F77_DUMMY_MAIN() { return 1; }
6556#endif
6557int
6558main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006559{
Martin v. Löwis11437992002-04-12 09:54:03 +00006560
6561 FILE *f = fopen ("conftest.val", "w");
6562 if (! f)
6563 exit (1);
6564 if (((long) (sizeof (char))) < 0)
6565 {
6566 long i = longval ();
6567 if (i != ((long) (sizeof (char))))
6568 exit (1);
6569 fprintf (f, "%ld\n", i);
6570 }
6571 else
6572 {
6573 unsigned long i = ulongval ();
6574 if (i != ((long) (sizeof (char))))
6575 exit (1);
6576 fprintf (f, "%lu\n", i);
6577 }
6578 exit (ferror (f) || fclose (f) != 0);
6579
6580 ;
6581 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006582}
Martin v. Löwis11437992002-04-12 09:54:03 +00006583_ACEOF
6584rm -f conftest$ac_exeext
6585if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6586 (eval $ac_link) 2>&5
6587 ac_status=$?
6588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6589 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6591 (eval $ac_try) 2>&5
6592 ac_status=$?
6593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6594 (exit $ac_status); }; }; then
6595 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006596else
Martin v. Löwis11437992002-04-12 09:54:03 +00006597 echo "$as_me: program exited with status $ac_status" >&5
6598echo "$as_me: failed program was:" >&5
6599cat conftest.$ac_ext >&5
6600( exit $ac_status )
6601{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6602echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6603 { (exit 1); exit 1; }; }
6604fi
6605rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6606fi
6607fi
6608rm -f conftest.val
6609else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006610 ac_cv_sizeof_char=0
6611fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006612fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006613echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6614echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6615cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006616#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006617_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006618
6619
Martin v. Löwis11437992002-04-12 09:54:03 +00006620echo "$as_me:$LINENO: checking for short" >&5
6621echo $ECHO_N "checking for short... $ECHO_C" >&6
6622if test "${ac_cv_type_short+set}" = set; then
6623 echo $ECHO_N "(cached) $ECHO_C" >&6
6624else
6625 cat >conftest.$ac_ext <<_ACEOF
6626#line $LINENO "configure"
6627#include "confdefs.h"
6628$ac_includes_default
6629#ifdef F77_DUMMY_MAIN
6630# ifdef __cplusplus
6631 extern "C"
6632# endif
6633 int F77_DUMMY_MAIN() { return 1; }
6634#endif
6635int
6636main ()
6637{
6638if ((short *) 0)
6639 return 0;
6640if (sizeof (short))
6641 return 0;
6642 ;
6643 return 0;
6644}
6645_ACEOF
6646rm -f conftest.$ac_objext
6647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6648 (eval $ac_compile) 2>&5
6649 ac_status=$?
6650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6651 (exit $ac_status); } &&
6652 { ac_try='test -s conftest.$ac_objext'
6653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6654 (eval $ac_try) 2>&5
6655 ac_status=$?
6656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6657 (exit $ac_status); }; }; then
6658 ac_cv_type_short=yes
6659else
6660 echo "$as_me: failed program was:" >&5
6661cat conftest.$ac_ext >&5
6662ac_cv_type_short=no
6663fi
6664rm -f conftest.$ac_objext conftest.$ac_ext
6665fi
6666echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6667echo "${ECHO_T}$ac_cv_type_short" >&6
6668
6669echo "$as_me:$LINENO: checking size of short" >&5
6670echo $ECHO_N "checking size of short... $ECHO_C" >&6
6671if test "${ac_cv_sizeof_short+set}" = set; then
6672 echo $ECHO_N "(cached) $ECHO_C" >&6
6673else
6674 if test "$ac_cv_type_short" = yes; then
6675 # The cast to unsigned long works around a bug in the HP C Compiler
6676 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6677 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6678 # This bug is HP SR number 8606223364.
6679 if test "$cross_compiling" = yes; then
6680 # Depending upon the size, compute the lo and hi bounds.
6681cat >conftest.$ac_ext <<_ACEOF
6682#line $LINENO "configure"
6683#include "confdefs.h"
6684$ac_includes_default
6685#ifdef F77_DUMMY_MAIN
6686# ifdef __cplusplus
6687 extern "C"
6688# endif
6689 int F77_DUMMY_MAIN() { return 1; }
6690#endif
6691int
6692main ()
6693{
6694static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6695test_array [0] = 0
6696
6697 ;
6698 return 0;
6699}
6700_ACEOF
6701rm -f conftest.$ac_objext
6702if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6703 (eval $ac_compile) 2>&5
6704 ac_status=$?
6705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6706 (exit $ac_status); } &&
6707 { ac_try='test -s conftest.$ac_objext'
6708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6709 (eval $ac_try) 2>&5
6710 ac_status=$?
6711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6712 (exit $ac_status); }; }; then
6713 ac_lo=0 ac_mid=0
6714 while :; do
6715 cat >conftest.$ac_ext <<_ACEOF
6716#line $LINENO "configure"
6717#include "confdefs.h"
6718$ac_includes_default
6719#ifdef F77_DUMMY_MAIN
6720# ifdef __cplusplus
6721 extern "C"
6722# endif
6723 int F77_DUMMY_MAIN() { return 1; }
6724#endif
6725int
6726main ()
6727{
6728static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6729test_array [0] = 0
6730
6731 ;
6732 return 0;
6733}
6734_ACEOF
6735rm -f conftest.$ac_objext
6736if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6737 (eval $ac_compile) 2>&5
6738 ac_status=$?
6739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6740 (exit $ac_status); } &&
6741 { ac_try='test -s conftest.$ac_objext'
6742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6743 (eval $ac_try) 2>&5
6744 ac_status=$?
6745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6746 (exit $ac_status); }; }; then
6747 ac_hi=$ac_mid; break
6748else
6749 echo "$as_me: failed program was:" >&5
6750cat conftest.$ac_ext >&5
6751ac_lo=`expr $ac_mid + 1`
6752 if test $ac_lo -le $ac_mid; then
6753 ac_lo= ac_hi=
6754 break
6755 fi
6756 ac_mid=`expr 2 '*' $ac_mid + 1`
6757fi
6758rm -f conftest.$ac_objext conftest.$ac_ext
6759 done
6760else
6761 echo "$as_me: failed program was:" >&5
6762cat conftest.$ac_ext >&5
6763cat >conftest.$ac_ext <<_ACEOF
6764#line $LINENO "configure"
6765#include "confdefs.h"
6766$ac_includes_default
6767#ifdef F77_DUMMY_MAIN
6768# ifdef __cplusplus
6769 extern "C"
6770# endif
6771 int F77_DUMMY_MAIN() { return 1; }
6772#endif
6773int
6774main ()
6775{
6776static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6777test_array [0] = 0
6778
6779 ;
6780 return 0;
6781}
6782_ACEOF
6783rm -f conftest.$ac_objext
6784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6785 (eval $ac_compile) 2>&5
6786 ac_status=$?
6787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6788 (exit $ac_status); } &&
6789 { ac_try='test -s conftest.$ac_objext'
6790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6791 (eval $ac_try) 2>&5
6792 ac_status=$?
6793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6794 (exit $ac_status); }; }; then
6795 ac_hi=-1 ac_mid=-1
6796 while :; do
6797 cat >conftest.$ac_ext <<_ACEOF
6798#line $LINENO "configure"
6799#include "confdefs.h"
6800$ac_includes_default
6801#ifdef F77_DUMMY_MAIN
6802# ifdef __cplusplus
6803 extern "C"
6804# endif
6805 int F77_DUMMY_MAIN() { return 1; }
6806#endif
6807int
6808main ()
6809{
6810static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6811test_array [0] = 0
6812
6813 ;
6814 return 0;
6815}
6816_ACEOF
6817rm -f conftest.$ac_objext
6818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6819 (eval $ac_compile) 2>&5
6820 ac_status=$?
6821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6822 (exit $ac_status); } &&
6823 { ac_try='test -s conftest.$ac_objext'
6824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6825 (eval $ac_try) 2>&5
6826 ac_status=$?
6827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6828 (exit $ac_status); }; }; then
6829 ac_lo=$ac_mid; break
6830else
6831 echo "$as_me: failed program was:" >&5
6832cat conftest.$ac_ext >&5
6833ac_hi=`expr '(' $ac_mid ')' - 1`
6834 if test $ac_mid -le $ac_hi; then
6835 ac_lo= ac_hi=
6836 break
6837 fi
6838 ac_mid=`expr 2 '*' $ac_mid`
6839fi
6840rm -f conftest.$ac_objext conftest.$ac_ext
6841 done
6842else
6843 echo "$as_me: failed program was:" >&5
6844cat conftest.$ac_ext >&5
6845ac_lo= ac_hi=
6846fi
6847rm -f conftest.$ac_objext conftest.$ac_ext
6848fi
6849rm -f conftest.$ac_objext conftest.$ac_ext
6850# Binary search between lo and hi bounds.
6851while test "x$ac_lo" != "x$ac_hi"; do
6852 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6853 cat >conftest.$ac_ext <<_ACEOF
6854#line $LINENO "configure"
6855#include "confdefs.h"
6856$ac_includes_default
6857#ifdef F77_DUMMY_MAIN
6858# ifdef __cplusplus
6859 extern "C"
6860# endif
6861 int F77_DUMMY_MAIN() { return 1; }
6862#endif
6863int
6864main ()
6865{
6866static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6867test_array [0] = 0
6868
6869 ;
6870 return 0;
6871}
6872_ACEOF
6873rm -f conftest.$ac_objext
6874if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6875 (eval $ac_compile) 2>&5
6876 ac_status=$?
6877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6878 (exit $ac_status); } &&
6879 { ac_try='test -s conftest.$ac_objext'
6880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6881 (eval $ac_try) 2>&5
6882 ac_status=$?
6883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6884 (exit $ac_status); }; }; then
6885 ac_hi=$ac_mid
6886else
6887 echo "$as_me: failed program was:" >&5
6888cat conftest.$ac_ext >&5
6889ac_lo=`expr '(' $ac_mid ')' + 1`
6890fi
6891rm -f conftest.$ac_objext conftest.$ac_ext
6892done
6893case $ac_lo in
6894?*) ac_cv_sizeof_short=$ac_lo;;
6895'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6896echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6897 { (exit 1); exit 1; }; } ;;
6898esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006899else
6900 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006901 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6902echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6903 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006904else
Martin v. Löwis11437992002-04-12 09:54:03 +00006905 cat >conftest.$ac_ext <<_ACEOF
6906#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006907#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006908$ac_includes_default
6909long longval () { return (long) (sizeof (short)); }
6910unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006911#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006912#include <stdlib.h>
6913#ifdef F77_DUMMY_MAIN
6914# ifdef __cplusplus
6915 extern "C"
6916# endif
6917 int F77_DUMMY_MAIN() { return 1; }
6918#endif
6919int
6920main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006921{
Martin v. Löwis11437992002-04-12 09:54:03 +00006922
6923 FILE *f = fopen ("conftest.val", "w");
6924 if (! f)
6925 exit (1);
6926 if (((long) (sizeof (short))) < 0)
6927 {
6928 long i = longval ();
6929 if (i != ((long) (sizeof (short))))
6930 exit (1);
6931 fprintf (f, "%ld\n", i);
6932 }
6933 else
6934 {
6935 unsigned long i = ulongval ();
6936 if (i != ((long) (sizeof (short))))
6937 exit (1);
6938 fprintf (f, "%lu\n", i);
6939 }
6940 exit (ferror (f) || fclose (f) != 0);
6941
6942 ;
6943 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006944}
Martin v. Löwis11437992002-04-12 09:54:03 +00006945_ACEOF
6946rm -f conftest$ac_exeext
6947if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6948 (eval $ac_link) 2>&5
6949 ac_status=$?
6950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6951 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6953 (eval $ac_try) 2>&5
6954 ac_status=$?
6955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6956 (exit $ac_status); }; }; then
6957 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006958else
Martin v. Löwis11437992002-04-12 09:54:03 +00006959 echo "$as_me: program exited with status $ac_status" >&5
6960echo "$as_me: failed program was:" >&5
6961cat conftest.$ac_ext >&5
6962( exit $ac_status )
6963{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6964echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6965 { (exit 1); exit 1; }; }
6966fi
6967rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6968fi
6969fi
6970rm -f conftest.val
6971else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006972 ac_cv_sizeof_short=0
6973fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006974fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006975echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6976echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6977cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006978#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006979_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006980
6981
Martin v. Löwis11437992002-04-12 09:54:03 +00006982echo "$as_me:$LINENO: checking for float" >&5
6983echo $ECHO_N "checking for float... $ECHO_C" >&6
6984if test "${ac_cv_type_float+set}" = set; then
6985 echo $ECHO_N "(cached) $ECHO_C" >&6
6986else
6987 cat >conftest.$ac_ext <<_ACEOF
6988#line $LINENO "configure"
6989#include "confdefs.h"
6990$ac_includes_default
6991#ifdef F77_DUMMY_MAIN
6992# ifdef __cplusplus
6993 extern "C"
6994# endif
6995 int F77_DUMMY_MAIN() { return 1; }
6996#endif
6997int
6998main ()
6999{
7000if ((float *) 0)
7001 return 0;
7002if (sizeof (float))
7003 return 0;
7004 ;
7005 return 0;
7006}
7007_ACEOF
7008rm -f conftest.$ac_objext
7009if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7010 (eval $ac_compile) 2>&5
7011 ac_status=$?
7012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7013 (exit $ac_status); } &&
7014 { ac_try='test -s conftest.$ac_objext'
7015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7016 (eval $ac_try) 2>&5
7017 ac_status=$?
7018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7019 (exit $ac_status); }; }; then
7020 ac_cv_type_float=yes
7021else
7022 echo "$as_me: failed program was:" >&5
7023cat conftest.$ac_ext >&5
7024ac_cv_type_float=no
7025fi
7026rm -f conftest.$ac_objext conftest.$ac_ext
7027fi
7028echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7029echo "${ECHO_T}$ac_cv_type_float" >&6
7030
7031echo "$as_me:$LINENO: checking size of float" >&5
7032echo $ECHO_N "checking size of float... $ECHO_C" >&6
7033if test "${ac_cv_sizeof_float+set}" = set; then
7034 echo $ECHO_N "(cached) $ECHO_C" >&6
7035else
7036 if test "$ac_cv_type_float" = yes; then
7037 # The cast to unsigned long works around a bug in the HP C Compiler
7038 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7039 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7040 # This bug is HP SR number 8606223364.
7041 if test "$cross_compiling" = yes; then
7042 # Depending upon the size, compute the lo and hi bounds.
7043cat >conftest.$ac_ext <<_ACEOF
7044#line $LINENO "configure"
7045#include "confdefs.h"
7046$ac_includes_default
7047#ifdef F77_DUMMY_MAIN
7048# ifdef __cplusplus
7049 extern "C"
7050# endif
7051 int F77_DUMMY_MAIN() { return 1; }
7052#endif
7053int
7054main ()
7055{
7056static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7057test_array [0] = 0
7058
7059 ;
7060 return 0;
7061}
7062_ACEOF
7063rm -f conftest.$ac_objext
7064if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7065 (eval $ac_compile) 2>&5
7066 ac_status=$?
7067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7068 (exit $ac_status); } &&
7069 { ac_try='test -s conftest.$ac_objext'
7070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7071 (eval $ac_try) 2>&5
7072 ac_status=$?
7073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7074 (exit $ac_status); }; }; then
7075 ac_lo=0 ac_mid=0
7076 while :; do
7077 cat >conftest.$ac_ext <<_ACEOF
7078#line $LINENO "configure"
7079#include "confdefs.h"
7080$ac_includes_default
7081#ifdef F77_DUMMY_MAIN
7082# ifdef __cplusplus
7083 extern "C"
7084# endif
7085 int F77_DUMMY_MAIN() { return 1; }
7086#endif
7087int
7088main ()
7089{
7090static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7091test_array [0] = 0
7092
7093 ;
7094 return 0;
7095}
7096_ACEOF
7097rm -f conftest.$ac_objext
7098if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7099 (eval $ac_compile) 2>&5
7100 ac_status=$?
7101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7102 (exit $ac_status); } &&
7103 { ac_try='test -s conftest.$ac_objext'
7104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7105 (eval $ac_try) 2>&5
7106 ac_status=$?
7107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7108 (exit $ac_status); }; }; then
7109 ac_hi=$ac_mid; break
7110else
7111 echo "$as_me: failed program was:" >&5
7112cat conftest.$ac_ext >&5
7113ac_lo=`expr $ac_mid + 1`
7114 if test $ac_lo -le $ac_mid; then
7115 ac_lo= ac_hi=
7116 break
7117 fi
7118 ac_mid=`expr 2 '*' $ac_mid + 1`
7119fi
7120rm -f conftest.$ac_objext conftest.$ac_ext
7121 done
7122else
7123 echo "$as_me: failed program was:" >&5
7124cat conftest.$ac_ext >&5
7125cat >conftest.$ac_ext <<_ACEOF
7126#line $LINENO "configure"
7127#include "confdefs.h"
7128$ac_includes_default
7129#ifdef F77_DUMMY_MAIN
7130# ifdef __cplusplus
7131 extern "C"
7132# endif
7133 int F77_DUMMY_MAIN() { return 1; }
7134#endif
7135int
7136main ()
7137{
7138static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7139test_array [0] = 0
7140
7141 ;
7142 return 0;
7143}
7144_ACEOF
7145rm -f conftest.$ac_objext
7146if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7147 (eval $ac_compile) 2>&5
7148 ac_status=$?
7149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7150 (exit $ac_status); } &&
7151 { ac_try='test -s conftest.$ac_objext'
7152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7153 (eval $ac_try) 2>&5
7154 ac_status=$?
7155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7156 (exit $ac_status); }; }; then
7157 ac_hi=-1 ac_mid=-1
7158 while :; do
7159 cat >conftest.$ac_ext <<_ACEOF
7160#line $LINENO "configure"
7161#include "confdefs.h"
7162$ac_includes_default
7163#ifdef F77_DUMMY_MAIN
7164# ifdef __cplusplus
7165 extern "C"
7166# endif
7167 int F77_DUMMY_MAIN() { return 1; }
7168#endif
7169int
7170main ()
7171{
7172static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7173test_array [0] = 0
7174
7175 ;
7176 return 0;
7177}
7178_ACEOF
7179rm -f conftest.$ac_objext
7180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7181 (eval $ac_compile) 2>&5
7182 ac_status=$?
7183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7184 (exit $ac_status); } &&
7185 { ac_try='test -s conftest.$ac_objext'
7186 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7187 (eval $ac_try) 2>&5
7188 ac_status=$?
7189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7190 (exit $ac_status); }; }; then
7191 ac_lo=$ac_mid; break
7192else
7193 echo "$as_me: failed program was:" >&5
7194cat conftest.$ac_ext >&5
7195ac_hi=`expr '(' $ac_mid ')' - 1`
7196 if test $ac_mid -le $ac_hi; then
7197 ac_lo= ac_hi=
7198 break
7199 fi
7200 ac_mid=`expr 2 '*' $ac_mid`
7201fi
7202rm -f conftest.$ac_objext conftest.$ac_ext
7203 done
7204else
7205 echo "$as_me: failed program was:" >&5
7206cat conftest.$ac_ext >&5
7207ac_lo= ac_hi=
7208fi
7209rm -f conftest.$ac_objext conftest.$ac_ext
7210fi
7211rm -f conftest.$ac_objext conftest.$ac_ext
7212# Binary search between lo and hi bounds.
7213while test "x$ac_lo" != "x$ac_hi"; do
7214 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7215 cat >conftest.$ac_ext <<_ACEOF
7216#line $LINENO "configure"
7217#include "confdefs.h"
7218$ac_includes_default
7219#ifdef F77_DUMMY_MAIN
7220# ifdef __cplusplus
7221 extern "C"
7222# endif
7223 int F77_DUMMY_MAIN() { return 1; }
7224#endif
7225int
7226main ()
7227{
7228static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7229test_array [0] = 0
7230
7231 ;
7232 return 0;
7233}
7234_ACEOF
7235rm -f conftest.$ac_objext
7236if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7237 (eval $ac_compile) 2>&5
7238 ac_status=$?
7239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7240 (exit $ac_status); } &&
7241 { ac_try='test -s conftest.$ac_objext'
7242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7243 (eval $ac_try) 2>&5
7244 ac_status=$?
7245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7246 (exit $ac_status); }; }; then
7247 ac_hi=$ac_mid
7248else
7249 echo "$as_me: failed program was:" >&5
7250cat conftest.$ac_ext >&5
7251ac_lo=`expr '(' $ac_mid ')' + 1`
7252fi
7253rm -f conftest.$ac_objext conftest.$ac_ext
7254done
7255case $ac_lo in
7256?*) ac_cv_sizeof_float=$ac_lo;;
7257'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7258echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7259 { (exit 1); exit 1; }; } ;;
7260esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007261else
7262 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007263 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7264echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7265 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007266else
Martin v. Löwis11437992002-04-12 09:54:03 +00007267 cat >conftest.$ac_ext <<_ACEOF
7268#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007269#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007270$ac_includes_default
7271long longval () { return (long) (sizeof (float)); }
7272unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007273#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007274#include <stdlib.h>
7275#ifdef F77_DUMMY_MAIN
7276# ifdef __cplusplus
7277 extern "C"
7278# endif
7279 int F77_DUMMY_MAIN() { return 1; }
7280#endif
7281int
7282main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007283{
Martin v. Löwis11437992002-04-12 09:54:03 +00007284
7285 FILE *f = fopen ("conftest.val", "w");
7286 if (! f)
7287 exit (1);
7288 if (((long) (sizeof (float))) < 0)
7289 {
7290 long i = longval ();
7291 if (i != ((long) (sizeof (float))))
7292 exit (1);
7293 fprintf (f, "%ld\n", i);
7294 }
7295 else
7296 {
7297 unsigned long i = ulongval ();
7298 if (i != ((long) (sizeof (float))))
7299 exit (1);
7300 fprintf (f, "%lu\n", i);
7301 }
7302 exit (ferror (f) || fclose (f) != 0);
7303
7304 ;
7305 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007306}
Martin v. Löwis11437992002-04-12 09:54:03 +00007307_ACEOF
7308rm -f conftest$ac_exeext
7309if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7310 (eval $ac_link) 2>&5
7311 ac_status=$?
7312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7313 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7315 (eval $ac_try) 2>&5
7316 ac_status=$?
7317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7318 (exit $ac_status); }; }; then
7319 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007320else
Martin v. Löwis11437992002-04-12 09:54:03 +00007321 echo "$as_me: program exited with status $ac_status" >&5
7322echo "$as_me: failed program was:" >&5
7323cat conftest.$ac_ext >&5
7324( exit $ac_status )
7325{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7326echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7327 { (exit 1); exit 1; }; }
7328fi
7329rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7330fi
7331fi
7332rm -f conftest.val
7333else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007334 ac_cv_sizeof_float=0
7335fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007336fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007337echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7338echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7339cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007340#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007341_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007342
7343
Martin v. Löwis11437992002-04-12 09:54:03 +00007344echo "$as_me:$LINENO: checking for double" >&5
7345echo $ECHO_N "checking for double... $ECHO_C" >&6
7346if test "${ac_cv_type_double+set}" = set; then
7347 echo $ECHO_N "(cached) $ECHO_C" >&6
7348else
7349 cat >conftest.$ac_ext <<_ACEOF
7350#line $LINENO "configure"
7351#include "confdefs.h"
7352$ac_includes_default
7353#ifdef F77_DUMMY_MAIN
7354# ifdef __cplusplus
7355 extern "C"
7356# endif
7357 int F77_DUMMY_MAIN() { return 1; }
7358#endif
7359int
7360main ()
7361{
7362if ((double *) 0)
7363 return 0;
7364if (sizeof (double))
7365 return 0;
7366 ;
7367 return 0;
7368}
7369_ACEOF
7370rm -f conftest.$ac_objext
7371if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7372 (eval $ac_compile) 2>&5
7373 ac_status=$?
7374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7375 (exit $ac_status); } &&
7376 { ac_try='test -s conftest.$ac_objext'
7377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7378 (eval $ac_try) 2>&5
7379 ac_status=$?
7380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7381 (exit $ac_status); }; }; then
7382 ac_cv_type_double=yes
7383else
7384 echo "$as_me: failed program was:" >&5
7385cat conftest.$ac_ext >&5
7386ac_cv_type_double=no
7387fi
7388rm -f conftest.$ac_objext conftest.$ac_ext
7389fi
7390echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7391echo "${ECHO_T}$ac_cv_type_double" >&6
7392
7393echo "$as_me:$LINENO: checking size of double" >&5
7394echo $ECHO_N "checking size of double... $ECHO_C" >&6
7395if test "${ac_cv_sizeof_double+set}" = set; then
7396 echo $ECHO_N "(cached) $ECHO_C" >&6
7397else
7398 if test "$ac_cv_type_double" = yes; then
7399 # The cast to unsigned long works around a bug in the HP C Compiler
7400 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7401 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7402 # This bug is HP SR number 8606223364.
7403 if test "$cross_compiling" = yes; then
7404 # Depending upon the size, compute the lo and hi bounds.
7405cat >conftest.$ac_ext <<_ACEOF
7406#line $LINENO "configure"
7407#include "confdefs.h"
7408$ac_includes_default
7409#ifdef F77_DUMMY_MAIN
7410# ifdef __cplusplus
7411 extern "C"
7412# endif
7413 int F77_DUMMY_MAIN() { return 1; }
7414#endif
7415int
7416main ()
7417{
7418static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7419test_array [0] = 0
7420
7421 ;
7422 return 0;
7423}
7424_ACEOF
7425rm -f conftest.$ac_objext
7426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7427 (eval $ac_compile) 2>&5
7428 ac_status=$?
7429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7430 (exit $ac_status); } &&
7431 { ac_try='test -s conftest.$ac_objext'
7432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7433 (eval $ac_try) 2>&5
7434 ac_status=$?
7435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7436 (exit $ac_status); }; }; then
7437 ac_lo=0 ac_mid=0
7438 while :; do
7439 cat >conftest.$ac_ext <<_ACEOF
7440#line $LINENO "configure"
7441#include "confdefs.h"
7442$ac_includes_default
7443#ifdef F77_DUMMY_MAIN
7444# ifdef __cplusplus
7445 extern "C"
7446# endif
7447 int F77_DUMMY_MAIN() { return 1; }
7448#endif
7449int
7450main ()
7451{
7452static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7453test_array [0] = 0
7454
7455 ;
7456 return 0;
7457}
7458_ACEOF
7459rm -f conftest.$ac_objext
7460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7461 (eval $ac_compile) 2>&5
7462 ac_status=$?
7463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7464 (exit $ac_status); } &&
7465 { ac_try='test -s conftest.$ac_objext'
7466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7467 (eval $ac_try) 2>&5
7468 ac_status=$?
7469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7470 (exit $ac_status); }; }; then
7471 ac_hi=$ac_mid; break
7472else
7473 echo "$as_me: failed program was:" >&5
7474cat conftest.$ac_ext >&5
7475ac_lo=`expr $ac_mid + 1`
7476 if test $ac_lo -le $ac_mid; then
7477 ac_lo= ac_hi=
7478 break
7479 fi
7480 ac_mid=`expr 2 '*' $ac_mid + 1`
7481fi
7482rm -f conftest.$ac_objext conftest.$ac_ext
7483 done
7484else
7485 echo "$as_me: failed program was:" >&5
7486cat conftest.$ac_ext >&5
7487cat >conftest.$ac_ext <<_ACEOF
7488#line $LINENO "configure"
7489#include "confdefs.h"
7490$ac_includes_default
7491#ifdef F77_DUMMY_MAIN
7492# ifdef __cplusplus
7493 extern "C"
7494# endif
7495 int F77_DUMMY_MAIN() { return 1; }
7496#endif
7497int
7498main ()
7499{
7500static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7501test_array [0] = 0
7502
7503 ;
7504 return 0;
7505}
7506_ACEOF
7507rm -f conftest.$ac_objext
7508if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7509 (eval $ac_compile) 2>&5
7510 ac_status=$?
7511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7512 (exit $ac_status); } &&
7513 { ac_try='test -s conftest.$ac_objext'
7514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7515 (eval $ac_try) 2>&5
7516 ac_status=$?
7517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7518 (exit $ac_status); }; }; then
7519 ac_hi=-1 ac_mid=-1
7520 while :; do
7521 cat >conftest.$ac_ext <<_ACEOF
7522#line $LINENO "configure"
7523#include "confdefs.h"
7524$ac_includes_default
7525#ifdef F77_DUMMY_MAIN
7526# ifdef __cplusplus
7527 extern "C"
7528# endif
7529 int F77_DUMMY_MAIN() { return 1; }
7530#endif
7531int
7532main ()
7533{
7534static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7535test_array [0] = 0
7536
7537 ;
7538 return 0;
7539}
7540_ACEOF
7541rm -f conftest.$ac_objext
7542if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7543 (eval $ac_compile) 2>&5
7544 ac_status=$?
7545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7546 (exit $ac_status); } &&
7547 { ac_try='test -s conftest.$ac_objext'
7548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7549 (eval $ac_try) 2>&5
7550 ac_status=$?
7551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7552 (exit $ac_status); }; }; then
7553 ac_lo=$ac_mid; break
7554else
7555 echo "$as_me: failed program was:" >&5
7556cat conftest.$ac_ext >&5
7557ac_hi=`expr '(' $ac_mid ')' - 1`
7558 if test $ac_mid -le $ac_hi; then
7559 ac_lo= ac_hi=
7560 break
7561 fi
7562 ac_mid=`expr 2 '*' $ac_mid`
7563fi
7564rm -f conftest.$ac_objext conftest.$ac_ext
7565 done
7566else
7567 echo "$as_me: failed program was:" >&5
7568cat conftest.$ac_ext >&5
7569ac_lo= ac_hi=
7570fi
7571rm -f conftest.$ac_objext conftest.$ac_ext
7572fi
7573rm -f conftest.$ac_objext conftest.$ac_ext
7574# Binary search between lo and hi bounds.
7575while test "x$ac_lo" != "x$ac_hi"; do
7576 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7577 cat >conftest.$ac_ext <<_ACEOF
7578#line $LINENO "configure"
7579#include "confdefs.h"
7580$ac_includes_default
7581#ifdef F77_DUMMY_MAIN
7582# ifdef __cplusplus
7583 extern "C"
7584# endif
7585 int F77_DUMMY_MAIN() { return 1; }
7586#endif
7587int
7588main ()
7589{
7590static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7591test_array [0] = 0
7592
7593 ;
7594 return 0;
7595}
7596_ACEOF
7597rm -f conftest.$ac_objext
7598if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7599 (eval $ac_compile) 2>&5
7600 ac_status=$?
7601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7602 (exit $ac_status); } &&
7603 { ac_try='test -s conftest.$ac_objext'
7604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7605 (eval $ac_try) 2>&5
7606 ac_status=$?
7607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7608 (exit $ac_status); }; }; then
7609 ac_hi=$ac_mid
7610else
7611 echo "$as_me: failed program was:" >&5
7612cat conftest.$ac_ext >&5
7613ac_lo=`expr '(' $ac_mid ')' + 1`
7614fi
7615rm -f conftest.$ac_objext conftest.$ac_ext
7616done
7617case $ac_lo in
7618?*) ac_cv_sizeof_double=$ac_lo;;
7619'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7620echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7621 { (exit 1); exit 1; }; } ;;
7622esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007623else
7624 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007625 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7626echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7627 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007628else
Martin v. Löwis11437992002-04-12 09:54:03 +00007629 cat >conftest.$ac_ext <<_ACEOF
7630#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007631#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007632$ac_includes_default
7633long longval () { return (long) (sizeof (double)); }
7634unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007635#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007636#include <stdlib.h>
7637#ifdef F77_DUMMY_MAIN
7638# ifdef __cplusplus
7639 extern "C"
7640# endif
7641 int F77_DUMMY_MAIN() { return 1; }
7642#endif
7643int
7644main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007645{
Martin v. Löwis11437992002-04-12 09:54:03 +00007646
7647 FILE *f = fopen ("conftest.val", "w");
7648 if (! f)
7649 exit (1);
7650 if (((long) (sizeof (double))) < 0)
7651 {
7652 long i = longval ();
7653 if (i != ((long) (sizeof (double))))
7654 exit (1);
7655 fprintf (f, "%ld\n", i);
7656 }
7657 else
7658 {
7659 unsigned long i = ulongval ();
7660 if (i != ((long) (sizeof (double))))
7661 exit (1);
7662 fprintf (f, "%lu\n", i);
7663 }
7664 exit (ferror (f) || fclose (f) != 0);
7665
7666 ;
7667 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007668}
Martin v. Löwis11437992002-04-12 09:54:03 +00007669_ACEOF
7670rm -f conftest$ac_exeext
7671if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7672 (eval $ac_link) 2>&5
7673 ac_status=$?
7674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7675 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7677 (eval $ac_try) 2>&5
7678 ac_status=$?
7679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7680 (exit $ac_status); }; }; then
7681 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007682else
Martin v. Löwis11437992002-04-12 09:54:03 +00007683 echo "$as_me: program exited with status $ac_status" >&5
7684echo "$as_me: failed program was:" >&5
7685cat conftest.$ac_ext >&5
7686( exit $ac_status )
7687{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7688echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7689 { (exit 1); exit 1; }; }
7690fi
7691rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7692fi
7693fi
7694rm -f conftest.val
7695else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007696 ac_cv_sizeof_double=0
7697fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007698fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007699echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7700echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7701cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007702#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007703_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007704
7705
Martin v. Löwis11437992002-04-12 09:54:03 +00007706echo "$as_me:$LINENO: checking for fpos_t" >&5
7707echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7708if test "${ac_cv_type_fpos_t+set}" = set; then
7709 echo $ECHO_N "(cached) $ECHO_C" >&6
7710else
7711 cat >conftest.$ac_ext <<_ACEOF
7712#line $LINENO "configure"
7713#include "confdefs.h"
7714$ac_includes_default
7715#ifdef F77_DUMMY_MAIN
7716# ifdef __cplusplus
7717 extern "C"
7718# endif
7719 int F77_DUMMY_MAIN() { return 1; }
7720#endif
7721int
7722main ()
7723{
7724if ((fpos_t *) 0)
7725 return 0;
7726if (sizeof (fpos_t))
7727 return 0;
7728 ;
7729 return 0;
7730}
7731_ACEOF
7732rm -f conftest.$ac_objext
7733if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7734 (eval $ac_compile) 2>&5
7735 ac_status=$?
7736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7737 (exit $ac_status); } &&
7738 { ac_try='test -s conftest.$ac_objext'
7739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7740 (eval $ac_try) 2>&5
7741 ac_status=$?
7742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7743 (exit $ac_status); }; }; then
7744 ac_cv_type_fpos_t=yes
7745else
7746 echo "$as_me: failed program was:" >&5
7747cat conftest.$ac_ext >&5
7748ac_cv_type_fpos_t=no
7749fi
7750rm -f conftest.$ac_objext conftest.$ac_ext
7751fi
7752echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7753echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7754
7755echo "$as_me:$LINENO: checking size of fpos_t" >&5
7756echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7757if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7758 echo $ECHO_N "(cached) $ECHO_C" >&6
7759else
7760 if test "$ac_cv_type_fpos_t" = yes; then
7761 # The cast to unsigned long works around a bug in the HP C Compiler
7762 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7763 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7764 # This bug is HP SR number 8606223364.
7765 if test "$cross_compiling" = yes; then
7766 # Depending upon the size, compute the lo and hi bounds.
7767cat >conftest.$ac_ext <<_ACEOF
7768#line $LINENO "configure"
7769#include "confdefs.h"
7770$ac_includes_default
7771#ifdef F77_DUMMY_MAIN
7772# ifdef __cplusplus
7773 extern "C"
7774# endif
7775 int F77_DUMMY_MAIN() { return 1; }
7776#endif
7777int
7778main ()
7779{
7780static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7781test_array [0] = 0
7782
7783 ;
7784 return 0;
7785}
7786_ACEOF
7787rm -f conftest.$ac_objext
7788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7789 (eval $ac_compile) 2>&5
7790 ac_status=$?
7791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7792 (exit $ac_status); } &&
7793 { ac_try='test -s conftest.$ac_objext'
7794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7795 (eval $ac_try) 2>&5
7796 ac_status=$?
7797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7798 (exit $ac_status); }; }; then
7799 ac_lo=0 ac_mid=0
7800 while :; do
7801 cat >conftest.$ac_ext <<_ACEOF
7802#line $LINENO "configure"
7803#include "confdefs.h"
7804$ac_includes_default
7805#ifdef F77_DUMMY_MAIN
7806# ifdef __cplusplus
7807 extern "C"
7808# endif
7809 int F77_DUMMY_MAIN() { return 1; }
7810#endif
7811int
7812main ()
7813{
7814static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7815test_array [0] = 0
7816
7817 ;
7818 return 0;
7819}
7820_ACEOF
7821rm -f conftest.$ac_objext
7822if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7823 (eval $ac_compile) 2>&5
7824 ac_status=$?
7825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7826 (exit $ac_status); } &&
7827 { ac_try='test -s conftest.$ac_objext'
7828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7829 (eval $ac_try) 2>&5
7830 ac_status=$?
7831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7832 (exit $ac_status); }; }; then
7833 ac_hi=$ac_mid; break
7834else
7835 echo "$as_me: failed program was:" >&5
7836cat conftest.$ac_ext >&5
7837ac_lo=`expr $ac_mid + 1`
7838 if test $ac_lo -le $ac_mid; then
7839 ac_lo= ac_hi=
7840 break
7841 fi
7842 ac_mid=`expr 2 '*' $ac_mid + 1`
7843fi
7844rm -f conftest.$ac_objext conftest.$ac_ext
7845 done
7846else
7847 echo "$as_me: failed program was:" >&5
7848cat conftest.$ac_ext >&5
7849cat >conftest.$ac_ext <<_ACEOF
7850#line $LINENO "configure"
7851#include "confdefs.h"
7852$ac_includes_default
7853#ifdef F77_DUMMY_MAIN
7854# ifdef __cplusplus
7855 extern "C"
7856# endif
7857 int F77_DUMMY_MAIN() { return 1; }
7858#endif
7859int
7860main ()
7861{
7862static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7863test_array [0] = 0
7864
7865 ;
7866 return 0;
7867}
7868_ACEOF
7869rm -f conftest.$ac_objext
7870if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7871 (eval $ac_compile) 2>&5
7872 ac_status=$?
7873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7874 (exit $ac_status); } &&
7875 { ac_try='test -s conftest.$ac_objext'
7876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7877 (eval $ac_try) 2>&5
7878 ac_status=$?
7879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7880 (exit $ac_status); }; }; then
7881 ac_hi=-1 ac_mid=-1
7882 while :; do
7883 cat >conftest.$ac_ext <<_ACEOF
7884#line $LINENO "configure"
7885#include "confdefs.h"
7886$ac_includes_default
7887#ifdef F77_DUMMY_MAIN
7888# ifdef __cplusplus
7889 extern "C"
7890# endif
7891 int F77_DUMMY_MAIN() { return 1; }
7892#endif
7893int
7894main ()
7895{
7896static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7897test_array [0] = 0
7898
7899 ;
7900 return 0;
7901}
7902_ACEOF
7903rm -f conftest.$ac_objext
7904if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7905 (eval $ac_compile) 2>&5
7906 ac_status=$?
7907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7908 (exit $ac_status); } &&
7909 { ac_try='test -s conftest.$ac_objext'
7910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7911 (eval $ac_try) 2>&5
7912 ac_status=$?
7913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7914 (exit $ac_status); }; }; then
7915 ac_lo=$ac_mid; break
7916else
7917 echo "$as_me: failed program was:" >&5
7918cat conftest.$ac_ext >&5
7919ac_hi=`expr '(' $ac_mid ')' - 1`
7920 if test $ac_mid -le $ac_hi; then
7921 ac_lo= ac_hi=
7922 break
7923 fi
7924 ac_mid=`expr 2 '*' $ac_mid`
7925fi
7926rm -f conftest.$ac_objext conftest.$ac_ext
7927 done
7928else
7929 echo "$as_me: failed program was:" >&5
7930cat conftest.$ac_ext >&5
7931ac_lo= ac_hi=
7932fi
7933rm -f conftest.$ac_objext conftest.$ac_ext
7934fi
7935rm -f conftest.$ac_objext conftest.$ac_ext
7936# Binary search between lo and hi bounds.
7937while test "x$ac_lo" != "x$ac_hi"; do
7938 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7939 cat >conftest.$ac_ext <<_ACEOF
7940#line $LINENO "configure"
7941#include "confdefs.h"
7942$ac_includes_default
7943#ifdef F77_DUMMY_MAIN
7944# ifdef __cplusplus
7945 extern "C"
7946# endif
7947 int F77_DUMMY_MAIN() { return 1; }
7948#endif
7949int
7950main ()
7951{
7952static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7953test_array [0] = 0
7954
7955 ;
7956 return 0;
7957}
7958_ACEOF
7959rm -f conftest.$ac_objext
7960if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7961 (eval $ac_compile) 2>&5
7962 ac_status=$?
7963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7964 (exit $ac_status); } &&
7965 { ac_try='test -s conftest.$ac_objext'
7966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7967 (eval $ac_try) 2>&5
7968 ac_status=$?
7969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7970 (exit $ac_status); }; }; then
7971 ac_hi=$ac_mid
7972else
7973 echo "$as_me: failed program was:" >&5
7974cat conftest.$ac_ext >&5
7975ac_lo=`expr '(' $ac_mid ')' + 1`
7976fi
7977rm -f conftest.$ac_objext conftest.$ac_ext
7978done
7979case $ac_lo in
7980?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7981'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7982echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7983 { (exit 1); exit 1; }; } ;;
7984esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007985else
7986 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007987 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7988echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7989 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007990else
Martin v. Löwis11437992002-04-12 09:54:03 +00007991 cat >conftest.$ac_ext <<_ACEOF
7992#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007993#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007994$ac_includes_default
7995long longval () { return (long) (sizeof (fpos_t)); }
7996unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007997#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007998#include <stdlib.h>
7999#ifdef F77_DUMMY_MAIN
8000# ifdef __cplusplus
8001 extern "C"
8002# endif
8003 int F77_DUMMY_MAIN() { return 1; }
8004#endif
8005int
8006main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008007{
Martin v. Löwis11437992002-04-12 09:54:03 +00008008
8009 FILE *f = fopen ("conftest.val", "w");
8010 if (! f)
8011 exit (1);
8012 if (((long) (sizeof (fpos_t))) < 0)
8013 {
8014 long i = longval ();
8015 if (i != ((long) (sizeof (fpos_t))))
8016 exit (1);
8017 fprintf (f, "%ld\n", i);
8018 }
8019 else
8020 {
8021 unsigned long i = ulongval ();
8022 if (i != ((long) (sizeof (fpos_t))))
8023 exit (1);
8024 fprintf (f, "%lu\n", i);
8025 }
8026 exit (ferror (f) || fclose (f) != 0);
8027
8028 ;
8029 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008030}
Martin v. Löwis11437992002-04-12 09:54:03 +00008031_ACEOF
8032rm -f conftest$ac_exeext
8033if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8034 (eval $ac_link) 2>&5
8035 ac_status=$?
8036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8037 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8039 (eval $ac_try) 2>&5
8040 ac_status=$?
8041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8042 (exit $ac_status); }; }; then
8043 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008044else
Martin v. Löwis11437992002-04-12 09:54:03 +00008045 echo "$as_me: program exited with status $ac_status" >&5
8046echo "$as_me: failed program was:" >&5
8047cat conftest.$ac_ext >&5
8048( exit $ac_status )
8049{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8050echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8051 { (exit 1); exit 1; }; }
8052fi
8053rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8054fi
8055fi
8056rm -f conftest.val
8057else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008058 ac_cv_sizeof_fpos_t=0
8059fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008060fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008061echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8062echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8063cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008064#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008065_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008066
Michael W. Hudson54241132001-12-07 15:38:26 +00008067
8068
Martin v. Löwis11437992002-04-12 09:54:03 +00008069echo "$as_me:$LINENO: checking for long long support" >&5
8070echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008071have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008072cat >conftest.$ac_ext <<_ACEOF
8073#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008074#include "confdefs.h"
8075
Martin v. Löwis11437992002-04-12 09:54:03 +00008076#ifdef F77_DUMMY_MAIN
8077# ifdef __cplusplus
8078 extern "C"
8079# endif
8080 int F77_DUMMY_MAIN() { return 1; }
8081#endif
8082int
8083main ()
8084{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008085long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008086 ;
8087 return 0;
8088}
8089_ACEOF
8090rm -f conftest.$ac_objext
8091if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8092 (eval $ac_compile) 2>&5
8093 ac_status=$?
8094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8095 (exit $ac_status); } &&
8096 { ac_try='test -s conftest.$ac_objext'
8097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8098 (eval $ac_try) 2>&5
8099 ac_status=$?
8100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8101 (exit $ac_status); }; }; then
8102
8103
8104cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008105#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008106_ACEOF
8107
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008108 have_long_long=yes
8109
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008110else
Martin v. Löwis11437992002-04-12 09:54:03 +00008111 echo "$as_me: failed program was:" >&5
8112cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008113fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008114rm -f conftest.$ac_objext conftest.$ac_ext
8115echo "$as_me:$LINENO: result: $have_long_long" >&5
8116echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008117if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008118echo "$as_me:$LINENO: checking for long long" >&5
8119echo $ECHO_N "checking for long long... $ECHO_C" >&6
8120if test "${ac_cv_type_long_long+set}" = set; then
8121 echo $ECHO_N "(cached) $ECHO_C" >&6
8122else
8123 cat >conftest.$ac_ext <<_ACEOF
8124#line $LINENO "configure"
8125#include "confdefs.h"
8126$ac_includes_default
8127#ifdef F77_DUMMY_MAIN
8128# ifdef __cplusplus
8129 extern "C"
8130# endif
8131 int F77_DUMMY_MAIN() { return 1; }
8132#endif
8133int
8134main ()
8135{
8136if ((long long *) 0)
8137 return 0;
8138if (sizeof (long long))
8139 return 0;
8140 ;
8141 return 0;
8142}
8143_ACEOF
8144rm -f conftest.$ac_objext
8145if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8146 (eval $ac_compile) 2>&5
8147 ac_status=$?
8148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8149 (exit $ac_status); } &&
8150 { ac_try='test -s conftest.$ac_objext'
8151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8152 (eval $ac_try) 2>&5
8153 ac_status=$?
8154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8155 (exit $ac_status); }; }; then
8156 ac_cv_type_long_long=yes
8157else
8158 echo "$as_me: failed program was:" >&5
8159cat conftest.$ac_ext >&5
8160ac_cv_type_long_long=no
8161fi
8162rm -f conftest.$ac_objext conftest.$ac_ext
8163fi
8164echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8165echo "${ECHO_T}$ac_cv_type_long_long" >&6
8166
8167echo "$as_me:$LINENO: checking size of long long" >&5
8168echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8169if test "${ac_cv_sizeof_long_long+set}" = set; then
8170 echo $ECHO_N "(cached) $ECHO_C" >&6
8171else
8172 if test "$ac_cv_type_long_long" = yes; then
8173 # The cast to unsigned long works around a bug in the HP C Compiler
8174 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8175 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8176 # This bug is HP SR number 8606223364.
8177 if test "$cross_compiling" = yes; then
8178 # Depending upon the size, compute the lo and hi bounds.
8179cat >conftest.$ac_ext <<_ACEOF
8180#line $LINENO "configure"
8181#include "confdefs.h"
8182$ac_includes_default
8183#ifdef F77_DUMMY_MAIN
8184# ifdef __cplusplus
8185 extern "C"
8186# endif
8187 int F77_DUMMY_MAIN() { return 1; }
8188#endif
8189int
8190main ()
8191{
8192static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8193test_array [0] = 0
8194
8195 ;
8196 return 0;
8197}
8198_ACEOF
8199rm -f conftest.$ac_objext
8200if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8201 (eval $ac_compile) 2>&5
8202 ac_status=$?
8203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8204 (exit $ac_status); } &&
8205 { ac_try='test -s conftest.$ac_objext'
8206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8207 (eval $ac_try) 2>&5
8208 ac_status=$?
8209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8210 (exit $ac_status); }; }; then
8211 ac_lo=0 ac_mid=0
8212 while :; do
8213 cat >conftest.$ac_ext <<_ACEOF
8214#line $LINENO "configure"
8215#include "confdefs.h"
8216$ac_includes_default
8217#ifdef F77_DUMMY_MAIN
8218# ifdef __cplusplus
8219 extern "C"
8220# endif
8221 int F77_DUMMY_MAIN() { return 1; }
8222#endif
8223int
8224main ()
8225{
8226static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8227test_array [0] = 0
8228
8229 ;
8230 return 0;
8231}
8232_ACEOF
8233rm -f conftest.$ac_objext
8234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8235 (eval $ac_compile) 2>&5
8236 ac_status=$?
8237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8238 (exit $ac_status); } &&
8239 { ac_try='test -s conftest.$ac_objext'
8240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8241 (eval $ac_try) 2>&5
8242 ac_status=$?
8243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8244 (exit $ac_status); }; }; then
8245 ac_hi=$ac_mid; break
8246else
8247 echo "$as_me: failed program was:" >&5
8248cat conftest.$ac_ext >&5
8249ac_lo=`expr $ac_mid + 1`
8250 if test $ac_lo -le $ac_mid; then
8251 ac_lo= ac_hi=
8252 break
8253 fi
8254 ac_mid=`expr 2 '*' $ac_mid + 1`
8255fi
8256rm -f conftest.$ac_objext conftest.$ac_ext
8257 done
8258else
8259 echo "$as_me: failed program was:" >&5
8260cat conftest.$ac_ext >&5
8261cat >conftest.$ac_ext <<_ACEOF
8262#line $LINENO "configure"
8263#include "confdefs.h"
8264$ac_includes_default
8265#ifdef F77_DUMMY_MAIN
8266# ifdef __cplusplus
8267 extern "C"
8268# endif
8269 int F77_DUMMY_MAIN() { return 1; }
8270#endif
8271int
8272main ()
8273{
8274static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8275test_array [0] = 0
8276
8277 ;
8278 return 0;
8279}
8280_ACEOF
8281rm -f conftest.$ac_objext
8282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8283 (eval $ac_compile) 2>&5
8284 ac_status=$?
8285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8286 (exit $ac_status); } &&
8287 { ac_try='test -s conftest.$ac_objext'
8288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8289 (eval $ac_try) 2>&5
8290 ac_status=$?
8291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8292 (exit $ac_status); }; }; then
8293 ac_hi=-1 ac_mid=-1
8294 while :; do
8295 cat >conftest.$ac_ext <<_ACEOF
8296#line $LINENO "configure"
8297#include "confdefs.h"
8298$ac_includes_default
8299#ifdef F77_DUMMY_MAIN
8300# ifdef __cplusplus
8301 extern "C"
8302# endif
8303 int F77_DUMMY_MAIN() { return 1; }
8304#endif
8305int
8306main ()
8307{
8308static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8309test_array [0] = 0
8310
8311 ;
8312 return 0;
8313}
8314_ACEOF
8315rm -f conftest.$ac_objext
8316if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8317 (eval $ac_compile) 2>&5
8318 ac_status=$?
8319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8320 (exit $ac_status); } &&
8321 { ac_try='test -s conftest.$ac_objext'
8322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8323 (eval $ac_try) 2>&5
8324 ac_status=$?
8325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8326 (exit $ac_status); }; }; then
8327 ac_lo=$ac_mid; break
8328else
8329 echo "$as_me: failed program was:" >&5
8330cat conftest.$ac_ext >&5
8331ac_hi=`expr '(' $ac_mid ')' - 1`
8332 if test $ac_mid -le $ac_hi; then
8333 ac_lo= ac_hi=
8334 break
8335 fi
8336 ac_mid=`expr 2 '*' $ac_mid`
8337fi
8338rm -f conftest.$ac_objext conftest.$ac_ext
8339 done
8340else
8341 echo "$as_me: failed program was:" >&5
8342cat conftest.$ac_ext >&5
8343ac_lo= ac_hi=
8344fi
8345rm -f conftest.$ac_objext conftest.$ac_ext
8346fi
8347rm -f conftest.$ac_objext conftest.$ac_ext
8348# Binary search between lo and hi bounds.
8349while test "x$ac_lo" != "x$ac_hi"; do
8350 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8351 cat >conftest.$ac_ext <<_ACEOF
8352#line $LINENO "configure"
8353#include "confdefs.h"
8354$ac_includes_default
8355#ifdef F77_DUMMY_MAIN
8356# ifdef __cplusplus
8357 extern "C"
8358# endif
8359 int F77_DUMMY_MAIN() { return 1; }
8360#endif
8361int
8362main ()
8363{
8364static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8365test_array [0] = 0
8366
8367 ;
8368 return 0;
8369}
8370_ACEOF
8371rm -f conftest.$ac_objext
8372if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8373 (eval $ac_compile) 2>&5
8374 ac_status=$?
8375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8376 (exit $ac_status); } &&
8377 { ac_try='test -s conftest.$ac_objext'
8378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8379 (eval $ac_try) 2>&5
8380 ac_status=$?
8381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8382 (exit $ac_status); }; }; then
8383 ac_hi=$ac_mid
8384else
8385 echo "$as_me: failed program was:" >&5
8386cat conftest.$ac_ext >&5
8387ac_lo=`expr '(' $ac_mid ')' + 1`
8388fi
8389rm -f conftest.$ac_objext conftest.$ac_ext
8390done
8391case $ac_lo in
8392?*) ac_cv_sizeof_long_long=$ac_lo;;
8393'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8394echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8395 { (exit 1); exit 1; }; } ;;
8396esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008397else
8398 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008399 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8400echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8401 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008402else
Martin v. Löwis11437992002-04-12 09:54:03 +00008403 cat >conftest.$ac_ext <<_ACEOF
8404#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008405#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008406$ac_includes_default
8407long longval () { return (long) (sizeof (long long)); }
8408unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008409#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008410#include <stdlib.h>
8411#ifdef F77_DUMMY_MAIN
8412# ifdef __cplusplus
8413 extern "C"
8414# endif
8415 int F77_DUMMY_MAIN() { return 1; }
8416#endif
8417int
8418main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008419{
Martin v. Löwis11437992002-04-12 09:54:03 +00008420
8421 FILE *f = fopen ("conftest.val", "w");
8422 if (! f)
8423 exit (1);
8424 if (((long) (sizeof (long long))) < 0)
8425 {
8426 long i = longval ();
8427 if (i != ((long) (sizeof (long long))))
8428 exit (1);
8429 fprintf (f, "%ld\n", i);
8430 }
8431 else
8432 {
8433 unsigned long i = ulongval ();
8434 if (i != ((long) (sizeof (long long))))
8435 exit (1);
8436 fprintf (f, "%lu\n", i);
8437 }
8438 exit (ferror (f) || fclose (f) != 0);
8439
8440 ;
8441 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008442}
Martin v. Löwis11437992002-04-12 09:54:03 +00008443_ACEOF
8444rm -f conftest$ac_exeext
8445if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8446 (eval $ac_link) 2>&5
8447 ac_status=$?
8448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8449 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8451 (eval $ac_try) 2>&5
8452 ac_status=$?
8453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8454 (exit $ac_status); }; }; then
8455 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008456else
Martin v. Löwis11437992002-04-12 09:54:03 +00008457 echo "$as_me: program exited with status $ac_status" >&5
8458echo "$as_me: failed program was:" >&5
8459cat conftest.$ac_ext >&5
8460( exit $ac_status )
8461{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8462echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8463 { (exit 1); exit 1; }; }
8464fi
8465rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8466fi
8467fi
8468rm -f conftest.val
8469else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008470 ac_cv_sizeof_long_long=0
8471fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008472fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008473echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8474echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8475cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008476#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008477_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008478
Michael W. Hudson54241132001-12-07 15:38:26 +00008479
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008480fi
8481
Martin v. Löwis11437992002-04-12 09:54:03 +00008482echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8483echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008484have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008485cat >conftest.$ac_ext <<_ACEOF
8486#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008487#include "confdefs.h"
8488
Martin v. Löwis11437992002-04-12 09:54:03 +00008489#ifdef F77_DUMMY_MAIN
8490# ifdef __cplusplus
8491 extern "C"
8492# endif
8493 int F77_DUMMY_MAIN() { return 1; }
8494#endif
8495int
8496main ()
8497{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008498uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008499 ;
8500 return 0;
8501}
8502_ACEOF
8503rm -f conftest.$ac_objext
8504if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8505 (eval $ac_compile) 2>&5
8506 ac_status=$?
8507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8508 (exit $ac_status); } &&
8509 { ac_try='test -s conftest.$ac_objext'
8510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8511 (eval $ac_try) 2>&5
8512 ac_status=$?
8513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8514 (exit $ac_status); }; }; then
8515
8516
8517cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008518#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008519_ACEOF
8520
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008521 have_uintptr_t=yes
8522
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008523else
Martin v. Löwis11437992002-04-12 09:54:03 +00008524 echo "$as_me: failed program was:" >&5
8525cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008526fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008527rm -f conftest.$ac_objext conftest.$ac_ext
8528echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8529echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008530if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008531echo "$as_me:$LINENO: checking for uintptr_t" >&5
8532echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8533if test "${ac_cv_type_uintptr_t+set}" = set; then
8534 echo $ECHO_N "(cached) $ECHO_C" >&6
8535else
8536 cat >conftest.$ac_ext <<_ACEOF
8537#line $LINENO "configure"
8538#include "confdefs.h"
8539$ac_includes_default
8540#ifdef F77_DUMMY_MAIN
8541# ifdef __cplusplus
8542 extern "C"
8543# endif
8544 int F77_DUMMY_MAIN() { return 1; }
8545#endif
8546int
8547main ()
8548{
8549if ((uintptr_t *) 0)
8550 return 0;
8551if (sizeof (uintptr_t))
8552 return 0;
8553 ;
8554 return 0;
8555}
8556_ACEOF
8557rm -f conftest.$ac_objext
8558if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8559 (eval $ac_compile) 2>&5
8560 ac_status=$?
8561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8562 (exit $ac_status); } &&
8563 { ac_try='test -s conftest.$ac_objext'
8564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8565 (eval $ac_try) 2>&5
8566 ac_status=$?
8567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8568 (exit $ac_status); }; }; then
8569 ac_cv_type_uintptr_t=yes
8570else
8571 echo "$as_me: failed program was:" >&5
8572cat conftest.$ac_ext >&5
8573ac_cv_type_uintptr_t=no
8574fi
8575rm -f conftest.$ac_objext conftest.$ac_ext
8576fi
8577echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8578echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8579
8580echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8581echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8582if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8583 echo $ECHO_N "(cached) $ECHO_C" >&6
8584else
8585 if test "$ac_cv_type_uintptr_t" = yes; then
8586 # The cast to unsigned long works around a bug in the HP C Compiler
8587 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8588 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8589 # This bug is HP SR number 8606223364.
8590 if test "$cross_compiling" = yes; then
8591 # Depending upon the size, compute the lo and hi bounds.
8592cat >conftest.$ac_ext <<_ACEOF
8593#line $LINENO "configure"
8594#include "confdefs.h"
8595$ac_includes_default
8596#ifdef F77_DUMMY_MAIN
8597# ifdef __cplusplus
8598 extern "C"
8599# endif
8600 int F77_DUMMY_MAIN() { return 1; }
8601#endif
8602int
8603main ()
8604{
8605static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8606test_array [0] = 0
8607
8608 ;
8609 return 0;
8610}
8611_ACEOF
8612rm -f conftest.$ac_objext
8613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8614 (eval $ac_compile) 2>&5
8615 ac_status=$?
8616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8617 (exit $ac_status); } &&
8618 { ac_try='test -s conftest.$ac_objext'
8619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8620 (eval $ac_try) 2>&5
8621 ac_status=$?
8622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8623 (exit $ac_status); }; }; then
8624 ac_lo=0 ac_mid=0
8625 while :; do
8626 cat >conftest.$ac_ext <<_ACEOF
8627#line $LINENO "configure"
8628#include "confdefs.h"
8629$ac_includes_default
8630#ifdef F77_DUMMY_MAIN
8631# ifdef __cplusplus
8632 extern "C"
8633# endif
8634 int F77_DUMMY_MAIN() { return 1; }
8635#endif
8636int
8637main ()
8638{
8639static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8640test_array [0] = 0
8641
8642 ;
8643 return 0;
8644}
8645_ACEOF
8646rm -f conftest.$ac_objext
8647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8648 (eval $ac_compile) 2>&5
8649 ac_status=$?
8650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8651 (exit $ac_status); } &&
8652 { ac_try='test -s conftest.$ac_objext'
8653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8654 (eval $ac_try) 2>&5
8655 ac_status=$?
8656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8657 (exit $ac_status); }; }; then
8658 ac_hi=$ac_mid; break
8659else
8660 echo "$as_me: failed program was:" >&5
8661cat conftest.$ac_ext >&5
8662ac_lo=`expr $ac_mid + 1`
8663 if test $ac_lo -le $ac_mid; then
8664 ac_lo= ac_hi=
8665 break
8666 fi
8667 ac_mid=`expr 2 '*' $ac_mid + 1`
8668fi
8669rm -f conftest.$ac_objext conftest.$ac_ext
8670 done
8671else
8672 echo "$as_me: failed program was:" >&5
8673cat conftest.$ac_ext >&5
8674cat >conftest.$ac_ext <<_ACEOF
8675#line $LINENO "configure"
8676#include "confdefs.h"
8677$ac_includes_default
8678#ifdef F77_DUMMY_MAIN
8679# ifdef __cplusplus
8680 extern "C"
8681# endif
8682 int F77_DUMMY_MAIN() { return 1; }
8683#endif
8684int
8685main ()
8686{
8687static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8688test_array [0] = 0
8689
8690 ;
8691 return 0;
8692}
8693_ACEOF
8694rm -f conftest.$ac_objext
8695if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8696 (eval $ac_compile) 2>&5
8697 ac_status=$?
8698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8699 (exit $ac_status); } &&
8700 { ac_try='test -s conftest.$ac_objext'
8701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8702 (eval $ac_try) 2>&5
8703 ac_status=$?
8704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8705 (exit $ac_status); }; }; then
8706 ac_hi=-1 ac_mid=-1
8707 while :; do
8708 cat >conftest.$ac_ext <<_ACEOF
8709#line $LINENO "configure"
8710#include "confdefs.h"
8711$ac_includes_default
8712#ifdef F77_DUMMY_MAIN
8713# ifdef __cplusplus
8714 extern "C"
8715# endif
8716 int F77_DUMMY_MAIN() { return 1; }
8717#endif
8718int
8719main ()
8720{
8721static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8722test_array [0] = 0
8723
8724 ;
8725 return 0;
8726}
8727_ACEOF
8728rm -f conftest.$ac_objext
8729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8730 (eval $ac_compile) 2>&5
8731 ac_status=$?
8732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8733 (exit $ac_status); } &&
8734 { ac_try='test -s conftest.$ac_objext'
8735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8736 (eval $ac_try) 2>&5
8737 ac_status=$?
8738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8739 (exit $ac_status); }; }; then
8740 ac_lo=$ac_mid; break
8741else
8742 echo "$as_me: failed program was:" >&5
8743cat conftest.$ac_ext >&5
8744ac_hi=`expr '(' $ac_mid ')' - 1`
8745 if test $ac_mid -le $ac_hi; then
8746 ac_lo= ac_hi=
8747 break
8748 fi
8749 ac_mid=`expr 2 '*' $ac_mid`
8750fi
8751rm -f conftest.$ac_objext conftest.$ac_ext
8752 done
8753else
8754 echo "$as_me: failed program was:" >&5
8755cat conftest.$ac_ext >&5
8756ac_lo= ac_hi=
8757fi
8758rm -f conftest.$ac_objext conftest.$ac_ext
8759fi
8760rm -f conftest.$ac_objext conftest.$ac_ext
8761# Binary search between lo and hi bounds.
8762while test "x$ac_lo" != "x$ac_hi"; do
8763 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8764 cat >conftest.$ac_ext <<_ACEOF
8765#line $LINENO "configure"
8766#include "confdefs.h"
8767$ac_includes_default
8768#ifdef F77_DUMMY_MAIN
8769# ifdef __cplusplus
8770 extern "C"
8771# endif
8772 int F77_DUMMY_MAIN() { return 1; }
8773#endif
8774int
8775main ()
8776{
8777static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8778test_array [0] = 0
8779
8780 ;
8781 return 0;
8782}
8783_ACEOF
8784rm -f conftest.$ac_objext
8785if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8786 (eval $ac_compile) 2>&5
8787 ac_status=$?
8788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8789 (exit $ac_status); } &&
8790 { ac_try='test -s conftest.$ac_objext'
8791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8792 (eval $ac_try) 2>&5
8793 ac_status=$?
8794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8795 (exit $ac_status); }; }; then
8796 ac_hi=$ac_mid
8797else
8798 echo "$as_me: failed program was:" >&5
8799cat conftest.$ac_ext >&5
8800ac_lo=`expr '(' $ac_mid ')' + 1`
8801fi
8802rm -f conftest.$ac_objext conftest.$ac_ext
8803done
8804case $ac_lo in
8805?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8806'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8807echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8808 { (exit 1); exit 1; }; } ;;
8809esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008810else
8811 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8813echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8814 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008815else
Martin v. Löwis11437992002-04-12 09:54:03 +00008816 cat >conftest.$ac_ext <<_ACEOF
8817#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008818#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008819$ac_includes_default
8820long longval () { return (long) (sizeof (uintptr_t)); }
8821unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008822#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008823#include <stdlib.h>
8824#ifdef F77_DUMMY_MAIN
8825# ifdef __cplusplus
8826 extern "C"
8827# endif
8828 int F77_DUMMY_MAIN() { return 1; }
8829#endif
8830int
8831main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008832{
Martin v. Löwis11437992002-04-12 09:54:03 +00008833
8834 FILE *f = fopen ("conftest.val", "w");
8835 if (! f)
8836 exit (1);
8837 if (((long) (sizeof (uintptr_t))) < 0)
8838 {
8839 long i = longval ();
8840 if (i != ((long) (sizeof (uintptr_t))))
8841 exit (1);
8842 fprintf (f, "%ld\n", i);
8843 }
8844 else
8845 {
8846 unsigned long i = ulongval ();
8847 if (i != ((long) (sizeof (uintptr_t))))
8848 exit (1);
8849 fprintf (f, "%lu\n", i);
8850 }
8851 exit (ferror (f) || fclose (f) != 0);
8852
8853 ;
8854 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008855}
Martin v. Löwis11437992002-04-12 09:54:03 +00008856_ACEOF
8857rm -f conftest$ac_exeext
8858if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8859 (eval $ac_link) 2>&5
8860 ac_status=$?
8861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8862 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8864 (eval $ac_try) 2>&5
8865 ac_status=$?
8866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8867 (exit $ac_status); }; }; then
8868 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008869else
Martin v. Löwis11437992002-04-12 09:54:03 +00008870 echo "$as_me: program exited with status $ac_status" >&5
8871echo "$as_me: failed program was:" >&5
8872cat conftest.$ac_ext >&5
8873( exit $ac_status )
8874{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8875echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8876 { (exit 1); exit 1; }; }
8877fi
8878rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8879fi
8880fi
8881rm -f conftest.val
8882else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008883 ac_cv_sizeof_uintptr_t=0
8884fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008885fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008886echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8887echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8888cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008889#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008890_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008891
Michael W. Hudson54241132001-12-07 15:38:26 +00008892
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008893fi
8894
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008895# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008896echo "$as_me:$LINENO: checking size of off_t" >&5
8897echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8898if test "${ac_cv_sizeof_off_t+set}" = set; then
8899 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008900else
8901 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008902 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008903else
Martin v. Löwis11437992002-04-12 09:54:03 +00008904 cat >conftest.$ac_ext <<_ACEOF
8905#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008906#include "confdefs.h"
8907#include <stdio.h>
8908#include <sys/types.h>
8909main()
8910{
8911 FILE *f=fopen("conftestval", "w");
8912 if (!f) exit(1);
8913 fprintf(f, "%d\n", sizeof(off_t));
8914 exit(0);
8915}
Martin v. Löwis11437992002-04-12 09:54:03 +00008916_ACEOF
8917rm -f conftest$ac_exeext
8918if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8919 (eval $ac_link) 2>&5
8920 ac_status=$?
8921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8922 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8924 (eval $ac_try) 2>&5
8925 ac_status=$?
8926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8927 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008928 ac_cv_sizeof_off_t=`cat conftestval`
8929else
Martin v. Löwis11437992002-04-12 09:54:03 +00008930 echo "$as_me: program exited with status $ac_status" >&5
8931echo "$as_me: failed program was:" >&5
8932cat conftest.$ac_ext >&5
8933( exit $ac_status )
8934ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008935fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008936rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008937fi
8938
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008939fi
8940
Martin v. Löwis11437992002-04-12 09:54:03 +00008941echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8942echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8943
8944cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008945#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008946_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008947
Michael W. Hudson54241132001-12-07 15:38:26 +00008948
Martin v. Löwis11437992002-04-12 09:54:03 +00008949echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8950echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008951if test "$have_long_long" = yes -a \
8952 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8953 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008954
Martin v. Löwis11437992002-04-12 09:54:03 +00008955cat >>confdefs.h <<\_ACEOF
8956#define HAVE_LARGEFILE_SUPPORT 1
8957_ACEOF
8958
8959 echo "$as_me:$LINENO: result: yes" >&5
8960echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008961else
Martin v. Löwis11437992002-04-12 09:54:03 +00008962 echo "$as_me:$LINENO: result: no" >&5
8963echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008964fi
8965
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008966# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008967echo "$as_me:$LINENO: checking size of time_t" >&5
8968echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8969if test "${ac_cv_sizeof_time_t+set}" = set; then
8970 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008971else
8972 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008973 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008974else
Martin v. Löwis11437992002-04-12 09:54:03 +00008975 cat >conftest.$ac_ext <<_ACEOF
8976#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008977#include "confdefs.h"
8978#include <stdio.h>
8979#include <time.h>
8980main()
8981{
8982 FILE *f=fopen("conftestval", "w");
8983 if (!f) exit(1);
8984 fprintf(f, "%d\n", sizeof(time_t));
8985 exit(0);
8986}
Martin v. Löwis11437992002-04-12 09:54:03 +00008987_ACEOF
8988rm -f conftest$ac_exeext
8989if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8990 (eval $ac_link) 2>&5
8991 ac_status=$?
8992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8993 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8995 (eval $ac_try) 2>&5
8996 ac_status=$?
8997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8998 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008999 ac_cv_sizeof_time_t=`cat conftestval`
9000else
Martin v. Löwis11437992002-04-12 09:54:03 +00009001 echo "$as_me: program exited with status $ac_status" >&5
9002echo "$as_me: failed program was:" >&5
9003cat conftest.$ac_ext >&5
9004( exit $ac_status )
9005ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009006fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009007rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009008fi
9009
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009010fi
9011
Martin v. Löwis11437992002-04-12 09:54:03 +00009012echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9013echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9014
9015cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009016#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009017_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009018
Michael W. Hudson54241132001-12-07 15:38:26 +00009019
9020
Trent Mick635f6fb2000-08-23 21:33:05 +00009021# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009022ac_save_cc="$CC"
9023if test "$ac_cv_kpthread" = "yes"
9024then CC="$CC -Kpthread"
9025fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009026echo "$as_me:$LINENO: checking for pthread_t" >&5
9027echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009028have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009029cat >conftest.$ac_ext <<_ACEOF
9030#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009031#include "confdefs.h"
9032#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009033#ifdef F77_DUMMY_MAIN
9034# ifdef __cplusplus
9035 extern "C"
9036# endif
9037 int F77_DUMMY_MAIN() { return 1; }
9038#endif
9039int
9040main ()
9041{
Guido van Rossum12580492000-09-24 16:47:19 +00009042pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 ;
9044 return 0;
9045}
9046_ACEOF
9047rm -f conftest.$ac_objext
9048if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9049 (eval $ac_compile) 2>&5
9050 ac_status=$?
9051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9052 (exit $ac_status); } &&
9053 { ac_try='test -s conftest.$ac_objext'
9054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9055 (eval $ac_try) 2>&5
9056 ac_status=$?
9057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9058 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009059 have_pthread_t=yes
9060else
Martin v. Löwis11437992002-04-12 09:54:03 +00009061 echo "$as_me: failed program was:" >&5
9062cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009063fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009064rm -f conftest.$ac_objext conftest.$ac_ext
9065echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9066echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009067if test "$have_pthread_t" = yes ; then
9068 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009069 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9070echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9071 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9072 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009073else
9074 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009075 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009076else
Martin v. Löwis11437992002-04-12 09:54:03 +00009077 cat >conftest.$ac_ext <<_ACEOF
9078#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009079#include "confdefs.h"
9080#include <stdio.h>
9081 #include <pthread.h>
9082 main()
9083 {
9084 FILE *f=fopen("conftestval", "w");
9085 if (!f) exit(1);
9086 fprintf(f, "%d\n", sizeof(pthread_t));
9087 exit(0);
9088 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009089_ACEOF
9090rm -f conftest$ac_exeext
9091if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9092 (eval $ac_link) 2>&5
9093 ac_status=$?
9094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9095 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9097 (eval $ac_try) 2>&5
9098 ac_status=$?
9099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9100 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009101 ac_cv_sizeof_pthread_t=`cat conftestval`
9102else
Martin v. Löwis11437992002-04-12 09:54:03 +00009103 echo "$as_me: program exited with status $ac_status" >&5
9104echo "$as_me: failed program was:" >&5
9105cat conftest.$ac_ext >&5
9106( exit $ac_status )
9107ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009108fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009109rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009110fi
9111
Trent Mick635f6fb2000-08-23 21:33:05 +00009112fi
9113
Martin v. Löwis11437992002-04-12 09:54:03 +00009114 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9115echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9116
9117cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009118#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009119_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009120
9121fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009122CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009123
Martin v. Löwis11437992002-04-12 09:54:03 +00009124echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9125echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009126# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9127if test "${enable_toolbox_glue+set}" = set; then
9128 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009129
Martin v. Löwis11437992002-04-12 09:54:03 +00009130fi;
Jack Jansene578a632001-08-15 01:27:14 +00009131
9132if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009133then
Jack Jansene578a632001-08-15 01:27:14 +00009134 case $ac_sys_system/$ac_sys_release in
9135 Darwin/*)
9136 enable_toolbox_glue="yes";;
9137 *)
9138 enable_toolbox_glue="no";;
9139 esac
9140fi
9141case "$enable_toolbox_glue" in
9142yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009143 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009144 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009145 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009146
9147cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009148#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009149_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009150
9151 ;;
9152*)
9153 extra_frameworks=""
9154 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009155 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009156 ;;
9157esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009158echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9159echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009160
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009161
9162case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009163 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009164 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009165 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009166 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9167 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009168 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009169 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009170 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009171 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9172 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009173esac
9174
Martin v. Löwis11437992002-04-12 09:54:03 +00009175echo "$as_me:$LINENO: checking for --enable-framework" >&5
9176echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009177if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009178then
Jack Jansenca06bc62001-08-03 15:32:23 +00009179 OPT="$OPT -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009180 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009181 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009182 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009183
Martin v. Löwis11437992002-04-12 09:54:03 +00009184cat >>confdefs.h <<\_ACEOF
9185#define WITH_NEXT_FRAMEWORK 1
9186_ACEOF
9187
9188 echo "$as_me:$LINENO: result: yes" >&5
9189echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009190else
Martin v. Löwis11437992002-04-12 09:54:03 +00009191 echo "$as_me:$LINENO: result: no" >&5
9192echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009193fi
9194
Martin v. Löwis11437992002-04-12 09:54:03 +00009195echo "$as_me:$LINENO: checking for dyld" >&5
9196echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009197case $ac_sys_system/$ac_sys_release in
9198 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009199
Martin v. Löwis11437992002-04-12 09:54:03 +00009200cat >>confdefs.h <<\_ACEOF
9201#define WITH_DYLD 1
9202_ACEOF
9203
9204 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9205echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009206 ;;
9207 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009208 echo "$as_me:$LINENO: result: no" >&5
9209echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009210 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009211esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009212
Guido van Rossum0a516c91994-09-12 10:58:40 +00009213# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009214
Michael W. Hudson54241132001-12-07 15:38:26 +00009215
9216
9217
9218
Guido van Rossum0a516c91994-09-12 10:58:40 +00009219# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009220# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009221echo "$as_me:$LINENO: checking SO" >&5
9222echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009223if test -z "$SO"
9224then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009225 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009226 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009227 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009228 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009229 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009230fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009231echo "$as_me:$LINENO: result: $SO" >&5
9232echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009233# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009234# -- "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 +00009235# (Shared libraries in this instance are shared modules to be loaded into
9236# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009237echo "$as_me:$LINENO: checking LDSHARED" >&5
9238echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009239if test -z "$LDSHARED"
9240then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009241 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009242 AIX*)
9243 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009244 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009245 ;;
9246 BeOS*)
9247 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009248 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009249 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009250 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009251 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009252 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009253 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009254 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009255 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009256 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009257 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009258 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009259 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9260 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009261 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009262 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9263 if test "$enable_framework" ; then
9264 # Link against the framework. All externals should be defined.
9265 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9266 else
9267 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009268 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009269 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009270 Darwin/*)
9271 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9272 if test "$enable_framework" ; then
9273 # Link against the framework. All externals should be defined.
9274 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9275 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009276 # No framework, use the Python app as bundle-loader
9277 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9278 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009279 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009280 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009281 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009282 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009283 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009284 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009285 then
9286 LDSHARED="cc -shared ${LDFLAGS}"
9287 else
9288 LDSHARED="ld -Bshareable ${LDFLAGS}"
9289 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009290 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009291 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009292 if test "$GCC" = "yes"
9293 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009294 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009295 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009296 SCO_SV*) LDSHARED="$(CC) -Wl,-G,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00009297 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009298 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009299 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009300 *) LDSHARED="ld";;
9301 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009302fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009303echo "$as_me:$LINENO: result: $LDSHARED" >&5
9304echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009305BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009306# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009307# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009308echo "$as_me:$LINENO: checking CCSHARED" >&5
9309echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009310if test -z "$CCSHARED"
9311then
Guido van Rossum07397971997-04-29 21:49:50 +00009312 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009313 SunOS*) if test "$GCC" = yes;
9314 then CCSHARED="-fPIC";
9315 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009316 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009317 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009318 else CCSHARED="+z";
9319 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009320 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009321 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009322 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009323 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009324 if test "$GCC" = "yes"
9325 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009326 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009327 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009328 SCO_SV*)
9329 if test "$GCC" = "yes"
9330 then CCSHARED="-fPIC"
9331 else CCSHARED="-Kpic -belf"
9332 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009333 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009334 IRIX*/6*) case $CC in
9335 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009336 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009337 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009338 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009339 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009340fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009341echo "$as_me:$LINENO: result: $CCSHARED" >&5
9342echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009343# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009344# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009345echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9346echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009347if test -z "$LINKFORSHARED"
9348then
Guido van Rossum07397971997-04-29 21:49:50 +00009349 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009350 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009351 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009352 LINKFORSHARED="-Wl,-E -Wl,+s";;
9353# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009354 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009355 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009356 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009357 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009358 # -u __dummy makes the linker aware of the objc runtime
9359 # in System.framework; otherwise, __objcInit (referenced in
9360 # crt1.o) gets erroneously defined as common, which breaks dynamic
9361 # loading of any modules which reference it in System.framework.
9362 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9363 # not used by the core itself but which needs to be in the core so
9364 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00009365 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009366 if test "$enable_framework"
9367 then
9368 LINKFORSHARED="$LINKFORSHARED -framework Python"
9369 fi
9370 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009371 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009372 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009373 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009374 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009375 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9376 then
9377 LINKFORSHARED="-Wl,--export-dynamic"
9378 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009379 SunOS/5*) case $CC in
9380 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009381 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009382 then
9383 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009384 fi;;
9385 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009386 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009387fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009388echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9389echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009390
Michael W. Hudson54241132001-12-07 15:38:26 +00009391
Martin v. Löwis11437992002-04-12 09:54:03 +00009392echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9393echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009394if test ! "$LIBRARY" = "$LDLIBRARY"
9395then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009396 case $ac_sys_system in
9397 CYGWIN*)
9398 # Cygwin needs CCSHARED when building extension DLLs
9399 # but not when building the interpreter DLL.
9400 CFLAGSFORSHARED='';;
9401 *)
9402 CFLAGSFORSHARED='$(CCSHARED)'
9403 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009404fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009405echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9406echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009407
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009408# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9409# library (with --enable-shared).
9410# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009411# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9412# if it is not required, since it creates a dependency of the shared library
9413# to LIBS. This, in turn, means that applications linking the shared libpython
9414# don't need to link LIBS explicitly. The default should be only changed
9415# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009416
9417echo "$as_me:$LINENO: checking SHLIBS" >&5
9418echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9419case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009420 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009421 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009422esac
9423echo "$as_me:$LINENO: result: $SHLIBS" >&5
9424echo "${ECHO_T}$SHLIBS" >&6
9425
9426
Guido van Rossum627b2d71993-12-24 10:39:16 +00009427# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009428
9429echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9430echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9431if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9432 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009433else
Martin v. Löwis11437992002-04-12 09:54:03 +00009434 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009435LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009436cat >conftest.$ac_ext <<_ACEOF
9437#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009438#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009439
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009440/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009441#ifdef __cplusplus
9442extern "C"
9443#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009444/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009445 builtin and then its argument prototype would still apply. */
9446char dlopen ();
9447#ifdef F77_DUMMY_MAIN
9448# ifdef __cplusplus
9449 extern "C"
9450# endif
9451 int F77_DUMMY_MAIN() { return 1; }
9452#endif
9453int
9454main ()
9455{
9456dlopen ();
9457 ;
9458 return 0;
9459}
9460_ACEOF
9461rm -f conftest.$ac_objext conftest$ac_exeext
9462if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9463 (eval $ac_link) 2>&5
9464 ac_status=$?
9465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9466 (exit $ac_status); } &&
9467 { ac_try='test -s conftest$ac_exeext'
9468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9469 (eval $ac_try) 2>&5
9470 ac_status=$?
9471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9472 (exit $ac_status); }; }; then
9473 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009474else
Martin v. Löwis11437992002-04-12 09:54:03 +00009475 echo "$as_me: failed program was:" >&5
9476cat conftest.$ac_ext >&5
9477ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009478fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009479rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9480LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009481fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009482echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9483echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9484if test $ac_cv_lib_dl_dlopen = yes; then
9485 cat >>confdefs.h <<_ACEOF
9486#define HAVE_LIBDL 1
9487_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009488
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009489 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009490
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009491fi
9492 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009493
9494echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9495echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9496if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9497 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009498else
Martin v. Löwis11437992002-04-12 09:54:03 +00009499 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009500LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009501cat >conftest.$ac_ext <<_ACEOF
9502#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009503#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009504
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009505/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009506#ifdef __cplusplus
9507extern "C"
9508#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009509/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 builtin and then its argument prototype would still apply. */
9511char shl_load ();
9512#ifdef F77_DUMMY_MAIN
9513# ifdef __cplusplus
9514 extern "C"
9515# endif
9516 int F77_DUMMY_MAIN() { return 1; }
9517#endif
9518int
9519main ()
9520{
9521shl_load ();
9522 ;
9523 return 0;
9524}
9525_ACEOF
9526rm -f conftest.$ac_objext conftest$ac_exeext
9527if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9528 (eval $ac_link) 2>&5
9529 ac_status=$?
9530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9531 (exit $ac_status); } &&
9532 { ac_try='test -s conftest$ac_exeext'
9533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9534 (eval $ac_try) 2>&5
9535 ac_status=$?
9536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9537 (exit $ac_status); }; }; then
9538 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009539else
Martin v. Löwis11437992002-04-12 09:54:03 +00009540 echo "$as_me: failed program was:" >&5
9541cat conftest.$ac_ext >&5
9542ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009543fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009544rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9545LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009546fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009547echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9548echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9549if test $ac_cv_lib_dld_shl_load = yes; then
9550 cat >>confdefs.h <<_ACEOF
9551#define HAVE_LIBDLD 1
9552_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009553
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009554 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009555
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009556fi
9557 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009558echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9559echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9560if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009561 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009562else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009563 ac_func_search_save_LIBS=$LIBS
9564ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009565cat >conftest.$ac_ext <<_ACEOF
9566#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009567#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009568
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009569/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009570#ifdef __cplusplus
9571extern "C"
9572#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009573/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009574 builtin and then its argument prototype would still apply. */
9575char sem_init ();
9576#ifdef F77_DUMMY_MAIN
9577# ifdef __cplusplus
9578 extern "C"
9579# endif
9580 int F77_DUMMY_MAIN() { return 1; }
9581#endif
9582int
9583main ()
9584{
9585sem_init ();
9586 ;
9587 return 0;
9588}
9589_ACEOF
9590rm -f conftest.$ac_objext conftest$ac_exeext
9591if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9592 (eval $ac_link) 2>&5
9593 ac_status=$?
9594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9595 (exit $ac_status); } &&
9596 { ac_try='test -s conftest$ac_exeext'
9597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9598 (eval $ac_try) 2>&5
9599 ac_status=$?
9600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9601 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009602 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009603else
Martin v. Löwis11437992002-04-12 09:54:03 +00009604 echo "$as_me: failed program was:" >&5
9605cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009606fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009607rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009608if test "$ac_cv_search_sem_init" = no; then
9609 for ac_lib in rt posix4; do
9610 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9611 cat >conftest.$ac_ext <<_ACEOF
9612#line $LINENO "configure"
9613#include "confdefs.h"
9614
9615/* Override any gcc2 internal prototype to avoid an error. */
9616#ifdef __cplusplus
9617extern "C"
9618#endif
9619/* We use char because int might match the return type of a gcc2
9620 builtin and then its argument prototype would still apply. */
9621char sem_init ();
9622#ifdef F77_DUMMY_MAIN
9623# ifdef __cplusplus
9624 extern "C"
9625# endif
9626 int F77_DUMMY_MAIN() { return 1; }
9627#endif
9628int
9629main ()
9630{
9631sem_init ();
9632 ;
9633 return 0;
9634}
Martin v. Löwis11437992002-04-12 09:54:03 +00009635_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009636rm -f conftest.$ac_objext conftest$ac_exeext
9637if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9638 (eval $ac_link) 2>&5
9639 ac_status=$?
9640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9641 (exit $ac_status); } &&
9642 { ac_try='test -s conftest$ac_exeext'
9643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9644 (eval $ac_try) 2>&5
9645 ac_status=$?
9646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9647 (exit $ac_status); }; }; then
9648 ac_cv_search_sem_init="-l$ac_lib"
9649break
9650else
9651 echo "$as_me: failed program was:" >&5
9652cat conftest.$ac_ext >&5
9653fi
9654rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9655 done
9656fi
9657LIBS=$ac_func_search_save_LIBS
9658fi
9659echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9660echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9661if test "$ac_cv_search_sem_init" != no; then
9662 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009663
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009664fi
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009665 # 'Real Time' functions on Solaris,
9666 # posix4 on Solaris 2.6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009667
9668# checks for system dependent C++ extensions support
9669case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009670 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9671echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9672 cat >conftest.$ac_ext <<_ACEOF
9673#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009674#include "confdefs.h"
9675#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009676#ifdef F77_DUMMY_MAIN
9677# ifdef __cplusplus
9678 extern "C"
9679# endif
9680 int F77_DUMMY_MAIN() { return 1; }
9681#endif
9682int
9683main ()
9684{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009685loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009686 ;
9687 return 0;
9688}
9689_ACEOF
9690rm -f conftest.$ac_objext conftest$ac_exeext
9691if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9692 (eval $ac_link) 2>&5
9693 ac_status=$?
9694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9695 (exit $ac_status); } &&
9696 { ac_try='test -s conftest$ac_exeext'
9697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9698 (eval $ac_try) 2>&5
9699 ac_status=$?
9700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9701 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009702
Martin v. Löwis11437992002-04-12 09:54:03 +00009703cat >>confdefs.h <<\_ACEOF
9704#define AIX_GENUINE_CPLUSPLUS 1
9705_ACEOF
9706
9707 echo "$as_me:$LINENO: result: yes" >&5
9708echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009709else
Martin v. Löwis11437992002-04-12 09:54:03 +00009710 echo "$as_me: failed program was:" >&5
9711cat conftest.$ac_ext >&5
9712echo "$as_me:$LINENO: result: no" >&5
9713echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009714fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009715rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009716 *) ;;
9717esac
9718
Guido van Rossum70c7f481998-03-26 18:44:10 +00009719# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9720# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009721# BeOS' sockets are stashed in libnet.
9722case "$ac_sys_system" in
9723IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009724*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009725echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9726echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9727if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9728 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009729else
Martin v. Löwis11437992002-04-12 09:54:03 +00009730 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009731LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009732cat >conftest.$ac_ext <<_ACEOF
9733#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009734#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009735
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009736/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009737#ifdef __cplusplus
9738extern "C"
9739#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009740/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009741 builtin and then its argument prototype would still apply. */
9742char t_open ();
9743#ifdef F77_DUMMY_MAIN
9744# ifdef __cplusplus
9745 extern "C"
9746# endif
9747 int F77_DUMMY_MAIN() { return 1; }
9748#endif
9749int
9750main ()
9751{
9752t_open ();
9753 ;
9754 return 0;
9755}
9756_ACEOF
9757rm -f conftest.$ac_objext conftest$ac_exeext
9758if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9759 (eval $ac_link) 2>&5
9760 ac_status=$?
9761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9762 (exit $ac_status); } &&
9763 { ac_try='test -s conftest$ac_exeext'
9764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9765 (eval $ac_try) 2>&5
9766 ac_status=$?
9767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9768 (exit $ac_status); }; }; then
9769 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009770else
Martin v. Löwis11437992002-04-12 09:54:03 +00009771 echo "$as_me: failed program was:" >&5
9772cat conftest.$ac_ext >&5
9773ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009774fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009775rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9776LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009777fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009778echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9779echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9780if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009781 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009782fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009783 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009784echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9785echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9786if test "${ac_cv_lib_socket_socket+set}" = set; then
9787 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009788else
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009790LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009791cat >conftest.$ac_ext <<_ACEOF
9792#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009793#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009794
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009795/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009796#ifdef __cplusplus
9797extern "C"
9798#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009799/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 builtin and then its argument prototype would still apply. */
9801char socket ();
9802#ifdef F77_DUMMY_MAIN
9803# ifdef __cplusplus
9804 extern "C"
9805# endif
9806 int F77_DUMMY_MAIN() { return 1; }
9807#endif
9808int
9809main ()
9810{
9811socket ();
9812 ;
9813 return 0;
9814}
9815_ACEOF
9816rm -f conftest.$ac_objext conftest$ac_exeext
9817if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9818 (eval $ac_link) 2>&5
9819 ac_status=$?
9820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9821 (exit $ac_status); } &&
9822 { ac_try='test -s conftest$ac_exeext'
9823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9824 (eval $ac_try) 2>&5
9825 ac_status=$?
9826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9827 (exit $ac_status); }; }; then
9828 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009829else
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 echo "$as_me: failed program was:" >&5
9831cat conftest.$ac_ext >&5
9832ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009833fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009834rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9835LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009836fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009837echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9838echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9839if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009840 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009841fi
9842 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009843;;
9844esac
9845case "$ac_sys_system" in
9846BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009847echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9848echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9849if test "${ac_cv_lib_net_socket+set}" = set; then
9850 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009851else
Martin v. Löwis11437992002-04-12 09:54:03 +00009852 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009853LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009854cat >conftest.$ac_ext <<_ACEOF
9855#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009856#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009857
Guido van Rossumad678af1998-10-02 14:42:15 +00009858/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009859#ifdef __cplusplus
9860extern "C"
9861#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009862/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009863 builtin and then its argument prototype would still apply. */
9864char socket ();
9865#ifdef F77_DUMMY_MAIN
9866# ifdef __cplusplus
9867 extern "C"
9868# endif
9869 int F77_DUMMY_MAIN() { return 1; }
9870#endif
9871int
9872main ()
9873{
9874socket ();
9875 ;
9876 return 0;
9877}
9878_ACEOF
9879rm -f conftest.$ac_objext conftest$ac_exeext
9880if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9881 (eval $ac_link) 2>&5
9882 ac_status=$?
9883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9884 (exit $ac_status); } &&
9885 { ac_try='test -s conftest$ac_exeext'
9886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9887 (eval $ac_try) 2>&5
9888 ac_status=$?
9889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9890 (exit $ac_status); }; }; then
9891 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009892else
Martin v. Löwis11437992002-04-12 09:54:03 +00009893 echo "$as_me: failed program was:" >&5
9894cat conftest.$ac_ext >&5
9895ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009896fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009897rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9898LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009899fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009900echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9901echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9902if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009903 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009904fi
9905 # BeOS
9906;;
9907esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009908
Martin v. Löwis11437992002-04-12 09:54:03 +00009909echo "$as_me:$LINENO: checking for --with-libs" >&5
9910echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9911
Guido van Rossuma68acba1996-07-31 17:36:39 +00009912# Check whether --with-libs or --without-libs was given.
9913if test "${with_libs+set}" = set; then
9914 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009915
9916echo "$as_me:$LINENO: result: $withval" >&5
9917echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009918LIBS="$withval $LIBS"
9919
9920else
Martin v. Löwis11437992002-04-12 09:54:03 +00009921 echo "$as_me:$LINENO: result: no" >&5
9922echo "${ECHO_T}no" >&6
9923fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009924
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009925# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009926
9927
Martin v. Löwis11437992002-04-12 09:54:03 +00009928echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9929echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9930
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009931# Check whether --with-signal-module or --without-signal-module was given.
9932if test "${with_signal_module+set}" = set; then
9933 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009934
Martin v. Löwis11437992002-04-12 09:54:03 +00009935fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009936
9937if test -z "$with_signal_module"
9938then with_signal_module="yes"
9939fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009940echo "$as_me:$LINENO: result: $with_signal_module" >&5
9941echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009942
9943if test "${with_signal_module}" = "yes"; then
9944 USE_SIGNAL_MODULE=""
9945 SIGNAL_OBJS=""
9946else
9947 USE_SIGNAL_MODULE="#"
9948 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9949fi
9950
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009951# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009952
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009953USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009954
Martin v. Löwis11437992002-04-12 09:54:03 +00009955echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9956echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9957
Guido van Rossumec2f0731997-01-22 20:54:01 +00009958
9959# Check whether --with-dec-threads or --without-dec-threads was given.
9960if test "${with_dec_threads+set}" = set; then
9961 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009962
9963echo "$as_me:$LINENO: result: $withval" >&5
9964echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009965LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009966if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009967 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009968fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009969else
Martin v. Löwis11437992002-04-12 09:54:03 +00009970 echo "$as_me:$LINENO: result: no" >&5
9971echo "${ECHO_T}no" >&6
9972fi;
9973
9974# Templates for things AC_DEFINEd more than once.
9975# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009976
9977
Martin v. Löwis11437992002-04-12 09:54:03 +00009978
9979
9980
9981
9982
9983echo "$as_me:$LINENO: checking for --with-threads" >&5
9984echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9985
Guido van Rossumec2f0731997-01-22 20:54:01 +00009986# Check whether --with-threads or --without-threads was given.
9987if test "${with_threads+set}" = set; then
9988 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009989
Martin v. Löwis11437992002-04-12 09:54:03 +00009990fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009991
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009992# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009993
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009994# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009995if test "${with_thread+set}" = set; then
9996 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009997 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +00009998fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009999
10000if test -z "$with_threads"
10001then with_threads="yes"
10002fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010003echo "$as_me:$LINENO: result: $with_threads" >&5
10004echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010005
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010006
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010007if test "$with_threads" = "no"
10008then
10009 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010010elif test "$ac_cv_pthread_is_default" = yes
10011then
Martin v. Löwis11437992002-04-12 09:54:03 +000010012 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010013#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010014_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010015
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010016 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010017 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010018#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010019_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010020
10021 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010022 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010023elif test "$ac_cv_kpthread" = "yes"
10024then
10025 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010026 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010027#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010028_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010029
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010030 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010031 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010032else
10033 if test ! -z "$with_threads" -a -d "$with_threads"
10034 then LDFLAGS="$LDFLAGS -L$with_threads"
10035 fi
10036 if test ! -z "$withval" -a -d "$withval"
10037 then LDFLAGS="$LDFLAGS -L$withval"
10038 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010039
10040 # According to the POSIX spec, a pthreads implementation must
10041 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010042 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10043echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10044 cat >conftest.$ac_ext <<_ACEOF
10045#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010046#include "confdefs.h"
10047#include <unistd.h>
10048 #ifdef _POSIX_THREADS
10049 yes
10050 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010051
10052_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010053if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10054 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010055 unistd_defines_pthreads=yes
10056else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010057 unistd_defines_pthreads=no
10058fi
10059rm -f conftest*
10060
Martin v. Löwis11437992002-04-12 09:54:03 +000010061 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10062echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010063
Martin v. Löwis11437992002-04-12 09:54:03 +000010064 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010065#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010066_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010067
Martin v. Löwis11437992002-04-12 09:54:03 +000010068 if test "${ac_cv_header_cthreads_h+set}" = set; then
10069 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10070echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10071if test "${ac_cv_header_cthreads_h+set}" = set; then
10072 echo $ECHO_N "(cached) $ECHO_C" >&6
10073fi
10074echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10075echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010076else
Martin v. Löwis11437992002-04-12 09:54:03 +000010077 # Is the header compilable?
10078echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10079echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10080cat >conftest.$ac_ext <<_ACEOF
10081#line $LINENO "configure"
10082#include "confdefs.h"
10083$ac_includes_default
10084#include <cthreads.h>
10085_ACEOF
10086rm -f conftest.$ac_objext
10087if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10088 (eval $ac_compile) 2>&5
10089 ac_status=$?
10090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10091 (exit $ac_status); } &&
10092 { ac_try='test -s conftest.$ac_objext'
10093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10094 (eval $ac_try) 2>&5
10095 ac_status=$?
10096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10097 (exit $ac_status); }; }; then
10098 ac_header_compiler=yes
10099else
10100 echo "$as_me: failed program was:" >&5
10101cat conftest.$ac_ext >&5
10102ac_header_compiler=no
10103fi
10104rm -f conftest.$ac_objext conftest.$ac_ext
10105echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10106echo "${ECHO_T}$ac_header_compiler" >&6
10107
10108# Is the header present?
10109echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10110echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10111cat >conftest.$ac_ext <<_ACEOF
10112#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010113#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010114#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010115_ACEOF
10116if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10117 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10118 ac_status=$?
10119 egrep -v '^ *\+' conftest.er1 >conftest.err
10120 rm -f conftest.er1
10121 cat conftest.err >&5
10122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10123 (exit $ac_status); } >/dev/null; then
10124 if test -s conftest.err; then
10125 ac_cpp_err=$ac_c_preproc_warn_flag
10126 else
10127 ac_cpp_err=
10128 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010129else
Martin v. Löwis11437992002-04-12 09:54:03 +000010130 ac_cpp_err=yes
10131fi
10132if test -z "$ac_cpp_err"; then
10133 ac_header_preproc=yes
10134else
10135 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010136 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010137 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010138fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010139rm -f conftest.err conftest.$ac_ext
10140echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10141echo "${ECHO_T}$ac_header_preproc" >&6
10142
10143# So? What about this header?
10144case $ac_header_compiler:$ac_header_preproc in
10145 yes:no )
10146 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10147echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10148 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10149echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10150 no:yes )
10151 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10152echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10153 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10154echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10155 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10156echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10157esac
10158echo "$as_me:$LINENO: checking for cthreads.h" >&5
10159echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10160if test "${ac_cv_header_cthreads_h+set}" = set; then
10161 echo $ECHO_N "(cached) $ECHO_C" >&6
10162else
10163 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010164fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010165echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10166echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10167
10168fi
10169if test $ac_cv_header_cthreads_h = yes; then
10170 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010171#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010172_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010173
Martin v. Löwis11437992002-04-12 09:54:03 +000010174 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010175#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010176_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010177
Martin v. Löwis11437992002-04-12 09:54:03 +000010178
10179cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010180#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010181_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010182
10183 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010184 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010185else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010186
Martin v. Löwis11437992002-04-12 09:54:03 +000010187 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10188 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10189echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10190if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10191 echo $ECHO_N "(cached) $ECHO_C" >&6
10192fi
10193echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10194echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010195else
Martin v. Löwis11437992002-04-12 09:54:03 +000010196 # Is the header compilable?
10197echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10198echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10199cat >conftest.$ac_ext <<_ACEOF
10200#line $LINENO "configure"
10201#include "confdefs.h"
10202$ac_includes_default
10203#include <mach/cthreads.h>
10204_ACEOF
10205rm -f conftest.$ac_objext
10206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10207 (eval $ac_compile) 2>&5
10208 ac_status=$?
10209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10210 (exit $ac_status); } &&
10211 { ac_try='test -s conftest.$ac_objext'
10212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10213 (eval $ac_try) 2>&5
10214 ac_status=$?
10215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10216 (exit $ac_status); }; }; then
10217 ac_header_compiler=yes
10218else
10219 echo "$as_me: failed program was:" >&5
10220cat conftest.$ac_ext >&5
10221ac_header_compiler=no
10222fi
10223rm -f conftest.$ac_objext conftest.$ac_ext
10224echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10225echo "${ECHO_T}$ac_header_compiler" >&6
10226
10227# Is the header present?
10228echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10229echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10230cat >conftest.$ac_ext <<_ACEOF
10231#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010232#include "confdefs.h"
10233#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010234_ACEOF
10235if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10236 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10237 ac_status=$?
10238 egrep -v '^ *\+' conftest.er1 >conftest.err
10239 rm -f conftest.er1
10240 cat conftest.err >&5
10241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10242 (exit $ac_status); } >/dev/null; then
10243 if test -s conftest.err; then
10244 ac_cpp_err=$ac_c_preproc_warn_flag
10245 else
10246 ac_cpp_err=
10247 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010248else
Martin v. Löwis11437992002-04-12 09:54:03 +000010249 ac_cpp_err=yes
10250fi
10251if test -z "$ac_cpp_err"; then
10252 ac_header_preproc=yes
10253else
10254 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010255 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010257fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010258rm -f conftest.err conftest.$ac_ext
10259echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10260echo "${ECHO_T}$ac_header_preproc" >&6
10261
10262# So? What about this header?
10263case $ac_header_compiler:$ac_header_preproc in
10264 yes:no )
10265 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10266echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10267 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10268echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10269 no:yes )
10270 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10271echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10272 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10273echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10274 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10275echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10276esac
10277echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10278echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10279if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10280 echo $ECHO_N "(cached) $ECHO_C" >&6
10281else
10282 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010283fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010284echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10285echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10286
10287fi
10288if test $ac_cv_header_mach_cthreads_h = yes; then
10289 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010290#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010291_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010292
Martin v. Löwis11437992002-04-12 09:54:03 +000010293 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010294#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010295_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010296
Martin v. Löwis11437992002-04-12 09:54:03 +000010297
10298cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010299#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010300_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010301
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010302 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010303else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010304
Martin v. Löwis11437992002-04-12 09:54:03 +000010305 echo "$as_me:$LINENO: checking for --with-pth" >&5
10306echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10307
10308# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010309if test "${with_pth+set}" = set; then
10310 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010311 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010312echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010313 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010314#define WITH_THREAD 1
10315_ACEOF
10316
10317
10318cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010319#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010320_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010321
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010322 LIBS="-lpth $LIBS"
10323 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010324else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010325 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010326echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010327
10328 # Just looking for pthread_create in libpthread is not enough:
10329 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10330 # So we really have to include pthread.h, and then link.
10331 _libs=$LIBS
10332 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010333 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10334echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10335 cat >conftest.$ac_ext <<_ACEOF
10336#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010337#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010338#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010339
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010340void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010341#ifdef F77_DUMMY_MAIN
10342# ifdef __cplusplus
10343 extern "C"
10344# endif
10345 int F77_DUMMY_MAIN() { return 1; }
10346#endif
10347int
10348main ()
10349{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010350
10351pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010352 ;
10353 return 0;
10354}
10355_ACEOF
10356rm -f conftest.$ac_objext conftest$ac_exeext
10357if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10358 (eval $ac_link) 2>&5
10359 ac_status=$?
10360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10361 (exit $ac_status); } &&
10362 { ac_try='test -s conftest$ac_exeext'
10363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10364 (eval $ac_try) 2>&5
10365 ac_status=$?
10366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10367 (exit $ac_status); }; }; then
10368
10369 echo "$as_me:$LINENO: result: yes" >&5
10370echo "${ECHO_T}yes" >&6
10371 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010372#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010373_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010374
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010375 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010376 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010377else
Martin v. Löwis11437992002-04-12 09:54:03 +000010378 echo "$as_me: failed program was:" >&5
10379cat conftest.$ac_ext >&5
10380
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010381 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10383echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10384if test "${ac_cv_func_pthread_detach+set}" = set; then
10385 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010386else
Martin v. Löwis11437992002-04-12 09:54:03 +000010387 cat >conftest.$ac_ext <<_ACEOF
10388#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010389#include "confdefs.h"
10390/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010391 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010392#include <assert.h>
10393/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010394#ifdef __cplusplus
10395extern "C"
10396#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010397/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 builtin and then its argument prototype would still apply. */
10399char pthread_detach ();
10400char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010401
Martin v. Löwis11437992002-04-12 09:54:03 +000010402#ifdef F77_DUMMY_MAIN
10403# ifdef __cplusplus
10404 extern "C"
10405# endif
10406 int F77_DUMMY_MAIN() { return 1; }
10407#endif
10408int
10409main ()
10410{
Guido van Rossumad678af1998-10-02 14:42:15 +000010411/* The GNU C library defines this for functions which it implements
10412 to always fail with ENOSYS. Some functions are actually named
10413 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010414#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010415choke me
10416#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010417f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010418#endif
10419
Martin v. Löwis11437992002-04-12 09:54:03 +000010420 ;
10421 return 0;
10422}
10423_ACEOF
10424rm -f conftest.$ac_objext conftest$ac_exeext
10425if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10426 (eval $ac_link) 2>&5
10427 ac_status=$?
10428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10429 (exit $ac_status); } &&
10430 { ac_try='test -s conftest$ac_exeext'
10431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10432 (eval $ac_try) 2>&5
10433 ac_status=$?
10434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10435 (exit $ac_status); }; }; then
10436 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010437else
Martin v. Löwis11437992002-04-12 09:54:03 +000010438 echo "$as_me: failed program was:" >&5
10439cat conftest.$ac_ext >&5
10440ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010441fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010442rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010443fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010444echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10445echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10446if test $ac_cv_func_pthread_detach = yes; then
10447 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010448#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010449_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010450
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010451 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010452 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010453else
Guido van Rossumad678af1998-10-02 14:42:15 +000010454
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010455 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10456 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10457echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10458if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10459 echo $ECHO_N "(cached) $ECHO_C" >&6
10460fi
10461echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10462echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10463else
10464 # Is the header compilable?
10465echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10466echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10467cat >conftest.$ac_ext <<_ACEOF
10468#line $LINENO "configure"
10469#include "confdefs.h"
10470$ac_includes_default
10471#include <atheos/threads.h>
10472_ACEOF
10473rm -f conftest.$ac_objext
10474if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10475 (eval $ac_compile) 2>&5
10476 ac_status=$?
10477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10478 (exit $ac_status); } &&
10479 { ac_try='test -s conftest.$ac_objext'
10480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10481 (eval $ac_try) 2>&5
10482 ac_status=$?
10483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10484 (exit $ac_status); }; }; then
10485 ac_header_compiler=yes
10486else
10487 echo "$as_me: failed program was:" >&5
10488cat conftest.$ac_ext >&5
10489ac_header_compiler=no
10490fi
10491rm -f conftest.$ac_objext conftest.$ac_ext
10492echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10493echo "${ECHO_T}$ac_header_compiler" >&6
10494
10495# Is the header present?
10496echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10497echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10498cat >conftest.$ac_ext <<_ACEOF
10499#line $LINENO "configure"
10500#include "confdefs.h"
10501#include <atheos/threads.h>
10502_ACEOF
10503if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10504 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10505 ac_status=$?
10506 egrep -v '^ *\+' conftest.er1 >conftest.err
10507 rm -f conftest.er1
10508 cat conftest.err >&5
10509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10510 (exit $ac_status); } >/dev/null; then
10511 if test -s conftest.err; then
10512 ac_cpp_err=$ac_c_preproc_warn_flag
10513 else
10514 ac_cpp_err=
10515 fi
10516else
10517 ac_cpp_err=yes
10518fi
10519if test -z "$ac_cpp_err"; then
10520 ac_header_preproc=yes
10521else
10522 echo "$as_me: failed program was:" >&5
10523 cat conftest.$ac_ext >&5
10524 ac_header_preproc=no
10525fi
10526rm -f conftest.err conftest.$ac_ext
10527echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10528echo "${ECHO_T}$ac_header_preproc" >&6
10529
10530# So? What about this header?
10531case $ac_header_compiler:$ac_header_preproc in
10532 yes:no )
10533 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10534echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10535 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10536echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10537 no:yes )
10538 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10539echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10540 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10541echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10542 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10543echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10544esac
10545echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10546echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10547if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10548 echo $ECHO_N "(cached) $ECHO_C" >&6
10549else
10550 ac_cv_header_atheos_threads_h=$ac_header_preproc
10551fi
10552echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10553echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10554
10555fi
10556if test $ac_cv_header_atheos_threads_h = yes; then
10557 cat >>confdefs.h <<\_ACEOF
10558#define WITH_THREAD 1
10559_ACEOF
10560
10561
10562cat >>confdefs.h <<\_ACEOF
10563#define ATHEOS_THREADS 1
10564_ACEOF
10565
10566 THREADOBJ="Python/thread.o"
10567else
10568
Martin v. Löwis11437992002-04-12 09:54:03 +000010569 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10570 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10571echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10572if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10573 echo $ECHO_N "(cached) $ECHO_C" >&6
10574fi
10575echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10576echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010577else
Martin v. Löwis11437992002-04-12 09:54:03 +000010578 # Is the header compilable?
10579echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10580echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10581cat >conftest.$ac_ext <<_ACEOF
10582#line $LINENO "configure"
10583#include "confdefs.h"
10584$ac_includes_default
10585#include <kernel/OS.h>
10586_ACEOF
10587rm -f conftest.$ac_objext
10588if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10589 (eval $ac_compile) 2>&5
10590 ac_status=$?
10591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10592 (exit $ac_status); } &&
10593 { ac_try='test -s conftest.$ac_objext'
10594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10595 (eval $ac_try) 2>&5
10596 ac_status=$?
10597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10598 (exit $ac_status); }; }; then
10599 ac_header_compiler=yes
10600else
10601 echo "$as_me: failed program was:" >&5
10602cat conftest.$ac_ext >&5
10603ac_header_compiler=no
10604fi
10605rm -f conftest.$ac_objext conftest.$ac_ext
10606echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10607echo "${ECHO_T}$ac_header_compiler" >&6
10608
10609# Is the header present?
10610echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10611echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10612cat >conftest.$ac_ext <<_ACEOF
10613#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010614#include "confdefs.h"
10615#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010616_ACEOF
10617if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10618 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10619 ac_status=$?
10620 egrep -v '^ *\+' conftest.er1 >conftest.err
10621 rm -f conftest.er1
10622 cat conftest.err >&5
10623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10624 (exit $ac_status); } >/dev/null; then
10625 if test -s conftest.err; then
10626 ac_cpp_err=$ac_c_preproc_warn_flag
10627 else
10628 ac_cpp_err=
10629 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010630else
Martin v. Löwis11437992002-04-12 09:54:03 +000010631 ac_cpp_err=yes
10632fi
10633if test -z "$ac_cpp_err"; then
10634 ac_header_preproc=yes
10635else
10636 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010637 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010638 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010639fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010640rm -f conftest.err conftest.$ac_ext
10641echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10642echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010643
Martin v. Löwis11437992002-04-12 09:54:03 +000010644# So? What about this header?
10645case $ac_header_compiler:$ac_header_preproc in
10646 yes:no )
10647 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10648echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10649 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10650echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10651 no:yes )
10652 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10653echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10654 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10655echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10656 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10657echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10658esac
10659echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10660echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10661if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10662 echo $ECHO_N "(cached) $ECHO_C" >&6
10663else
10664 ac_cv_header_kernel_OS_h=$ac_header_preproc
10665fi
10666echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10667echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10668
10669fi
10670if test $ac_cv_header_kernel_OS_h = yes; then
10671 cat >>confdefs.h <<\_ACEOF
10672#define WITH_THREAD 1
10673_ACEOF
10674
10675
10676cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010677#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010678_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010679
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010680 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010681else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010682
Martin v. Löwis11437992002-04-12 09:54:03 +000010683 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10684echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10685if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10686 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010687else
Martin v. Löwis11437992002-04-12 09:54:03 +000010688 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010689LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010690cat >conftest.$ac_ext <<_ACEOF
10691#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010692#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010693
Greg Steinadf63d62000-07-05 10:38:09 +000010694/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010695#ifdef __cplusplus
10696extern "C"
10697#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010698/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010699 builtin and then its argument prototype would still apply. */
10700char pthread_create ();
10701#ifdef F77_DUMMY_MAIN
10702# ifdef __cplusplus
10703 extern "C"
10704# endif
10705 int F77_DUMMY_MAIN() { return 1; }
10706#endif
10707int
10708main ()
10709{
10710pthread_create ();
10711 ;
10712 return 0;
10713}
10714_ACEOF
10715rm -f conftest.$ac_objext conftest$ac_exeext
10716if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10717 (eval $ac_link) 2>&5
10718 ac_status=$?
10719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10720 (exit $ac_status); } &&
10721 { ac_try='test -s conftest$ac_exeext'
10722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10723 (eval $ac_try) 2>&5
10724 ac_status=$?
10725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10726 (exit $ac_status); }; }; then
10727 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010728else
Martin v. Löwis11437992002-04-12 09:54:03 +000010729 echo "$as_me: failed program was:" >&5
10730cat conftest.$ac_ext >&5
10731ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010732fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010733rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10734LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010735fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010736echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10737echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10738if test $ac_cv_lib_pthreads_pthread_create = yes; then
10739 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010740#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010741_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010742
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010743 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010744 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010745 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010746else
Greg Steinadf63d62000-07-05 10:38:09 +000010747
Martin v. Löwis11437992002-04-12 09:54:03 +000010748 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10749echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10750if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10751 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010752else
Martin v. Löwis11437992002-04-12 09:54:03 +000010753 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010754LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010755cat >conftest.$ac_ext <<_ACEOF
10756#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010757#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010758
Guido van Rossum49545951997-12-02 19:28:29 +000010759/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010760#ifdef __cplusplus
10761extern "C"
10762#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010763/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010764 builtin and then its argument prototype would still apply. */
10765char pthread_create ();
10766#ifdef F77_DUMMY_MAIN
10767# ifdef __cplusplus
10768 extern "C"
10769# endif
10770 int F77_DUMMY_MAIN() { return 1; }
10771#endif
10772int
10773main ()
10774{
10775pthread_create ();
10776 ;
10777 return 0;
10778}
10779_ACEOF
10780rm -f conftest.$ac_objext conftest$ac_exeext
10781if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10782 (eval $ac_link) 2>&5
10783 ac_status=$?
10784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10785 (exit $ac_status); } &&
10786 { ac_try='test -s conftest$ac_exeext'
10787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10788 (eval $ac_try) 2>&5
10789 ac_status=$?
10790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10791 (exit $ac_status); }; }; then
10792 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010793else
Martin v. Löwis11437992002-04-12 09:54:03 +000010794 echo "$as_me: failed program was:" >&5
10795cat conftest.$ac_ext >&5
10796ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010797fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010798rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10799LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010800fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010801echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10802echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10803if test $ac_cv_lib_c_r_pthread_create = yes; then
10804 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010805#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010806_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010807
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010808 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010809 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010810 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010811else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010812
Martin v. Löwis11437992002-04-12 09:54:03 +000010813 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10814echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10815if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10816 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010817else
Martin v. Löwis11437992002-04-12 09:54:03 +000010818 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010819LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010820cat >conftest.$ac_ext <<_ACEOF
10821#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010822#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010823
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010824/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010825#ifdef __cplusplus
10826extern "C"
10827#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010828/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010829 builtin and then its argument prototype would still apply. */
10830char __d6_pthread_create ();
10831#ifdef F77_DUMMY_MAIN
10832# ifdef __cplusplus
10833 extern "C"
10834# endif
10835 int F77_DUMMY_MAIN() { return 1; }
10836#endif
10837int
10838main ()
10839{
10840__d6_pthread_create ();
10841 ;
10842 return 0;
10843}
10844_ACEOF
10845rm -f conftest.$ac_objext conftest$ac_exeext
10846if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10847 (eval $ac_link) 2>&5
10848 ac_status=$?
10849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10850 (exit $ac_status); } &&
10851 { ac_try='test -s conftest$ac_exeext'
10852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10853 (eval $ac_try) 2>&5
10854 ac_status=$?
10855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10856 (exit $ac_status); }; }; then
10857 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010858else
Martin v. Löwis11437992002-04-12 09:54:03 +000010859 echo "$as_me: failed program was:" >&5
10860cat conftest.$ac_ext >&5
10861ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010862fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010863rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10864LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010865fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010866echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10867echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10868if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10869 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010870#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010871_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010872
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010873 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010874 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010875 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010876else
Guido van Rossum49545951997-12-02 19:28:29 +000010877
Martin v. Löwis11437992002-04-12 09:54:03 +000010878 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10879echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10880if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10881 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010882else
Martin v. Löwis11437992002-04-12 09:54:03 +000010883 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010884LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010885cat >conftest.$ac_ext <<_ACEOF
10886#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010887#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010888
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010889/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010890#ifdef __cplusplus
10891extern "C"
10892#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010893/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010894 builtin and then its argument prototype would still apply. */
10895char __pthread_create_system ();
10896#ifdef F77_DUMMY_MAIN
10897# ifdef __cplusplus
10898 extern "C"
10899# endif
10900 int F77_DUMMY_MAIN() { return 1; }
10901#endif
10902int
10903main ()
10904{
10905__pthread_create_system ();
10906 ;
10907 return 0;
10908}
10909_ACEOF
10910rm -f conftest.$ac_objext conftest$ac_exeext
10911if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10912 (eval $ac_link) 2>&5
10913 ac_status=$?
10914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10915 (exit $ac_status); } &&
10916 { ac_try='test -s conftest$ac_exeext'
10917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10918 (eval $ac_try) 2>&5
10919 ac_status=$?
10920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10921 (exit $ac_status); }; }; then
10922 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010923else
Martin v. Löwis11437992002-04-12 09:54:03 +000010924 echo "$as_me: failed program was:" >&5
10925cat conftest.$ac_ext >&5
10926ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010927fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010928rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10929LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010930fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010931echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10932echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10933if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10934 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010935#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010936_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010937
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010938 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010939 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010940 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010941else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010942
Martin v. Löwis11437992002-04-12 09:54:03 +000010943 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10944echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10945if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10946 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010947else
Martin v. Löwis11437992002-04-12 09:54:03 +000010948 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010949LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010950cat >conftest.$ac_ext <<_ACEOF
10951#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010952#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010953
Guido van Rossumb93a8621998-05-07 13:27:32 +000010954/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010955#ifdef __cplusplus
10956extern "C"
10957#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010958/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010959 builtin and then its argument prototype would still apply. */
10960char pthread_create ();
10961#ifdef F77_DUMMY_MAIN
10962# ifdef __cplusplus
10963 extern "C"
10964# endif
10965 int F77_DUMMY_MAIN() { return 1; }
10966#endif
10967int
10968main ()
10969{
10970pthread_create ();
10971 ;
10972 return 0;
10973}
10974_ACEOF
10975rm -f conftest.$ac_objext conftest$ac_exeext
10976if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10977 (eval $ac_link) 2>&5
10978 ac_status=$?
10979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10980 (exit $ac_status); } &&
10981 { ac_try='test -s conftest$ac_exeext'
10982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10983 (eval $ac_try) 2>&5
10984 ac_status=$?
10985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10986 (exit $ac_status); }; }; then
10987 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010988else
Martin v. Löwis11437992002-04-12 09:54:03 +000010989 echo "$as_me: failed program was:" >&5
10990cat conftest.$ac_ext >&5
10991ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010992fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010993rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10994LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010995fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010996echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10997echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10998if test $ac_cv_lib_cma_pthread_create = yes; then
10999 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011000#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011001_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011002
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011003 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011004 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011005 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011006else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011007
Martin v. Löwis130fb172001-07-19 11:00:41 +000011008 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011009fi
11010
Guido van Rossum627b2d71993-12-24 10:39:16 +000011011
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011012fi
11013
Guido van Rossum0be3e491997-05-22 20:33:33 +000011014fi
11015
Guido van Rossum49545951997-12-02 19:28:29 +000011016fi
11017
Guido van Rossumb93a8621998-05-07 13:27:32 +000011018fi
11019
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011020fi
11021
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011022
Michael W. Hudson54241132001-12-07 15:38:26 +000011023fi
11024
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011025
11026fi
11027
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011028fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011029rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11030fi;
11031fi
11032
11033
11034fi
11035
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011036
Michael W. Hudson54241132001-12-07 15:38:26 +000011037
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011038 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011039 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011040
11041cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011042#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011043_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011044
11045 fi
11046
Martin v. Löwis11437992002-04-12 09:54:03 +000011047 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11048echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11049 if test "${ac_cv_pthread_system_supported+set}" = set; then
11050 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011051else
11052 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011053 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011054else
Martin v. Löwis11437992002-04-12 09:54:03 +000011055 cat >conftest.$ac_ext <<_ACEOF
11056#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011057#include "confdefs.h"
11058#include <pthread.h>
11059 void *foo(void *parm) {
11060 return NULL;
11061 }
11062 main() {
11063 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011064 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011065 if (pthread_attr_init(&attr)) exit(-1);
11066 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011067 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011068 exit(0);
11069 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011070_ACEOF
11071rm -f conftest$ac_exeext
11072if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11073 (eval $ac_link) 2>&5
11074 ac_status=$?
11075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11076 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11078 (eval $ac_try) 2>&5
11079 ac_status=$?
11080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11081 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011082 ac_cv_pthread_system_supported=yes
11083else
Martin v. Löwis11437992002-04-12 09:54:03 +000011084 echo "$as_me: program exited with status $ac_status" >&5
11085echo "$as_me: failed program was:" >&5
11086cat conftest.$ac_ext >&5
11087( exit $ac_status )
11088ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011089fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011090rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011091fi
11092
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011093fi
11094
Martin v. Löwis11437992002-04-12 09:54:03 +000011095 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11096echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011097 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011098
11099cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011100#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011101_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011102
11103 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011104
11105for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011106do
Martin v. Löwis11437992002-04-12 09:54:03 +000011107as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11108echo "$as_me:$LINENO: checking for $ac_func" >&5
11109echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11110if eval "test \"\${$as_ac_var+set}\" = set"; then
11111 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011112else
Martin v. Löwis11437992002-04-12 09:54:03 +000011113 cat >conftest.$ac_ext <<_ACEOF
11114#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011115#include "confdefs.h"
11116/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011117 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011118#include <assert.h>
11119/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011120#ifdef __cplusplus
11121extern "C"
11122#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011123/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011124 builtin and then its argument prototype would still apply. */
11125char $ac_func ();
11126char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011127
Martin v. Löwis11437992002-04-12 09:54:03 +000011128#ifdef F77_DUMMY_MAIN
11129# ifdef __cplusplus
11130 extern "C"
11131# endif
11132 int F77_DUMMY_MAIN() { return 1; }
11133#endif
11134int
11135main ()
11136{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011137/* The GNU C library defines this for functions which it implements
11138 to always fail with ENOSYS. Some functions are actually named
11139 something starting with __ and the normal name is an alias. */
11140#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11141choke me
11142#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011143f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011144#endif
11145
Martin v. Löwis11437992002-04-12 09:54:03 +000011146 ;
11147 return 0;
11148}
11149_ACEOF
11150rm -f conftest.$ac_objext conftest$ac_exeext
11151if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11152 (eval $ac_link) 2>&5
11153 ac_status=$?
11154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11155 (exit $ac_status); } &&
11156 { ac_try='test -s conftest$ac_exeext'
11157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11158 (eval $ac_try) 2>&5
11159 ac_status=$?
11160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11161 (exit $ac_status); }; }; then
11162 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011163else
Martin v. Löwis11437992002-04-12 09:54:03 +000011164 echo "$as_me: failed program was:" >&5
11165cat conftest.$ac_ext >&5
11166eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011167fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011168rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011169fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011170echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11171echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11172if test `eval echo '${'$as_ac_var'}'` = yes; then
11173 cat >>confdefs.h <<_ACEOF
11174#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11175_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011176
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011177fi
11178done
11179
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011180 fi
11181
Martin v. Löwis11437992002-04-12 09:54:03 +000011182 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11183echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11184if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11185 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011186else
Martin v. Löwis11437992002-04-12 09:54:03 +000011187 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011188LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011189cat >conftest.$ac_ext <<_ACEOF
11190#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011191#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011192
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011193/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011194#ifdef __cplusplus
11195extern "C"
11196#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011197/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011198 builtin and then its argument prototype would still apply. */
11199char usconfig ();
11200#ifdef F77_DUMMY_MAIN
11201# ifdef __cplusplus
11202 extern "C"
11203# endif
11204 int F77_DUMMY_MAIN() { return 1; }
11205#endif
11206int
11207main ()
11208{
11209usconfig ();
11210 ;
11211 return 0;
11212}
11213_ACEOF
11214rm -f conftest.$ac_objext conftest$ac_exeext
11215if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11216 (eval $ac_link) 2>&5
11217 ac_status=$?
11218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11219 (exit $ac_status); } &&
11220 { ac_try='test -s conftest$ac_exeext'
11221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11222 (eval $ac_try) 2>&5
11223 ac_status=$?
11224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11225 (exit $ac_status); }; }; then
11226 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011227else
Martin v. Löwis11437992002-04-12 09:54:03 +000011228 echo "$as_me: failed program was:" >&5
11229cat conftest.$ac_ext >&5
11230ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011231fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011232rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11233LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011234fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011235echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11236echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11237if test $ac_cv_lib_mpc_usconfig = yes; then
11238 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011239#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011240_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011241
Martin v. Löwis130fb172001-07-19 11:00:41 +000011242 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011243 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011244 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011245fi
11246
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011247
Neal Norwitza978ab02002-11-02 16:58:05 +000011248 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011249 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11250echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11251if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11252 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011253else
Martin v. Löwis11437992002-04-12 09:54:03 +000011254 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011255LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011256cat >conftest.$ac_ext <<_ACEOF
11257#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011258#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011259
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011260/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011261#ifdef __cplusplus
11262extern "C"
11263#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011264/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011265 builtin and then its argument prototype would still apply. */
11266char thr_create ();
11267#ifdef F77_DUMMY_MAIN
11268# ifdef __cplusplus
11269 extern "C"
11270# endif
11271 int F77_DUMMY_MAIN() { return 1; }
11272#endif
11273int
11274main ()
11275{
11276thr_create ();
11277 ;
11278 return 0;
11279}
11280_ACEOF
11281rm -f conftest.$ac_objext conftest$ac_exeext
11282if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11283 (eval $ac_link) 2>&5
11284 ac_status=$?
11285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11286 (exit $ac_status); } &&
11287 { ac_try='test -s conftest$ac_exeext'
11288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11289 (eval $ac_try) 2>&5
11290 ac_status=$?
11291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11292 (exit $ac_status); }; }; then
11293 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011294else
Martin v. Löwis11437992002-04-12 09:54:03 +000011295 echo "$as_me: failed program was:" >&5
11296cat conftest.$ac_ext >&5
11297ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011298fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011299rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11300LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011301fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011302echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11303echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11304if test $ac_cv_lib_thread_thr_create = yes; then
11305 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011306#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011307_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011308
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011309 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011310 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011311 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011312fi
11313
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011314 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011315
Martin v. Löwis130fb172001-07-19 11:00:41 +000011316 if test "$USE_THREAD_MODULE" != "#"
11317 then
11318 # If the above checks didn't disable threads, (at least) OSF1
11319 # needs this '-threads' argument during linking.
11320 case $ac_sys_system in
11321 OSF1) LDLAST=-threads;;
11322 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011323 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011324
11325 if test "$posix_threads" = yes -a \
11326 "$ac_sys_system" = "SunOS" -a \
11327 "$ac_sys_release" = "5.6"; then
11328
11329cat >>confdefs.h <<\_ACEOF
11330#define HAVE_PTHREAD_DESTRUCTOR 1
11331_ACEOF
11332
11333 fi
11334
Guido van Rossum627b2d71993-12-24 10:39:16 +000011335fi
11336
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011337# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011338
11339
11340echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11341echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011342# Check whether --enable-ipv6 or --disable-ipv6 was given.
11343if test "${enable_ipv6+set}" = set; then
11344 enableval="$enable_ipv6"
11345 case "$enableval" in
11346 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011347 echo "$as_me:$LINENO: result: no" >&5
11348echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011349 ipv6=no
11350 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011351 *) echo "$as_me:$LINENO: result: yes" >&5
11352echo "${ECHO_T}yes" >&6
11353 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011354#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011355_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011356
11357 ipv6=yes
11358 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011359 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011360else
Martin v. Löwis11437992002-04-12 09:54:03 +000011361
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011362 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011363 echo "$as_me:$LINENO: result: no" >&5
11364echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011365 ipv6=no
11366
11367else
Martin v. Löwis11437992002-04-12 09:54:03 +000011368 cat >conftest.$ac_ext <<_ACEOF
11369#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011370#include "confdefs.h"
11371 /* AF_INET6 available check */
11372#include <sys/types.h>
11373#include <sys/socket.h>
11374main()
11375{
11376 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11377 exit(1);
11378 else
11379 exit(0);
11380}
11381
Martin v. Löwis11437992002-04-12 09:54:03 +000011382_ACEOF
11383rm -f conftest$ac_exeext
11384if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11385 (eval $ac_link) 2>&5
11386 ac_status=$?
11387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11388 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11390 (eval $ac_try) 2>&5
11391 ac_status=$?
11392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11393 (exit $ac_status); }; }; then
11394 echo "$as_me:$LINENO: result: yes" >&5
11395echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011396 ipv6=yes
11397else
Martin v. Löwis11437992002-04-12 09:54:03 +000011398 echo "$as_me: program exited with status $ac_status" >&5
11399echo "$as_me: failed program was:" >&5
11400cat conftest.$ac_ext >&5
11401( exit $ac_status )
11402echo "$as_me:$LINENO: result: no" >&5
11403echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011404 ipv6=no
11405fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011406rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011407fi
11408
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011409if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011410 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11411echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11412 cat >conftest.$ac_ext <<_ACEOF
11413#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011414#include "confdefs.h"
11415#include <sys/types.h>
11416#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011417#ifdef F77_DUMMY_MAIN
11418# ifdef __cplusplus
11419 extern "C"
11420# endif
11421 int F77_DUMMY_MAIN() { return 1; }
11422#endif
11423int
11424main ()
11425{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011426struct sockaddr_in6 x;
11427x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011428 ;
11429 return 0;
11430}
11431_ACEOF
11432rm -f conftest.$ac_objext
11433if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11434 (eval $ac_compile) 2>&5
11435 ac_status=$?
11436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11437 (exit $ac_status); } &&
11438 { ac_try='test -s conftest.$ac_objext'
11439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11440 (eval $ac_try) 2>&5
11441 ac_status=$?
11442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11443 (exit $ac_status); }; }; then
11444 echo "$as_me:$LINENO: result: yes" >&5
11445echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011446 ipv6=yes
11447else
Martin v. Löwis11437992002-04-12 09:54:03 +000011448 echo "$as_me: failed program was:" >&5
11449cat conftest.$ac_ext >&5
11450echo "$as_me:$LINENO: result: no" >&5
11451echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011452 ipv6=no
11453fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011454rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011455fi
11456
11457if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011458 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011459#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011460_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011461
11462fi
11463
Martin v. Löwis11437992002-04-12 09:54:03 +000011464fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011465
11466ipv6type=unknown
11467ipv6lib=none
11468ipv6trylibc=no
11469
11470if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011471 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11472echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011473 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11474 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011475 case $i in
11476 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011477 cat >conftest.$ac_ext <<_ACEOF
11478#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011479#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011480
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011481#include <netinet/in.h>
11482#ifdef IPV6_INRIA_VERSION
11483yes
11484#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011485_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011486if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11487 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011488 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011489fi
11490rm -f conftest*
11491
11492 ;;
11493 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011494 cat >conftest.$ac_ext <<_ACEOF
11495#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011496#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011497
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011498#include <netinet/in.h>
11499#ifdef __KAME__
11500yes
11501#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011502_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11504 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011505 ipv6type=$i;
11506 ipv6lib=inet6
11507 ipv6libdir=/usr/local/v6/lib
11508 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011509fi
11510rm -f conftest*
11511
11512 ;;
11513 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 cat >conftest.$ac_ext <<_ACEOF
11515#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011516#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011517
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011518#include <features.h>
11519#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11520yes
11521#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011522_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011523if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11524 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011525 ipv6type=$i;
11526 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011527fi
11528rm -f conftest*
11529
11530 ;;
11531 linux-inet6)
11532 if test -d /usr/inet6; then
11533 ipv6type=$i
11534 ipv6lib=inet6
11535 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011536 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011537 fi
11538 ;;
11539 solaris)
11540 if test -f /etc/netconfig; then
11541 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11542 ipv6type=$i
11543 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011544 fi
11545 fi
11546 ;;
11547 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011548 cat >conftest.$ac_ext <<_ACEOF
11549#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011550#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011551
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011552#include <sys/param.h>
11553#ifdef _TOSHIBA_INET6
11554yes
11555#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011556_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011557if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11558 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011559 ipv6type=$i;
11560 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011561 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011562fi
11563rm -f conftest*
11564
11565 ;;
11566 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011567 cat >conftest.$ac_ext <<_ACEOF
11568#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011569#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011570
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011571#include </usr/local/v6/include/sys/v6config.h>
11572#ifdef __V6D__
11573yes
11574#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011575_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011576if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11577 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011578 ipv6type=$i;
11579 ipv6lib=v6;
11580 ipv6libdir=/usr/local/v6/lib;
11581 OPT="-I/usr/local/v6/include $OPT"
11582fi
11583rm -f conftest*
11584
11585 ;;
11586 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011587 cat >conftest.$ac_ext <<_ACEOF
11588#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011589#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011590
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011591#include <sys/param.h>
11592#ifdef _ZETA_MINAMI_INET6
11593yes
11594#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011595_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011596if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11597 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011598 ipv6type=$i;
11599 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011600 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011601fi
11602rm -f conftest*
11603
11604 ;;
11605 esac
11606 if test "$ipv6type" != "unknown"; then
11607 break
11608 fi
11609 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011610 echo "$as_me:$LINENO: result: $ipv6type" >&5
11611echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011612fi
11613
11614if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11615 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11616 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11617 echo "using lib$ipv6lib"
11618 else
11619 if test $ipv6trylibc = "yes"; then
11620 echo "using libc"
11621 else
11622 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11623 echo "You need to fetch lib$ipv6lib.a from appropriate"
11624 echo 'ipv6 kit and compile beforehand.'
11625 exit 1
11626 fi
11627 fi
11628fi
11629
Jack Jansen7b8c7542002-04-14 20:12:41 +000011630# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011631echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11632echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011633
11634# Check whether --with-universal-newlines or --without-universal-newlines was given.
11635if test "${with_universal_newlines+set}" = set; then
11636 withval="$with_universal_newlines"
11637
11638fi;
11639
11640if test -z "$with_universal_newlines"
11641then with_universal_newlines="yes"
11642fi
11643if test "$with_universal_newlines" != "no"
11644then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011645
11646cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011647#define WITH_UNIVERSAL_NEWLINES 1
11648_ACEOF
11649
11650fi
11651echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11652echo "${ECHO_T}$with_universal_newlines" >&6
11653
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011654# Check for --with-doc-strings
11655echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11656echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11657
11658# Check whether --with-doc-strings or --without-doc-strings was given.
11659if test "${with_doc_strings+set}" = set; then
11660 withval="$with_doc_strings"
11661
11662fi;
11663
11664if test -z "$with_doc_strings"
11665then with_doc_strings="yes"
11666fi
11667if test "$with_doc_strings" != "no"
11668then
11669
11670cat >>confdefs.h <<\_ACEOF
11671#define WITH_DOC_STRINGS 1
11672_ACEOF
11673
11674fi
11675echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11676echo "${ECHO_T}$with_doc_strings" >&6
11677
Neil Schemenauera35c6882001-02-27 04:45:05 +000011678# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011679echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11680echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11681
Neil Schemenauera35c6882001-02-27 04:45:05 +000011682# Check whether --with-pymalloc or --without-pymalloc was given.
11683if test "${with_pymalloc+set}" = set; then
11684 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011685
Martin v. Löwis11437992002-04-12 09:54:03 +000011686fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011687
Neil Schemenauer16c22972002-03-22 15:34:49 +000011688if test -z "$with_pymalloc"
11689then with_pymalloc="yes"
11690fi
11691if test "$with_pymalloc" != "no"
11692then
Martin v. Löwis11437992002-04-12 09:54:03 +000011693
11694cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011695#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011696_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011697
11698fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011699echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11700echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011701
Barry Warsawef82cd72000-06-30 16:21:01 +000011702# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011703echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11704echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11705
Barry Warsawef82cd72000-06-30 16:21:01 +000011706# Check whether --with-wctype-functions or --without-wctype-functions was given.
11707if test "${with_wctype_functions+set}" = set; then
11708 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011709
Barry Warsawef82cd72000-06-30 16:21:01 +000011710if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011711then
11712
11713cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011714#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011715_ACEOF
11716
11717 echo "$as_me:$LINENO: result: yes" >&5
11718echo "${ECHO_T}yes" >&6
11719else echo "$as_me:$LINENO: result: no" >&5
11720echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011721fi
11722else
Martin v. Löwis11437992002-04-12 09:54:03 +000011723 echo "$as_me:$LINENO: result: no" >&5
11724echo "${ECHO_T}no" >&6
11725fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011726
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011727# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011728
Guido van Rossum98935bf2001-09-05 19:13:16 +000011729DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011730
Martin v. Löwis11437992002-04-12 09:54:03 +000011731echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11732echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11733
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011734# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011735if test "${with_sgi_dl+set}" = set; then
11736 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011737
11738echo "$as_me:$LINENO: result: $withval" >&5
11739echo "${ECHO_T}$withval" >&6
11740
11741cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011742#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011743_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011744
Guido van Rossume97ee181999-12-20 21:27:22 +000011745DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011746dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011747if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011748then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011749else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11750echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11751 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011752fi
11753DLINCLDIR=${dldir}
11754LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011755else
Martin v. Löwis11437992002-04-12 09:54:03 +000011756 echo "$as_me:$LINENO: result: no" >&5
11757echo "${ECHO_T}no" >&6
11758fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011759
Martin v. Löwis11437992002-04-12 09:54:03 +000011760echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11761echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011762
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011763# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011764if test "${with_dl_dld+set}" = set; then
11765 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011766
11767echo "$as_me:$LINENO: result: $withval" >&5
11768echo "${ECHO_T}$withval" >&6
11769
11770cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011771#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011772_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011773
Guido van Rossume97ee181999-12-20 21:27:22 +000011774DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011775dldir=`echo "$withval" | sed 's/,.*//'`
11776dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011777if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011778then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011779else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
11780echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
11781 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011782fi
11783DLINCLDIR=${dldir}
11784LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011785else
Martin v. Löwis11437992002-04-12 09:54:03 +000011786 echo "$as_me:$LINENO: result: no" >&5
11787echo "${ECHO_T}no" >&6
11788fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011789
Guido van Rossume97ee181999-12-20 21:27:22 +000011790# the dlopen() function means we might want to use dynload_shlib.o. some
11791# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011792
Thomas Wouters3a584202000-08-05 23:28:51 +000011793for ac_func in dlopen
11794do
Martin v. Löwis11437992002-04-12 09:54:03 +000011795as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11796echo "$as_me:$LINENO: checking for $ac_func" >&5
11797echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11798if eval "test \"\${$as_ac_var+set}\" = set"; then
11799 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011800else
Martin v. Löwis11437992002-04-12 09:54:03 +000011801 cat >conftest.$ac_ext <<_ACEOF
11802#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011803#include "confdefs.h"
11804/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011805 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011806#include <assert.h>
11807/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011808#ifdef __cplusplus
11809extern "C"
11810#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011811/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011812 builtin and then its argument prototype would still apply. */
11813char $ac_func ();
11814char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011815
Martin v. Löwis11437992002-04-12 09:54:03 +000011816#ifdef F77_DUMMY_MAIN
11817# ifdef __cplusplus
11818 extern "C"
11819# endif
11820 int F77_DUMMY_MAIN() { return 1; }
11821#endif
11822int
11823main ()
11824{
Guido van Rossume97ee181999-12-20 21:27:22 +000011825/* The GNU C library defines this for functions which it implements
11826 to always fail with ENOSYS. Some functions are actually named
11827 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011828#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011829choke me
11830#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011831f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011832#endif
11833
Martin v. Löwis11437992002-04-12 09:54:03 +000011834 ;
11835 return 0;
11836}
11837_ACEOF
11838rm -f conftest.$ac_objext conftest$ac_exeext
11839if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11840 (eval $ac_link) 2>&5
11841 ac_status=$?
11842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11843 (exit $ac_status); } &&
11844 { ac_try='test -s conftest$ac_exeext'
11845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11846 (eval $ac_try) 2>&5
11847 ac_status=$?
11848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11849 (exit $ac_status); }; }; then
11850 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011851else
Martin v. Löwis11437992002-04-12 09:54:03 +000011852 echo "$as_me: failed program was:" >&5
11853cat conftest.$ac_ext >&5
11854eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011855fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011856rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011857fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011858echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11859echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11860if test `eval echo '${'$as_ac_var'}'` = yes; then
11861 cat >>confdefs.h <<_ACEOF
11862#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11863_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011864
Guido van Rossume97ee181999-12-20 21:27:22 +000011865fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011866done
Guido van Rossume97ee181999-12-20 21:27:22 +000011867
Michael W. Hudson54241132001-12-07 15:38:26 +000011868
Guido van Rossume97ee181999-12-20 21:27:22 +000011869# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11870# loading of modules.
11871
Martin v. Löwis11437992002-04-12 09:54:03 +000011872echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11873echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011874if test -z "$DYNLOADFILE"
11875then
11876 case $ac_sys_system/$ac_sys_release in
11877 AIX*) DYNLOADFILE="dynload_aix.o";;
11878 BeOS*) DYNLOADFILE="dynload_beos.o";;
11879 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011880 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011881 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011882 *)
11883 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11884 # out any dynamic loading
11885 if test "$ac_cv_func_dlopen" = yes
11886 then DYNLOADFILE="dynload_shlib.o"
11887 else DYNLOADFILE="dynload_stub.o"
11888 fi
11889 ;;
11890 esac
11891fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011892echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11893echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011894if test "$DYNLOADFILE" != "dynload_stub.o"
11895then
Martin v. Löwis11437992002-04-12 09:54:03 +000011896
11897cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011898#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011899_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011900
11901fi
11902
Neil Schemenauer4e425612001-06-19 15:44:15 +000011903# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11904
Michael W. Hudson54241132001-12-07 15:38:26 +000011905
Martin v. Löwis11437992002-04-12 09:54:03 +000011906echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11907echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011908if test -z "$MACHDEP_OBJS"
11909then
Jack Jansene578a632001-08-15 01:27:14 +000011910 MACHDEP_OBJS=$extra_machdep_objs
11911else
11912 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011913fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011914echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11915echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011916
Guido van Rossum627b2d71993-12-24 10:39:16 +000011917# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
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
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011991
Fred Drake6b3cc522002-04-15 19:20:27 +000011992
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011993for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011994 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011995 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011996 hstrerror inet_pton kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000011997 mremap nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011998 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011999 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000012000 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012001 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012002 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000012003 truncate uname unsetenv utimes waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000012004do
Martin v. Löwis11437992002-04-12 09:54:03 +000012005as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12006echo "$as_me:$LINENO: checking for $ac_func" >&5
12007echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12008if eval "test \"\${$as_ac_var+set}\" = set"; then
12009 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012010else
Martin v. Löwis11437992002-04-12 09:54:03 +000012011 cat >conftest.$ac_ext <<_ACEOF
12012#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012013#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012014/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012015 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012016#include <assert.h>
12017/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012018#ifdef __cplusplus
12019extern "C"
12020#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012021/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012022 builtin and then its argument prototype would still apply. */
12023char $ac_func ();
12024char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012025
Martin v. Löwis11437992002-04-12 09:54:03 +000012026#ifdef F77_DUMMY_MAIN
12027# ifdef __cplusplus
12028 extern "C"
12029# endif
12030 int F77_DUMMY_MAIN() { return 1; }
12031#endif
12032int
12033main ()
12034{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012035/* The GNU C library defines this for functions which it implements
12036 to always fail with ENOSYS. Some functions are actually named
12037 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012038#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012039choke me
12040#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012041f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012042#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012043
Martin v. Löwis11437992002-04-12 09:54:03 +000012044 ;
12045 return 0;
12046}
12047_ACEOF
12048rm -f conftest.$ac_objext conftest$ac_exeext
12049if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12050 (eval $ac_link) 2>&5
12051 ac_status=$?
12052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12053 (exit $ac_status); } &&
12054 { ac_try='test -s conftest$ac_exeext'
12055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12056 (eval $ac_try) 2>&5
12057 ac_status=$?
12058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12059 (exit $ac_status); }; }; then
12060 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012061else
Martin v. Löwis11437992002-04-12 09:54:03 +000012062 echo "$as_me: failed program was:" >&5
12063cat conftest.$ac_ext >&5
12064eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012065fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012066rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012067fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012068echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12069echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12070if test `eval echo '${'$as_ac_var'}'` = yes; then
12071 cat >>confdefs.h <<_ACEOF
12072#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12073_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012074
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012075fi
12076done
12077
Michael W. Hudson54241132001-12-07 15:38:26 +000012078
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012079# For some functions, having a definition is not sufficient, since
12080# we want to take their address.
12081echo "$as_me:$LINENO: checking for chroot" >&5
12082echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12083cat >conftest.$ac_ext <<_ACEOF
12084#line $LINENO "configure"
12085#include "confdefs.h"
12086#include <unistd.h>
12087#ifdef F77_DUMMY_MAIN
12088# ifdef __cplusplus
12089 extern "C"
12090# endif
12091 int F77_DUMMY_MAIN() { return 1; }
12092#endif
12093int
12094main ()
12095{
12096void *x=chroot
12097 ;
12098 return 0;
12099}
12100_ACEOF
12101rm -f conftest.$ac_objext
12102if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12103 (eval $ac_compile) 2>&5
12104 ac_status=$?
12105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12106 (exit $ac_status); } &&
12107 { ac_try='test -s conftest.$ac_objext'
12108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12109 (eval $ac_try) 2>&5
12110 ac_status=$?
12111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12112 (exit $ac_status); }; }; then
12113
12114cat >>confdefs.h <<\_ACEOF
12115#define HAVE_CHROOT 1
12116_ACEOF
12117
12118 echo "$as_me:$LINENO: result: yes" >&5
12119echo "${ECHO_T}yes" >&6
12120else
12121 echo "$as_me: failed program was:" >&5
12122cat conftest.$ac_ext >&5
12123echo "$as_me:$LINENO: result: no" >&5
12124echo "${ECHO_T}no" >&6
12125
12126fi
12127rm -f conftest.$ac_objext conftest.$ac_ext
12128echo "$as_me:$LINENO: checking for link" >&5
12129echo $ECHO_N "checking for link... $ECHO_C" >&6
12130cat >conftest.$ac_ext <<_ACEOF
12131#line $LINENO "configure"
12132#include "confdefs.h"
12133#include <unistd.h>
12134#ifdef F77_DUMMY_MAIN
12135# ifdef __cplusplus
12136 extern "C"
12137# endif
12138 int F77_DUMMY_MAIN() { return 1; }
12139#endif
12140int
12141main ()
12142{
12143void *x=link
12144 ;
12145 return 0;
12146}
12147_ACEOF
12148rm -f conftest.$ac_objext
12149if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12150 (eval $ac_compile) 2>&5
12151 ac_status=$?
12152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12153 (exit $ac_status); } &&
12154 { ac_try='test -s conftest.$ac_objext'
12155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12156 (eval $ac_try) 2>&5
12157 ac_status=$?
12158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12159 (exit $ac_status); }; }; then
12160
12161cat >>confdefs.h <<\_ACEOF
12162#define HAVE_LINK 1
12163_ACEOF
12164
12165 echo "$as_me:$LINENO: result: yes" >&5
12166echo "${ECHO_T}yes" >&6
12167else
12168 echo "$as_me: failed program was:" >&5
12169cat conftest.$ac_ext >&5
12170echo "$as_me:$LINENO: result: no" >&5
12171echo "${ECHO_T}no" >&6
12172
12173fi
12174rm -f conftest.$ac_objext conftest.$ac_ext
12175echo "$as_me:$LINENO: checking for symlink" >&5
12176echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12177cat >conftest.$ac_ext <<_ACEOF
12178#line $LINENO "configure"
12179#include "confdefs.h"
12180#include <unistd.h>
12181#ifdef F77_DUMMY_MAIN
12182# ifdef __cplusplus
12183 extern "C"
12184# endif
12185 int F77_DUMMY_MAIN() { return 1; }
12186#endif
12187int
12188main ()
12189{
12190void *x=symlink
12191 ;
12192 return 0;
12193}
12194_ACEOF
12195rm -f conftest.$ac_objext
12196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12197 (eval $ac_compile) 2>&5
12198 ac_status=$?
12199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12200 (exit $ac_status); } &&
12201 { ac_try='test -s conftest.$ac_objext'
12202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12203 (eval $ac_try) 2>&5
12204 ac_status=$?
12205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12206 (exit $ac_status); }; }; then
12207
12208cat >>confdefs.h <<\_ACEOF
12209#define HAVE_SYMLINK 1
12210_ACEOF
12211
12212 echo "$as_me:$LINENO: result: yes" >&5
12213echo "${ECHO_T}yes" >&6
12214else
12215 echo "$as_me: failed program was:" >&5
12216cat conftest.$ac_ext >&5
12217echo "$as_me:$LINENO: result: no" >&5
12218echo "${ECHO_T}no" >&6
12219
12220fi
12221rm -f conftest.$ac_objext conftest.$ac_ext
12222
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012223# check for openpty and forkpty
12224
Martin v. Löwis11437992002-04-12 09:54:03 +000012225
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012226for ac_func in openpty
12227do
Martin v. Löwis11437992002-04-12 09:54:03 +000012228as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12229echo "$as_me:$LINENO: checking for $ac_func" >&5
12230echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12231if eval "test \"\${$as_ac_var+set}\" = set"; then
12232 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012233else
Martin v. Löwis11437992002-04-12 09:54:03 +000012234 cat >conftest.$ac_ext <<_ACEOF
12235#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012236#include "confdefs.h"
12237/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012238 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012239#include <assert.h>
12240/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012241#ifdef __cplusplus
12242extern "C"
12243#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012244/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012245 builtin and then its argument prototype would still apply. */
12246char $ac_func ();
12247char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012248
Martin v. Löwis11437992002-04-12 09:54:03 +000012249#ifdef F77_DUMMY_MAIN
12250# ifdef __cplusplus
12251 extern "C"
12252# endif
12253 int F77_DUMMY_MAIN() { return 1; }
12254#endif
12255int
12256main ()
12257{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012258/* The GNU C library defines this for functions which it implements
12259 to always fail with ENOSYS. Some functions are actually named
12260 something starting with __ and the normal name is an alias. */
12261#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12262choke me
12263#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012264f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012265#endif
12266
Martin v. Löwis11437992002-04-12 09:54:03 +000012267 ;
12268 return 0;
12269}
12270_ACEOF
12271rm -f conftest.$ac_objext conftest$ac_exeext
12272if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12273 (eval $ac_link) 2>&5
12274 ac_status=$?
12275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12276 (exit $ac_status); } &&
12277 { ac_try='test -s conftest$ac_exeext'
12278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12279 (eval $ac_try) 2>&5
12280 ac_status=$?
12281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12282 (exit $ac_status); }; }; then
12283 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012284else
Martin v. Löwis11437992002-04-12 09:54:03 +000012285 echo "$as_me: failed program was:" >&5
12286cat conftest.$ac_ext >&5
12287eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012288fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012289rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012290fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012291echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12292echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12293if test `eval echo '${'$as_ac_var'}'` = yes; then
12294 cat >>confdefs.h <<_ACEOF
12295#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12296_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012297
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012298else
Martin v. Löwis11437992002-04-12 09:54:03 +000012299 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
12300echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
12301if test "${ac_cv_lib_util_openpty+set}" = set; then
12302 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012303else
Martin v. Löwis11437992002-04-12 09:54:03 +000012304 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012305LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012306cat >conftest.$ac_ext <<_ACEOF
12307#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012308#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012309
Fred Drake8cef4cf2000-06-28 16:40:38 +000012310/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012311#ifdef __cplusplus
12312extern "C"
12313#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012314/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012315 builtin and then its argument prototype would still apply. */
12316char openpty ();
12317#ifdef F77_DUMMY_MAIN
12318# ifdef __cplusplus
12319 extern "C"
12320# endif
12321 int F77_DUMMY_MAIN() { return 1; }
12322#endif
12323int
12324main ()
12325{
12326openpty ();
12327 ;
12328 return 0;
12329}
12330_ACEOF
12331rm -f conftest.$ac_objext conftest$ac_exeext
12332if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12333 (eval $ac_link) 2>&5
12334 ac_status=$?
12335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12336 (exit $ac_status); } &&
12337 { ac_try='test -s conftest$ac_exeext'
12338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12339 (eval $ac_try) 2>&5
12340 ac_status=$?
12341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12342 (exit $ac_status); }; }; then
12343 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012344else
Martin v. Löwis11437992002-04-12 09:54:03 +000012345 echo "$as_me: failed program was:" >&5
12346cat conftest.$ac_ext >&5
12347ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012348fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012349rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12350LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012351fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012352echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
12353echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
12354if test $ac_cv_lib_util_openpty = yes; then
12355 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012356#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012357_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012358 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012359fi
12360
12361fi
12362done
12363
Martin v. Löwis11437992002-04-12 09:54:03 +000012364
Fred Drake8cef4cf2000-06-28 16:40:38 +000012365for ac_func in forkpty
12366do
Martin v. Löwis11437992002-04-12 09:54:03 +000012367as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12368echo "$as_me:$LINENO: checking for $ac_func" >&5
12369echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12370if eval "test \"\${$as_ac_var+set}\" = set"; then
12371 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012372else
Martin v. Löwis11437992002-04-12 09:54:03 +000012373 cat >conftest.$ac_ext <<_ACEOF
12374#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012375#include "confdefs.h"
12376/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012377 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000012378#include <assert.h>
12379/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012380#ifdef __cplusplus
12381extern "C"
12382#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012383/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012384 builtin and then its argument prototype would still apply. */
12385char $ac_func ();
12386char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000012387
Martin v. Löwis11437992002-04-12 09:54:03 +000012388#ifdef F77_DUMMY_MAIN
12389# ifdef __cplusplus
12390 extern "C"
12391# endif
12392 int F77_DUMMY_MAIN() { return 1; }
12393#endif
12394int
12395main ()
12396{
Fred Drake8cef4cf2000-06-28 16:40:38 +000012397/* The GNU C library defines this for functions which it implements
12398 to always fail with ENOSYS. Some functions are actually named
12399 something starting with __ and the normal name is an alias. */
12400#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12401choke me
12402#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012403f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000012404#endif
12405
Martin v. Löwis11437992002-04-12 09:54:03 +000012406 ;
12407 return 0;
12408}
12409_ACEOF
12410rm -f conftest.$ac_objext conftest$ac_exeext
12411if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12412 (eval $ac_link) 2>&5
12413 ac_status=$?
12414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12415 (exit $ac_status); } &&
12416 { ac_try='test -s conftest$ac_exeext'
12417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12418 (eval $ac_try) 2>&5
12419 ac_status=$?
12420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12421 (exit $ac_status); }; }; then
12422 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012423else
Martin v. Löwis11437992002-04-12 09:54:03 +000012424 echo "$as_me: failed program was:" >&5
12425cat conftest.$ac_ext >&5
12426eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012427fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012428rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012429fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012430echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12431echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12432if test `eval echo '${'$as_ac_var'}'` = yes; then
12433 cat >>confdefs.h <<_ACEOF
12434#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12435_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012436
Fred Drake8cef4cf2000-06-28 16:40:38 +000012437else
Martin v. Löwis11437992002-04-12 09:54:03 +000012438 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
12439echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
12440if test "${ac_cv_lib_util_forkpty+set}" = set; then
12441 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012442else
Martin v. Löwis11437992002-04-12 09:54:03 +000012443 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012444LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012445cat >conftest.$ac_ext <<_ACEOF
12446#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012447#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012448
Fred Drake8cef4cf2000-06-28 16:40:38 +000012449/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012450#ifdef __cplusplus
12451extern "C"
12452#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012453/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012454 builtin and then its argument prototype would still apply. */
12455char forkpty ();
12456#ifdef F77_DUMMY_MAIN
12457# ifdef __cplusplus
12458 extern "C"
12459# endif
12460 int F77_DUMMY_MAIN() { return 1; }
12461#endif
12462int
12463main ()
12464{
12465forkpty ();
12466 ;
12467 return 0;
12468}
12469_ACEOF
12470rm -f conftest.$ac_objext conftest$ac_exeext
12471if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12472 (eval $ac_link) 2>&5
12473 ac_status=$?
12474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12475 (exit $ac_status); } &&
12476 { ac_try='test -s conftest$ac_exeext'
12477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12478 (eval $ac_try) 2>&5
12479 ac_status=$?
12480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12481 (exit $ac_status); }; }; then
12482 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012483else
Martin v. Löwis11437992002-04-12 09:54:03 +000012484 echo "$as_me: failed program was:" >&5
12485cat conftest.$ac_ext >&5
12486ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012487fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012488rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12489LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012490fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012491echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
12492echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
12493if test $ac_cv_lib_util_forkpty = yes; then
12494 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012495#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012496_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012497 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012498fi
12499
12500fi
12501done
12502
Jack Jansendd19cf82001-12-06 22:36:17 +000012503
Michael W. Hudson54241132001-12-07 15:38:26 +000012504# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012505
12506
12507
12508
12509
12510
Fred Drake8cef4cf2000-06-28 16:40:38 +000012511for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
12512do
Martin v. Löwis11437992002-04-12 09:54:03 +000012513as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12514echo "$as_me:$LINENO: checking for $ac_func" >&5
12515echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12516if eval "test \"\${$as_ac_var+set}\" = set"; then
12517 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012518else
Martin v. Löwis11437992002-04-12 09:54:03 +000012519 cat >conftest.$ac_ext <<_ACEOF
12520#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012521#include "confdefs.h"
12522/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012523 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012524#include <assert.h>
12525/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012526#ifdef __cplusplus
12527extern "C"
12528#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012529/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012530 builtin and then its argument prototype would still apply. */
12531char $ac_func ();
12532char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012533
Martin v. Löwis11437992002-04-12 09:54:03 +000012534#ifdef F77_DUMMY_MAIN
12535# ifdef __cplusplus
12536 extern "C"
12537# endif
12538 int F77_DUMMY_MAIN() { return 1; }
12539#endif
12540int
12541main ()
12542{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012543/* The GNU C library defines this for functions which it implements
12544 to always fail with ENOSYS. Some functions are actually named
12545 something starting with __ and the normal name is an alias. */
12546#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12547choke me
12548#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012549f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012550#endif
12551
Martin v. Löwis11437992002-04-12 09:54:03 +000012552 ;
12553 return 0;
12554}
12555_ACEOF
12556rm -f conftest.$ac_objext conftest$ac_exeext
12557if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12558 (eval $ac_link) 2>&5
12559 ac_status=$?
12560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12561 (exit $ac_status); } &&
12562 { ac_try='test -s conftest$ac_exeext'
12563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12564 (eval $ac_try) 2>&5
12565 ac_status=$?
12566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12567 (exit $ac_status); }; }; then
12568 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012569else
Martin v. Löwis11437992002-04-12 09:54:03 +000012570 echo "$as_me: failed program was:" >&5
12571cat conftest.$ac_ext >&5
12572eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012573fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012574rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012575fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012576echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12577echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12578if test `eval echo '${'$as_ac_var'}'` = yes; then
12579 cat >>confdefs.h <<_ACEOF
12580#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12581_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012582
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012583fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012584done
12585
Michael W. Hudson54241132001-12-07 15:38:26 +000012586
Martin v. Löwis11437992002-04-12 09:54:03 +000012587
12588
12589
12590
12591
Martin v. Löwis1142de32002-03-29 16:28:31 +000012592for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000012593do
Martin v. Löwis11437992002-04-12 09:54:03 +000012594as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12595echo "$as_me:$LINENO: checking for $ac_func" >&5
12596echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12597if eval "test \"\${$as_ac_var+set}\" = set"; then
12598 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012599else
Martin v. Löwis11437992002-04-12 09:54:03 +000012600 cat >conftest.$ac_ext <<_ACEOF
12601#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012602#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012603/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012604 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012605#include <assert.h>
12606/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012607#ifdef __cplusplus
12608extern "C"
12609#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012610/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012611 builtin and then its argument prototype would still apply. */
12612char $ac_func ();
12613char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012614
Martin v. Löwis11437992002-04-12 09:54:03 +000012615#ifdef F77_DUMMY_MAIN
12616# ifdef __cplusplus
12617 extern "C"
12618# endif
12619 int F77_DUMMY_MAIN() { return 1; }
12620#endif
12621int
12622main ()
12623{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012624/* The GNU C library defines this for functions which it implements
12625 to always fail with ENOSYS. Some functions are actually named
12626 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012627#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012628choke me
12629#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012630f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012631#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012632
Martin v. Löwis11437992002-04-12 09:54:03 +000012633 ;
12634 return 0;
12635}
12636_ACEOF
12637rm -f conftest.$ac_objext conftest$ac_exeext
12638if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12639 (eval $ac_link) 2>&5
12640 ac_status=$?
12641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12642 (exit $ac_status); } &&
12643 { ac_try='test -s conftest$ac_exeext'
12644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12645 (eval $ac_try) 2>&5
12646 ac_status=$?
12647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12648 (exit $ac_status); }; }; then
12649 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012650else
Martin v. Löwis11437992002-04-12 09:54:03 +000012651 echo "$as_me: failed program was:" >&5
12652cat conftest.$ac_ext >&5
12653eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012654fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012655rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000012656fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012657echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12658echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12659if test `eval echo '${'$as_ac_var'}'` = yes; then
12660 cat >>confdefs.h <<_ACEOF
12661#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12662_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000012663
Martin v. Löwis1142de32002-03-29 16:28:31 +000012664else
Martin v. Löwis11437992002-04-12 09:54:03 +000012665 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012666fi
12667done
12668
12669
Martin v. Löwis11437992002-04-12 09:54:03 +000012670
Martin v. Löwis1142de32002-03-29 16:28:31 +000012671for ac_func in getpgrp
12672do
Martin v. Löwis11437992002-04-12 09:54:03 +000012673as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12674echo "$as_me:$LINENO: checking for $ac_func" >&5
12675echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12676if eval "test \"\${$as_ac_var+set}\" = set"; then
12677 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000012678else
Martin v. Löwis11437992002-04-12 09:54:03 +000012679 cat >conftest.$ac_ext <<_ACEOF
12680#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012681#include "confdefs.h"
12682/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012683 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000012684#include <assert.h>
12685/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012686#ifdef __cplusplus
12687extern "C"
12688#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012689/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012690 builtin and then its argument prototype would still apply. */
12691char $ac_func ();
12692char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012693
Martin v. Löwis11437992002-04-12 09:54:03 +000012694#ifdef F77_DUMMY_MAIN
12695# ifdef __cplusplus
12696 extern "C"
12697# endif
12698 int F77_DUMMY_MAIN() { return 1; }
12699#endif
12700int
12701main ()
12702{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012703/* The GNU C library defines this for functions which it implements
12704 to always fail with ENOSYS. Some functions are actually named
12705 something starting with __ and the normal name is an alias. */
12706#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12707choke me
12708#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012709f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012710#endif
12711
Martin v. Löwis11437992002-04-12 09:54:03 +000012712 ;
12713 return 0;
12714}
12715_ACEOF
12716rm -f conftest.$ac_objext conftest$ac_exeext
12717if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12718 (eval $ac_link) 2>&5
12719 ac_status=$?
12720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12721 (exit $ac_status); } &&
12722 { ac_try='test -s conftest$ac_exeext'
12723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12724 (eval $ac_try) 2>&5
12725 ac_status=$?
12726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12727 (exit $ac_status); }; }; then
12728 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012729else
Martin v. Löwis11437992002-04-12 09:54:03 +000012730 echo "$as_me: failed program was:" >&5
12731cat conftest.$ac_ext >&5
12732eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012733fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012734rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012735fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012736echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12737echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12738if test `eval echo '${'$as_ac_var'}'` = yes; then
12739 cat >>confdefs.h <<_ACEOF
12740#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12741_ACEOF
12742 cat >conftest.$ac_ext <<_ACEOF
12743#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012744#include "confdefs.h"
12745#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012746#ifdef F77_DUMMY_MAIN
12747# ifdef __cplusplus
12748 extern "C"
12749# endif
12750 int F77_DUMMY_MAIN() { return 1; }
12751#endif
12752int
12753main ()
12754{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012755getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012756 ;
12757 return 0;
12758}
12759_ACEOF
12760rm -f conftest.$ac_objext
12761if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12762 (eval $ac_compile) 2>&5
12763 ac_status=$?
12764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12765 (exit $ac_status); } &&
12766 { ac_try='test -s conftest.$ac_objext'
12767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12768 (eval $ac_try) 2>&5
12769 ac_status=$?
12770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12771 (exit $ac_status); }; }; then
12772
12773cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012774#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012775_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012776
Martin v. Löwis11437992002-04-12 09:54:03 +000012777
Guido van Rossumf78abae1997-01-21 22:02:36 +000012778else
Martin v. Löwis11437992002-04-12 09:54:03 +000012779 echo "$as_me: failed program was:" >&5
12780cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012781fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012782rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012783
Guido van Rossum627b2d71993-12-24 10:39:16 +000012784fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012785done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012786
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012787echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12788echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12789if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012790 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012791else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012792 if test "$cross_compiling" = yes; then
12793 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12794echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12795 { (exit 1); exit 1; }; }
12796else
Martin v. Löwis11437992002-04-12 09:54:03 +000012797 cat >conftest.$ac_ext <<_ACEOF
12798#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012799#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012800#if HAVE_UNISTD_H
12801# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012802#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012803
Martin v. Löwis11437992002-04-12 09:54:03 +000012804#ifdef F77_DUMMY_MAIN
12805# ifdef __cplusplus
12806 extern "C"
12807# endif
12808 int F77_DUMMY_MAIN() { return 1; }
12809#endif
12810int
12811main ()
12812{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012813/* If this system has a BSD-style setpgrp which takes arguments,
12814 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12815 exit successfully. */
12816 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012817 ;
12818 return 0;
12819}
12820_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012821rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012822if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12823 (eval $ac_link) 2>&5
12824 ac_status=$?
12825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012826 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12828 (eval $ac_try) 2>&5
12829 ac_status=$?
12830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12831 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012832 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012833else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012834 echo "$as_me: program exited with status $ac_status" >&5
12835echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012836cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012837( exit $ac_status )
12838ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012839fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012840rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012841fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012842fi
12843echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12844echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12845if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012846
12847cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012848#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012849_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012850
12851fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012852
Martin v. Löwis11437992002-04-12 09:54:03 +000012853
Thomas Wouters3a584202000-08-05 23:28:51 +000012854for ac_func in gettimeofday
12855do
Martin v. Löwis11437992002-04-12 09:54:03 +000012856as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12857echo "$as_me:$LINENO: checking for $ac_func" >&5
12858echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12859if eval "test \"\${$as_ac_var+set}\" = set"; then
12860 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012861else
Martin v. Löwis11437992002-04-12 09:54:03 +000012862 cat >conftest.$ac_ext <<_ACEOF
12863#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012864#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012865/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012866 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012867#include <assert.h>
12868/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012869#ifdef __cplusplus
12870extern "C"
12871#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012872/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012873 builtin and then its argument prototype would still apply. */
12874char $ac_func ();
12875char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012876
Martin v. Löwis11437992002-04-12 09:54:03 +000012877#ifdef F77_DUMMY_MAIN
12878# ifdef __cplusplus
12879 extern "C"
12880# endif
12881 int F77_DUMMY_MAIN() { return 1; }
12882#endif
12883int
12884main ()
12885{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012886/* The GNU C library defines this for functions which it implements
12887 to always fail with ENOSYS. Some functions are actually named
12888 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012889#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012890choke me
12891#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012892f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012893#endif
12894
Martin v. Löwis11437992002-04-12 09:54:03 +000012895 ;
12896 return 0;
12897}
12898_ACEOF
12899rm -f conftest.$ac_objext conftest$ac_exeext
12900if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12901 (eval $ac_link) 2>&5
12902 ac_status=$?
12903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12904 (exit $ac_status); } &&
12905 { ac_try='test -s conftest$ac_exeext'
12906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12907 (eval $ac_try) 2>&5
12908 ac_status=$?
12909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12910 (exit $ac_status); }; }; then
12911 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012912else
Martin v. Löwis11437992002-04-12 09:54:03 +000012913 echo "$as_me: failed program was:" >&5
12914cat conftest.$ac_ext >&5
12915eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012916fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012917rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012918fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012919echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12920echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12921if test `eval echo '${'$as_ac_var'}'` = yes; then
12922 cat >>confdefs.h <<_ACEOF
12923#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12924_ACEOF
12925 cat >conftest.$ac_ext <<_ACEOF
12926#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012927#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012928#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012929#ifdef F77_DUMMY_MAIN
12930# ifdef __cplusplus
12931 extern "C"
12932# endif
12933 int F77_DUMMY_MAIN() { return 1; }
12934#endif
12935int
12936main ()
12937{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012938gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012939 ;
12940 return 0;
12941}
12942_ACEOF
12943rm -f conftest.$ac_objext
12944if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12945 (eval $ac_compile) 2>&5
12946 ac_status=$?
12947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12948 (exit $ac_status); } &&
12949 { ac_try='test -s conftest.$ac_objext'
12950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12951 (eval $ac_try) 2>&5
12952 ac_status=$?
12953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12954 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012955 :
12956else
Martin v. Löwis11437992002-04-12 09:54:03 +000012957 echo "$as_me: failed program was:" >&5
12958cat conftest.$ac_ext >&5
12959
12960cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012961#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012962_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012963
Martin v. Löwis11437992002-04-12 09:54:03 +000012964
Guido van Rossum627b2d71993-12-24 10:39:16 +000012965fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012966rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012967
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012968fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012969done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012970
Michael W. Hudson54241132001-12-07 15:38:26 +000012971
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012972echo "$as_me:$LINENO: checking for major" >&5
12973echo $ECHO_N "checking for major... $ECHO_C" >&6
12974cat >conftest.$ac_ext <<_ACEOF
12975#line $LINENO "configure"
12976#include "confdefs.h"
12977
12978 #if defined(MAJOR_IN_MKDEV)
12979 #include <sys/mkdev.h>
12980 #elif defined(MAJOR_IN_SYSMACROS)
12981 #include <sys/sysmacros.h>
12982 #else
12983 #include <sys/types.h>
12984 #endif
12985
12986#ifdef F77_DUMMY_MAIN
12987# ifdef __cplusplus
12988 extern "C"
12989# endif
12990 int F77_DUMMY_MAIN() { return 1; }
12991#endif
12992int
12993main ()
12994{
12995
12996 makedev(major(0),minor(0));
12997
12998 ;
12999 return 0;
13000}
13001_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013002rm -f conftest.$ac_objext conftest$ac_exeext
13003if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13004 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013005 ac_status=$?
13006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13007 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013008 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13010 (eval $ac_try) 2>&5
13011 ac_status=$?
13012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13013 (exit $ac_status); }; }; then
13014
13015
13016cat >>confdefs.h <<\_ACEOF
13017#define HAVE_DEVICE_MACROS 1
13018_ACEOF
13019
13020 echo "$as_me:$LINENO: result: yes" >&5
13021echo "${ECHO_T}yes" >&6
13022
13023else
13024 echo "$as_me: failed program was:" >&5
13025cat conftest.$ac_ext >&5
13026
13027 echo "$as_me:$LINENO: result: no" >&5
13028echo "${ECHO_T}no" >&6
13029
13030fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013031rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013032
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013033# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013034# for [no]getaddrinfo in netdb.h.
13035echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13036echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13037cat >conftest.$ac_ext <<_ACEOF
13038#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013039#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013040
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013041#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013042#include <sys/socket.h>
13043#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013044#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013045
Martin v. Löwis11437992002-04-12 09:54:03 +000013046#ifdef F77_DUMMY_MAIN
13047# ifdef __cplusplus
13048 extern "C"
13049# endif
13050 int F77_DUMMY_MAIN() { return 1; }
13051#endif
13052int
13053main ()
13054{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013055
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013056getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013057
Martin v. Löwis11437992002-04-12 09:54:03 +000013058 ;
13059 return 0;
13060}
13061_ACEOF
13062rm -f conftest.$ac_objext conftest$ac_exeext
13063if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13064 (eval $ac_link) 2>&5
13065 ac_status=$?
13066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13067 (exit $ac_status); } &&
13068 { ac_try='test -s conftest$ac_exeext'
13069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13070 (eval $ac_try) 2>&5
13071 ac_status=$?
13072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13073 (exit $ac_status); }; }; then
13074
13075echo "$as_me:$LINENO: result: yes" >&5
13076echo "${ECHO_T}yes" >&6
13077echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13078echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013079if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013080 echo "$as_me:$LINENO: result: buggy" >&5
13081echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013082buggygetaddrinfo=yes
13083else
Martin v. Löwis11437992002-04-12 09:54:03 +000013084 cat >conftest.$ac_ext <<_ACEOF
13085#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013086#include "confdefs.h"
13087
13088#include <sys/types.h>
13089#include <netdb.h>
13090#include <string.h>
13091#include <sys/socket.h>
13092#include <netinet/in.h>
13093
13094main()
13095{
13096 int passive, gaierr, inet4 = 0, inet6 = 0;
13097 struct addrinfo hints, *ai, *aitop;
13098 char straddr[INET6_ADDRSTRLEN], strport[16];
13099
13100 for (passive = 0; passive <= 1; passive++) {
13101 memset(&hints, 0, sizeof(hints));
13102 hints.ai_family = AF_UNSPEC;
13103 hints.ai_flags = passive ? AI_PASSIVE : 0;
13104 hints.ai_socktype = SOCK_STREAM;
13105 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13106 (void)gai_strerror(gaierr);
13107 goto bad;
13108 }
13109 for (ai = aitop; ai; ai = ai->ai_next) {
13110 if (ai->ai_addr == NULL ||
13111 ai->ai_addrlen == 0 ||
13112 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13113 straddr, sizeof(straddr), strport, sizeof(strport),
13114 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13115 goto bad;
13116 }
13117 switch (ai->ai_family) {
13118 case AF_INET:
13119 if (strcmp(strport, "54321") != 0) {
13120 goto bad;
13121 }
13122 if (passive) {
13123 if (strcmp(straddr, "0.0.0.0") != 0) {
13124 goto bad;
13125 }
13126 } else {
13127 if (strcmp(straddr, "127.0.0.1") != 0) {
13128 goto bad;
13129 }
13130 }
13131 inet4++;
13132 break;
13133 case AF_INET6:
13134 if (strcmp(strport, "54321") != 0) {
13135 goto bad;
13136 }
13137 if (passive) {
13138 if (strcmp(straddr, "::") != 0) {
13139 goto bad;
13140 }
13141 } else {
13142 if (strcmp(straddr, "::1") != 0) {
13143 goto bad;
13144 }
13145 }
13146 inet6++;
13147 break;
13148 case AF_UNSPEC:
13149 goto bad;
13150 break;
13151 default:
13152 /* another family support? */
13153 break;
13154 }
13155 }
13156 }
13157
13158 if (!(inet4 == 0 || inet4 == 2))
13159 goto bad;
13160 if (!(inet6 == 0 || inet6 == 2))
13161 goto bad;
13162
13163 if (aitop)
13164 freeaddrinfo(aitop);
13165 exit(0);
13166
13167 bad:
13168 if (aitop)
13169 freeaddrinfo(aitop);
13170 exit(1);
13171}
13172
Martin v. Löwis11437992002-04-12 09:54:03 +000013173_ACEOF
13174rm -f conftest$ac_exeext
13175if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13176 (eval $ac_link) 2>&5
13177 ac_status=$?
13178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13179 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13181 (eval $ac_try) 2>&5
13182 ac_status=$?
13183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13184 (exit $ac_status); }; }; then
13185 echo "$as_me:$LINENO: result: good" >&5
13186echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013187buggygetaddrinfo=no
13188else
Martin v. Löwis11437992002-04-12 09:54:03 +000013189 echo "$as_me: program exited with status $ac_status" >&5
13190echo "$as_me: failed program was:" >&5
13191cat conftest.$ac_ext >&5
13192( exit $ac_status )
13193echo "$as_me:$LINENO: result: buggy" >&5
13194echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013195buggygetaddrinfo=yes
13196fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013197rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013198fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013199else
Martin v. Löwis11437992002-04-12 09:54:03 +000013200 echo "$as_me: failed program was:" >&5
13201cat conftest.$ac_ext >&5
13202
13203echo "$as_me:$LINENO: result: no" >&5
13204echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013205buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013206
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013207fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013208rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013209
13210if test "$buggygetaddrinfo" = "yes"; then
13211 if test "$ipv6" = "yes"; then
13212 echo 'Fatal: You must get working getaddrinfo() function.'
13213 echo ' or you can specify "--disable-ipv6"'.
13214 exit 1
13215 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013216else
Martin v. Löwis11437992002-04-12 09:54:03 +000013217
13218cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013219#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013220_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013221
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013222fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013223
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013224for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013225do
Martin v. Löwis11437992002-04-12 09:54:03 +000013226as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13227echo "$as_me:$LINENO: checking for $ac_func" >&5
13228echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13229if eval "test \"\${$as_ac_var+set}\" = set"; then
13230 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013231else
Martin v. Löwis11437992002-04-12 09:54:03 +000013232 cat >conftest.$ac_ext <<_ACEOF
13233#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013234#include "confdefs.h"
13235/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013236 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013237#include <assert.h>
13238/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013239#ifdef __cplusplus
13240extern "C"
13241#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013242/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013243 builtin and then its argument prototype would still apply. */
13244char $ac_func ();
13245char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013246
Martin v. Löwis11437992002-04-12 09:54:03 +000013247#ifdef F77_DUMMY_MAIN
13248# ifdef __cplusplus
13249 extern "C"
13250# endif
13251 int F77_DUMMY_MAIN() { return 1; }
13252#endif
13253int
13254main ()
13255{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013256/* The GNU C library defines this for functions which it implements
13257 to always fail with ENOSYS. Some functions are actually named
13258 something starting with __ and the normal name is an alias. */
13259#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13260choke me
13261#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013262f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013263#endif
13264
Martin v. Löwis11437992002-04-12 09:54:03 +000013265 ;
13266 return 0;
13267}
13268_ACEOF
13269rm -f conftest.$ac_objext conftest$ac_exeext
13270if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13271 (eval $ac_link) 2>&5
13272 ac_status=$?
13273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13274 (exit $ac_status); } &&
13275 { ac_try='test -s conftest$ac_exeext'
13276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13277 (eval $ac_try) 2>&5
13278 ac_status=$?
13279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13280 (exit $ac_status); }; }; then
13281 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013282else
Martin v. Löwis11437992002-04-12 09:54:03 +000013283 echo "$as_me: failed program was:" >&5
13284cat conftest.$ac_ext >&5
13285eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013286fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013287rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013288fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013289echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13290echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13291if test `eval echo '${'$as_ac_var'}'` = yes; then
13292 cat >>confdefs.h <<_ACEOF
13293#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13294_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013295
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013296fi
13297done
13298
Michael W. Hudson54241132001-12-07 15:38:26 +000013299
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013300# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000013301echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13302echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13303if test "${ac_cv_header_time+set}" = set; then
13304 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013305else
Martin v. Löwis11437992002-04-12 09:54:03 +000013306 cat >conftest.$ac_ext <<_ACEOF
13307#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013308#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013309#include <sys/types.h>
13310#include <sys/time.h>
13311#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013312
13313#ifdef F77_DUMMY_MAIN
13314# ifdef __cplusplus
13315 extern "C"
13316# endif
13317 int F77_DUMMY_MAIN() { return 1; }
13318#endif
13319int
13320main ()
13321{
13322if ((struct tm *) 0)
13323return 0;
13324 ;
13325 return 0;
13326}
13327_ACEOF
13328rm -f conftest.$ac_objext
13329if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13330 (eval $ac_compile) 2>&5
13331 ac_status=$?
13332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13333 (exit $ac_status); } &&
13334 { ac_try='test -s conftest.$ac_objext'
13335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13336 (eval $ac_try) 2>&5
13337 ac_status=$?
13338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13339 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013340 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013341else
Martin v. Löwis11437992002-04-12 09:54:03 +000013342 echo "$as_me: failed program was:" >&5
13343cat conftest.$ac_ext >&5
13344ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013345fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013346rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013347fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013348echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
13349echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013350if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013351
13352cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013353#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013354_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013355
13356fi
13357
Martin v. Löwis11437992002-04-12 09:54:03 +000013358echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
13359echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
13360if test "${ac_cv_struct_tm+set}" = set; then
13361 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013362else
Martin v. Löwis11437992002-04-12 09:54:03 +000013363 cat >conftest.$ac_ext <<_ACEOF
13364#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013365#include "confdefs.h"
13366#include <sys/types.h>
13367#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013368
13369#ifdef F77_DUMMY_MAIN
13370# ifdef __cplusplus
13371 extern "C"
13372# endif
13373 int F77_DUMMY_MAIN() { return 1; }
13374#endif
13375int
13376main ()
13377{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013378struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000013379 ;
13380 return 0;
13381}
13382_ACEOF
13383rm -f conftest.$ac_objext
13384if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13385 (eval $ac_compile) 2>&5
13386 ac_status=$?
13387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13388 (exit $ac_status); } &&
13389 { ac_try='test -s conftest.$ac_objext'
13390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13391 (eval $ac_try) 2>&5
13392 ac_status=$?
13393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13394 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013395 ac_cv_struct_tm=time.h
13396else
Martin v. Löwis11437992002-04-12 09:54:03 +000013397 echo "$as_me: failed program was:" >&5
13398cat conftest.$ac_ext >&5
13399ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013400fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013401rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013402fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013403echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
13404echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013405if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013406
13407cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013408#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013409_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013410
13411fi
13412
Martin v. Löwis11437992002-04-12 09:54:03 +000013413echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13414echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
13415if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13416 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013417else
Martin v. Löwis11437992002-04-12 09:54:03 +000013418 cat >conftest.$ac_ext <<_ACEOF
13419#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013420#include "confdefs.h"
13421#include <sys/types.h>
13422#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013423
13424
13425#ifdef F77_DUMMY_MAIN
13426# ifdef __cplusplus
13427 extern "C"
13428# endif
13429 int F77_DUMMY_MAIN() { return 1; }
13430#endif
13431int
13432main ()
13433{
13434static struct tm ac_aggr;
13435if (ac_aggr.tm_zone)
13436return 0;
13437 ;
13438 return 0;
13439}
13440_ACEOF
13441rm -f conftest.$ac_objext
13442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13443 (eval $ac_compile) 2>&5
13444 ac_status=$?
13445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13446 (exit $ac_status); } &&
13447 { ac_try='test -s conftest.$ac_objext'
13448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13449 (eval $ac_try) 2>&5
13450 ac_status=$?
13451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13452 (exit $ac_status); }; }; then
13453 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013454else
Martin v. Löwis11437992002-04-12 09:54:03 +000013455 echo "$as_me: failed program was:" >&5
13456cat conftest.$ac_ext >&5
13457ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013458fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013459rm -f conftest.$ac_objext conftest.$ac_ext
13460fi
13461echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13462echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
13463if test $ac_cv_member_struct_tm_tm_zone = yes; then
13464
13465cat >>confdefs.h <<_ACEOF
13466#define HAVE_STRUCT_TM_TM_ZONE 1
13467_ACEOF
13468
13469
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013470fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013471
Martin v. Löwis11437992002-04-12 09:54:03 +000013472if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13473
13474cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013475#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013476_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013477
13478else
Martin v. Löwis11437992002-04-12 09:54:03 +000013479 echo "$as_me:$LINENO: checking for tzname" >&5
13480echo $ECHO_N "checking for tzname... $ECHO_C" >&6
13481if test "${ac_cv_var_tzname+set}" = set; then
13482 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013483else
Martin v. Löwis11437992002-04-12 09:54:03 +000013484 cat >conftest.$ac_ext <<_ACEOF
13485#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013486#include "confdefs.h"
13487#include <time.h>
13488#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013489extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013490#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013491
13492#ifdef F77_DUMMY_MAIN
13493# ifdef __cplusplus
13494 extern "C"
13495# endif
13496 int F77_DUMMY_MAIN() { return 1; }
13497#endif
13498int
13499main ()
13500{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013501atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000013502 ;
13503 return 0;
13504}
13505_ACEOF
13506rm -f conftest.$ac_objext conftest$ac_exeext
13507if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13508 (eval $ac_link) 2>&5
13509 ac_status=$?
13510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13511 (exit $ac_status); } &&
13512 { ac_try='test -s conftest$ac_exeext'
13513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13514 (eval $ac_try) 2>&5
13515 ac_status=$?
13516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13517 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013518 ac_cv_var_tzname=yes
13519else
Martin v. Löwis11437992002-04-12 09:54:03 +000013520 echo "$as_me: failed program was:" >&5
13521cat conftest.$ac_ext >&5
13522ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013523fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013524rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013525fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013526echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13527echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013528 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013529
13530cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013531#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013532_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013533
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013534 fi
13535fi
13536
Martin v. Löwis11437992002-04-12 09:54:03 +000013537echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
13538echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
13539if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
13540 echo $ECHO_N "(cached) $ECHO_C" >&6
13541else
13542 cat >conftest.$ac_ext <<_ACEOF
13543#line $LINENO "configure"
13544#include "confdefs.h"
13545$ac_includes_default
13546#ifdef F77_DUMMY_MAIN
13547# ifdef __cplusplus
13548 extern "C"
13549# endif
13550 int F77_DUMMY_MAIN() { return 1; }
13551#endif
13552int
13553main ()
13554{
13555static struct stat ac_aggr;
13556if (ac_aggr.st_rdev)
13557return 0;
13558 ;
13559 return 0;
13560}
13561_ACEOF
13562rm -f conftest.$ac_objext
13563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13564 (eval $ac_compile) 2>&5
13565 ac_status=$?
13566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13567 (exit $ac_status); } &&
13568 { ac_try='test -s conftest.$ac_objext'
13569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13570 (eval $ac_try) 2>&5
13571 ac_status=$?
13572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13573 (exit $ac_status); }; }; then
13574 ac_cv_member_struct_stat_st_rdev=yes
13575else
13576 echo "$as_me: failed program was:" >&5
13577cat conftest.$ac_ext >&5
13578ac_cv_member_struct_stat_st_rdev=no
13579fi
13580rm -f conftest.$ac_objext conftest.$ac_ext
13581fi
13582echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
13583echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
13584if test $ac_cv_member_struct_stat_st_rdev = yes; then
13585
13586cat >>confdefs.h <<_ACEOF
13587#define HAVE_STRUCT_STAT_ST_RDEV 1
13588_ACEOF
13589
13590
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013591fi
13592
Martin v. Löwis11437992002-04-12 09:54:03 +000013593echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13594echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13595if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13596 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013597else
Martin v. Löwis11437992002-04-12 09:54:03 +000013598 cat >conftest.$ac_ext <<_ACEOF
13599#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013600#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013601$ac_includes_default
13602#ifdef F77_DUMMY_MAIN
13603# ifdef __cplusplus
13604 extern "C"
13605# endif
13606 int F77_DUMMY_MAIN() { return 1; }
13607#endif
13608int
13609main ()
13610{
13611static struct stat ac_aggr;
13612if (ac_aggr.st_blksize)
13613return 0;
13614 ;
13615 return 0;
13616}
13617_ACEOF
13618rm -f conftest.$ac_objext
13619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13620 (eval $ac_compile) 2>&5
13621 ac_status=$?
13622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13623 (exit $ac_status); } &&
13624 { ac_try='test -s conftest.$ac_objext'
13625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13626 (eval $ac_try) 2>&5
13627 ac_status=$?
13628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13629 (exit $ac_status); }; }; then
13630 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013631else
Martin v. Löwis11437992002-04-12 09:54:03 +000013632 echo "$as_me: failed program was:" >&5
13633cat conftest.$ac_ext >&5
13634ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013635fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013636rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013637fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013638echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13639echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13640if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013641
Martin v. Löwis11437992002-04-12 09:54:03 +000013642cat >>confdefs.h <<_ACEOF
13643#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13644_ACEOF
13645
13646
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013647fi
13648
Martin v. Löwis11437992002-04-12 09:54:03 +000013649echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13650echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13651if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13652 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013653else
Martin v. Löwis11437992002-04-12 09:54:03 +000013654 cat >conftest.$ac_ext <<_ACEOF
13655#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013656#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013657$ac_includes_default
13658#ifdef F77_DUMMY_MAIN
13659# ifdef __cplusplus
13660 extern "C"
13661# endif
13662 int F77_DUMMY_MAIN() { return 1; }
13663#endif
13664int
13665main ()
13666{
13667static struct stat ac_aggr;
13668if (ac_aggr.st_blocks)
13669return 0;
13670 ;
13671 return 0;
13672}
13673_ACEOF
13674rm -f conftest.$ac_objext
13675if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13676 (eval $ac_compile) 2>&5
13677 ac_status=$?
13678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13679 (exit $ac_status); } &&
13680 { ac_try='test -s conftest.$ac_objext'
13681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13682 (eval $ac_try) 2>&5
13683 ac_status=$?
13684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13685 (exit $ac_status); }; }; then
13686 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013687else
Martin v. Löwis11437992002-04-12 09:54:03 +000013688 echo "$as_me: failed program was:" >&5
13689cat conftest.$ac_ext >&5
13690ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013691fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013692rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013693fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013694echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13695echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13696if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013697
Martin v. Löwis11437992002-04-12 09:54:03 +000013698cat >>confdefs.h <<_ACEOF
13699#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13700_ACEOF
13701
13702
13703cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013704#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013705_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013706
13707else
Martin v. Löwis11437992002-04-12 09:54:03 +000013708 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013709fi
13710
Michael W. Hudson54241132001-12-07 15:38:26 +000013711
Martin v. Löwis11437992002-04-12 09:54:03 +000013712
13713echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13714echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13715if test "${ac_cv_header_time_altzone+set}" = set; then
13716 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013717else
Martin v. Löwis11437992002-04-12 09:54:03 +000013718 cat >conftest.$ac_ext <<_ACEOF
13719#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013720#include "confdefs.h"
13721#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013722#ifdef F77_DUMMY_MAIN
13723# ifdef __cplusplus
13724 extern "C"
13725# endif
13726 int F77_DUMMY_MAIN() { return 1; }
13727#endif
13728int
13729main ()
13730{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013731return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013732 ;
13733 return 0;
13734}
13735_ACEOF
13736rm -f conftest.$ac_objext
13737if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13738 (eval $ac_compile) 2>&5
13739 ac_status=$?
13740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13741 (exit $ac_status); } &&
13742 { ac_try='test -s conftest.$ac_objext'
13743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13744 (eval $ac_try) 2>&5
13745 ac_status=$?
13746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13747 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013748 ac_cv_header_time_altzone=yes
13749else
Martin v. Löwis11437992002-04-12 09:54:03 +000013750 echo "$as_me: failed program was:" >&5
13751cat conftest.$ac_ext >&5
13752ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013753fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013754rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013755fi
13756
Martin v. Löwis11437992002-04-12 09:54:03 +000013757echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13758echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013759if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013760
13761cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013762#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013763_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013764
13765fi
13766
Guido van Rossumda88dad1995-01-26 00:46:29 +000013767was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013768echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13769echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13770cat >conftest.$ac_ext <<_ACEOF
13771#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013772#include "confdefs.h"
13773
13774#include <sys/types.h>
13775#include <sys/select.h>
13776#include <sys/time.h>
13777
Martin v. Löwis11437992002-04-12 09:54:03 +000013778#ifdef F77_DUMMY_MAIN
13779# ifdef __cplusplus
13780 extern "C"
13781# endif
13782 int F77_DUMMY_MAIN() { return 1; }
13783#endif
13784int
13785main ()
13786{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013787;
Martin v. Löwis11437992002-04-12 09:54:03 +000013788 ;
13789 return 0;
13790}
13791_ACEOF
13792rm -f conftest.$ac_objext
13793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13794 (eval $ac_compile) 2>&5
13795 ac_status=$?
13796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13797 (exit $ac_status); } &&
13798 { ac_try='test -s conftest.$ac_objext'
13799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13800 (eval $ac_try) 2>&5
13801 ac_status=$?
13802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13803 (exit $ac_status); }; }; then
13804
13805
13806cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013807#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013808_ACEOF
13809
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013810 was_it_defined=yes
13811
Guido van Rossumf78abae1997-01-21 22:02:36 +000013812else
Martin v. Löwis11437992002-04-12 09:54:03 +000013813 echo "$as_me: failed program was:" >&5
13814cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013815fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013816rm -f conftest.$ac_objext conftest.$ac_ext
13817echo "$as_me:$LINENO: result: $was_it_defined" >&5
13818echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013819
Martin v. Löwis11437992002-04-12 09:54:03 +000013820echo "$as_me:$LINENO: checking for addrinfo" >&5
13821echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13822if test "${ac_cv_struct_addrinfo+set}" = set; then
13823 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013824else
Martin v. Löwis11437992002-04-12 09:54:03 +000013825 cat >conftest.$ac_ext <<_ACEOF
13826#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013827#include "confdefs.h"
13828
13829# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013830#ifdef F77_DUMMY_MAIN
13831# ifdef __cplusplus
13832 extern "C"
13833# endif
13834 int F77_DUMMY_MAIN() { return 1; }
13835#endif
13836int
13837main ()
13838{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013839struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013840 ;
13841 return 0;
13842}
13843_ACEOF
13844rm -f conftest.$ac_objext
13845if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13846 (eval $ac_compile) 2>&5
13847 ac_status=$?
13848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13849 (exit $ac_status); } &&
13850 { ac_try='test -s conftest.$ac_objext'
13851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13852 (eval $ac_try) 2>&5
13853 ac_status=$?
13854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13855 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013856 ac_cv_struct_addrinfo=yes
13857else
Martin v. Löwis11437992002-04-12 09:54:03 +000013858 echo "$as_me: failed program was:" >&5
13859cat conftest.$ac_ext >&5
13860ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013861fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013862rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013863fi
13864
Martin v. Löwis11437992002-04-12 09:54:03 +000013865echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13866echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013867if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013868
13869cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013870#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013871_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013872
13873fi
13874
Martin v. Löwis11437992002-04-12 09:54:03 +000013875echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13876echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13877if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13878 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013879else
Martin v. Löwis11437992002-04-12 09:54:03 +000013880 cat >conftest.$ac_ext <<_ACEOF
13881#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013882#include "confdefs.h"
13883
13884# include <sys/types.h>
13885# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013886#ifdef F77_DUMMY_MAIN
13887# ifdef __cplusplus
13888 extern "C"
13889# endif
13890 int F77_DUMMY_MAIN() { return 1; }
13891#endif
13892int
13893main ()
13894{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013895struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013896 ;
13897 return 0;
13898}
13899_ACEOF
13900rm -f conftest.$ac_objext
13901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13902 (eval $ac_compile) 2>&5
13903 ac_status=$?
13904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13905 (exit $ac_status); } &&
13906 { ac_try='test -s conftest.$ac_objext'
13907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13908 (eval $ac_try) 2>&5
13909 ac_status=$?
13910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13911 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013912 ac_cv_struct_sockaddr_storage=yes
13913else
Martin v. Löwis11437992002-04-12 09:54:03 +000013914 echo "$as_me: failed program was:" >&5
13915cat conftest.$ac_ext >&5
13916ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013917fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013918rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013919fi
13920
Martin v. Löwis11437992002-04-12 09:54:03 +000013921echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13922echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013923if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013924
13925cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013926#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013927_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013928
13929fi
13930
Guido van Rossum627b2d71993-12-24 10:39:16 +000013931# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013932
Michael W. Hudson54241132001-12-07 15:38:26 +000013933
Martin v. Löwis11437992002-04-12 09:54:03 +000013934echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13935echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13936if test "${ac_cv_c_char_unsigned+set}" = set; then
13937 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013938else
Martin v. Löwis11437992002-04-12 09:54:03 +000013939 cat >conftest.$ac_ext <<_ACEOF
13940#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013941#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013942$ac_includes_default
13943#ifdef F77_DUMMY_MAIN
13944# ifdef __cplusplus
13945 extern "C"
13946# endif
13947 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013949int
13950main ()
13951{
13952static int test_array [1 - 2 * !(((char) -1) < 0)];
13953test_array [0] = 0
13954
13955 ;
13956 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013957}
Martin v. Löwis11437992002-04-12 09:54:03 +000013958_ACEOF
13959rm -f conftest.$ac_objext
13960if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13961 (eval $ac_compile) 2>&5
13962 ac_status=$?
13963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13964 (exit $ac_status); } &&
13965 { ac_try='test -s conftest.$ac_objext'
13966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13967 (eval $ac_try) 2>&5
13968 ac_status=$?
13969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13970 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013971 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013972else
13973 echo "$as_me: failed program was:" >&5
13974cat conftest.$ac_ext >&5
13975ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013976fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013977rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013978fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013979echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13980echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013981if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013982 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013983#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013984_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013985
13986fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013987
Martin v. Löwis11437992002-04-12 09:54:03 +000013988echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13989echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13990if test "${ac_cv_prog_cc_stdc+set}" = set; then
13991 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013992else
Martin v. Löwis11437992002-04-12 09:54:03 +000013993 ac_cv_prog_cc_stdc=no
13994ac_save_CC=$CC
13995cat >conftest.$ac_ext <<_ACEOF
13996#line $LINENO "configure"
13997#include "confdefs.h"
13998#include <stdarg.h>
13999#include <stdio.h>
14000#include <sys/types.h>
14001#include <sys/stat.h>
14002/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14003struct buf { int x; };
14004FILE * (*rcsopen) (struct buf *, struct stat *, int);
14005static char *e (p, i)
14006 char **p;
14007 int i;
14008{
14009 return p[i];
14010}
14011static char *f (char * (*g) (char **, int), char **p, ...)
14012{
14013 char *s;
14014 va_list v;
14015 va_start (v,p);
14016 s = g (p, va_arg (v,int));
14017 va_end (v);
14018 return s;
14019}
14020int test (int i, double x);
14021struct s1 {int (*f) (int a);};
14022struct s2 {int (*f) (double a);};
14023int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14024int argc;
14025char **argv;
14026#ifdef F77_DUMMY_MAIN
14027# ifdef __cplusplus
14028 extern "C"
14029# endif
14030 int F77_DUMMY_MAIN() { return 1; }
14031#endif
14032int
14033main ()
14034{
14035return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14036 ;
14037 return 0;
14038}
14039_ACEOF
14040# Don't try gcc -ansi; that turns off useful extensions and
14041# breaks some systems' header files.
14042# AIX -qlanglvl=ansi
14043# Ultrix and OSF/1 -std1
14044# HP-UX 10.20 and later -Ae
14045# HP-UX older versions -Aa -D_HPUX_SOURCE
14046# SVR4 -Xc -D__EXTENSIONS__
14047for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14048do
14049 CC="$ac_save_CC $ac_arg"
14050 rm -f conftest.$ac_objext
14051if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14052 (eval $ac_compile) 2>&5
14053 ac_status=$?
14054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14055 (exit $ac_status); } &&
14056 { ac_try='test -s conftest.$ac_objext'
14057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14058 (eval $ac_try) 2>&5
14059 ac_status=$?
14060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14061 (exit $ac_status); }; }; then
14062 ac_cv_prog_cc_stdc=$ac_arg
14063break
14064else
14065 echo "$as_me: failed program was:" >&5
14066cat conftest.$ac_ext >&5
14067fi
14068rm -f conftest.$ac_objext
14069done
14070rm -f conftest.$ac_ext conftest.$ac_objext
14071CC=$ac_save_CC
14072
14073fi
14074
14075case "x$ac_cv_prog_cc_stdc" in
14076 x|xno)
14077 echo "$as_me:$LINENO: result: none needed" >&5
14078echo "${ECHO_T}none needed" >&6 ;;
14079 *)
14080 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14081echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14082 CC="$CC $ac_cv_prog_cc_stdc" ;;
14083esac
14084
14085echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14086echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14087if test "${ac_cv_c_const+set}" = set; then
14088 echo $ECHO_N "(cached) $ECHO_C" >&6
14089else
14090 cat >conftest.$ac_ext <<_ACEOF
14091#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014092#include "confdefs.h"
14093
Martin v. Löwis11437992002-04-12 09:54:03 +000014094#ifdef F77_DUMMY_MAIN
14095# ifdef __cplusplus
14096 extern "C"
14097# endif
14098 int F77_DUMMY_MAIN() { return 1; }
14099#endif
14100int
14101main ()
14102{
14103/* FIXME: Include the comments suggested by Paul. */
14104#ifndef __cplusplus
14105 /* Ultrix mips cc rejects this. */
14106 typedef int charset[2];
14107 const charset x;
14108 /* SunOS 4.1.1 cc rejects this. */
14109 char const *const *ccp;
14110 char **p;
14111 /* NEC SVR4.0.2 mips cc rejects this. */
14112 struct point {int x, y;};
14113 static struct point const zero = {0,0};
14114 /* AIX XL C 1.02.0.0 rejects this.
14115 It does not let you subtract one const X* pointer from another in
14116 an arm of an if-expression whose if-part is not a constant
14117 expression */
14118 const char *g = "string";
14119 ccp = &g + (g ? g-g : 0);
14120 /* HPUX 7.0 cc rejects these. */
14121 ++ccp;
14122 p = (char**) ccp;
14123 ccp = (char const *const *) p;
14124 { /* SCO 3.2v4 cc rejects this. */
14125 char *t;
14126 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014127
Martin v. Löwis11437992002-04-12 09:54:03 +000014128 *t++ = 0;
14129 }
14130 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14131 int x[] = {25, 17};
14132 const int *foo = &x[0];
14133 ++foo;
14134 }
14135 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14136 typedef const int *iptr;
14137 iptr p = 0;
14138 ++p;
14139 }
14140 { /* AIX XL C 1.02.0.0 rejects this saying
14141 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14142 struct s { int j; const int *ap[3]; };
14143 struct s *b; b->j = 5;
14144 }
14145 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14146 const int foo = 10;
14147 }
14148#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014149
Martin v. Löwis11437992002-04-12 09:54:03 +000014150 ;
14151 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014152}
Martin v. Löwis11437992002-04-12 09:54:03 +000014153_ACEOF
14154rm -f conftest.$ac_objext
14155if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14156 (eval $ac_compile) 2>&5
14157 ac_status=$?
14158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14159 (exit $ac_status); } &&
14160 { ac_try='test -s conftest.$ac_objext'
14161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14162 (eval $ac_try) 2>&5
14163 ac_status=$?
14164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14165 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014166 ac_cv_c_const=yes
14167else
Martin v. Löwis11437992002-04-12 09:54:03 +000014168 echo "$as_me: failed program was:" >&5
14169cat conftest.$ac_ext >&5
14170ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014171fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014172rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014173fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014174echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14175echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014176if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014177
14178cat >>confdefs.h <<\_ACEOF
14179#define const
14180_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014181
14182fi
14183
Michael W. Hudson54241132001-12-07 15:38:26 +000014184
Guido van Rossumda88dad1995-01-26 00:46:29 +000014185works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014186echo "$as_me:$LINENO: checking for working volatile" >&5
14187echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14188cat >conftest.$ac_ext <<_ACEOF
14189#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014190#include "confdefs.h"
14191
Martin v. Löwis11437992002-04-12 09:54:03 +000014192#ifdef F77_DUMMY_MAIN
14193# ifdef __cplusplus
14194 extern "C"
14195# endif
14196 int F77_DUMMY_MAIN() { return 1; }
14197#endif
14198int
14199main ()
14200{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014201volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014202 ;
14203 return 0;
14204}
14205_ACEOF
14206rm -f conftest.$ac_objext
14207if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14208 (eval $ac_compile) 2>&5
14209 ac_status=$?
14210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14211 (exit $ac_status); } &&
14212 { ac_try='test -s conftest.$ac_objext'
14213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14214 (eval $ac_try) 2>&5
14215 ac_status=$?
14216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14217 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014218 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014219else
Martin v. Löwis11437992002-04-12 09:54:03 +000014220 echo "$as_me: failed program was:" >&5
14221cat conftest.$ac_ext >&5
14222
14223cat >>confdefs.h <<\_ACEOF
14224#define volatile
14225_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014226
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014227
Guido van Rossum627b2d71993-12-24 10:39:16 +000014228fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014229rm -f conftest.$ac_objext conftest.$ac_ext
14230echo "$as_me:$LINENO: result: $works" >&5
14231echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014232
Guido van Rossumda88dad1995-01-26 00:46:29 +000014233works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014234echo "$as_me:$LINENO: checking for working signed char" >&5
14235echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14236cat >conftest.$ac_ext <<_ACEOF
14237#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014238#include "confdefs.h"
14239
Martin v. Löwis11437992002-04-12 09:54:03 +000014240#ifdef F77_DUMMY_MAIN
14241# ifdef __cplusplus
14242 extern "C"
14243# endif
14244 int F77_DUMMY_MAIN() { return 1; }
14245#endif
14246int
14247main ()
14248{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014249signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014250 ;
14251 return 0;
14252}
14253_ACEOF
14254rm -f conftest.$ac_objext
14255if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14256 (eval $ac_compile) 2>&5
14257 ac_status=$?
14258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14259 (exit $ac_status); } &&
14260 { ac_try='test -s conftest.$ac_objext'
14261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14262 (eval $ac_try) 2>&5
14263 ac_status=$?
14264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14265 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014266 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014267else
Martin v. Löwis11437992002-04-12 09:54:03 +000014268 echo "$as_me: failed program was:" >&5
14269cat conftest.$ac_ext >&5
14270
14271cat >>confdefs.h <<\_ACEOF
14272#define signed
14273_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000014274
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014275
Guido van Rossum7f43da71994-08-01 12:15:30 +000014276fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014277rm -f conftest.$ac_objext conftest.$ac_ext
14278echo "$as_me:$LINENO: result: $works" >&5
14279echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014280
Guido van Rossumda88dad1995-01-26 00:46:29 +000014281have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014282echo "$as_me:$LINENO: checking for prototypes" >&5
14283echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
14284cat >conftest.$ac_ext <<_ACEOF
14285#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014286#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014287int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014288#ifdef F77_DUMMY_MAIN
14289# ifdef __cplusplus
14290 extern "C"
14291# endif
14292 int F77_DUMMY_MAIN() { return 1; }
14293#endif
14294int
14295main ()
14296{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014297return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014298 ;
14299 return 0;
14300}
14301_ACEOF
14302rm -f conftest.$ac_objext
14303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14304 (eval $ac_compile) 2>&5
14305 ac_status=$?
14306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14307 (exit $ac_status); } &&
14308 { ac_try='test -s conftest.$ac_objext'
14309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14310 (eval $ac_try) 2>&5
14311 ac_status=$?
14312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14313 (exit $ac_status); }; }; then
14314
14315
14316cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014317#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014318_ACEOF
14319
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014320 have_prototypes=yes
14321
Guido van Rossumf78abae1997-01-21 22:02:36 +000014322else
Martin v. Löwis11437992002-04-12 09:54:03 +000014323 echo "$as_me: failed program was:" >&5
14324cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014325fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014326rm -f conftest.$ac_objext conftest.$ac_ext
14327echo "$as_me:$LINENO: result: $have_prototypes" >&5
14328echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014329
Guido van Rossumda88dad1995-01-26 00:46:29 +000014330works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014331echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
14332echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
14333cat >conftest.$ac_ext <<_ACEOF
14334#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014335#include "confdefs.h"
14336
14337#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014338int foo(int x, ...) {
14339 va_list va;
14340 va_start(va, x);
14341 va_arg(va, int);
14342 va_arg(va, char *);
14343 va_arg(va, double);
14344 return 0;
14345}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014346
Martin v. Löwis11437992002-04-12 09:54:03 +000014347#ifdef F77_DUMMY_MAIN
14348# ifdef __cplusplus
14349 extern "C"
14350# endif
14351 int F77_DUMMY_MAIN() { return 1; }
14352#endif
14353int
14354main ()
14355{
Guido van Rossum90eea071996-08-30 20:58:57 +000014356return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014357 ;
14358 return 0;
14359}
14360_ACEOF
14361rm -f conftest.$ac_objext
14362if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14363 (eval $ac_compile) 2>&5
14364 ac_status=$?
14365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14366 (exit $ac_status); } &&
14367 { ac_try='test -s conftest.$ac_objext'
14368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14369 (eval $ac_try) 2>&5
14370 ac_status=$?
14371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14372 (exit $ac_status); }; }; then
14373
14374
14375cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014376#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014377_ACEOF
14378
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014379 works=yes
14380
Guido van Rossumf78abae1997-01-21 22:02:36 +000014381else
Martin v. Löwis11437992002-04-12 09:54:03 +000014382 echo "$as_me: failed program was:" >&5
14383cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000014384fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014385rm -f conftest.$ac_objext conftest.$ac_ext
14386echo "$as_me:$LINENO: result: $works" >&5
14387echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014388
Guido van Rossumda88dad1995-01-26 00:46:29 +000014389if test "$have_prototypes" = yes; then
14390bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014391echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
14392echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
14393cat >conftest.$ac_ext <<_ACEOF
14394#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014395#include "confdefs.h"
14396#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014397#ifdef F77_DUMMY_MAIN
14398# ifdef __cplusplus
14399 extern "C"
14400# endif
14401 int F77_DUMMY_MAIN() { return 1; }
14402#endif
14403int
14404main ()
14405{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014406char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000014407 ;
14408 return 0;
14409}
14410_ACEOF
14411rm -f conftest.$ac_objext
14412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14413 (eval $ac_compile) 2>&5
14414 ac_status=$?
14415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14416 (exit $ac_status); } &&
14417 { ac_try='test -s conftest.$ac_objext'
14418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14419 (eval $ac_try) 2>&5
14420 ac_status=$?
14421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14422 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014423 :
14424else
Martin v. Löwis11437992002-04-12 09:54:03 +000014425 echo "$as_me: failed program was:" >&5
14426cat conftest.$ac_ext >&5
14427
14428cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014429#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014430_ACEOF
14431
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014432 bad_prototypes=yes
14433
Guido van Rossum627b2d71993-12-24 10:39:16 +000014434fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014435rm -f conftest.$ac_objext conftest.$ac_ext
14436echo "$as_me:$LINENO: result: $bad_prototypes" >&5
14437echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014438fi
14439
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014440# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000014441echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
14442echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
14443cat >conftest.$ac_ext <<_ACEOF
14444#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014445#include "confdefs.h"
14446#include <sys/types.h>
14447#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014448#ifdef F77_DUMMY_MAIN
14449# ifdef __cplusplus
14450 extern "C"
14451# endif
14452 int F77_DUMMY_MAIN() { return 1; }
14453#endif
14454int
14455main ()
14456{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014457struct sockaddr x;
14458x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014459 ;
14460 return 0;
14461}
14462_ACEOF
14463rm -f conftest.$ac_objext
14464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14465 (eval $ac_compile) 2>&5
14466 ac_status=$?
14467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14468 (exit $ac_status); } &&
14469 { ac_try='test -s conftest.$ac_objext'
14470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14471 (eval $ac_try) 2>&5
14472 ac_status=$?
14473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14474 (exit $ac_status); }; }; then
14475 echo "$as_me:$LINENO: result: yes" >&5
14476echo "${ECHO_T}yes" >&6
14477
14478cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014479#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014480_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014481
14482else
Martin v. Löwis11437992002-04-12 09:54:03 +000014483 echo "$as_me: failed program was:" >&5
14484cat conftest.$ac_ext >&5
14485echo "$as_me:$LINENO: result: no" >&5
14486echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014487fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014488rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014489
Guido van Rossumda88dad1995-01-26 00:46:29 +000014490va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014491echo "$as_me:$LINENO: checking whether va_list is an array" >&5
14492echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
14493cat >conftest.$ac_ext <<_ACEOF
14494#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014495#include "confdefs.h"
14496
14497#ifdef HAVE_STDARG_PROTOTYPES
14498#include <stdarg.h>
14499#else
14500#include <varargs.h>
14501#endif
14502
Martin v. Löwis11437992002-04-12 09:54:03 +000014503#ifdef F77_DUMMY_MAIN
14504# ifdef __cplusplus
14505 extern "C"
14506# endif
14507 int F77_DUMMY_MAIN() { return 1; }
14508#endif
14509int
14510main ()
14511{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014512va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000014513 ;
14514 return 0;
14515}
14516_ACEOF
14517rm -f conftest.$ac_objext
14518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14519 (eval $ac_compile) 2>&5
14520 ac_status=$?
14521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14522 (exit $ac_status); } &&
14523 { ac_try='test -s conftest.$ac_objext'
14524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14525 (eval $ac_try) 2>&5
14526 ac_status=$?
14527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14528 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014529 :
14530else
Martin v. Löwis11437992002-04-12 09:54:03 +000014531 echo "$as_me: failed program was:" >&5
14532cat conftest.$ac_ext >&5
14533
14534
14535cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014536#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014537_ACEOF
14538
Guido van Rossumda88dad1995-01-26 00:46:29 +000014539 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014540
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014541fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014542rm -f conftest.$ac_objext conftest.$ac_ext
14543echo "$as_me:$LINENO: result: $va_list_is_array" >&5
14544echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014545
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014546# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014547
14548
14549
14550echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
14551echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
14552if test "${ac_cv_func_gethostbyname_r+set}" = set; then
14553 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014554else
Martin v. Löwis11437992002-04-12 09:54:03 +000014555 cat >conftest.$ac_ext <<_ACEOF
14556#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014557#include "confdefs.h"
14558/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014559 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014560#include <assert.h>
14561/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014562#ifdef __cplusplus
14563extern "C"
14564#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014565/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014566 builtin and then its argument prototype would still apply. */
14567char gethostbyname_r ();
14568char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014569
Martin v. Löwis11437992002-04-12 09:54:03 +000014570#ifdef F77_DUMMY_MAIN
14571# ifdef __cplusplus
14572 extern "C"
14573# endif
14574 int F77_DUMMY_MAIN() { return 1; }
14575#endif
14576int
14577main ()
14578{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014579/* The GNU C library defines this for functions which it implements
14580 to always fail with ENOSYS. Some functions are actually named
14581 something starting with __ and the normal name is an alias. */
14582#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
14583choke me
14584#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014585f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014586#endif
14587
Martin v. Löwis11437992002-04-12 09:54:03 +000014588 ;
14589 return 0;
14590}
14591_ACEOF
14592rm -f conftest.$ac_objext conftest$ac_exeext
14593if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14594 (eval $ac_link) 2>&5
14595 ac_status=$?
14596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14597 (exit $ac_status); } &&
14598 { ac_try='test -s conftest$ac_exeext'
14599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14600 (eval $ac_try) 2>&5
14601 ac_status=$?
14602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14603 (exit $ac_status); }; }; then
14604 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014605else
Martin v. Löwis11437992002-04-12 09:54:03 +000014606 echo "$as_me: failed program was:" >&5
14607cat conftest.$ac_ext >&5
14608ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014609fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014610rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014611fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014612echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
14613echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
14614if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014615
Martin v. Löwis11437992002-04-12 09:54:03 +000014616 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014617#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014618_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014619
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
14621echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014622 OLD_CFLAGS=$CFLAGS
14623 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014624 cat >conftest.$ac_ext <<_ACEOF
14625#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014626#include "confdefs.h"
14627
14628# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014629
14630#ifdef F77_DUMMY_MAIN
14631# ifdef __cplusplus
14632 extern "C"
14633# endif
14634 int F77_DUMMY_MAIN() { return 1; }
14635#endif
14636int
14637main ()
14638{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014639
14640 char *name;
14641 struct hostent *he, *res;
14642 char buffer[2048];
14643 int buflen = 2048;
14644 int h_errnop;
14645
14646 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014647
14648 ;
14649 return 0;
14650}
14651_ACEOF
14652rm -f conftest.$ac_objext
14653if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14654 (eval $ac_compile) 2>&5
14655 ac_status=$?
14656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14657 (exit $ac_status); } &&
14658 { ac_try='test -s conftest.$ac_objext'
14659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14660 (eval $ac_try) 2>&5
14661 ac_status=$?
14662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14663 (exit $ac_status); }; }; then
14664
14665 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014666#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014667_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014668
Martin v. Löwis11437992002-04-12 09:54:03 +000014669
14670cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014671#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014672_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014673
Martin v. Löwis11437992002-04-12 09:54:03 +000014674 echo "$as_me:$LINENO: result: yes" >&5
14675echo "${ECHO_T}yes" >&6
14676
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014677else
Martin v. Löwis11437992002-04-12 09:54:03 +000014678 echo "$as_me: failed program was:" >&5
14679cat conftest.$ac_ext >&5
14680
14681 echo "$as_me:$LINENO: result: no" >&5
14682echo "${ECHO_T}no" >&6
14683 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14684echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14685 cat >conftest.$ac_ext <<_ACEOF
14686#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014687#include "confdefs.h"
14688
14689# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014690
14691#ifdef F77_DUMMY_MAIN
14692# ifdef __cplusplus
14693 extern "C"
14694# endif
14695 int F77_DUMMY_MAIN() { return 1; }
14696#endif
14697int
14698main ()
14699{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014700
14701 char *name;
14702 struct hostent *he;
14703 char buffer[2048];
14704 int buflen = 2048;
14705 int h_errnop;
14706
14707 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014708
14709 ;
14710 return 0;
14711}
14712_ACEOF
14713rm -f conftest.$ac_objext
14714if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14715 (eval $ac_compile) 2>&5
14716 ac_status=$?
14717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14718 (exit $ac_status); } &&
14719 { ac_try='test -s conftest.$ac_objext'
14720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14721 (eval $ac_try) 2>&5
14722 ac_status=$?
14723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14724 (exit $ac_status); }; }; then
14725
14726 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014727#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014728_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014729
Martin v. Löwis11437992002-04-12 09:54:03 +000014730
14731cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014732#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014733_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014734
Martin v. Löwis11437992002-04-12 09:54:03 +000014735 echo "$as_me:$LINENO: result: yes" >&5
14736echo "${ECHO_T}yes" >&6
14737
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014738else
Martin v. Löwis11437992002-04-12 09:54:03 +000014739 echo "$as_me: failed program was:" >&5
14740cat conftest.$ac_ext >&5
14741
14742 echo "$as_me:$LINENO: result: no" >&5
14743echo "${ECHO_T}no" >&6
14744 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14745echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14746 cat >conftest.$ac_ext <<_ACEOF
14747#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014748#include "confdefs.h"
14749
14750# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014751
14752#ifdef F77_DUMMY_MAIN
14753# ifdef __cplusplus
14754 extern "C"
14755# endif
14756 int F77_DUMMY_MAIN() { return 1; }
14757#endif
14758int
14759main ()
14760{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014761
14762 char *name;
14763 struct hostent *he;
14764 struct hostent_data data;
14765
14766 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014767
14768 ;
14769 return 0;
14770}
14771_ACEOF
14772rm -f conftest.$ac_objext
14773if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14774 (eval $ac_compile) 2>&5
14775 ac_status=$?
14776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14777 (exit $ac_status); } &&
14778 { ac_try='test -s conftest.$ac_objext'
14779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14780 (eval $ac_try) 2>&5
14781 ac_status=$?
14782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14783 (exit $ac_status); }; }; then
14784
14785 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014786#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014787_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014788
Martin v. Löwis11437992002-04-12 09:54:03 +000014789
14790cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014791#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014792_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014793
Martin v. Löwis11437992002-04-12 09:54:03 +000014794 echo "$as_me:$LINENO: result: yes" >&5
14795echo "${ECHO_T}yes" >&6
14796
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014797else
Martin v. Löwis11437992002-04-12 09:54:03 +000014798 echo "$as_me: failed program was:" >&5
14799cat conftest.$ac_ext >&5
14800
14801 echo "$as_me:$LINENO: result: no" >&5
14802echo "${ECHO_T}no" >&6
14803
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014804fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014805rm -f conftest.$ac_objext conftest.$ac_ext
14806
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014807fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014808rm -f conftest.$ac_objext conftest.$ac_ext
14809
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014810fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014811rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014812 CFLAGS=$OLD_CFLAGS
14813
14814else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014815
Martin v. Löwis11437992002-04-12 09:54:03 +000014816
14817for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014818do
Martin v. Löwis11437992002-04-12 09:54:03 +000014819as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14820echo "$as_me:$LINENO: checking for $ac_func" >&5
14821echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14822if eval "test \"\${$as_ac_var+set}\" = set"; then
14823 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014824else
Martin v. Löwis11437992002-04-12 09:54:03 +000014825 cat >conftest.$ac_ext <<_ACEOF
14826#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014827#include "confdefs.h"
14828/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014829 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014830#include <assert.h>
14831/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014832#ifdef __cplusplus
14833extern "C"
14834#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014835/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014836 builtin and then its argument prototype would still apply. */
14837char $ac_func ();
14838char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014839
Martin v. Löwis11437992002-04-12 09:54:03 +000014840#ifdef F77_DUMMY_MAIN
14841# ifdef __cplusplus
14842 extern "C"
14843# endif
14844 int F77_DUMMY_MAIN() { return 1; }
14845#endif
14846int
14847main ()
14848{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014849/* The GNU C library defines this for functions which it implements
14850 to always fail with ENOSYS. Some functions are actually named
14851 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014852#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014853choke me
14854#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014855f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014856#endif
14857
Martin v. Löwis11437992002-04-12 09:54:03 +000014858 ;
14859 return 0;
14860}
14861_ACEOF
14862rm -f conftest.$ac_objext conftest$ac_exeext
14863if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14864 (eval $ac_link) 2>&5
14865 ac_status=$?
14866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14867 (exit $ac_status); } &&
14868 { ac_try='test -s conftest$ac_exeext'
14869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14870 (eval $ac_try) 2>&5
14871 ac_status=$?
14872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14873 (exit $ac_status); }; }; then
14874 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014875else
Martin v. Löwis11437992002-04-12 09:54:03 +000014876 echo "$as_me: failed program was:" >&5
14877cat conftest.$ac_ext >&5
14878eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014879fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014880rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014881fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014882echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14883echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14884if test `eval echo '${'$as_ac_var'}'` = yes; then
14885 cat >>confdefs.h <<_ACEOF
14886#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14887_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014888
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014889fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014890done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014891
Michael W. Hudson54241132001-12-07 15:38:26 +000014892
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014893fi
14894
Michael W. Hudson54241132001-12-07 15:38:26 +000014895
14896
14897
14898
14899
14900
Guido van Rossum627b2d71993-12-24 10:39:16 +000014901# checks for system services
14902# (none yet)
14903
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014904# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014905echo "$as_me:$LINENO: checking for __fpu_control" >&5
14906echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14907if test "${ac_cv_func___fpu_control+set}" = set; then
14908 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014909else
Martin v. Löwis11437992002-04-12 09:54:03 +000014910 cat >conftest.$ac_ext <<_ACEOF
14911#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014912#include "confdefs.h"
14913/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014914 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014915#include <assert.h>
14916/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014917#ifdef __cplusplus
14918extern "C"
14919#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014920/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014921 builtin and then its argument prototype would still apply. */
14922char __fpu_control ();
14923char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014924
Martin v. Löwis11437992002-04-12 09:54:03 +000014925#ifdef F77_DUMMY_MAIN
14926# ifdef __cplusplus
14927 extern "C"
14928# endif
14929 int F77_DUMMY_MAIN() { return 1; }
14930#endif
14931int
14932main ()
14933{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014934/* The GNU C library defines this for functions which it implements
14935 to always fail with ENOSYS. Some functions are actually named
14936 something starting with __ and the normal name is an alias. */
14937#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14938choke me
14939#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014940f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014941#endif
14942
Martin v. Löwis11437992002-04-12 09:54:03 +000014943 ;
14944 return 0;
14945}
14946_ACEOF
14947rm -f conftest.$ac_objext conftest$ac_exeext
14948if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14949 (eval $ac_link) 2>&5
14950 ac_status=$?
14951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14952 (exit $ac_status); } &&
14953 { ac_try='test -s conftest$ac_exeext'
14954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14955 (eval $ac_try) 2>&5
14956 ac_status=$?
14957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14958 (exit $ac_status); }; }; then
14959 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014960else
Martin v. Löwis11437992002-04-12 09:54:03 +000014961 echo "$as_me: failed program was:" >&5
14962cat conftest.$ac_ext >&5
14963ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014964fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014965rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014966fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014967echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14968echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14969if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014970 :
14971else
Martin v. Löwis11437992002-04-12 09:54:03 +000014972
14973echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14974echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14975if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14976 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014977else
Martin v. Löwis11437992002-04-12 09:54:03 +000014978 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014979LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014980cat >conftest.$ac_ext <<_ACEOF
14981#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014982#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014983
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014984/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014985#ifdef __cplusplus
14986extern "C"
14987#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014988/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014989 builtin and then its argument prototype would still apply. */
14990char __fpu_control ();
14991#ifdef F77_DUMMY_MAIN
14992# ifdef __cplusplus
14993 extern "C"
14994# endif
14995 int F77_DUMMY_MAIN() { return 1; }
14996#endif
14997int
14998main ()
14999{
15000__fpu_control ();
15001 ;
15002 return 0;
15003}
15004_ACEOF
15005rm -f conftest.$ac_objext conftest$ac_exeext
15006if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15007 (eval $ac_link) 2>&5
15008 ac_status=$?
15009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15010 (exit $ac_status); } &&
15011 { ac_try='test -s conftest$ac_exeext'
15012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15013 (eval $ac_try) 2>&5
15014 ac_status=$?
15015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15016 (exit $ac_status); }; }; then
15017 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015018else
Martin v. Löwis11437992002-04-12 09:54:03 +000015019 echo "$as_me: failed program was:" >&5
15020cat conftest.$ac_ext >&5
15021ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015022fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015023rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15024LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015025fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015026echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15027echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15028if test $ac_cv_lib_ieee___fpu_control = yes; then
15029 cat >>confdefs.h <<_ACEOF
15030#define HAVE_LIBIEEE 1
15031_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015032
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015033 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015034
Guido van Rossum627b2d71993-12-24 10:39:16 +000015035fi
15036
Michael W. Hudson54241132001-12-07 15:38:26 +000015037
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015038fi
15039
Michael W. Hudson54241132001-12-07 15:38:26 +000015040
Guido van Rossum7f253911997-05-09 02:42:48 +000015041# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015042echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15043echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15044
Guido van Rossum7f253911997-05-09 02:42:48 +000015045# Check whether --with-fpectl or --without-fpectl was given.
15046if test "${with_fpectl+set}" = set; then
15047 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015048
Guido van Rossum7f253911997-05-09 02:42:48 +000015049if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015050then
15051
15052cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015053#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015054_ACEOF
15055
15056 echo "$as_me:$LINENO: result: yes" >&5
15057echo "${ECHO_T}yes" >&6
15058else echo "$as_me:$LINENO: result: no" >&5
15059echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015060fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015061else
Martin v. Löwis11437992002-04-12 09:54:03 +000015062 echo "$as_me:$LINENO: result: no" >&5
15063echo "${ECHO_T}no" >&6
15064fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015065
Guido van Rossum7f43da71994-08-01 12:15:30 +000015066# check for --with-libm=...
15067
Guido van Rossum563e7081996-09-10 18:20:48 +000015068case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015069Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015070BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015071*) LIBM=-lm
15072esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015073echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15074echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15075
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015076# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015077if test "${with_libm+set}" = set; then
15078 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015079
Guido van Rossum7f253911997-05-09 02:42:48 +000015080if test "$withval" = no
15081then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015082 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15083echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015084elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015085then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015086 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15087echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15088else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15089echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15090 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015091fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015092else
Martin v. Löwis11437992002-04-12 09:54:03 +000015093 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15094echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15095fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015096
15097# check for --with-libc=...
15098
Martin v. Löwis11437992002-04-12 09:54:03 +000015099echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15100echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15101
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015102# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015103if test "${with_libc+set}" = set; then
15104 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015105
Guido van Rossum7f253911997-05-09 02:42:48 +000015106if test "$withval" = no
15107then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015108 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15109echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015110elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015111then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015112 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
15113echo "${ECHO_T}set LIBC=\"$withval\"" >&6
15114else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
15115echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
15116 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015117fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015118else
Martin v. Löwis11437992002-04-12 09:54:03 +000015119 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
15120echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
15121fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015122
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015123# check for hypot() in math library
15124LIBS_SAVE=$LIBS
15125LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000015126
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015127for ac_func in hypot
15128do
Martin v. Löwis11437992002-04-12 09:54:03 +000015129as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15130echo "$as_me:$LINENO: checking for $ac_func" >&5
15131echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15132if eval "test \"\${$as_ac_var+set}\" = set"; then
15133 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015134else
Martin v. Löwis11437992002-04-12 09:54:03 +000015135 cat >conftest.$ac_ext <<_ACEOF
15136#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015137#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015138/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015139 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015140#include <assert.h>
15141/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015142#ifdef __cplusplus
15143extern "C"
15144#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015145/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015146 builtin and then its argument prototype would still apply. */
15147char $ac_func ();
15148char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015149
Martin v. Löwis11437992002-04-12 09:54:03 +000015150#ifdef F77_DUMMY_MAIN
15151# ifdef __cplusplus
15152 extern "C"
15153# endif
15154 int F77_DUMMY_MAIN() { return 1; }
15155#endif
15156int
15157main ()
15158{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015159/* The GNU C library defines this for functions which it implements
15160 to always fail with ENOSYS. Some functions are actually named
15161 something starting with __ and the normal name is an alias. */
15162#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15163choke me
15164#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015165f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015166#endif
15167
Martin v. Löwis11437992002-04-12 09:54:03 +000015168 ;
15169 return 0;
15170}
15171_ACEOF
15172rm -f conftest.$ac_objext conftest$ac_exeext
15173if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15174 (eval $ac_link) 2>&5
15175 ac_status=$?
15176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15177 (exit $ac_status); } &&
15178 { ac_try='test -s conftest$ac_exeext'
15179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15180 (eval $ac_try) 2>&5
15181 ac_status=$?
15182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15183 (exit $ac_status); }; }; then
15184 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015185else
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 echo "$as_me: failed program was:" >&5
15187cat conftest.$ac_ext >&5
15188eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015189fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015190rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015191fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015192echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15193echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15194if test `eval echo '${'$as_ac_var'}'` = yes; then
15195 cat >>confdefs.h <<_ACEOF
15196#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15197_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015198
Michael W. Hudson54241132001-12-07 15:38:26 +000015199else
Martin v. Löwis11437992002-04-12 09:54:03 +000015200 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015201fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015202done
15203
Michael W. Hudson54241132001-12-07 15:38:26 +000015204
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015205LIBS=$LIBS_SAVE
15206
Guido van Rossumad713701997-07-10 22:42:38 +000015207# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000015208echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
15209echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
15210if test "${ac_cv_malloc_zero+set}" = set; then
15211 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000015212else
15213 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015214 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000015215else
Martin v. Löwis11437992002-04-12 09:54:03 +000015216 cat >conftest.$ac_ext <<_ACEOF
15217#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000015218#include "confdefs.h"
15219#include <stdio.h>
15220#ifdef HAVE_STDLIB
15221#include <stdlib.h>
15222#else
15223char *malloc(), *realloc();
15224int *free();
15225#endif
15226main() {
15227 char *p;
15228 p = malloc(0);
15229 if (p == NULL) exit(1);
15230 p = realloc(p, 0);
15231 if (p == NULL) exit(1);
15232 free(p);
15233 exit(0);
15234}
Martin v. Löwis11437992002-04-12 09:54:03 +000015235_ACEOF
15236rm -f conftest$ac_exeext
15237if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15238 (eval $ac_link) 2>&5
15239 ac_status=$?
15240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15241 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15243 (eval $ac_try) 2>&5
15244 ac_status=$?
15245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15246 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000015247 ac_cv_malloc_zero=nonnull
15248else
Martin v. Löwis11437992002-04-12 09:54:03 +000015249 echo "$as_me: program exited with status $ac_status" >&5
15250echo "$as_me: failed program was:" >&5
15251cat conftest.$ac_ext >&5
15252( exit $ac_status )
15253ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000015254fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015255rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000015256fi
Guido van Rossumad713701997-07-10 22:42:38 +000015257fi
Guido van Rossum3065c942001-09-17 04:03:14 +000015258 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000015259echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
15260echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000015261if test "$ac_cv_malloc_zero" = null
15262then
Martin v. Löwis11437992002-04-12 09:54:03 +000015263
15264cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000015265#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015266_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000015267
15268fi
15269
Guido van Rossumef2255b2000-03-10 22:30:29 +000015270# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015271if test "${ac_cv_header_wchar_h+set}" = set; then
15272 echo "$as_me:$LINENO: checking for wchar.h" >&5
15273echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15274if test "${ac_cv_header_wchar_h+set}" = set; then
15275 echo $ECHO_N "(cached) $ECHO_C" >&6
15276fi
15277echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15278echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015279else
Martin v. Löwis11437992002-04-12 09:54:03 +000015280 # Is the header compilable?
15281echo "$as_me:$LINENO: checking wchar.h usability" >&5
15282echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15283cat >conftest.$ac_ext <<_ACEOF
15284#line $LINENO "configure"
15285#include "confdefs.h"
15286$ac_includes_default
15287#include <wchar.h>
15288_ACEOF
15289rm -f conftest.$ac_objext
15290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15291 (eval $ac_compile) 2>&5
15292 ac_status=$?
15293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15294 (exit $ac_status); } &&
15295 { ac_try='test -s conftest.$ac_objext'
15296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15297 (eval $ac_try) 2>&5
15298 ac_status=$?
15299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15300 (exit $ac_status); }; }; then
15301 ac_header_compiler=yes
15302else
15303 echo "$as_me: failed program was:" >&5
15304cat conftest.$ac_ext >&5
15305ac_header_compiler=no
15306fi
15307rm -f conftest.$ac_objext conftest.$ac_ext
15308echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15309echo "${ECHO_T}$ac_header_compiler" >&6
15310
15311# Is the header present?
15312echo "$as_me:$LINENO: checking wchar.h presence" >&5
15313echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
15314cat >conftest.$ac_ext <<_ACEOF
15315#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015316#include "confdefs.h"
15317#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015318_ACEOF
15319if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15320 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15321 ac_status=$?
15322 egrep -v '^ *\+' conftest.er1 >conftest.err
15323 rm -f conftest.er1
15324 cat conftest.err >&5
15325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15326 (exit $ac_status); } >/dev/null; then
15327 if test -s conftest.err; then
15328 ac_cpp_err=$ac_c_preproc_warn_flag
15329 else
15330 ac_cpp_err=
15331 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015332else
Martin v. Löwis11437992002-04-12 09:54:03 +000015333 ac_cpp_err=yes
15334fi
15335if test -z "$ac_cpp_err"; then
15336 ac_header_preproc=yes
15337else
15338 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000015339 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015340 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015341fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015342rm -f conftest.err conftest.$ac_ext
15343echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15344echo "${ECHO_T}$ac_header_preproc" >&6
15345
15346# So? What about this header?
15347case $ac_header_compiler:$ac_header_preproc in
15348 yes:no )
15349 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
15350echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15351 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15352echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15353 no:yes )
15354 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
15355echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
15356 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
15357echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
15358 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15359echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15360esac
15361echo "$as_me:$LINENO: checking for wchar.h" >&5
15362echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15363if test "${ac_cv_header_wchar_h+set}" = set; then
15364 echo $ECHO_N "(cached) $ECHO_C" >&6
15365else
15366 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000015367fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015368echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15369echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
15370
15371fi
15372if test $ac_cv_header_wchar_h = yes; then
15373
15374
15375cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015376#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015377_ACEOF
15378
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015379 wchar_h="yes"
15380
Guido van Rossumef2255b2000-03-10 22:30:29 +000015381else
Martin v. Löwis11437992002-04-12 09:54:03 +000015382 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015383
15384fi
15385
Michael W. Hudson54241132001-12-07 15:38:26 +000015386
Martin v. Löwis11437992002-04-12 09:54:03 +000015387
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015388# determine wchar_t size
15389if test "$wchar_h" = yes
15390then
Martin v. Löwis11437992002-04-12 09:54:03 +000015391 echo "$as_me:$LINENO: checking for wchar_t" >&5
15392echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
15393if test "${ac_cv_type_wchar_t+set}" = set; then
15394 echo $ECHO_N "(cached) $ECHO_C" >&6
15395else
15396 cat >conftest.$ac_ext <<_ACEOF
15397#line $LINENO "configure"
15398#include "confdefs.h"
15399#include <wchar.h>
15400
15401#ifdef F77_DUMMY_MAIN
15402# ifdef __cplusplus
15403 extern "C"
15404# endif
15405 int F77_DUMMY_MAIN() { return 1; }
15406#endif
15407int
15408main ()
15409{
15410if ((wchar_t *) 0)
15411 return 0;
15412if (sizeof (wchar_t))
15413 return 0;
15414 ;
15415 return 0;
15416}
15417_ACEOF
15418rm -f conftest.$ac_objext
15419if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15420 (eval $ac_compile) 2>&5
15421 ac_status=$?
15422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15423 (exit $ac_status); } &&
15424 { ac_try='test -s conftest.$ac_objext'
15425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15426 (eval $ac_try) 2>&5
15427 ac_status=$?
15428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15429 (exit $ac_status); }; }; then
15430 ac_cv_type_wchar_t=yes
15431else
15432 echo "$as_me: failed program was:" >&5
15433cat conftest.$ac_ext >&5
15434ac_cv_type_wchar_t=no
15435fi
15436rm -f conftest.$ac_objext conftest.$ac_ext
15437fi
15438echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
15439echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
15440
15441echo "$as_me:$LINENO: checking size of wchar_t" >&5
15442echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
15443if test "${ac_cv_sizeof_wchar_t+set}" = set; then
15444 echo $ECHO_N "(cached) $ECHO_C" >&6
15445else
15446 if test "$ac_cv_type_wchar_t" = yes; then
15447 # The cast to unsigned long works around a bug in the HP C Compiler
15448 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15449 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15450 # This bug is HP SR number 8606223364.
15451 if test "$cross_compiling" = yes; then
15452 # Depending upon the size, compute the lo and hi bounds.
15453cat >conftest.$ac_ext <<_ACEOF
15454#line $LINENO "configure"
15455#include "confdefs.h"
15456#include <wchar.h>
15457
15458#ifdef F77_DUMMY_MAIN
15459# ifdef __cplusplus
15460 extern "C"
15461# endif
15462 int F77_DUMMY_MAIN() { return 1; }
15463#endif
15464int
15465main ()
15466{
15467static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
15468test_array [0] = 0
15469
15470 ;
15471 return 0;
15472}
15473_ACEOF
15474rm -f conftest.$ac_objext
15475if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15476 (eval $ac_compile) 2>&5
15477 ac_status=$?
15478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15479 (exit $ac_status); } &&
15480 { ac_try='test -s conftest.$ac_objext'
15481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15482 (eval $ac_try) 2>&5
15483 ac_status=$?
15484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15485 (exit $ac_status); }; }; then
15486 ac_lo=0 ac_mid=0
15487 while :; do
15488 cat >conftest.$ac_ext <<_ACEOF
15489#line $LINENO "configure"
15490#include "confdefs.h"
15491#include <wchar.h>
15492
15493#ifdef F77_DUMMY_MAIN
15494# ifdef __cplusplus
15495 extern "C"
15496# endif
15497 int F77_DUMMY_MAIN() { return 1; }
15498#endif
15499int
15500main ()
15501{
15502static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15503test_array [0] = 0
15504
15505 ;
15506 return 0;
15507}
15508_ACEOF
15509rm -f conftest.$ac_objext
15510if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15511 (eval $ac_compile) 2>&5
15512 ac_status=$?
15513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15514 (exit $ac_status); } &&
15515 { ac_try='test -s conftest.$ac_objext'
15516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15517 (eval $ac_try) 2>&5
15518 ac_status=$?
15519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15520 (exit $ac_status); }; }; then
15521 ac_hi=$ac_mid; break
15522else
15523 echo "$as_me: failed program was:" >&5
15524cat conftest.$ac_ext >&5
15525ac_lo=`expr $ac_mid + 1`
15526 if test $ac_lo -le $ac_mid; then
15527 ac_lo= ac_hi=
15528 break
15529 fi
15530 ac_mid=`expr 2 '*' $ac_mid + 1`
15531fi
15532rm -f conftest.$ac_objext conftest.$ac_ext
15533 done
15534else
15535 echo "$as_me: failed program was:" >&5
15536cat conftest.$ac_ext >&5
15537cat >conftest.$ac_ext <<_ACEOF
15538#line $LINENO "configure"
15539#include "confdefs.h"
15540#include <wchar.h>
15541
15542#ifdef F77_DUMMY_MAIN
15543# ifdef __cplusplus
15544 extern "C"
15545# endif
15546 int F77_DUMMY_MAIN() { return 1; }
15547#endif
15548int
15549main ()
15550{
15551static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
15552test_array [0] = 0
15553
15554 ;
15555 return 0;
15556}
15557_ACEOF
15558rm -f conftest.$ac_objext
15559if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15560 (eval $ac_compile) 2>&5
15561 ac_status=$?
15562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15563 (exit $ac_status); } &&
15564 { ac_try='test -s conftest.$ac_objext'
15565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15566 (eval $ac_try) 2>&5
15567 ac_status=$?
15568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15569 (exit $ac_status); }; }; then
15570 ac_hi=-1 ac_mid=-1
15571 while :; do
15572 cat >conftest.$ac_ext <<_ACEOF
15573#line $LINENO "configure"
15574#include "confdefs.h"
15575#include <wchar.h>
15576
15577#ifdef F77_DUMMY_MAIN
15578# ifdef __cplusplus
15579 extern "C"
15580# endif
15581 int F77_DUMMY_MAIN() { return 1; }
15582#endif
15583int
15584main ()
15585{
15586static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
15587test_array [0] = 0
15588
15589 ;
15590 return 0;
15591}
15592_ACEOF
15593rm -f conftest.$ac_objext
15594if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15595 (eval $ac_compile) 2>&5
15596 ac_status=$?
15597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15598 (exit $ac_status); } &&
15599 { ac_try='test -s conftest.$ac_objext'
15600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15601 (eval $ac_try) 2>&5
15602 ac_status=$?
15603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15604 (exit $ac_status); }; }; then
15605 ac_lo=$ac_mid; break
15606else
15607 echo "$as_me: failed program was:" >&5
15608cat conftest.$ac_ext >&5
15609ac_hi=`expr '(' $ac_mid ')' - 1`
15610 if test $ac_mid -le $ac_hi; then
15611 ac_lo= ac_hi=
15612 break
15613 fi
15614 ac_mid=`expr 2 '*' $ac_mid`
15615fi
15616rm -f conftest.$ac_objext conftest.$ac_ext
15617 done
15618else
15619 echo "$as_me: failed program was:" >&5
15620cat conftest.$ac_ext >&5
15621ac_lo= ac_hi=
15622fi
15623rm -f conftest.$ac_objext conftest.$ac_ext
15624fi
15625rm -f conftest.$ac_objext conftest.$ac_ext
15626# Binary search between lo and hi bounds.
15627while test "x$ac_lo" != "x$ac_hi"; do
15628 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15629 cat >conftest.$ac_ext <<_ACEOF
15630#line $LINENO "configure"
15631#include "confdefs.h"
15632#include <wchar.h>
15633
15634#ifdef F77_DUMMY_MAIN
15635# ifdef __cplusplus
15636 extern "C"
15637# endif
15638 int F77_DUMMY_MAIN() { return 1; }
15639#endif
15640int
15641main ()
15642{
15643static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15644test_array [0] = 0
15645
15646 ;
15647 return 0;
15648}
15649_ACEOF
15650rm -f conftest.$ac_objext
15651if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15652 (eval $ac_compile) 2>&5
15653 ac_status=$?
15654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15655 (exit $ac_status); } &&
15656 { ac_try='test -s conftest.$ac_objext'
15657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15658 (eval $ac_try) 2>&5
15659 ac_status=$?
15660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15661 (exit $ac_status); }; }; then
15662 ac_hi=$ac_mid
15663else
15664 echo "$as_me: failed program was:" >&5
15665cat conftest.$ac_ext >&5
15666ac_lo=`expr '(' $ac_mid ')' + 1`
15667fi
15668rm -f conftest.$ac_objext conftest.$ac_ext
15669done
15670case $ac_lo in
15671?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15672'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15673echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15674 { (exit 1); exit 1; }; } ;;
15675esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015676else
15677 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015678 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15679echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15680 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015681else
Martin v. Löwis11437992002-04-12 09:54:03 +000015682 cat >conftest.$ac_ext <<_ACEOF
15683#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015684#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015685#include <wchar.h>
15686
15687long longval () { return (long) (sizeof (wchar_t)); }
15688unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015689#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015690#include <stdlib.h>
15691#ifdef F77_DUMMY_MAIN
15692# ifdef __cplusplus
15693 extern "C"
15694# endif
15695 int F77_DUMMY_MAIN() { return 1; }
15696#endif
15697int
15698main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015699{
Martin v. Löwis11437992002-04-12 09:54:03 +000015700
15701 FILE *f = fopen ("conftest.val", "w");
15702 if (! f)
15703 exit (1);
15704 if (((long) (sizeof (wchar_t))) < 0)
15705 {
15706 long i = longval ();
15707 if (i != ((long) (sizeof (wchar_t))))
15708 exit (1);
15709 fprintf (f, "%ld\n", i);
15710 }
15711 else
15712 {
15713 unsigned long i = ulongval ();
15714 if (i != ((long) (sizeof (wchar_t))))
15715 exit (1);
15716 fprintf (f, "%lu\n", i);
15717 }
15718 exit (ferror (f) || fclose (f) != 0);
15719
15720 ;
15721 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015722}
Martin v. Löwis11437992002-04-12 09:54:03 +000015723_ACEOF
15724rm -f conftest$ac_exeext
15725if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15726 (eval $ac_link) 2>&5
15727 ac_status=$?
15728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15729 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15731 (eval $ac_try) 2>&5
15732 ac_status=$?
15733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15734 (exit $ac_status); }; }; then
15735 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015736else
Martin v. Löwis11437992002-04-12 09:54:03 +000015737 echo "$as_me: program exited with status $ac_status" >&5
15738echo "$as_me: failed program was:" >&5
15739cat conftest.$ac_ext >&5
15740( exit $ac_status )
15741{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15742echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15743 { (exit 1); exit 1; }; }
15744fi
15745rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15746fi
15747fi
15748rm -f conftest.val
15749else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015750 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015751fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015752fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015753echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15754echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15755cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015756#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015757_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015758
Michael W. Hudson54241132001-12-07 15:38:26 +000015759
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015760fi
15761
Martin v. Löwis11437992002-04-12 09:54:03 +000015762echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15763echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015764# Check whether --enable-unicode or --disable-unicode was given.
15765if test "${enable_unicode+set}" = set; then
15766 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015767
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015768else
15769 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015770fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015771
15772if test $enable_unicode = yes
15773then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015774 # Without any arguments, Py_UNICODE defaults to two-byte mode
15775 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015776fi
15777
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015778
15779
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015780case "$enable_unicode" in
15781ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015782 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015783#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015784_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015785
15786 ;;
15787ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015788 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015789#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015790_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015791
15792 ;;
15793esac
15794
Michael W. Hudson54241132001-12-07 15:38:26 +000015795
Martin v. Löwis11437992002-04-12 09:54:03 +000015796
15797
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015798
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015799if test "$enable_unicode" = "no"
15800then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015801 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015802 echo "$as_me:$LINENO: result: not used" >&5
15803echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015804else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015805 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015806
15807cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015808#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015809_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015810
15811 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15812 then
15813 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015814
Martin v. Löwis11437992002-04-12 09:54:03 +000015815cat >>confdefs.h <<\_ACEOF
15816#define HAVE_USABLE_WCHAR_T 1
15817_ACEOF
15818
15819 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015820#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015821_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015822
15823 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15824 then
15825 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015826 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015827#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015828_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015829
15830 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15831 then
15832 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015833 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015834#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015835_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015836
15837 else
15838 PY_UNICODE_TYPE="no type found"
15839 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015840 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15841echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015842fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015843
15844# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015845echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15846echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15847if test "${ac_cv_c_bigendian+set}" = set; then
15848 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015849else
Martin v. Löwis11437992002-04-12 09:54:03 +000015850 # See if sys/param.h defines the BYTE_ORDER macro.
15851cat >conftest.$ac_ext <<_ACEOF
15852#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015853#include "confdefs.h"
15854#include <sys/types.h>
15855#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015856
Martin v. Löwis11437992002-04-12 09:54:03 +000015857#ifdef F77_DUMMY_MAIN
15858# ifdef __cplusplus
15859 extern "C"
15860# endif
15861 int F77_DUMMY_MAIN() { return 1; }
15862#endif
15863int
15864main ()
15865{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015866#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15867 bogus endian macros
15868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015869
15870 ;
15871 return 0;
15872}
15873_ACEOF
15874rm -f conftest.$ac_objext
15875if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15876 (eval $ac_compile) 2>&5
15877 ac_status=$?
15878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15879 (exit $ac_status); } &&
15880 { ac_try='test -s conftest.$ac_objext'
15881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15882 (eval $ac_try) 2>&5
15883 ac_status=$?
15884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15885 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015886 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015887cat >conftest.$ac_ext <<_ACEOF
15888#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015889#include "confdefs.h"
15890#include <sys/types.h>
15891#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015892
Martin v. Löwis11437992002-04-12 09:54:03 +000015893#ifdef F77_DUMMY_MAIN
15894# ifdef __cplusplus
15895 extern "C"
15896# endif
15897 int F77_DUMMY_MAIN() { return 1; }
15898#endif
15899int
15900main ()
15901{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015902#if BYTE_ORDER != BIG_ENDIAN
15903 not big endian
15904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015905
15906 ;
15907 return 0;
15908}
15909_ACEOF
15910rm -f conftest.$ac_objext
15911if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15912 (eval $ac_compile) 2>&5
15913 ac_status=$?
15914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15915 (exit $ac_status); } &&
15916 { ac_try='test -s conftest.$ac_objext'
15917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15918 (eval $ac_try) 2>&5
15919 ac_status=$?
15920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15921 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015922 ac_cv_c_bigendian=yes
15923else
Martin v. Löwis11437992002-04-12 09:54:03 +000015924 echo "$as_me: failed program was:" >&5
15925cat conftest.$ac_ext >&5
15926ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015927fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015928rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015929else
Martin v. Löwis11437992002-04-12 09:54:03 +000015930 echo "$as_me: failed program was:" >&5
15931cat conftest.$ac_ext >&5
15932# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015933if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015934 # try to guess the endianess by grep'ing values into an object file
15935 ac_cv_c_bigendian=unknown
15936 cat >conftest.$ac_ext <<_ACEOF
15937#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015938#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015939short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15940short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15941void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15942short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15943short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15944void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15945#ifdef F77_DUMMY_MAIN
15946# ifdef __cplusplus
15947 extern "C"
15948# endif
15949 int F77_DUMMY_MAIN() { return 1; }
15950#endif
15951int
15952main ()
15953{
15954 _ascii (); _ebcdic ();
15955 ;
15956 return 0;
15957}
15958_ACEOF
15959rm -f conftest.$ac_objext
15960if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15961 (eval $ac_compile) 2>&5
15962 ac_status=$?
15963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15964 (exit $ac_status); } &&
15965 { ac_try='test -s conftest.$ac_objext'
15966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15967 (eval $ac_try) 2>&5
15968 ac_status=$?
15969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15970 (exit $ac_status); }; }; then
15971 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15972 ac_cv_c_bigendian=yes
15973fi
15974if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15975 if test "$ac_cv_c_bigendian" = unknown; then
15976 ac_cv_c_bigendian=no
15977 else
15978 # finding both strings is unlikely to happen, but who knows?
15979 ac_cv_c_bigendian=unknown
15980 fi
15981fi
15982else
15983 echo "$as_me: failed program was:" >&5
15984cat conftest.$ac_ext >&5
15985fi
15986rm -f conftest.$ac_objext conftest.$ac_ext
15987else
15988 cat >conftest.$ac_ext <<_ACEOF
15989#line $LINENO "configure"
15990#include "confdefs.h"
15991int
15992main ()
15993{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015994 /* Are we little or big endian? From Harbison&Steele. */
15995 union
15996 {
15997 long l;
15998 char c[sizeof (long)];
15999 } u;
16000 u.l = 1;
16001 exit (u.c[sizeof (long) - 1] == 1);
16002}
Martin v. Löwis11437992002-04-12 09:54:03 +000016003_ACEOF
16004rm -f conftest$ac_exeext
16005if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16006 (eval $ac_link) 2>&5
16007 ac_status=$?
16008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16009 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16011 (eval $ac_try) 2>&5
16012 ac_status=$?
16013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16014 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016015 ac_cv_c_bigendian=no
16016else
Martin v. Löwis11437992002-04-12 09:54:03 +000016017 echo "$as_me: program exited with status $ac_status" >&5
16018echo "$as_me: failed program was:" >&5
16019cat conftest.$ac_ext >&5
16020( exit $ac_status )
16021ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016022fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016023rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016024fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016025fi
16026rm -f conftest.$ac_objext conftest.$ac_ext
16027fi
16028echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16029echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16030case $ac_cv_c_bigendian in
16031 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016032
Martin v. Löwis11437992002-04-12 09:54:03 +000016033cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016034#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016035_ACEOF
16036 ;;
16037 no)
16038 ;;
16039 *)
16040 { { echo "$as_me:$LINENO: error: unknown endianess
16041presetting ac_cv_c_bigendian=no (or yes) will help" >&5
16042echo "$as_me: error: unknown endianess
16043presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16044 { (exit 1); exit 1; }; } ;;
16045esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016046
Michael W. Hudson54241132001-12-07 15:38:26 +000016047
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016048# Check whether right shifting a negative integer extends the sign bit
16049# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016050echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16051echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16052if test "${ac_cv_rshift_extends_sign+set}" = set; then
16053 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016054else
Martin v. Löwis11437992002-04-12 09:54:03 +000016055
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016056if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016057 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016058else
Martin v. Löwis11437992002-04-12 09:54:03 +000016059 cat >conftest.$ac_ext <<_ACEOF
16060#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016061#include "confdefs.h"
16062
16063int main()
16064{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016065 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016066}
16067
Martin v. Löwis11437992002-04-12 09:54:03 +000016068_ACEOF
16069rm -f conftest$ac_exeext
16070if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16071 (eval $ac_link) 2>&5
16072 ac_status=$?
16073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16074 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16076 (eval $ac_try) 2>&5
16077 ac_status=$?
16078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16079 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016080 ac_cv_rshift_extends_sign=yes
16081else
Martin v. Löwis11437992002-04-12 09:54:03 +000016082 echo "$as_me: program exited with status $ac_status" >&5
16083echo "$as_me: failed program was:" >&5
16084cat conftest.$ac_ext >&5
16085( exit $ac_status )
16086ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016087fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016088rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16089fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016090fi
16091
Martin v. Löwis11437992002-04-12 09:54:03 +000016092echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16093echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016094if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016095then
Martin v. Löwis11437992002-04-12 09:54:03 +000016096
16097cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016098#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016099_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016100
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016101fi
16102
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016103# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016104echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16105echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16106if test "${ac_cv_have_getc_unlocked+set}" = set; then
16107 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016108else
Martin v. Löwis11437992002-04-12 09:54:03 +000016109
16110cat >conftest.$ac_ext <<_ACEOF
16111#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016112#include "confdefs.h"
16113#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016114#ifdef F77_DUMMY_MAIN
16115# ifdef __cplusplus
16116 extern "C"
16117# endif
16118 int F77_DUMMY_MAIN() { return 1; }
16119#endif
16120int
16121main ()
16122{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016123
16124 FILE *f = fopen("/dev/null", "r");
16125 flockfile(f);
16126 getc_unlocked(f);
16127 funlockfile(f);
16128
Martin v. Löwis11437992002-04-12 09:54:03 +000016129 ;
16130 return 0;
16131}
16132_ACEOF
16133rm -f conftest.$ac_objext conftest$ac_exeext
16134if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16135 (eval $ac_link) 2>&5
16136 ac_status=$?
16137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16138 (exit $ac_status); } &&
16139 { ac_try='test -s conftest$ac_exeext'
16140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16141 (eval $ac_try) 2>&5
16142 ac_status=$?
16143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16144 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016145 ac_cv_have_getc_unlocked=yes
16146else
Martin v. Löwis11437992002-04-12 09:54:03 +000016147 echo "$as_me: failed program was:" >&5
16148cat conftest.$ac_ext >&5
16149ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016150fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016151rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016152fi
16153
Martin v. Löwis11437992002-04-12 09:54:03 +000016154echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16155echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016156if test "$ac_cv_have_getc_unlocked" = yes
16157then
Martin v. Löwis11437992002-04-12 09:54:03 +000016158
16159cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016160#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016161_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016162
16163fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016164
Martin v. Löwis0daad592001-09-30 21:09:59 +000016165# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000016166echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
16167echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
16168if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
16169 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000016170else
Martin v. Löwis11437992002-04-12 09:54:03 +000016171 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000016172LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016173cat >conftest.$ac_ext <<_ACEOF
16174#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000016175#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016176
Guido van Rossum353ae582001-07-10 16:45:32 +000016177/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016178#ifdef __cplusplus
16179extern "C"
16180#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000016181/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016182 builtin and then its argument prototype would still apply. */
16183char rl_pre_input_hook ();
16184#ifdef F77_DUMMY_MAIN
16185# ifdef __cplusplus
16186 extern "C"
16187# endif
16188 int F77_DUMMY_MAIN() { return 1; }
16189#endif
16190int
16191main ()
16192{
16193rl_pre_input_hook ();
16194 ;
16195 return 0;
16196}
16197_ACEOF
16198rm -f conftest.$ac_objext conftest$ac_exeext
16199if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16200 (eval $ac_link) 2>&5
16201 ac_status=$?
16202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16203 (exit $ac_status); } &&
16204 { ac_try='test -s conftest$ac_exeext'
16205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16206 (eval $ac_try) 2>&5
16207 ac_status=$?
16208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16209 (exit $ac_status); }; }; then
16210 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016211else
Martin v. Löwis11437992002-04-12 09:54:03 +000016212 echo "$as_me: failed program was:" >&5
16213cat conftest.$ac_ext >&5
16214ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016215fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016216rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16217LIBS=$ac_check_lib_save_LIBS
16218fi
16219echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16220echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16221if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016222
Martin v. Löwis11437992002-04-12 09:54:03 +000016223cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016224#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016225_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016226
Martin v. Löwis0daad592001-09-30 21:09:59 +000016227fi
16228
Michael W. Hudson54241132001-12-07 15:38:26 +000016229
Martin v. Löwis0daad592001-09-30 21:09:59 +000016230# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016231echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16232echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16233if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16234 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016235else
Martin v. Löwis11437992002-04-12 09:54:03 +000016236 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016237LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016238cat >conftest.$ac_ext <<_ACEOF
16239#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016240#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016241
Martin v. Löwis0daad592001-09-30 21:09:59 +000016242/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016243#ifdef __cplusplus
16244extern "C"
16245#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016246/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016247 builtin and then its argument prototype would still apply. */
16248char rl_completion_matches ();
16249#ifdef F77_DUMMY_MAIN
16250# ifdef __cplusplus
16251 extern "C"
16252# endif
16253 int F77_DUMMY_MAIN() { return 1; }
16254#endif
16255int
16256main ()
16257{
16258rl_completion_matches ();
16259 ;
16260 return 0;
16261}
16262_ACEOF
16263rm -f conftest.$ac_objext conftest$ac_exeext
16264if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16265 (eval $ac_link) 2>&5
16266 ac_status=$?
16267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16268 (exit $ac_status); } &&
16269 { ac_try='test -s conftest$ac_exeext'
16270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16271 (eval $ac_try) 2>&5
16272 ac_status=$?
16273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16274 (exit $ac_status); }; }; then
16275 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000016276else
Martin v. Löwis11437992002-04-12 09:54:03 +000016277 echo "$as_me: failed program was:" >&5
16278cat conftest.$ac_ext >&5
16279ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000016280fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016281rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16282LIBS=$ac_check_lib_save_LIBS
16283fi
16284echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
16285echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
16286if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016287
Martin v. Löwis11437992002-04-12 09:54:03 +000016288cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016289#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016290_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016291
Guido van Rossum353ae582001-07-10 16:45:32 +000016292fi
16293
Jack Jansendd19cf82001-12-06 22:36:17 +000016294
Martin v. Löwis11437992002-04-12 09:54:03 +000016295echo "$as_me:$LINENO: checking for broken nice()" >&5
16296echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
16297if test "${ac_cv_broken_nice+set}" = set; then
16298 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016299else
Martin v. Löwis11437992002-04-12 09:54:03 +000016300
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016301if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016302 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016303else
Martin v. Löwis11437992002-04-12 09:54:03 +000016304 cat >conftest.$ac_ext <<_ACEOF
16305#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016306#include "confdefs.h"
16307
16308int main()
16309{
16310 int val1 = nice(1);
16311 if (val1 != -1 && val1 == nice(2))
16312 exit(0);
16313 exit(1);
16314}
16315
Martin v. Löwis11437992002-04-12 09:54:03 +000016316_ACEOF
16317rm -f conftest$ac_exeext
16318if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16319 (eval $ac_link) 2>&5
16320 ac_status=$?
16321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16322 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16324 (eval $ac_try) 2>&5
16325 ac_status=$?
16326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16327 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016328 ac_cv_broken_nice=yes
16329else
Martin v. Löwis11437992002-04-12 09:54:03 +000016330 echo "$as_me: program exited with status $ac_status" >&5
16331echo "$as_me: failed program was:" >&5
16332cat conftest.$ac_ext >&5
16333( exit $ac_status )
16334ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016335fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016336rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16337fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016338fi
16339
Martin v. Löwis11437992002-04-12 09:54:03 +000016340echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
16341echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016342if test "$ac_cv_broken_nice" = yes
16343then
Martin v. Löwis11437992002-04-12 09:54:03 +000016344
16345cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016346#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016347_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016348
16349fi
16350
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016351# Look for subsecond timestamps in struct stat
16352echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
16353echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
16354if test "${ac_cv_stat_tv_nsec+set}" = set; then
16355 echo $ECHO_N "(cached) $ECHO_C" >&6
16356else
16357 cat >conftest.$ac_ext <<_ACEOF
16358#line $LINENO "configure"
16359#include "confdefs.h"
16360#include <sys/stat.h>
16361#ifdef F77_DUMMY_MAIN
16362# ifdef __cplusplus
16363 extern "C"
16364# endif
16365 int F77_DUMMY_MAIN() { return 1; }
16366#endif
16367int
16368main ()
16369{
16370
16371struct stat st;
16372st.st_mtim.tv_nsec = 1;
16373
16374 ;
16375 return 0;
16376}
16377_ACEOF
16378rm -f conftest.$ac_objext
16379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16380 (eval $ac_compile) 2>&5
16381 ac_status=$?
16382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16383 (exit $ac_status); } &&
16384 { ac_try='test -s conftest.$ac_objext'
16385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16386 (eval $ac_try) 2>&5
16387 ac_status=$?
16388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16389 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016390 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016391else
16392 echo "$as_me: failed program was:" >&5
16393cat conftest.$ac_ext >&5
16394ac_cv_stat_tv_nsec=no
16395fi
16396rm -f conftest.$ac_objext conftest.$ac_ext
16397fi
16398
16399echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
16400echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
16401if test "$ac_cv_stat_tv_nsec" = yes
16402then
16403
16404cat >>confdefs.h <<\_ACEOF
16405#define HAVE_STAT_TV_NSEC 1
16406_ACEOF
16407
16408fi
16409
Jack Jansen666b1e72001-10-31 12:11:48 +000016410# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000016411echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
16412echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
16413if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
16414 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016415else
Martin v. Löwis11437992002-04-12 09:54:03 +000016416 cat >conftest.$ac_ext <<_ACEOF
16417#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016418#include "confdefs.h"
16419#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016420#ifdef F77_DUMMY_MAIN
16421# ifdef __cplusplus
16422 extern "C"
16423# endif
16424 int F77_DUMMY_MAIN() { return 1; }
16425#endif
16426int
16427main ()
16428{
Jack Jansen666b1e72001-10-31 12:11:48 +000016429
16430 int rtn;
16431 rtn = mvwdelch(0,0,0);
16432
Martin v. Löwis11437992002-04-12 09:54:03 +000016433 ;
16434 return 0;
16435}
16436_ACEOF
16437rm -f conftest.$ac_objext
16438if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16439 (eval $ac_compile) 2>&5
16440 ac_status=$?
16441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16442 (exit $ac_status); } &&
16443 { ac_try='test -s conftest.$ac_objext'
16444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16445 (eval $ac_try) 2>&5
16446 ac_status=$?
16447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16448 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016449 ac_cv_mvwdelch_is_expression=yes
16450else
Martin v. Löwis11437992002-04-12 09:54:03 +000016451 echo "$as_me: failed program was:" >&5
16452cat conftest.$ac_ext >&5
16453ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016454fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016455rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016456fi
16457
Martin v. Löwis11437992002-04-12 09:54:03 +000016458echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
16459echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016460
16461if test "$ac_cv_mvwdelch_is_expression" = yes
16462then
Martin v. Löwis11437992002-04-12 09:54:03 +000016463
16464cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016465#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016466_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016467
16468fi
16469
Martin v. Löwis11437992002-04-12 09:54:03 +000016470echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
16471echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
16472if test "${ac_cv_window_has_flags+set}" = set; then
16473 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016474else
Martin v. Löwis11437992002-04-12 09:54:03 +000016475 cat >conftest.$ac_ext <<_ACEOF
16476#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016477#include "confdefs.h"
16478#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016479#ifdef F77_DUMMY_MAIN
16480# ifdef __cplusplus
16481 extern "C"
16482# endif
16483 int F77_DUMMY_MAIN() { return 1; }
16484#endif
16485int
16486main ()
16487{
Jack Jansen666b1e72001-10-31 12:11:48 +000016488
16489 WINDOW *w;
16490 w->_flags = 0;
16491
Martin v. Löwis11437992002-04-12 09:54:03 +000016492 ;
16493 return 0;
16494}
16495_ACEOF
16496rm -f conftest.$ac_objext
16497if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16498 (eval $ac_compile) 2>&5
16499 ac_status=$?
16500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16501 (exit $ac_status); } &&
16502 { ac_try='test -s conftest.$ac_objext'
16503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16504 (eval $ac_try) 2>&5
16505 ac_status=$?
16506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16507 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016508 ac_cv_window_has_flags=yes
16509else
Martin v. Löwis11437992002-04-12 09:54:03 +000016510 echo "$as_me: failed program was:" >&5
16511cat conftest.$ac_ext >&5
16512ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016513fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016514rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016515fi
16516
Martin v. Löwis11437992002-04-12 09:54:03 +000016517echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
16518echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016519
Jack Jansen666b1e72001-10-31 12:11:48 +000016520
16521if test "$ac_cv_window_has_flags" = yes
16522then
Martin v. Löwis11437992002-04-12 09:54:03 +000016523
16524cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016525#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016526_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016527
16528fi
16529
Martin v. Löwis11437992002-04-12 09:54:03 +000016530echo "$as_me:$LINENO: checking for socklen_t" >&5
16531echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
16532if test "${ac_cv_type_socklen_t+set}" = set; then
16533 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000016534else
Martin v. Löwis11437992002-04-12 09:54:03 +000016535 cat >conftest.$ac_ext <<_ACEOF
16536#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000016537#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000016538
16539#ifdef HAVE_SYS_TYPES_H
16540#include <sys/types.h>
16541#endif
16542#ifdef HAVE_SYS_SOCKET_H
16543#include <sys/socket.h>
16544#endif
16545
16546
Martin v. Löwis11437992002-04-12 09:54:03 +000016547#ifdef F77_DUMMY_MAIN
16548# ifdef __cplusplus
16549 extern "C"
16550# endif
16551 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016552#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016553int
16554main ()
16555{
16556if ((socklen_t *) 0)
16557 return 0;
16558if (sizeof (socklen_t))
16559 return 0;
16560 ;
16561 return 0;
16562}
16563_ACEOF
16564rm -f conftest.$ac_objext
16565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16566 (eval $ac_compile) 2>&5
16567 ac_status=$?
16568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16569 (exit $ac_status); } &&
16570 { ac_try='test -s conftest.$ac_objext'
16571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16572 (eval $ac_try) 2>&5
16573 ac_status=$?
16574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16575 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016576 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000016577else
Martin v. Löwis11437992002-04-12 09:54:03 +000016578 echo "$as_me: failed program was:" >&5
16579cat conftest.$ac_ext >&5
16580ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000016581fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016582rm -f conftest.$ac_objext conftest.$ac_ext
16583fi
16584echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
16585echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
16586if test $ac_cv_type_socklen_t = yes; then
16587 :
16588else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016589
Martin v. Löwis01c04012002-11-11 14:58:44 +000016590cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016591#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000016592_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016593
16594fi
16595
Michael W. Hudson54241132001-12-07 15:38:26 +000016596
Michael W. Hudson54241132001-12-07 15:38:26 +000016597
16598
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016599for h in `(cd $srcdir;echo Python/thread_*.h)`
16600do
16601 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16602done
16603
Michael W. Hudson54241132001-12-07 15:38:26 +000016604
Jack Jansen0b06be72002-06-21 14:48:38 +000016605SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000016606echo "$as_me:$LINENO: checking for build directories" >&5
16607echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016608for dir in $SRCDIRS; do
16609 if test ! -d $dir; then
16610 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016611 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016612done
Martin v. Löwis11437992002-04-12 09:54:03 +000016613echo "$as_me:$LINENO: result: done" >&5
16614echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000016615
Guido van Rossum627b2d71993-12-24 10:39:16 +000016616# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000016617ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016618
Martin v. Löwis11437992002-04-12 09:54:03 +000016619cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016620# This file is a shell script that caches the results of configure
16621# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016622# scripts and configure runs, see configure's option --config-cache.
16623# It is not useful on other systems. If it contains results you don't
16624# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016625#
Martin v. Löwis11437992002-04-12 09:54:03 +000016626# config.status only pays attention to the cache file if you give it
16627# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016628#
Martin v. Löwis11437992002-04-12 09:54:03 +000016629# `ac_cv_env_foo' variables (set or unset) will be overriden when
16630# loading this file, other *unset* `ac_cv_foo' will be assigned the
16631# following values.
16632
16633_ACEOF
16634
Guido van Rossumf78abae1997-01-21 22:02:36 +000016635# The following way of writing the cache mishandles newlines in values,
16636# but we know of no workaround that is simple, portable, and efficient.
16637# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016638# Ultrix sh set writes to stderr and can't be redirected directly,
16639# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000016640{
16641 (set) 2>&1 |
16642 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16643 *ac_space=\ *)
16644 # `set' does not quote correctly, so add quotes (double-quote
16645 # substitution turns \\\\ into \\, and sed turns \\ into \).
16646 sed -n \
16647 "s/'/'\\\\''/g;
16648 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16649 ;;
16650 *)
16651 # `set' quotes correctly as required by POSIX, so do not add quotes.
16652 sed -n \
16653 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16654 ;;
16655 esac;
16656} |
16657 sed '
16658 t clear
16659 : clear
16660 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16661 t end
16662 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16663 : end' >>confcache
16664if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016665 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016666 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16667 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016668 else
16669 echo "not updating unwritable cache $cache_file"
16670 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016671fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016672rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016673
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016674test "x$prefix" = xNONE && prefix=$ac_default_prefix
16675# Let make expand exec_prefix.
16676test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016677
Martin v. Löwis11437992002-04-12 09:54:03 +000016678# VPATH may cause trouble with some makes, so we remove $(srcdir),
16679# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16680# trailing colons and then remove the whole line if VPATH becomes empty
16681# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016682if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016683 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16684s/:*\$(srcdir):*/:/;
16685s/:*\${srcdir}:*/:/;
16686s/:*@srcdir@:*/:/;
16687s/^\([^=]*=[ ]*\):*/\1/;
16688s/:*$//;
16689s/^[^=]*=[ ]*$//;
16690}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016691fi
16692
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016693DEFS=-DHAVE_CONFIG_H
16694
Martin v. Löwis11437992002-04-12 09:54:03 +000016695
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016696: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016697ac_clean_files_save=$ac_clean_files
16698ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16699{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16700echo "$as_me: creating $CONFIG_STATUS" >&6;}
16701cat >$CONFIG_STATUS <<_ACEOF
16702#! $SHELL
16703# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016704# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016705# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016706# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016707
Martin v. Löwis11437992002-04-12 09:54:03 +000016708debug=false
16709SHELL=\${CONFIG_SHELL-$SHELL}
16710_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016711
Martin v. Löwis11437992002-04-12 09:54:03 +000016712cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016713
Martin v. Löwis11437992002-04-12 09:54:03 +000016714## --------------------- ##
16715## M4sh Initialization. ##
16716## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016717
Martin v. Löwis11437992002-04-12 09:54:03 +000016718# Be Bourne compatible
16719if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16720 emulate sh
16721 NULLCMD=:
16722elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16723 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016724fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016725
Martin v. Löwis11437992002-04-12 09:54:03 +000016726# NLS nuisances.
16727# Support unset when possible.
16728if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16729 as_unset=unset
16730else
16731 as_unset=false
16732fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016733
Martin v. Löwis11437992002-04-12 09:54:03 +000016734(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16735 { $as_unset LANG || test "${LANG+set}" != set; } ||
16736 { LANG=C; export LANG; }
16737(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16738 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16739 { LC_ALL=C; export LC_ALL; }
16740(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16741 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16742 { LC_TIME=C; export LC_TIME; }
16743(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16744 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16745 { LC_CTYPE=C; export LC_CTYPE; }
16746(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16747 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16748 { LANGUAGE=C; export LANGUAGE; }
16749(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16750 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16751 { LC_COLLATE=C; export LC_COLLATE; }
16752(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16753 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16754 { LC_NUMERIC=C; export LC_NUMERIC; }
16755(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16756 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16757 { LC_MESSAGES=C; export LC_MESSAGES; }
16758
16759
16760# Name of the executable.
16761as_me=`(basename "$0") 2>/dev/null ||
16762$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16763 X"$0" : 'X\(//\)$' \| \
16764 X"$0" : 'X\(/\)$' \| \
16765 . : '\(.\)' 2>/dev/null ||
16766echo X/"$0" |
16767 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16768 /^X\/\(\/\/\)$/{ s//\1/; q; }
16769 /^X\/\(\/\).*/{ s//\1/; q; }
16770 s/.*/./; q'`
16771
16772# PATH needs CR, and LINENO needs CR and PATH.
16773# Avoid depending upon Character Ranges.
16774as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16775as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16776as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16777as_cr_digits='0123456789'
16778as_cr_alnum=$as_cr_Letters$as_cr_digits
16779
16780# The user is always right.
16781if test "${PATH_SEPARATOR+set}" != set; then
16782 echo "#! /bin/sh" >conftest.sh
16783 echo "exit 0" >>conftest.sh
16784 chmod +x conftest.sh
16785 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16786 PATH_SEPARATOR=';'
16787 else
16788 PATH_SEPARATOR=:
16789 fi
16790 rm -f conftest.sh
16791fi
16792
16793
16794 as_lineno_1=$LINENO
16795 as_lineno_2=$LINENO
16796 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16797 test "x$as_lineno_1" != "x$as_lineno_2" &&
16798 test "x$as_lineno_3" = "x$as_lineno_2" || {
16799 # Find who we are. Look in the path if we contain no path at all
16800 # relative or not.
16801 case $0 in
16802 *[\\/]* ) as_myself=$0 ;;
16803 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16804for as_dir in $PATH
16805do
16806 IFS=$as_save_IFS
16807 test -z "$as_dir" && as_dir=.
16808 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16809done
16810
16811 ;;
16812 esac
16813 # We did not find ourselves, most probably we were run as `sh COMMAND'
16814 # in which case we are not to be found in the path.
16815 if test "x$as_myself" = x; then
16816 as_myself=$0
16817 fi
16818 if test ! -f "$as_myself"; then
16819 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16820echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16821 { (exit 1); exit 1; }; }
16822 fi
16823 case $CONFIG_SHELL in
16824 '')
16825 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16826for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16827do
16828 IFS=$as_save_IFS
16829 test -z "$as_dir" && as_dir=.
16830 for as_base in sh bash ksh sh5; do
16831 case $as_dir in
16832 /*)
16833 if ("$as_dir/$as_base" -c '
16834 as_lineno_1=$LINENO
16835 as_lineno_2=$LINENO
16836 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16837 test "x$as_lineno_1" != "x$as_lineno_2" &&
16838 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16839 CONFIG_SHELL=$as_dir/$as_base
16840 export CONFIG_SHELL
16841 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16842 fi;;
16843 esac
16844 done
16845done
16846;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016847 esac
16848
Martin v. Löwis11437992002-04-12 09:54:03 +000016849 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16850 # uniformly replaced by the line number. The first 'sed' inserts a
16851 # line-number line before each line; the second 'sed' does the real
16852 # work. The second script uses 'N' to pair each line-number line
16853 # with the numbered line, and appends trailing '-' during
16854 # substitution so that $LINENO is not a special case at line end.
16855 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16856 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16857 sed '=' <$as_myself |
16858 sed '
16859 N
16860 s,$,-,
16861 : loop
16862 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16863 t loop
16864 s,-$,,
16865 s,^['$as_cr_digits']*\n,,
16866 ' >$as_me.lineno &&
16867 chmod +x $as_me.lineno ||
16868 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16869echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16870 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016871
Martin v. Löwis11437992002-04-12 09:54:03 +000016872 # Don't try to exec as it changes $[0], causing all sort of problems
16873 # (the dirname of $[0] is not the place where we might find the
16874 # original and so on. Autoconf is especially sensible to this).
16875 . ./$as_me.lineno
16876 # Exit status is that of the last command.
16877 exit
16878}
16879
16880
16881case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16882 *c*,-n*) ECHO_N= ECHO_C='
16883' ECHO_T=' ' ;;
16884 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16885 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16886esac
16887
16888if expr a : '\(a\)' >/dev/null 2>&1; then
16889 as_expr=expr
16890else
16891 as_expr=false
16892fi
16893
16894rm -f conf$$ conf$$.exe conf$$.file
16895echo >conf$$.file
16896if ln -s conf$$.file conf$$ 2>/dev/null; then
16897 # We could just check for DJGPP; but this test a) works b) is more generic
16898 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16899 if test -f conf$$.exe; then
16900 # Don't use ln at all; we don't have any links
16901 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016902 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016903 as_ln_s='ln -s'
16904 fi
16905elif ln conf$$.file conf$$ 2>/dev/null; then
16906 as_ln_s=ln
16907else
16908 as_ln_s='cp -p'
16909fi
16910rm -f conf$$ conf$$.exe conf$$.file
16911
16912as_executable_p="test -f"
16913
16914# Sed expression to map a string onto a valid CPP name.
16915as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16916
16917# Sed expression to map a string onto a valid variable name.
16918as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16919
16920
16921# IFS
16922# We need space, tab and new line, in precisely that order.
16923as_nl='
16924'
16925IFS=" $as_nl"
16926
16927# CDPATH.
16928$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16929
16930exec 6>&1
16931
16932# Open the log real soon, to keep \$[0] and so on meaningful, and to
16933# report actual input values of CONFIG_FILES etc. instead of their
16934# values after options handling. Logging --version etc. is OK.
16935exec 5>>config.log
16936{
16937 echo
16938 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16939## Running $as_me. ##
16940_ASBOX
16941} >&5
16942cat >&5 <<_CSEOF
16943
Martin v. Löwis88afe662002-10-26 13:47:44 +000016944This file was extended by python $as_me 2.3, which was
Martin v. Löwis11437992002-04-12 09:54:03 +000016945generated by GNU Autoconf 2.53. Invocation command line was
16946
16947 CONFIG_FILES = $CONFIG_FILES
16948 CONFIG_HEADERS = $CONFIG_HEADERS
16949 CONFIG_LINKS = $CONFIG_LINKS
16950 CONFIG_COMMANDS = $CONFIG_COMMANDS
16951 $ $0 $@
16952
16953_CSEOF
16954echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16955echo >&5
16956_ACEOF
16957
16958# Files that config.status was made for.
16959if test -n "$ac_config_files"; then
16960 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16961fi
16962
16963if test -n "$ac_config_headers"; then
16964 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16965fi
16966
16967if test -n "$ac_config_links"; then
16968 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16969fi
16970
16971if test -n "$ac_config_commands"; then
16972 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16973fi
16974
16975cat >>$CONFIG_STATUS <<\_ACEOF
16976
16977ac_cs_usage="\
16978\`$as_me' instantiates files from templates according to the
16979current configuration.
16980
16981Usage: $0 [OPTIONS] [FILE]...
16982
16983 -h, --help print this help, then exit
16984 -V, --version print version number, then exit
16985 -d, --debug don't remove temporary files
16986 --recheck update $as_me by reconfiguring in the same conditions
16987 --file=FILE[:TEMPLATE]
16988 instantiate the configuration file FILE
16989 --header=FILE[:TEMPLATE]
16990 instantiate the configuration header FILE
16991
16992Configuration files:
16993$config_files
16994
16995Configuration headers:
16996$config_headers
16997
16998Report bugs to <bug-autoconf@gnu.org>."
16999_ACEOF
17000
17001cat >>$CONFIG_STATUS <<_ACEOF
17002ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017003python config.status 2.3
Martin v. Löwis11437992002-04-12 09:54:03 +000017004configured by $0, generated by GNU Autoconf 2.53,
17005 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17006
17007Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17008Free Software Foundation, Inc.
17009This config.status script is free software; the Free Software Foundation
17010gives unlimited permission to copy, distribute and modify it."
17011srcdir=$srcdir
17012INSTALL="$INSTALL"
17013_ACEOF
17014
17015cat >>$CONFIG_STATUS <<\_ACEOF
17016# If no file are specified by the user, then we need to provide default
17017# value. By we need to know if files were specified by the user.
17018ac_need_defaults=:
17019while test $# != 0
17020do
17021 case $1 in
17022 --*=*)
17023 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17024 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17025 shift
17026 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17027 shift
17028 ;;
17029 -*);;
17030 *) # This is not an option, so the user has probably given explicit
17031 # arguments.
17032 ac_need_defaults=false;;
17033 esac
17034
17035 case $1 in
17036 # Handling of the options.
17037_ACEOF
17038cat >>$CONFIG_STATUS <<_ACEOF
17039 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17040 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17041 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17042_ACEOF
17043cat >>$CONFIG_STATUS <<\_ACEOF
17044 --version | --vers* | -V )
17045 echo "$ac_cs_version"; exit 0 ;;
17046 --he | --h)
17047 # Conflict between --help and --header
17048 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17049Try \`$0 --help' for more information." >&5
17050echo "$as_me: error: ambiguous option: $1
17051Try \`$0 --help' for more information." >&2;}
17052 { (exit 1); exit 1; }; };;
17053 --help | --hel | -h )
17054 echo "$ac_cs_usage"; exit 0 ;;
17055 --debug | --d* | -d )
17056 debug=: ;;
17057 --file | --fil | --fi | --f )
17058 shift
17059 CONFIG_FILES="$CONFIG_FILES $1"
17060 ac_need_defaults=false;;
17061 --header | --heade | --head | --hea )
17062 shift
17063 CONFIG_HEADERS="$CONFIG_HEADERS $1"
17064 ac_need_defaults=false;;
17065
17066 # This is an error.
17067 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17068Try \`$0 --help' for more information." >&5
17069echo "$as_me: error: unrecognized option: $1
17070Try \`$0 --help' for more information." >&2;}
17071 { (exit 1); exit 1; }; } ;;
17072
17073 *) ac_config_targets="$ac_config_targets $1" ;;
17074
17075 esac
17076 shift
17077done
17078
17079_ACEOF
17080
17081
17082
17083
17084
17085cat >>$CONFIG_STATUS <<\_ACEOF
17086for ac_config_target in $ac_config_targets
17087do
17088 case "$ac_config_target" in
17089 # Handling of arguments.
17090 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17091 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
17092 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17093 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17094echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17095 { (exit 1); exit 1; }; };;
17096 esac
17097done
17098
17099# If the user did not use the arguments to specify the items to instantiate,
17100# then the envvar interface is used. Set only those that are not.
17101# We use the long form for the default assignment because of an extremely
17102# bizarre bug on SunOS 4.1.3.
17103if $ac_need_defaults; then
17104 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17105 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17106fi
17107
17108# Create a temporary directory, and hook for its removal unless debugging.
17109$debug ||
17110{
17111 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17112 trap '{ (exit 1); exit 1; }' 1 2 13 15
17113}
17114
17115# Create a (secure) tmp directory for tmp files.
17116: ${TMPDIR=/tmp}
17117{
17118 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17119 test -n "$tmp" && test -d "$tmp"
17120} ||
17121{
17122 tmp=$TMPDIR/cs$$-$RANDOM
17123 (umask 077 && mkdir $tmp)
17124} ||
17125{
17126 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17127 { (exit 1); exit 1; }
17128}
17129
17130_ACEOF
17131
17132cat >>$CONFIG_STATUS <<_ACEOF
17133
17134#
17135# CONFIG_FILES section.
17136#
17137
17138# No need to generate the scripts if there are no CONFIG_FILES.
17139# This happens for instance when ./config.status config.h
17140if test -n "\$CONFIG_FILES"; then
17141 # Protect against being on the right side of a sed subst in config.status.
17142 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17143 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17144s,@SHELL@,$SHELL,;t t
17145s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17146s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17147s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17148s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17149s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17150s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17151s,@exec_prefix@,$exec_prefix,;t t
17152s,@prefix@,$prefix,;t t
17153s,@program_transform_name@,$program_transform_name,;t t
17154s,@bindir@,$bindir,;t t
17155s,@sbindir@,$sbindir,;t t
17156s,@libexecdir@,$libexecdir,;t t
17157s,@datadir@,$datadir,;t t
17158s,@sysconfdir@,$sysconfdir,;t t
17159s,@sharedstatedir@,$sharedstatedir,;t t
17160s,@localstatedir@,$localstatedir,;t t
17161s,@libdir@,$libdir,;t t
17162s,@includedir@,$includedir,;t t
17163s,@oldincludedir@,$oldincludedir,;t t
17164s,@infodir@,$infodir,;t t
17165s,@mandir@,$mandir,;t t
17166s,@build_alias@,$build_alias,;t t
17167s,@host_alias@,$host_alias,;t t
17168s,@target_alias@,$target_alias,;t t
17169s,@DEFS@,$DEFS,;t t
17170s,@ECHO_C@,$ECHO_C,;t t
17171s,@ECHO_N@,$ECHO_N,;t t
17172s,@ECHO_T@,$ECHO_T,;t t
17173s,@LIBS@,$LIBS,;t t
17174s,@VERSION@,$VERSION,;t t
17175s,@SOVERSION@,$SOVERSION,;t t
17176s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
17177s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
17178s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
17179s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
17180s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
17181s,@MACHDEP@,$MACHDEP,;t t
17182s,@SGI_ABI@,$SGI_ABI,;t t
17183s,@CXX@,$CXX,;t t
17184s,@MAINOBJ@,$MAINOBJ,;t t
17185s,@EXEEXT@,$EXEEXT,;t t
17186s,@CC@,$CC,;t t
17187s,@CFLAGS@,$CFLAGS,;t t
17188s,@LDFLAGS@,$LDFLAGS,;t t
17189s,@CPPFLAGS@,$CPPFLAGS,;t t
17190s,@ac_ct_CC@,$ac_ct_CC,;t t
17191s,@OBJEXT@,$OBJEXT,;t t
17192s,@CPP@,$CPP,;t t
17193s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
17194s,@LIBRARY@,$LIBRARY,;t t
17195s,@LDLIBRARY@,$LDLIBRARY,;t t
17196s,@DLLLIBRARY@,$DLLLIBRARY,;t t
17197s,@BLDLIBRARY@,$BLDLIBRARY,;t t
17198s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
17199s,@INSTSONAME@,$INSTSONAME,;t t
17200s,@RUNSHARED@,$RUNSHARED,;t t
17201s,@LINKCC@,$LINKCC,;t t
17202s,@RANLIB@,$RANLIB,;t t
17203s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17204s,@AR@,$AR,;t t
17205s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17206s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17207s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17208s,@LN@,$LN,;t t
17209s,@OPT@,$OPT,;t t
17210s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
17211s,@SO@,$SO,;t t
17212s,@LDSHARED@,$LDSHARED,;t t
17213s,@BLDSHARED@,$BLDSHARED,;t t
17214s,@CCSHARED@,$CCSHARED,;t t
17215s,@LINKFORSHARED@,$LINKFORSHARED,;t t
17216s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017217s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017218s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
17219s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
17220s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
17221s,@LDLAST@,$LDLAST,;t t
17222s,@THREADOBJ@,$THREADOBJ,;t t
17223s,@DLINCLDIR@,$DLINCLDIR,;t t
17224s,@DYNLOADFILE@,$DYNLOADFILE,;t t
17225s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
17226s,@LIBOBJS@,$LIBOBJS,;t t
17227s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
17228s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
17229s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
17230s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
17231s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
17232s,@LIBM@,$LIBM,;t t
17233s,@LIBC@,$LIBC,;t t
17234s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
17235s,@THREADHEADERS@,$THREADHEADERS,;t t
17236s,@SRCDIRS@,$SRCDIRS,;t t
17237CEOF
17238
17239_ACEOF
17240
17241 cat >>$CONFIG_STATUS <<\_ACEOF
17242 # Split the substitutions into bite-sized pieces for seds with
17243 # small command number limits, like on Digital OSF/1 and HP-UX.
17244 ac_max_sed_lines=48
17245 ac_sed_frag=1 # Number of current file.
17246 ac_beg=1 # First line for current file.
17247 ac_end=$ac_max_sed_lines # Line after last line for current file.
17248 ac_more_lines=:
17249 ac_sed_cmds=
17250 while $ac_more_lines; do
17251 if test $ac_beg -gt 1; then
17252 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17253 else
17254 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17255 fi
17256 if test ! -s $tmp/subs.frag; then
17257 ac_more_lines=false
17258 else
17259 # The purpose of the label and of the branching condition is to
17260 # speed up the sed processing (if there are no `@' at all, there
17261 # is no need to browse any of the substitutions).
17262 # These are the two extra sed commands mentioned above.
17263 (echo ':t
17264 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17265 if test -z "$ac_sed_cmds"; then
17266 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17267 else
17268 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17269 fi
17270 ac_sed_frag=`expr $ac_sed_frag + 1`
17271 ac_beg=$ac_end
17272 ac_end=`expr $ac_end + $ac_max_sed_lines`
17273 fi
17274 done
17275 if test -z "$ac_sed_cmds"; then
17276 ac_sed_cmds=cat
17277 fi
17278fi # test -n "$CONFIG_FILES"
17279
17280_ACEOF
17281cat >>$CONFIG_STATUS <<\_ACEOF
17282for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17283 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17284 case $ac_file in
17285 - | *:- | *:-:* ) # input from stdin
17286 cat >$tmp/stdin
17287 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17288 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17289 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17290 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17291 * ) ac_file_in=$ac_file.in ;;
17292 esac
17293
17294 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17295 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17296$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17297 X"$ac_file" : 'X\(//\)[^/]' \| \
17298 X"$ac_file" : 'X\(//\)$' \| \
17299 X"$ac_file" : 'X\(/\)' \| \
17300 . : '\(.\)' 2>/dev/null ||
17301echo X"$ac_file" |
17302 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17303 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17304 /^X\(\/\/\)$/{ s//\1/; q; }
17305 /^X\(\/\).*/{ s//\1/; q; }
17306 s/.*/./; q'`
17307 { case "$ac_dir" in
17308 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17309 *) as_incr_dir=.;;
17310esac
17311as_dummy="$ac_dir"
17312for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17313 case $as_mkdir_dir in
17314 # Skip DOS drivespec
17315 ?:) as_incr_dir=$as_mkdir_dir ;;
17316 *)
17317 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17318 test -d "$as_incr_dir" ||
17319 mkdir "$as_incr_dir" ||
17320 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17321echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17322 { (exit 1); exit 1; }; }
17323 ;;
17324 esac
17325done; }
17326
17327 ac_builddir=.
17328
17329if test "$ac_dir" != .; then
17330 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17331 # A "../" for each directory in $ac_dir_suffix.
17332 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17333else
17334 ac_dir_suffix= ac_top_builddir=
17335fi
17336
17337case $srcdir in
17338 .) # No --srcdir option. We are building in place.
17339 ac_srcdir=.
17340 if test -z "$ac_top_builddir"; then
17341 ac_top_srcdir=.
17342 else
17343 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17344 fi ;;
17345 [\\/]* | ?:[\\/]* ) # Absolute path.
17346 ac_srcdir=$srcdir$ac_dir_suffix;
17347 ac_top_srcdir=$srcdir ;;
17348 *) # Relative path.
17349 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17350 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17351esac
17352# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
17353# absolute.
17354ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise3271202002-11-07 07:42:30 +000017355ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000017356ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
17357ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
17358
17359
17360 case $INSTALL in
17361 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17362 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
17363 esac
17364
17365 if test x"$ac_file" != x-; then
17366 { echo "$as_me:$LINENO: creating $ac_file" >&5
17367echo "$as_me: creating $ac_file" >&6;}
17368 rm -f "$ac_file"
17369 fi
17370 # Let's still pretend it is `configure' which instantiates (i.e., don't
17371 # use $as_me), people would be surprised to read:
17372 # /* config.h. Generated by config.status. */
17373 if test x"$ac_file" = x-; then
17374 configure_input=
17375 else
17376 configure_input="$ac_file. "
17377 fi
17378 configure_input=$configure_input"Generated from `echo $ac_file_in |
17379 sed 's,.*/,,'` by configure."
17380
17381 # First look for the input files in the build tree, otherwise in the
17382 # src tree.
17383 ac_file_inputs=`IFS=:
17384 for f in $ac_file_in; do
17385 case $f in
17386 -) echo $tmp/stdin ;;
17387 [\\/$]*)
17388 # Absolute (can't be DOS-style, as IFS=:)
17389 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17390echo "$as_me: error: cannot find input file: $f" >&2;}
17391 { (exit 1); exit 1; }; }
17392 echo $f;;
17393 *) # Relative
17394 if test -f "$f"; then
17395 # Build tree
17396 echo $f
17397 elif test -f "$srcdir/$f"; then
17398 # Source tree
17399 echo $srcdir/$f
17400 else
17401 # /dev/null tree
17402 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17403echo "$as_me: error: cannot find input file: $f" >&2;}
17404 { (exit 1); exit 1; }; }
17405 fi;;
17406 esac
17407 done` || { (exit 1); exit 1; }
17408_ACEOF
17409cat >>$CONFIG_STATUS <<_ACEOF
17410 sed "$ac_vpsub
17411$extrasub
17412_ACEOF
17413cat >>$CONFIG_STATUS <<\_ACEOF
17414:t
17415/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17416s,@configure_input@,$configure_input,;t t
17417s,@srcdir@,$ac_srcdir,;t t
17418s,@abs_srcdir@,$ac_abs_srcdir,;t t
17419s,@top_srcdir@,$ac_top_srcdir,;t t
17420s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17421s,@builddir@,$ac_builddir,;t t
17422s,@abs_builddir@,$ac_abs_builddir,;t t
17423s,@top_builddir@,$ac_top_builddir,;t t
17424s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17425s,@INSTALL@,$ac_INSTALL,;t t
17426" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17427 rm -f $tmp/stdin
17428 if test x"$ac_file" != x-; then
17429 mv $tmp/out $ac_file
17430 else
17431 cat $tmp/out
17432 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017433 fi
17434
Martin v. Löwis11437992002-04-12 09:54:03 +000017435done
17436_ACEOF
17437cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017438
Martin v. Löwis11437992002-04-12 09:54:03 +000017439#
17440# CONFIG_HEADER section.
17441#
Guido van Rossum627b2d71993-12-24 10:39:16 +000017442
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017443# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17444# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017445#
17446# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000017447ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17448ac_dB='[ ].*$,\1#\2'
17449ac_dC=' '
17450ac_dD=',;t'
17451# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17452ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17453ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017454ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000017455ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017456
Martin v. Löwis11437992002-04-12 09:54:03 +000017457for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000017458 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000017459 case $ac_file in
17460 - | *:- | *:-:* ) # input from stdin
17461 cat >$tmp/stdin
17462 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17463 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17464 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17465 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17466 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017467 esac
17468
Martin v. Löwis11437992002-04-12 09:54:03 +000017469 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17470echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017471
Martin v. Löwis11437992002-04-12 09:54:03 +000017472 # First look for the input files in the build tree, otherwise in the
17473 # src tree.
17474 ac_file_inputs=`IFS=:
17475 for f in $ac_file_in; do
17476 case $f in
17477 -) echo $tmp/stdin ;;
17478 [\\/$]*)
17479 # Absolute (can't be DOS-style, as IFS=:)
17480 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17481echo "$as_me: error: cannot find input file: $f" >&2;}
17482 { (exit 1); exit 1; }; }
17483 echo $f;;
17484 *) # Relative
17485 if test -f "$f"; then
17486 # Build tree
17487 echo $f
17488 elif test -f "$srcdir/$f"; then
17489 # Source tree
17490 echo $srcdir/$f
17491 else
17492 # /dev/null tree
17493 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17494echo "$as_me: error: cannot find input file: $f" >&2;}
17495 { (exit 1); exit 1; }; }
17496 fi;;
17497 esac
17498 done` || { (exit 1); exit 1; }
17499 # Remove the trailing spaces.
17500 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017501
Martin v. Löwis11437992002-04-12 09:54:03 +000017502_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017503
Martin v. Löwis11437992002-04-12 09:54:03 +000017504# Transform confdefs.h into two sed scripts, `conftest.defines' and
17505# `conftest.undefs', that substitutes the proper values into
17506# config.h.in to produce config.h. The first handles `#define'
17507# templates, and the second `#undef' templates.
17508# And first: Protect against being on the right side of a sed subst in
17509# config.status. Protect against being in an unquoted here document
17510# in config.status.
17511rm -f conftest.defines conftest.undefs
17512# Using a here document instead of a string reduces the quoting nightmare.
17513# Putting comments in sed scripts is not portable.
17514#
17515# `end' is used to avoid that the second main sed command (meant for
17516# 0-ary CPP macros) applies to n-ary macro definitions.
17517# See the Autoconf documentation for `clear'.
17518cat >confdef2sed.sed <<\_ACEOF
17519s/[\\&,]/\\&/g
17520s,[\\$`],\\&,g
17521t clear
17522: clear
17523s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
17524t end
17525s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
17526: end
17527_ACEOF
17528# If some macros were called several times there might be several times
17529# the same #defines, which is useless. Nevertheless, we may not want to
17530# sort them, since we want the *last* AC-DEFINE to be honored.
17531uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17532sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17533rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017534
17535# This sed command replaces #undef with comments. This is necessary, for
17536# example, in the case of _POSIX_SOURCE, which is predefined and required
17537# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017538cat >>conftest.undefs <<\_ACEOF
17539s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
17540_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017541
Martin v. Löwis11437992002-04-12 09:54:03 +000017542# Break up conftest.defines because some shells have a limit on the size
17543# of here documents, and old seds have small limits too (100 cmds).
17544echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
17545echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
17546echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17547echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017548rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000017549while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000017550do
Martin v. Löwis11437992002-04-12 09:54:03 +000017551 # Write a limited-size here document to $tmp/defines.sed.
17552 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17553 # Speed up: don't consider the non `#define' lines.
17554 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
17555 # Work around the forget-to-reset-the-flag bug.
17556 echo 't clr' >>$CONFIG_STATUS
17557 echo ': clr' >>$CONFIG_STATUS
17558 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017559 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017560 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17561 rm -f $tmp/in
17562 mv $tmp/out $tmp/in
17563' >>$CONFIG_STATUS
17564 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17565 rm -f conftest.defines
17566 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000017567done
Martin v. Löwis11437992002-04-12 09:54:03 +000017568rm -f conftest.defines
17569echo ' fi # egrep' >>$CONFIG_STATUS
17570echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017571
Martin v. Löwis11437992002-04-12 09:54:03 +000017572# Break up conftest.undefs because some shells have a limit on the size
17573# of here documents, and old seds have small limits too (100 cmds).
17574echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
17575rm -f conftest.tail
17576while grep . conftest.undefs >/dev/null
17577do
17578 # Write a limited-size here document to $tmp/undefs.sed.
17579 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17580 # Speed up: don't consider the non `#undef'
17581 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
17582 # Work around the forget-to-reset-the-flag bug.
17583 echo 't clr' >>$CONFIG_STATUS
17584 echo ': clr' >>$CONFIG_STATUS
17585 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
17586 echo 'CEOF
17587 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17588 rm -f $tmp/in
17589 mv $tmp/out $tmp/in
17590' >>$CONFIG_STATUS
17591 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17592 rm -f conftest.undefs
17593 mv conftest.tail conftest.undefs
17594done
17595rm -f conftest.undefs
17596
17597cat >>$CONFIG_STATUS <<\_ACEOF
17598 # Let's still pretend it is `configure' which instantiates (i.e., don't
17599 # use $as_me), people would be surprised to read:
17600 # /* config.h. Generated by config.status. */
17601 if test x"$ac_file" = x-; then
17602 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000017603 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017604 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000017605 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017606 cat $tmp/in >>$tmp/config.h
17607 rm -f $tmp/in
17608 if test x"$ac_file" != x-; then
17609 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17610 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17611echo "$as_me: $ac_file is unchanged" >&6;}
17612 else
17613 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17614$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17615 X"$ac_file" : 'X\(//\)[^/]' \| \
17616 X"$ac_file" : 'X\(//\)$' \| \
17617 X"$ac_file" : 'X\(/\)' \| \
17618 . : '\(.\)' 2>/dev/null ||
17619echo X"$ac_file" |
17620 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17621 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17622 /^X\(\/\/\)$/{ s//\1/; q; }
17623 /^X\(\/\).*/{ s//\1/; q; }
17624 s/.*/./; q'`
17625 { case "$ac_dir" in
17626 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17627 *) as_incr_dir=.;;
17628esac
17629as_dummy="$ac_dir"
17630for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17631 case $as_mkdir_dir in
17632 # Skip DOS drivespec
17633 ?:) as_incr_dir=$as_mkdir_dir ;;
17634 *)
17635 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17636 test -d "$as_incr_dir" ||
17637 mkdir "$as_incr_dir" ||
17638 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17639echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17640 { (exit 1); exit 1; }; }
17641 ;;
17642 esac
17643done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017644
Martin v. Löwis11437992002-04-12 09:54:03 +000017645 rm -f $ac_file
17646 mv $tmp/config.h $ac_file
17647 fi
17648 else
17649 cat $tmp/config.h
17650 rm -f $tmp/config.h
17651 fi
17652done
17653_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017654
Martin v. Löwis11437992002-04-12 09:54:03 +000017655cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017656
Martin v. Löwis11437992002-04-12 09:54:03 +000017657{ (exit 0); exit 0; }
17658_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017659chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000017660ac_clean_files=$ac_clean_files_save
17661
17662
17663# configure is writing to config.log, and then calls config.status.
17664# config.status does its own redirection, appending to config.log.
17665# Unfortunately, on DOS this fails, as config.log is still kept open
17666# by configure, so config.status won't be able to write to it; its
17667# output is simply discarded. So we exec the FD to /dev/null,
17668# effectively closing config.log, so it can be properly (re)opened and
17669# appended to by config.status. When coming back to configure, we
17670# need to make the FD available again.
17671if test "$no_create" != yes; then
17672 ac_cs_success=:
17673 exec 5>/dev/null
17674 $SHELL $CONFIG_STATUS || ac_cs_success=false
17675 exec 5>>config.log
17676 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17677 # would make configure fail if this is the last instruction.
17678 $ac_cs_success || { (exit 1); exit 1; }
17679fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017680
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017681
17682echo "creating Setup"
17683if test ! -f Modules/Setup
17684then
17685 cp $srcdir/Modules/Setup.dist Modules/Setup
17686fi
17687
17688echo "creating Setup.local"
17689if test ! -f Modules/Setup.local
17690then
17691 echo "# Edit this file for local setup changes" >Modules/Setup.local
17692fi
17693
17694echo "creating Makefile"
17695$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17696 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017697 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017698mv config.c Modules