blob: 207eddfc34d78ced8abcc6e47565a16995afccf0 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis438b5342002-12-27 10:16:42 +00002# From configure.in Revision: 1.378 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis88afe662002-10-26 13:47:44 +00004# Generated by GNU Autoconf 2.53 for python 2.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000010
Martin v. Löwis11437992002-04-12 09:54:03 +000011if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
18## --------------------- ##
19## M4sh Initialization. ##
20## --------------------- ##
21
22# Be Bourne compatible
23if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24 emulate sh
25 NULLCMD=:
26elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27 set -o posix
28fi
29
30# NLS nuisances.
31# Support unset when possible.
32if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
33 as_unset=unset
34else
35 as_unset=false
36fi
37
38(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
39 { $as_unset LANG || test "${LANG+set}" != set; } ||
40 { LANG=C; export LANG; }
41(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
42 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
43 { LC_ALL=C; export LC_ALL; }
44(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
45 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
46 { LC_TIME=C; export LC_TIME; }
47(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
48 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
49 { LC_CTYPE=C; export LC_CTYPE; }
50(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
51 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
52 { LANGUAGE=C; export LANGUAGE; }
53(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
54 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
55 { LC_COLLATE=C; export LC_COLLATE; }
56(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
57 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
58 { LC_NUMERIC=C; export LC_NUMERIC; }
59(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
60 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
61 { LC_MESSAGES=C; export LC_MESSAGES; }
62
63
64# Name of the executable.
65as_me=`(basename "$0") 2>/dev/null ||
66$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67 X"$0" : 'X\(//\)$' \| \
68 X"$0" : 'X\(/\)$' \| \
69 . : '\(.\)' 2>/dev/null ||
70echo X/"$0" |
71 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
72 /^X\/\(\/\/\)$/{ s//\1/; q; }
73 /^X\/\(\/\).*/{ s//\1/; q; }
74 s/.*/./; q'`
75
76# PATH needs CR, and LINENO needs CR and PATH.
77# Avoid depending upon Character Ranges.
78as_cr_letters='abcdefghijklmnopqrstuvwxyz'
79as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
80as_cr_Letters=$as_cr_letters$as_cr_LETTERS
81as_cr_digits='0123456789'
82as_cr_alnum=$as_cr_Letters$as_cr_digits
83
84# The user is always right.
85if test "${PATH_SEPARATOR+set}" != set; then
86 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
89 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
90 PATH_SEPARATOR=';'
91 else
92 PATH_SEPARATOR=:
93 fi
94 rm -f conftest.sh
95fi
96
97
98 as_lineno_1=$LINENO
99 as_lineno_2=$LINENO
100 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
101 test "x$as_lineno_1" != "x$as_lineno_2" &&
102 test "x$as_lineno_3" = "x$as_lineno_2" || {
103 # Find who we are. Look in the path if we contain no path at all
104 # relative or not.
105 case $0 in
106 *[\\/]* ) as_myself=$0 ;;
107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
108for as_dir in $PATH
109do
110 IFS=$as_save_IFS
111 test -z "$as_dir" && as_dir=.
112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
113done
114
115 ;;
116 esac
117 # We did not find ourselves, most probably we were run as `sh COMMAND'
118 # in which case we are not to be found in the path.
119 if test "x$as_myself" = x; then
120 as_myself=$0
121 fi
122 if test ! -f "$as_myself"; then
123 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
124 { (exit 1); exit 1; }; }
125 fi
126 case $CONFIG_SHELL in
127 '')
128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
129for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
130do
131 IFS=$as_save_IFS
132 test -z "$as_dir" && as_dir=.
133 for as_base in sh bash ksh sh5; do
134 case $as_dir in
135 /*)
136 if ("$as_dir/$as_base" -c '
137 as_lineno_1=$LINENO
138 as_lineno_2=$LINENO
139 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
140 test "x$as_lineno_1" != "x$as_lineno_2" &&
141 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
142 CONFIG_SHELL=$as_dir/$as_base
143 export CONFIG_SHELL
144 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
145 fi;;
146 esac
147 done
148done
149;;
150 esac
151
152 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
153 # uniformly replaced by the line number. The first 'sed' inserts a
154 # line-number line before each line; the second 'sed' does the real
155 # work. The second script uses 'N' to pair each line-number line
156 # with the numbered line, and appends trailing '-' during
157 # substitution so that $LINENO is not a special case at line end.
158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
159 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
160 sed '=' <$as_myself |
161 sed '
162 N
163 s,$,-,
164 : loop
165 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
166 t loop
167 s,-$,,
168 s,^['$as_cr_digits']*\n,,
169 ' >$as_me.lineno &&
170 chmod +x $as_me.lineno ||
171 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
172 { (exit 1); exit 1; }; }
173
174 # Don't try to exec as it changes $[0], causing all sort of problems
175 # (the dirname of $[0] is not the place where we might find the
176 # original and so on. Autoconf is especially sensible to this).
177 . ./$as_me.lineno
178 # Exit status is that of the last command.
179 exit
180}
181
182
183case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
184 *c*,-n*) ECHO_N= ECHO_C='
185' ECHO_T=' ' ;;
186 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
187 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
188esac
189
190if expr a : '\(a\)' >/dev/null 2>&1; then
191 as_expr=expr
192else
193 as_expr=false
194fi
195
196rm -f conf$$ conf$$.exe conf$$.file
197echo >conf$$.file
198if ln -s conf$$.file conf$$ 2>/dev/null; then
199 # We could just check for DJGPP; but this test a) works b) is more generic
200 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
201 if test -f conf$$.exe; then
202 # Don't use ln at all; we don't have any links
203 as_ln_s='cp -p'
204 else
205 as_ln_s='ln -s'
206 fi
207elif ln conf$$.file conf$$ 2>/dev/null; then
208 as_ln_s=ln
209else
210 as_ln_s='cp -p'
211fi
212rm -f conf$$ conf$$.exe conf$$.file
213
214as_executable_p="test -f"
215
216# Sed expression to map a string onto a valid CPP name.
217as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
218
219# Sed expression to map a string onto a valid variable name.
220as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
221
222
223# IFS
224# We need space, tab and new line, in precisely that order.
225as_nl='
226'
227IFS=" $as_nl"
228
229# CDPATH.
230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
231
232
233# Name of the host.
234# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
235# so uname gets run too.
236ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
237
238exec 6>&1
239
240#
241# Initializations.
242#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000243ac_default_prefix=/usr/local
Martin v. Löwis11437992002-04-12 09:54:03 +0000244cross_compiling=no
245subdirs=
246MFLAGS=
247MAKEFLAGS=
248SHELL=${CONFIG_SHELL-/bin/sh}
249
250# Maximum number of lines to put in a shell here document.
251# This variable seems obsolete. It should probably be removed, and
252# only ac_max_sed_lines should be used.
253: ${ac_max_here_lines=38}
254
255# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000256PACKAGE_NAME='python'
257PACKAGE_TARNAME='python'
258PACKAGE_VERSION='2.3'
259PACKAGE_STRING='python 2.3'
260PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000261
262ac_unique_file="Include/object.h"
263# Factoring default headers for most tests.
264ac_includes_default="\
265#include <stdio.h>
266#if HAVE_SYS_TYPES_H
267# include <sys/types.h>
268#endif
269#if HAVE_SYS_STAT_H
270# include <sys/stat.h>
271#endif
272#if STDC_HEADERS
273# include <stdlib.h>
274# include <stddef.h>
275#else
276# if HAVE_STDLIB_H
277# include <stdlib.h>
278# endif
279#endif
280#if HAVE_STRING_H
281# if !STDC_HEADERS && HAVE_MEMORY_H
282# include <memory.h>
283# endif
284# include <string.h>
285#endif
286#if HAVE_STRINGS_H
287# include <strings.h>
288#endif
289#if HAVE_INTTYPES_H
290# include <inttypes.h>
291#else
292# if HAVE_STDINT_H
293# include <stdint.h>
294# endif
295#endif
296#if HAVE_UNISTD_H
297# include <unistd.h>
298#endif"
299
Guido van Rossum627b2d71993-12-24 10:39:16 +0000300
Guido van Rossum7f43da71994-08-01 12:15:30 +0000301# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000302ac_init_help=
303ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304# The variables have the same names as the options, with
305# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000306cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000308no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000309no_recursion=
310prefix=NONE
311program_prefix=NONE
312program_suffix=NONE
313program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000314silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000315site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318x_includes=NONE
319x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000320
321# Installation directory options.
322# These are left unexpanded so users can "make install exec_prefix=/foo"
323# and all the variables that are supposed to be based on exec_prefix
324# by default will actually change.
325# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000326bindir='${exec_prefix}/bin'
327sbindir='${exec_prefix}/sbin'
328libexecdir='${exec_prefix}/libexec'
329datadir='${prefix}/share'
330sysconfdir='${prefix}/etc'
331sharedstatedir='${prefix}/com'
332localstatedir='${prefix}/var'
333libdir='${exec_prefix}/lib'
334includedir='${prefix}/include'
335oldincludedir='/usr/include'
336infodir='${prefix}/info'
337mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000338
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339ac_prev=
340for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000341do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000342 # If the previous option needs an argument, assign it.
343 if test -n "$ac_prev"; then
344 eval "$ac_prev=\$ac_option"
345 ac_prev=
346 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000348
Martin v. Löwis11437992002-04-12 09:54:03 +0000349 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000351 # Accept the important Cygnus configure options, so we can diagnose typos.
352
Martin v. Löwis11437992002-04-12 09:54:03 +0000353 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000355 -bindir | --bindir | --bindi | --bind | --bin | --bi)
356 ac_prev=bindir ;;
357 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000358 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000359
360 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000361 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 -cache-file | --cache-file | --cache-fil | --cache-fi \
366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
367 ac_prev=cache_file ;;
368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 cache_file=$ac_optarg ;;
371
372 --config-cache | -C)
373 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
376 ac_prev=datadir ;;
377 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
378 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000379 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000380
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000382 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
385 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
386 { (exit 1); exit 1; }; }
387 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
388 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000391 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395 { (exit 1); exit 1; }; }
396 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397 case $ac_option in
398 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 *) ac_optarg=yes ;;
400 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
404 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
405 | --exec | --exe | --ex)
406 ac_prev=exec_prefix ;;
407 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
408 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
409 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 # Obsolete; use --with-gas.
414 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 -help | --help | --hel | --he | -h)
417 ac_init_help=long ;;
418 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
419 ac_init_help=recursive ;;
420 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
421 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000426 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 -includedir | --includedir | --includedi | --included | --include \
429 | --includ | --inclu | --incl | --inc)
430 ac_prev=includedir ;;
431 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
432 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000434
435 -infodir | --infodir | --infodi | --infod | --info | --inf)
436 ac_prev=infodir ;;
437 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439
440 -libdir | --libdir | --libdi | --libd)
441 ac_prev=libdir ;;
442 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000444
445 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
446 | --libexe | --libex | --libe)
447 ac_prev=libexecdir ;;
448 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
449 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -localstatedir | --localstatedir | --localstatedi | --localstated \
453 | --localstate | --localstat | --localsta | --localst \
454 | --locals | --local | --loca | --loc | --lo)
455 ac_prev=localstatedir ;;
456 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
457 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
458 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000460
461 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
462 ac_prev=mandir ;;
463 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 # Obsolete; use --without-fp.
468 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469
470 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000471 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 no_create=yes ;;
473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
476 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000478 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
479 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
480 | --oldin | --oldi | --old | --ol | --o)
481 ac_prev=oldincludedir ;;
482 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
483 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
484 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
488 ac_prev=prefix ;;
489 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000490 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
492 -program-prefix | --program-prefix | --program-prefi | --program-pref \
493 | --program-pre | --program-pr | --program-p)
494 ac_prev=program_prefix ;;
495 -program-prefix=* | --program-prefix=* | --program-prefi=* \
496 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498
499 -program-suffix | --program-suffix | --program-suffi | --program-suff \
500 | --program-suf | --program-su | --program-s)
501 ac_prev=program_suffix ;;
502 -program-suffix=* | --program-suffix=* | --program-suffi=* \
503 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-transform-name | --program-transform-name \
507 | --program-transform-nam | --program-transform-na \
508 | --program-transform-n | --program-transform- \
509 | --program-transform | --program-transfor \
510 | --program-transfo | --program-transf \
511 | --program-trans | --program-tran \
512 | --progr-tra | --program-tr | --program-t)
513 ac_prev=program_transform_name ;;
514 -program-transform-name=* | --program-transform-name=* \
515 | --program-transform-nam=* | --program-transform-na=* \
516 | --program-transform-n=* | --program-transform-=* \
517 | --program-transform=* | --program-transfor=* \
518 | --program-transfo=* | --program-transf=* \
519 | --program-trans=* | --program-tran=* \
520 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
524 | -silent | --silent | --silen | --sile | --sil)
525 silent=yes ;;
526
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000527 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
528 ac_prev=sbindir ;;
529 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
530 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000532
533 -sharedstatedir | --sharedstatedir | --sharedstatedi \
534 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
535 | --sharedst | --shareds | --shared | --share | --shar \
536 | --sha | --sh)
537 ac_prev=sharedstatedir ;;
538 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
539 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
540 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
541 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544 -site | --site | --sit)
545 ac_prev=site ;;
546 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000547 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
550 ac_prev=srcdir ;;
551 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000552 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
555 | --syscon | --sysco | --sysc | --sys | --sy)
556 ac_prev=sysconfdir ;;
557 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
558 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565
566 -v | -verbose | --verbose | --verbos | --verbo | --verb)
567 verbose=yes ;;
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 -version | --version | --versio | --versi | --vers | -V)
570 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000571
572 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
576 { echo "$as_me: error: invalid package name: $ac_package" >&2
577 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 case $ac_option in
580 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581 *) ac_optarg=yes ;;
582 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000584
585 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package | sed 's/-/_/g'`
592 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000594 --x)
595 # Obsolete; use --with-x.
596 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597
598 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
599 | --x-incl | --x-inc | --x-in | --x-i)
600 ac_prev=x_includes ;;
601 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
602 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
605 -x-libraries | --x-libraries | --x-librarie | --x-librari \
606 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
607 ac_prev=x_libraries ;;
608 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
609 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000610 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
Martin v. Löwis11437992002-04-12 09:54:03 +0000612 -*) { echo "$as_me: error: unrecognized option: $ac_option
613Try \`$0 --help' for more information." >&2
614 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615 ;;
616
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 *=*)
618 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
619 # Reject names that are not valid shell variable names.
620 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
621 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
622 { (exit 1); exit 1; }; }
623 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
624 eval "$ac_envvar='$ac_optarg'"
625 export $ac_envvar ;;
626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000627 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 # FIXME: should be removed in autoconf 3.0.
629 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
630 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
631 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
632 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633 ;;
634
635 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636done
637
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
640 { echo "$as_me: error: missing argument to $ac_option" >&2
641 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642fi
643
Martin v. Löwis11437992002-04-12 09:54:03 +0000644# Be sure to have absolute paths.
645for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646do
Martin v. Löwis11437992002-04-12 09:54:03 +0000647 eval ac_val=$`echo $ac_var`
648 case $ac_val in
649 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
650 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
651 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652 esac
653done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
657 localstatedir libdir includedir oldincludedir infodir mandir
658do
659 eval ac_val=$`echo $ac_var`
660 case $ac_val in
661 [\\/$]* | ?:[\\/]* ) ;;
662 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
663 { (exit 1); exit 1; }; };;
664 esac
665done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666
Martin v. Löwis11437992002-04-12 09:54:03 +0000667# There might be people who depend on the old broken behavior: `$host'
668# used to hold the argument of --host etc.
669# FIXME: To remove some day.
670build=$build_alias
671host=$host_alias
672target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673
Martin v. Löwis11437992002-04-12 09:54:03 +0000674# FIXME: To remove some day.
675if test "x$host_alias" != x; then
676 if test "x$build_alias" = x; then
677 cross_compiling=maybe
678 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
679 If a cross compiler is detected then cross compile mode will be used." >&2
680 elif test "x$build_alias" != "x$host_alias"; then
681 cross_compiling=yes
682 fi
683fi
684
685ac_tool_prefix=
686test -n "$host_alias" && ac_tool_prefix=$host_alias-
687
688test "$silent" = yes && exec 6>/dev/null
689
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
691# Find the source files, if location was not specified.
692if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000693 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000694 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000695 ac_confdir=`(dirname "$0") 2>/dev/null ||
696$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
697 X"$0" : 'X\(//\)[^/]' \| \
698 X"$0" : 'X\(//\)$' \| \
699 X"$0" : 'X\(/\)' \| \
700 . : '\(.\)' 2>/dev/null ||
701echo X"$0" |
702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
703 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
704 /^X\(\/\/\)$/{ s//\1/; q; }
705 /^X\(\/\).*/{ s//\1/; q; }
706 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 srcdir=$ac_confdir
708 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709 srcdir=..
710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711else
712 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000716 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
717 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000719 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
720 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000722fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000723srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
724ac_env_build_alias_set=${build_alias+set}
725ac_env_build_alias_value=$build_alias
726ac_cv_env_build_alias_set=${build_alias+set}
727ac_cv_env_build_alias_value=$build_alias
728ac_env_host_alias_set=${host_alias+set}
729ac_env_host_alias_value=$host_alias
730ac_cv_env_host_alias_set=${host_alias+set}
731ac_cv_env_host_alias_value=$host_alias
732ac_env_target_alias_set=${target_alias+set}
733ac_env_target_alias_value=$target_alias
734ac_cv_env_target_alias_set=${target_alias+set}
735ac_cv_env_target_alias_value=$target_alias
736ac_env_CC_set=${CC+set}
737ac_env_CC_value=$CC
738ac_cv_env_CC_set=${CC+set}
739ac_cv_env_CC_value=$CC
740ac_env_CFLAGS_set=${CFLAGS+set}
741ac_env_CFLAGS_value=$CFLAGS
742ac_cv_env_CFLAGS_set=${CFLAGS+set}
743ac_cv_env_CFLAGS_value=$CFLAGS
744ac_env_LDFLAGS_set=${LDFLAGS+set}
745ac_env_LDFLAGS_value=$LDFLAGS
746ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
747ac_cv_env_LDFLAGS_value=$LDFLAGS
748ac_env_CPPFLAGS_set=${CPPFLAGS+set}
749ac_env_CPPFLAGS_value=$CPPFLAGS
750ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
751ac_cv_env_CPPFLAGS_value=$CPPFLAGS
752ac_env_CPP_set=${CPP+set}
753ac_env_CPP_value=$CPP
754ac_cv_env_CPP_set=${CPP+set}
755ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756
Martin v. Löwis11437992002-04-12 09:54:03 +0000757#
758# Report the --help message.
759#
760if test "$ac_init_help" = "long"; then
761 # Omit some internal or obsolete options to make the list less imposing.
762 # This message is too long to be a string in the A/UX 3.1 sh.
763 cat <<_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000764\`configure' configures python 2.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000765
766Usage: $0 [OPTION]... [VAR=VALUE]...
767
768To assign environment variables (e.g., CC, CFLAGS...), specify them as
769VAR=VALUE. See below for descriptions of some of the useful variables.
770
771Defaults for the options are specified in brackets.
772
773Configuration:
774 -h, --help display this help and exit
775 --help=short display options specific to this package
776 --help=recursive display the short help of all the included packages
777 -V, --version display version information and exit
778 -q, --quiet, --silent do not print \`checking...' messages
779 --cache-file=FILE cache test results in FILE [disabled]
780 -C, --config-cache alias for \`--cache-file=config.cache'
781 -n, --no-create do not create output files
782 --srcdir=DIR find the sources in DIR [configure dir or \`..']
783
784_ACEOF
785
786 cat <<_ACEOF
787Installation directories:
788 --prefix=PREFIX install architecture-independent files in PREFIX
789 [$ac_default_prefix]
790 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
791 [PREFIX]
792
793By default, \`make install' will install all the files in
794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
796for instance \`--prefix=\$HOME'.
797
798For better control, use the options below.
799
800Fine tuning of the installation directories:
801 --bindir=DIR user executables [EPREFIX/bin]
802 --sbindir=DIR system admin executables [EPREFIX/sbin]
803 --libexecdir=DIR program executables [EPREFIX/libexec]
804 --datadir=DIR read-only architecture-independent data [PREFIX/share]
805 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
806 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
807 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
808 --libdir=DIR object code libraries [EPREFIX/lib]
809 --includedir=DIR C header files [PREFIX/include]
810 --oldincludedir=DIR C header files for non-gcc [/usr/include]
811 --infodir=DIR info documentation [PREFIX/info]
812 --mandir=DIR man documentation [PREFIX/man]
813_ACEOF
814
815 cat <<\_ACEOF
816_ACEOF
817fi
818
819if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000820 case $ac_init_help in
821 short | recursive ) echo "Configuration of python 2.3:";;
822 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 cat <<\_ACEOF
824
825Optional Features:
826 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
827 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000828 --enable-framework[=INSTALLDIR]
829 Build (MacOSX|Darwin) framework
830 --enable-shared disable/enable building shared python library
831 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
832 --enable-ipv6 Enable ipv6 (with ipv4) support
833 --disable-ipv6 Disable ipv6 support
834 --enable-unicode[=ucs[24]]
835 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000836
837Optional Packages:
838 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
839 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000840 --without-gcc never use gcc
841 --with-cxx=<compiler> enable C++ support
842 --with-suffix=.exe set executable suffix
843 --with-pydebug build with Py_DEBUG defined
844 --with-libs='lib1 ...' link against additional libs
845 --with-signal-module disable/enable signal module
846 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
847 --with(out)-threads[=DIRECTORY]
848 disable/enable thread support
849 --with(out)-thread[=DIRECTORY]
850 deprecated; use --with(out)-threads
851 --with-pth use GNU pth threading libraries
852 --with(out)-universal-newlines
853 disable/enable foreign newlines
854 --with(out)-doc-strings disable/enable documentation strings
855 --with(out)-pymalloc disable/enable specialized mallocs
856 --with-wctype-functions use wctype.h functions
857 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
858 --with-dl-dld=DL_DIR GNU dynamic linking
859 --with-fpectl enable SIGFPE catching
860 --with-libm=STRING math library
861 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000862
863Some influential environment variables:
864 CC C compiler command
865 CFLAGS C compiler flags
866 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
867 nonstandard directory <lib dir>
868 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
869 headers in a nonstandard directory <include dir>
870 CPP C preprocessor
871
872Use these variables to override the choices made by `configure' or to help
873it to find libraries and programs with nonstandard names/locations.
874
875_ACEOF
876fi
877
878if test "$ac_init_help" = "recursive"; then
879 # If there are subdirs, report their specific --help.
880 ac_popdir=`pwd`
881 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
882 test -d $ac_dir || continue
883 ac_builddir=.
884
885if test "$ac_dir" != .; then
886 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
887 # A "../" for each directory in $ac_dir_suffix.
888 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
889else
890 ac_dir_suffix= ac_top_builddir=
891fi
892
893case $srcdir in
894 .) # No --srcdir option. We are building in place.
895 ac_srcdir=.
896 if test -z "$ac_top_builddir"; then
897 ac_top_srcdir=.
898 else
899 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
900 fi ;;
901 [\\/]* | ?:[\\/]* ) # Absolute path.
902 ac_srcdir=$srcdir$ac_dir_suffix;
903 ac_top_srcdir=$srcdir ;;
904 *) # Relative path.
905 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
906 ac_top_srcdir=$ac_top_builddir$srcdir ;;
907esac
908# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
909# absolute.
910ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise3271202002-11-07 07:42:30 +0000911ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000912ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
913ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
914
915 cd $ac_dir
916 # Check for guested configure; otherwise get Cygnus style configure.
917 if test -f $ac_srcdir/configure.gnu; then
918 echo
919 $SHELL $ac_srcdir/configure.gnu --help=recursive
920 elif test -f $ac_srcdir/configure; then
921 echo
922 $SHELL $ac_srcdir/configure --help=recursive
923 elif test -f $ac_srcdir/configure.ac ||
924 test -f $ac_srcdir/configure.in; then
925 echo
926 $ac_configure --help
927 else
928 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
929 fi
930 cd $ac_popdir
931 done
932fi
933
934test -n "$ac_init_help" && exit 0
935if $ac_init_version; then
936 cat <<\_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000937python configure 2.3
938generated by GNU Autoconf 2.53
Martin v. Löwis11437992002-04-12 09:54:03 +0000939
940Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
941Free Software Foundation, Inc.
942This configure script is free software; the Free Software Foundation
943gives unlimited permission to copy, distribute and modify it.
944_ACEOF
945 exit 0
946fi
947exec 5>config.log
948cat >&5 <<_ACEOF
949This file contains any messages produced by compilers while
950running configure, to aid debugging if configure makes a mistake.
951
Martin v. Löwis88afe662002-10-26 13:47:44 +0000952It was created by python $as_me 2.3, which was
Martin v. Löwis11437992002-04-12 09:54:03 +0000953generated by GNU Autoconf 2.53. Invocation command line was
954
955 $ $0 $@
956
957_ACEOF
958{
959cat <<_ASUNAME
960## --------- ##
961## Platform. ##
962## --------- ##
963
964hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
965uname -m = `(uname -m) 2>/dev/null || echo unknown`
966uname -r = `(uname -r) 2>/dev/null || echo unknown`
967uname -s = `(uname -s) 2>/dev/null || echo unknown`
968uname -v = `(uname -v) 2>/dev/null || echo unknown`
969
970/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
971/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
972
973/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
974/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
975/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
976hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
977/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
978/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
979/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
980
981_ASUNAME
982
983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
984for as_dir in $PATH
985do
986 IFS=$as_save_IFS
987 test -z "$as_dir" && as_dir=.
988 echo "PATH: $as_dir"
989done
990
991} >&5
992
993cat >&5 <<_ACEOF
994
995
996## ----------- ##
997## Core tests. ##
998## ----------- ##
999
1000_ACEOF
1001
1002
1003# Keep a trace of the command line.
1004# Strip out --no-create and --no-recursion so they do not pile up.
1005# Also quote any args containing shell meta-characters.
1006ac_configure_args=
1007ac_sep=
1008for ac_arg
1009do
1010 case $ac_arg in
1011 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1012 | --no-cr | --no-c | -n ) continue ;;
1013 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1014 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1015 continue ;;
1016 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1017 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1018 esac
1019 case " $ac_configure_args " in
1020 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1021 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1022 ac_sep=" " ;;
1023 esac
1024 # Get rid of the leading space.
1025done
1026
1027# When interrupted or exit'd, cleanup temporary files, and complete
1028# config.log. We remove comments because anyway the quotes in there
1029# would cause problems or look ugly.
1030# WARNING: Be sure not to use single quotes in there, as some shells,
1031# such as our DU 5.0 friend, will then `close' the trap.
1032trap 'exit_status=$?
1033 # Save into config.log some information that might help in debugging.
1034 {
1035 echo
1036 cat <<\_ASBOX
1037## ---------------- ##
1038## Cache variables. ##
1039## ---------------- ##
1040_ASBOX
1041 echo
1042 # The following way of writing the cache mishandles newlines in values,
1043{
1044 (set) 2>&1 |
1045 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1046 *ac_space=\ *)
1047 sed -n \
1048 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1049 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1050 ;;
1051 *)
1052 sed -n \
1053 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1054 ;;
1055 esac;
1056}
1057 echo
1058 if test -s confdefs.h; then
1059 cat <<\_ASBOX
1060## ----------- ##
1061## confdefs.h. ##
1062## ----------- ##
1063_ASBOX
1064 echo
1065 sed "/^$/d" confdefs.h
1066 echo
1067 fi
1068 test "$ac_signal" != 0 &&
1069 echo "$as_me: caught signal $ac_signal"
1070 echo "$as_me: exit $exit_status"
1071 } >&5
1072 rm -f core core.* *.core &&
1073 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1074 exit $exit_status
1075 ' 0
1076for ac_signal in 1 2 13 15; do
1077 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1078done
1079ac_signal=0
1080
1081# confdefs.h avoids OS command line length limits that DEFS can exceed.
1082rm -rf conftest* confdefs.h
1083# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1084echo >confdefs.h
1085
1086# Predefined preprocessor variables.
1087
1088cat >>confdefs.h <<_ACEOF
1089#define PACKAGE_NAME "$PACKAGE_NAME"
1090_ACEOF
1091
1092
1093cat >>confdefs.h <<_ACEOF
1094#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1095_ACEOF
1096
1097
1098cat >>confdefs.h <<_ACEOF
1099#define PACKAGE_VERSION "$PACKAGE_VERSION"
1100_ACEOF
1101
1102
1103cat >>confdefs.h <<_ACEOF
1104#define PACKAGE_STRING "$PACKAGE_STRING"
1105_ACEOF
1106
1107
1108cat >>confdefs.h <<_ACEOF
1109#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1110_ACEOF
1111
1112
1113# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114# Prefer explicitly selected file to automatically selected ones.
1115if test -z "$CONFIG_SITE"; then
1116 if test "x$prefix" != xNONE; then
1117 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1118 else
1119 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1120 fi
1121fi
1122for ac_site_file in $CONFIG_SITE; do
1123 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1125echo "$as_me: loading site script $ac_site_file" >&6;}
1126 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 . "$ac_site_file"
1128 fi
1129done
1130
1131if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 # Some versions of bash will fail to source /dev/null (special
1133 # files actually), so we avoid doing that.
1134 if test -f "$cache_file"; then
1135 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1136echo "$as_me: loading cache $cache_file" >&6;}
1137 case $cache_file in
1138 [\\/]* | ?:[\\/]* ) . $cache_file;;
1139 *) . ./$cache_file;;
1140 esac
1141 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142else
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1144echo "$as_me: creating cache $cache_file" >&6;}
1145 >$cache_file
1146fi
1147
1148# Check that the precious variables saved in the cache have kept the same
1149# value.
1150ac_cache_corrupted=false
1151for ac_var in `(set) 2>&1 |
1152 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1153 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1154 eval ac_new_set=\$ac_env_${ac_var}_set
1155 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1156 eval ac_new_val="\$ac_env_${ac_var}_value"
1157 case $ac_old_set,$ac_new_set in
1158 set,)
1159 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1160echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1161 ac_cache_corrupted=: ;;
1162 ,set)
1163 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1164echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1165 ac_cache_corrupted=: ;;
1166 ,);;
1167 *)
1168 if test "x$ac_old_val" != "x$ac_new_val"; then
1169 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1170echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1171 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1172echo "$as_me: former value: $ac_old_val" >&2;}
1173 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1174echo "$as_me: current value: $ac_new_val" >&2;}
1175 ac_cache_corrupted=:
1176 fi;;
1177 esac
1178 # Pass precious variables to config.status.
1179 if test "$ac_new_set" = set; then
1180 case $ac_new_val in
1181 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1182 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1183 *) ac_arg=$ac_var=$ac_new_val ;;
1184 esac
1185 case " $ac_configure_args " in
1186 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1187 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1188 esac
1189 fi
1190done
1191if $ac_cache_corrupted; then
1192 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1193echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1194 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1195echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1196 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197fi
1198
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1203ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204
Guido van Rossum627b2d71993-12-24 10:39:16 +00001205
Michael W. Hudson54241132001-12-07 15:38:26 +00001206
1207
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208
Martin v. Löwis11437992002-04-12 09:54:03 +00001209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
Martin v. Löwis88afe662002-10-26 13:47:44 +00001222
1223
1224
1225
1226
1227
1228
1229
1230
Martin v. Löwis11437992002-04-12 09:54:03 +00001231ac_config_headers="$ac_config_headers pyconfig.h"
1232
1233
1234# This is for stuff that absolutely must end up in pyconfig.h.
1235# Please use pyport.h instead, if possible.
1236
1237
1238
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001239
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001240
1241
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001242VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001243
Martin v. Löwis1142de32002-03-29 16:28:31 +00001244
1245SOVERSION=1.0
1246
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001247# The later defininition of _XOPEN_SOURCE disables certain features
1248# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1249
1250cat >>confdefs.h <<\_ACEOF
1251#define _GNU_SOURCE 1
1252_ACEOF
1253
1254
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001255define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001256
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001257# Arguments passed to configure.
1258
1259CONFIG_ARGS="$ac_configure_args"
1260
Jack Jansene578a632001-08-15 01:27:14 +00001261# Check whether --enable-framework or --disable-framework was given.
1262if test "${enable_framework+set}" = set; then
1263 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001264
Jack Jansene578a632001-08-15 01:27:14 +00001265 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001267 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001268 esac
1269 case $enableval in
1270 no)
1271 PYTHONFRAMEWORK=
1272 PYTHONFRAMEWORKDIR=no-framework
1273 PYTHONFRAMEWORKPREFIX=
1274 PYTHONFRAMEWORKINSTALLDIR=
1275 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001276 ;;
1277 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001278 PYTHONFRAMEWORK=Python
1279 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001280 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001281 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1282 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001283 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001284
Guido van Rossum563e7081996-09-10 18:20:48 +00001285else
Martin v. Löwis11437992002-04-12 09:54:03 +00001286
Jack Jansene578a632001-08-15 01:27:14 +00001287 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001288 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001289 PYTHONFRAMEWORKPREFIX=
1290 PYTHONFRAMEWORKINSTALLDIR=
1291 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001292
Martin v. Löwis11437992002-04-12 09:54:03 +00001293fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001294
1295
1296
1297
Jack Jansene578a632001-08-15 01:27:14 +00001298
1299##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001300## AC_HELP_STRING(--with-dyld,
1301## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001302##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001303# Set name for machine-dependent library files
1304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305echo "$as_me:$LINENO: checking MACHDEP" >&5
1306echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001307if test -z "$MACHDEP"
1308then
Guido van Rossum563e7081996-09-10 18:20:48 +00001309 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001310 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1311 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001312 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001313 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001314 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001315 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001316 ac_md_system=`echo $ac_sys_system |
1317 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1318 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001319 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001320 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001321
Guido van Rossum07397971997-04-29 21:49:50 +00001322 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001323 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001324 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001325 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001326 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001327 esac
1328fi
Guido van Rossum91922671997-10-09 20:24:13 +00001329
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001330# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1331# disable features if it is defined, without any means to access these
1332# features as extensions. For these systems, we skip the definition of
1333# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1334# some feature, make sure there is no alternative way to access this
1335# feature. Also, when using wildcards, make sure you have verified the
1336# need for not defining _XOPEN_SOURCE on all systems matching the
1337# wildcard, and that the wildcard does not include future systems
1338# (which may remove their limitations).
1339case $ac_sys_system/$ac_sys_release in
1340 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1341 # even though select is a POSIX function. Reported by J. Ribbens.
1342 OpenBSD/2.* | OpenBSD/3.[012])
1343 define_xopen_source=no;;
1344esac
1345
1346if test $define_xopen_source = yes
1347then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001348
1349cat >>confdefs.h <<\_ACEOF
1350#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001351_ACEOF
1352
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001353
1354 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1355 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1356 # several APIs are not declared. Since this is also needed in some
1357 # cases for HP-UX, we define it globally.
1358
1359
1360cat >>confdefs.h <<\_ACEOF
1361#define _XOPEN_SOURCE_EXTENDED 1
1362_ACEOF
1363
1364
1365cat >>confdefs.h <<\_ACEOF
1366#define _POSIX_C_SOURCE 200112L
1367_ACEOF
1368
1369
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001370fi
1371
Guido van Rossum91922671997-10-09 20:24:13 +00001372#
1373# SGI compilers allow the specification of the both the ABI and the
1374# ISA on the command line. Depending on the values of these switches,
1375# different and often incompatable code will be generated.
1376#
1377# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1378# thus supply support for various ABI/ISA combinations. The MACHDEP
1379# variable is also adjusted.
1380#
1381
1382if test ! -z "$SGI_ABI"
1383then
1384 CC="cc $SGI_ABI"
1385 LDFLAGS="$SGI_ABI $LDFLAGS"
1386 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1387fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001388echo "$as_me:$LINENO: result: $MACHDEP" >&5
1389echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001390
Guido van Rossum627b2d71993-12-24 10:39:16 +00001391# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001392echo "$as_me:$LINENO: checking for --without-gcc" >&5
1393echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1394
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001395# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001396if test "${with_gcc+set}" = set; then
1397 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001398
Guido van Rossum7f43da71994-08-01 12:15:30 +00001399 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001400 no) CC=cc
1401 without_gcc=yes;;
1402 yes) CC=gcc
1403 without_gcc=no;;
1404 *) CC=$withval
1405 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001406 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001407else
Martin v. Löwis11437992002-04-12 09:54:03 +00001408
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001409 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001410 AIX*) CC=cc_r
1411 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001412 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001413 case $BE_HOST_CPU in
1414 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001415 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001416 without_gcc=yes
Mark Hammond8235ea12002-07-19 06:55:41 +00001417 OPT="-O -export pragma"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001418 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001419 ;;
1420 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001421 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001422 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001423 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001424 ;;
1425 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1427echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1428 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001429 ;;
1430 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001431 AR="\$(srcdir)/Modules/ar_beos"
1432 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001433 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001434 Monterey*)
1435 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001436 without_gcc=;;
1437 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001438 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001439fi;
1440echo "$as_me:$LINENO: result: $without_gcc" >&5
1441echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001442
1443
Guido van Rossum95012191999-12-16 17:50:52 +00001444
Fred Drakea1a84e72001-03-06 05:52:16 +00001445MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001446echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1447echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1448
Guido van Rossum95012191999-12-16 17:50:52 +00001449# Check whether --with-cxx or --without-cxx was given.
1450if test "${with_cxx+set}" = set; then
1451 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001452
Martin v. Löwis22352952000-12-13 17:37:02 +00001453 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001454 case $withval in
1455 no) CXX=
1456 with_cxx=no;;
1457 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001458 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001459 with_cxx=$withval;;
1460 esac
1461else
Martin v. Löwis11437992002-04-12 09:54:03 +00001462
Guido van Rossum95012191999-12-16 17:50:52 +00001463 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001464 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001465
Martin v. Löwis11437992002-04-12 09:54:03 +00001466fi;
1467echo "$as_me:$LINENO: result: $with_cxx" >&5
1468echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001469
1470if test "$with_cxx" = "yes"
1471then
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1473echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1474 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001475fi
1476
1477
1478
1479
Martin v. Löwis11437992002-04-12 09:54:03 +00001480if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001481then
1482 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1483do
Martin v. Löwis11437992002-04-12 09:54:03 +00001484 # Extract the first word of "$ac_prog", so it can be a program name with args.
Martin v. Löwis22352952000-12-13 17:37:02 +00001485set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001486echo "$as_me:$LINENO: checking for $ac_word" >&5
1487echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1488if test "${ac_cv_prog_CXX+set}" = set; then
1489 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001490else
1491 if test -n "$CXX"; then
1492 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1493else
Martin v. Löwis11437992002-04-12 09:54:03 +00001494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1495for as_dir in $PATH
1496do
1497 IFS=$as_save_IFS
1498 test -z "$as_dir" && as_dir=.
1499 for ac_exec_ext in '' $ac_executable_extensions; do
1500 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1501 ac_cv_prog_CXX="$ac_prog"
1502 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1503 break 2
1504 fi
1505done
1506done
1507
Martin v. Löwis22352952000-12-13 17:37:02 +00001508fi
1509fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001510CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001511if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 echo "$as_me:$LINENO: result: $CXX" >&5
1513echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001514else
Martin v. Löwis11437992002-04-12 09:54:03 +00001515 echo "$as_me:$LINENO: result: no" >&5
1516echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001517fi
1518
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001520done
1521test -n "$CXX" || CXX="notfound"
1522
1523 if test "$CXX" = "notfound"
1524 then
1525 CXX=
1526 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001527 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001528ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001529ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1530ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1531ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1532 cat >conftest.$ac_ext <<_ACEOF
1533#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001534#include "confdefs.h"
1535
Martin v. Löwis11437992002-04-12 09:54:03 +00001536#ifdef F77_DUMMY_MAIN
1537# ifdef __cplusplus
1538 extern "C"
1539# endif
1540 int F77_DUMMY_MAIN() { return 1; }
1541#endif
1542int
1543main ()
1544{
Michael W. Hudson54241132001-12-07 15:38:26 +00001545
Martin v. Löwis11437992002-04-12 09:54:03 +00001546 ;
1547 return 0;
1548}
1549_ACEOF
1550ac_clean_files_save=$ac_clean_files
1551ac_clean_files="$ac_clean_files a.out a.exe"
1552# Try to create an executable without -o first, disregard a.out.
1553# It will help us diagnose broken compilers, and finding out an intuition
1554# of exeext.
1555echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1556echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1557ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1558if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1559 (eval $ac_link_default) 2>&5
1560 ac_status=$?
1561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1562 (exit $ac_status); }; then
1563 # Find the output, starting from the most likely. This scheme is
1564# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1565# resort.
1566
1567# Be careful to initialize this variable, since it used to be cached.
1568# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1569ac_cv_exeext=
1570for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1571 ls a.out conftest 2>/dev/null;
1572 ls a.* conftest.* 2>/dev/null`; do
1573 case $ac_file in
1574 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1575 a.out ) # We found the default executable, but exeext='' is most
1576 # certainly right.
1577 break;;
1578 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1579 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1580 export ac_cv_exeext
1581 break;;
1582 * ) break;;
1583 esac
1584done
1585else
1586 echo "$as_me: failed program was:" >&5
1587cat conftest.$ac_ext >&5
1588{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1589echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1590 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001591fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001592
1593ac_exeext=$ac_cv_exeext
1594echo "$as_me:$LINENO: result: $ac_file" >&5
1595echo "${ECHO_T}$ac_file" >&6
1596
1597# Check the compiler produces executables we can run. If not, either
1598# the compiler is broken, or we cross compile.
1599echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1600echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1601# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1602# If not cross compiling, check that we can run a simple program.
1603if test "$cross_compiling" != yes; then
1604 if { ac_try='./$ac_file'
1605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1606 (eval $ac_try) 2>&5
1607 ac_status=$?
1608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1609 (exit $ac_status); }; }; then
1610 cross_compiling=no
1611 else
1612 if test "$cross_compiling" = maybe; then
1613 cross_compiling=yes
1614 else
1615 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1616If you meant to cross compile, use \`--host'." >&5
1617echo "$as_me: error: cannot run C++ compiled programs.
1618If you meant to cross compile, use \`--host'." >&2;}
1619 { (exit 1); exit 1; }; }
1620 fi
1621 fi
1622fi
1623echo "$as_me:$LINENO: result: yes" >&5
1624echo "${ECHO_T}yes" >&6
1625
1626rm -f a.out a.exe conftest$ac_cv_exeext
1627ac_clean_files=$ac_clean_files_save
1628# Check the compiler produces executables we can run. If not, either
1629# the compiler is broken, or we cross compile.
1630echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1631echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1632echo "$as_me:$LINENO: result: $cross_compiling" >&5
1633echo "${ECHO_T}$cross_compiling" >&6
1634
1635echo "$as_me:$LINENO: checking for suffix of executables" >&5
1636echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1637if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1638 (eval $ac_link) 2>&5
1639 ac_status=$?
1640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1641 (exit $ac_status); }; then
1642 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1643# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1644# work properly (i.e., refer to `conftest.exe'), while it won't with
1645# `rm'.
1646for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1647 case $ac_file in
1648 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1649 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1650 export ac_cv_exeext
1651 break;;
1652 * ) break;;
1653 esac
1654done
1655else
1656 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1657echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1658 { (exit 1); exit 1; }; }
1659fi
1660
1661rm -f conftest$ac_cv_exeext
1662echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1663echo "${ECHO_T}$ac_cv_exeext" >&6
1664
1665rm -f conftest.$ac_ext
1666EXEEXT=$ac_cv_exeext
1667ac_exeext=$EXEEXT
1668
1669 ac_ext=c
1670ac_cpp='$CPP $CPPFLAGS'
1671ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1672ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1673ac_compiler_gnu=$ac_cv_c_compiler_gnu
1674
1675
Martin v. Löwis22352952000-12-13 17:37:02 +00001676
1677 fi
1678fi
1679
Guido van Rossum8b131c51995-03-09 14:10:13 +00001680# If the user switches compilers, we can't believe the cache
1681if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1682then
Martin v. Löwis11437992002-04-12 09:54:03 +00001683 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1684(it is also a good idea to do 'make clean' before compiling)" >&5
1685echo "$as_me: error: cached CC is different -- throw away $cache_file
1686(it is also a good idea to do 'make clean' before compiling)" >&2;}
1687 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001688fi
1689
Martin v. Löwis11437992002-04-12 09:54:03 +00001690ac_ext=c
1691ac_cpp='$CPP $CPPFLAGS'
1692ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1693ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1694ac_compiler_gnu=$ac_cv_c_compiler_gnu
1695if test -n "$ac_tool_prefix"; then
1696 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1697set dummy ${ac_tool_prefix}gcc; ac_word=$2
1698echo "$as_me:$LINENO: checking for $ac_word" >&5
1699echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1700if test "${ac_cv_prog_CC+set}" = set; then
1701 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001702else
1703 if test -n "$CC"; then
1704 ac_cv_prog_CC="$CC" # Let the user override the test.
1705else
Martin v. Löwis11437992002-04-12 09:54:03 +00001706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1707for as_dir in $PATH
1708do
1709 IFS=$as_save_IFS
1710 test -z "$as_dir" && as_dir=.
1711 for ac_exec_ext in '' $ac_executable_extensions; do
1712 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1713 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1714 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1715 break 2
1716 fi
1717done
1718done
1719
Jack Jansendd19cf82001-12-06 22:36:17 +00001720fi
1721fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001722CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001723if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001724 echo "$as_me:$LINENO: result: $CC" >&5
1725echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001726else
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 echo "$as_me:$LINENO: result: no" >&5
1728echo "${ECHO_T}no" >&6
1729fi
1730
1731fi
1732if test -z "$ac_cv_prog_CC"; then
1733 ac_ct_CC=$CC
1734 # Extract the first word of "gcc", so it can be a program name with args.
1735set dummy gcc; ac_word=$2
1736echo "$as_me:$LINENO: checking for $ac_word" >&5
1737echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1738if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1739 echo $ECHO_N "(cached) $ECHO_C" >&6
1740else
1741 if test -n "$ac_ct_CC"; then
1742 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1743else
1744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1745for as_dir in $PATH
1746do
1747 IFS=$as_save_IFS
1748 test -z "$as_dir" && as_dir=.
1749 for ac_exec_ext in '' $ac_executable_extensions; do
1750 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1751 ac_cv_prog_ac_ct_CC="gcc"
1752 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1753 break 2
1754 fi
1755done
1756done
1757
1758fi
1759fi
1760ac_ct_CC=$ac_cv_prog_ac_ct_CC
1761if test -n "$ac_ct_CC"; then
1762 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1763echo "${ECHO_T}$ac_ct_CC" >&6
1764else
1765 echo "$as_me:$LINENO: result: no" >&5
1766echo "${ECHO_T}no" >&6
1767fi
1768
1769 CC=$ac_ct_CC
1770else
1771 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001772fi
1773
Jack Jansendd19cf82001-12-06 22:36:17 +00001774if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001775 if test -n "$ac_tool_prefix"; then
1776 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1777set dummy ${ac_tool_prefix}cc; ac_word=$2
1778echo "$as_me:$LINENO: checking for $ac_word" >&5
1779echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1780if test "${ac_cv_prog_CC+set}" = set; then
1781 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001782else
1783 if test -n "$CC"; then
1784 ac_cv_prog_CC="$CC" # Let the user override the test.
1785else
Martin v. Löwis11437992002-04-12 09:54:03 +00001786as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1787for as_dir in $PATH
1788do
1789 IFS=$as_save_IFS
1790 test -z "$as_dir" && as_dir=.
1791 for ac_exec_ext in '' $ac_executable_extensions; do
1792 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1793 ac_cv_prog_CC="${ac_tool_prefix}cc"
1794 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1795 break 2
1796 fi
1797done
1798done
1799
1800fi
1801fi
1802CC=$ac_cv_prog_CC
1803if test -n "$CC"; then
1804 echo "$as_me:$LINENO: result: $CC" >&5
1805echo "${ECHO_T}$CC" >&6
1806else
1807 echo "$as_me:$LINENO: result: no" >&5
1808echo "${ECHO_T}no" >&6
1809fi
1810
1811fi
1812if test -z "$ac_cv_prog_CC"; then
1813 ac_ct_CC=$CC
1814 # Extract the first word of "cc", so it can be a program name with args.
1815set dummy cc; ac_word=$2
1816echo "$as_me:$LINENO: checking for $ac_word" >&5
1817echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1818if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1819 echo $ECHO_N "(cached) $ECHO_C" >&6
1820else
1821 if test -n "$ac_ct_CC"; then
1822 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1823else
1824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1825for as_dir in $PATH
1826do
1827 IFS=$as_save_IFS
1828 test -z "$as_dir" && as_dir=.
1829 for ac_exec_ext in '' $ac_executable_extensions; do
1830 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1831 ac_cv_prog_ac_ct_CC="cc"
1832 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1833 break 2
1834 fi
1835done
1836done
1837
1838fi
1839fi
1840ac_ct_CC=$ac_cv_prog_ac_ct_CC
1841if test -n "$ac_ct_CC"; then
1842 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1843echo "${ECHO_T}$ac_ct_CC" >&6
1844else
1845 echo "$as_me:$LINENO: result: no" >&5
1846echo "${ECHO_T}no" >&6
1847fi
1848
1849 CC=$ac_ct_CC
1850else
1851 CC="$ac_cv_prog_CC"
1852fi
1853
1854fi
1855if test -z "$CC"; then
1856 # Extract the first word of "cc", so it can be a program name with args.
1857set dummy cc; ac_word=$2
1858echo "$as_me:$LINENO: checking for $ac_word" >&5
1859echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1860if test "${ac_cv_prog_CC+set}" = set; then
1861 echo $ECHO_N "(cached) $ECHO_C" >&6
1862else
1863 if test -n "$CC"; then
1864 ac_cv_prog_CC="$CC" # Let the user override the test.
1865else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001866 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1868for as_dir in $PATH
1869do
1870 IFS=$as_save_IFS
1871 test -z "$as_dir" && as_dir=.
1872 for ac_exec_ext in '' $ac_executable_extensions; do
1873 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1874 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1875 ac_prog_rejected=yes
1876 continue
1877 fi
1878 ac_cv_prog_CC="cc"
1879 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1880 break 2
1881 fi
1882done
1883done
1884
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001885if test $ac_prog_rejected = yes; then
1886 # We found a bogon in the path, so make sure we never use it.
1887 set dummy $ac_cv_prog_CC
1888 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001889 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001890 # We chose a different compiler from the bogus one.
1891 # However, it has the same basename, so the bogon will be chosen
1892 # first if we set CC to just the basename; use the full file name.
1893 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001894 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001895 shift
1896 ac_cv_prog_CC="$@"
1897 fi
1898fi
1899fi
1900fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001901CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001902if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001903 echo "$as_me:$LINENO: result: $CC" >&5
1904echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001905else
Martin v. Löwis11437992002-04-12 09:54:03 +00001906 echo "$as_me:$LINENO: result: no" >&5
1907echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001908fi
1909
Martin v. Löwis11437992002-04-12 09:54:03 +00001910fi
1911if test -z "$CC"; then
1912 if test -n "$ac_tool_prefix"; then
1913 for ac_prog in cl
1914 do
1915 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1916set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1917echo "$as_me:$LINENO: checking for $ac_word" >&5
1918echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1919if test "${ac_cv_prog_CC+set}" = set; then
1920 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001921else
1922 if test -n "$CC"; then
1923 ac_cv_prog_CC="$CC" # Let the user override the test.
1924else
Martin v. Löwis11437992002-04-12 09:54:03 +00001925as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1926for as_dir in $PATH
1927do
1928 IFS=$as_save_IFS
1929 test -z "$as_dir" && as_dir=.
1930 for ac_exec_ext in '' $ac_executable_extensions; do
1931 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1932 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1933 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1934 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001935 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001936done
1937done
1938
1939fi
1940fi
1941CC=$ac_cv_prog_CC
1942if test -n "$CC"; then
1943 echo "$as_me:$LINENO: result: $CC" >&5
1944echo "${ECHO_T}$CC" >&6
1945else
1946 echo "$as_me:$LINENO: result: no" >&5
1947echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001948fi
1949
Martin v. Löwis11437992002-04-12 09:54:03 +00001950 test -n "$CC" && break
1951 done
1952fi
1953if test -z "$CC"; then
1954 ac_ct_CC=$CC
1955 for ac_prog in cl
1956do
1957 # Extract the first word of "$ac_prog", so it can be a program name with args.
1958set dummy $ac_prog; ac_word=$2
1959echo "$as_me:$LINENO: checking for $ac_word" >&5
1960echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1961if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1962 echo $ECHO_N "(cached) $ECHO_C" >&6
1963else
1964 if test -n "$ac_ct_CC"; then
1965 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1966else
1967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1968for as_dir in $PATH
1969do
1970 IFS=$as_save_IFS
1971 test -z "$as_dir" && as_dir=.
1972 for ac_exec_ext in '' $ac_executable_extensions; do
1973 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1974 ac_cv_prog_ac_ct_CC="$ac_prog"
1975 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1976 break 2
1977 fi
1978done
1979done
Jack Jansendd19cf82001-12-06 22:36:17 +00001980
Martin v. Löwis11437992002-04-12 09:54:03 +00001981fi
1982fi
1983ac_ct_CC=$ac_cv_prog_ac_ct_CC
1984if test -n "$ac_ct_CC"; then
1985 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1986echo "${ECHO_T}$ac_ct_CC" >&6
1987else
1988 echo "$as_me:$LINENO: result: no" >&5
1989echo "${ECHO_T}no" >&6
1990fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001991
Martin v. Löwis11437992002-04-12 09:54:03 +00001992 test -n "$ac_ct_CC" && break
1993done
Michael W. Hudson54241132001-12-07 15:38:26 +00001994
Martin v. Löwis11437992002-04-12 09:54:03 +00001995 CC=$ac_ct_CC
1996fi
1997
1998fi
1999
2000
2001test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2002echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2003 { (exit 1); exit 1; }; }
2004
2005# Provide some information about the compiler.
2006echo "$as_me:$LINENO:" \
2007 "checking for C compiler version" >&5
2008ac_compiler=`set X $ac_compile; echo $2`
2009{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2010 (eval $ac_compiler --version </dev/null >&5) 2>&5
2011 ac_status=$?
2012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2013 (exit $ac_status); }
2014{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2015 (eval $ac_compiler -v </dev/null >&5) 2>&5
2016 ac_status=$?
2017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2018 (exit $ac_status); }
2019{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2020 (eval $ac_compiler -V </dev/null >&5) 2>&5
2021 ac_status=$?
2022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2023 (exit $ac_status); }
2024
2025cat >conftest.$ac_ext <<_ACEOF
2026#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002027#include "confdefs.h"
2028
Martin v. Löwis11437992002-04-12 09:54:03 +00002029#ifdef F77_DUMMY_MAIN
2030# ifdef __cplusplus
2031 extern "C"
2032# endif
2033 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002035int
2036main ()
2037{
2038
2039 ;
2040 return 0;
2041}
2042_ACEOF
2043ac_clean_files_save=$ac_clean_files
2044ac_clean_files="$ac_clean_files a.out a.exe"
2045# Try to create an executable without -o first, disregard a.out.
2046# It will help us diagnose broken compilers, and finding out an intuition
2047# of exeext.
2048echo "$as_me:$LINENO: checking for C compiler default output" >&5
2049echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2050ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2051if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2052 (eval $ac_link_default) 2>&5
2053 ac_status=$?
2054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2055 (exit $ac_status); }; then
2056 # Find the output, starting from the most likely. This scheme is
2057# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2058# resort.
2059
2060# Be careful to initialize this variable, since it used to be cached.
2061# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2062ac_cv_exeext=
2063for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2064 ls a.out conftest 2>/dev/null;
2065 ls a.* conftest.* 2>/dev/null`; do
2066 case $ac_file in
2067 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2068 a.out ) # We found the default executable, but exeext='' is most
2069 # certainly right.
2070 break;;
2071 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2072 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2073 export ac_cv_exeext
2074 break;;
2075 * ) break;;
2076 esac
2077done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002078else
Martin v. Löwis11437992002-04-12 09:54:03 +00002079 echo "$as_me: failed program was:" >&5
2080cat conftest.$ac_ext >&5
2081{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2082echo "$as_me: error: C compiler cannot create executables" >&2;}
2083 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002084fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002085
Martin v. Löwis11437992002-04-12 09:54:03 +00002086ac_exeext=$ac_cv_exeext
2087echo "$as_me:$LINENO: result: $ac_file" >&5
2088echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002089
Martin v. Löwis11437992002-04-12 09:54:03 +00002090# Check the compiler produces executables we can run. If not, either
2091# the compiler is broken, or we cross compile.
2092echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2093echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2094# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2095# If not cross compiling, check that we can run a simple program.
2096if test "$cross_compiling" != yes; then
2097 if { ac_try='./$ac_file'
2098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2099 (eval $ac_try) 2>&5
2100 ac_status=$?
2101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2102 (exit $ac_status); }; }; then
2103 cross_compiling=no
2104 else
2105 if test "$cross_compiling" = maybe; then
2106 cross_compiling=yes
2107 else
2108 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2109If you meant to cross compile, use \`--host'." >&5
2110echo "$as_me: error: cannot run C compiled programs.
2111If you meant to cross compile, use \`--host'." >&2;}
2112 { (exit 1); exit 1; }; }
2113 fi
2114 fi
2115fi
2116echo "$as_me:$LINENO: result: yes" >&5
2117echo "${ECHO_T}yes" >&6
2118
2119rm -f a.out a.exe conftest$ac_cv_exeext
2120ac_clean_files=$ac_clean_files_save
2121# Check the compiler produces executables we can run. If not, either
2122# the compiler is broken, or we cross compile.
2123echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2124echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2125echo "$as_me:$LINENO: result: $cross_compiling" >&5
2126echo "${ECHO_T}$cross_compiling" >&6
2127
2128echo "$as_me:$LINENO: checking for suffix of executables" >&5
2129echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2131 (eval $ac_link) 2>&5
2132 ac_status=$?
2133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2134 (exit $ac_status); }; then
2135 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2136# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2137# work properly (i.e., refer to `conftest.exe'), while it won't with
2138# `rm'.
2139for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2140 case $ac_file in
2141 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2142 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2143 export ac_cv_exeext
2144 break;;
2145 * ) break;;
2146 esac
2147done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002148else
Martin v. Löwis11437992002-04-12 09:54:03 +00002149 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2150echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2151 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002152fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002153
Martin v. Löwis11437992002-04-12 09:54:03 +00002154rm -f conftest$ac_cv_exeext
2155echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2156echo "${ECHO_T}$ac_cv_exeext" >&6
2157
2158rm -f conftest.$ac_ext
2159EXEEXT=$ac_cv_exeext
2160ac_exeext=$EXEEXT
2161echo "$as_me:$LINENO: checking for suffix of object files" >&5
2162echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2163if test "${ac_cv_objext+set}" = set; then
2164 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002165else
Martin v. Löwis11437992002-04-12 09:54:03 +00002166 cat >conftest.$ac_ext <<_ACEOF
2167#line $LINENO "configure"
2168#include "confdefs.h"
2169
2170#ifdef F77_DUMMY_MAIN
2171# ifdef __cplusplus
2172 extern "C"
2173# endif
2174 int F77_DUMMY_MAIN() { return 1; }
2175#endif
2176int
2177main ()
2178{
2179
2180 ;
2181 return 0;
2182}
2183_ACEOF
2184rm -f conftest.o conftest.obj
2185if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2186 (eval $ac_compile) 2>&5
2187 ac_status=$?
2188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2189 (exit $ac_status); }; then
2190 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2191 case $ac_file in
2192 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2193 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2194 break;;
2195 esac
2196done
2197else
2198 echo "$as_me: failed program was:" >&5
2199cat conftest.$ac_ext >&5
2200{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2201echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2202 { (exit 1); exit 1; }; }
2203fi
2204
2205rm -f conftest.$ac_cv_objext conftest.$ac_ext
2206fi
2207echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2208echo "${ECHO_T}$ac_cv_objext" >&6
2209OBJEXT=$ac_cv_objext
2210ac_objext=$OBJEXT
2211echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2212echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2213if test "${ac_cv_c_compiler_gnu+set}" = set; then
2214 echo $ECHO_N "(cached) $ECHO_C" >&6
2215else
2216 cat >conftest.$ac_ext <<_ACEOF
2217#line $LINENO "configure"
2218#include "confdefs.h"
2219
2220#ifdef F77_DUMMY_MAIN
2221# ifdef __cplusplus
2222 extern "C"
2223# endif
2224 int F77_DUMMY_MAIN() { return 1; }
2225#endif
2226int
2227main ()
2228{
2229#ifndef __GNUC__
2230 choke me
2231#endif
2232
2233 ;
2234 return 0;
2235}
2236_ACEOF
2237rm -f conftest.$ac_objext
2238if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2239 (eval $ac_compile) 2>&5
2240 ac_status=$?
2241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2242 (exit $ac_status); } &&
2243 { ac_try='test -s conftest.$ac_objext'
2244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2245 (eval $ac_try) 2>&5
2246 ac_status=$?
2247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2248 (exit $ac_status); }; }; then
2249 ac_compiler_gnu=yes
2250else
2251 echo "$as_me: failed program was:" >&5
2252cat conftest.$ac_ext >&5
2253ac_compiler_gnu=no
2254fi
2255rm -f conftest.$ac_objext conftest.$ac_ext
2256ac_cv_c_compiler_gnu=$ac_compiler_gnu
2257
2258fi
2259echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2260echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2261GCC=`test $ac_compiler_gnu = yes && echo yes`
2262ac_test_CFLAGS=${CFLAGS+set}
2263ac_save_CFLAGS=$CFLAGS
2264CFLAGS="-g"
2265echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2266echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2267if test "${ac_cv_prog_cc_g+set}" = set; then
2268 echo $ECHO_N "(cached) $ECHO_C" >&6
2269else
2270 cat >conftest.$ac_ext <<_ACEOF
2271#line $LINENO "configure"
2272#include "confdefs.h"
2273
2274#ifdef F77_DUMMY_MAIN
2275# ifdef __cplusplus
2276 extern "C"
2277# endif
2278 int F77_DUMMY_MAIN() { return 1; }
2279#endif
2280int
2281main ()
2282{
2283
2284 ;
2285 return 0;
2286}
2287_ACEOF
2288rm -f conftest.$ac_objext
2289if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2290 (eval $ac_compile) 2>&5
2291 ac_status=$?
2292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2293 (exit $ac_status); } &&
2294 { ac_try='test -s conftest.$ac_objext'
2295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2296 (eval $ac_try) 2>&5
2297 ac_status=$?
2298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2299 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002300 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002301else
Martin v. Löwis11437992002-04-12 09:54:03 +00002302 echo "$as_me: failed program was:" >&5
2303cat conftest.$ac_ext >&5
2304ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002305fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002306rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002307fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002308echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2309echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002310if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002311 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002312elif test $ac_cv_prog_cc_g = yes; then
2313 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002314 CFLAGS="-g -O2"
2315 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002316 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002317 fi
2318else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002319 if test "$GCC" = yes; then
2320 CFLAGS="-O2"
2321 else
2322 CFLAGS=
2323 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002324fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002325# Some people use a C++ compiler to compile C. Since we use `exit',
2326# in C++ we need to declare it. In case someone uses the same compiler
2327# for both compiling C and C++ we need to have the C++ compiler decide
2328# the declaration of exit, since it's the most demanding environment.
2329cat >conftest.$ac_ext <<_ACEOF
2330#ifndef __cplusplus
2331 choke me
2332#endif
2333_ACEOF
2334rm -f conftest.$ac_objext
2335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2336 (eval $ac_compile) 2>&5
2337 ac_status=$?
2338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2339 (exit $ac_status); } &&
2340 { ac_try='test -s conftest.$ac_objext'
2341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2342 (eval $ac_try) 2>&5
2343 ac_status=$?
2344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2345 (exit $ac_status); }; }; then
2346 for ac_declaration in \
2347 ''\
2348 '#include <stdlib.h>' \
2349 'extern "C" void std::exit (int) throw (); using std::exit;' \
2350 'extern "C" void std::exit (int); using std::exit;' \
2351 'extern "C" void exit (int) throw ();' \
2352 'extern "C" void exit (int);' \
2353 'void exit (int);'
2354do
2355 cat >conftest.$ac_ext <<_ACEOF
2356#line $LINENO "configure"
2357#include "confdefs.h"
2358#include <stdlib.h>
2359$ac_declaration
2360#ifdef F77_DUMMY_MAIN
2361# ifdef __cplusplus
2362 extern "C"
2363# endif
2364 int F77_DUMMY_MAIN() { return 1; }
2365#endif
2366int
2367main ()
2368{
2369exit (42);
2370 ;
2371 return 0;
2372}
2373_ACEOF
2374rm -f conftest.$ac_objext
2375if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2376 (eval $ac_compile) 2>&5
2377 ac_status=$?
2378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2379 (exit $ac_status); } &&
2380 { ac_try='test -s conftest.$ac_objext'
2381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2382 (eval $ac_try) 2>&5
2383 ac_status=$?
2384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2385 (exit $ac_status); }; }; then
2386 :
2387else
2388 echo "$as_me: failed program was:" >&5
2389cat conftest.$ac_ext >&5
2390continue
2391fi
2392rm -f conftest.$ac_objext conftest.$ac_ext
2393 cat >conftest.$ac_ext <<_ACEOF
2394#line $LINENO "configure"
2395#include "confdefs.h"
2396$ac_declaration
2397#ifdef F77_DUMMY_MAIN
2398# ifdef __cplusplus
2399 extern "C"
2400# endif
2401 int F77_DUMMY_MAIN() { return 1; }
2402#endif
2403int
2404main ()
2405{
2406exit (42);
2407 ;
2408 return 0;
2409}
2410_ACEOF
2411rm -f conftest.$ac_objext
2412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2413 (eval $ac_compile) 2>&5
2414 ac_status=$?
2415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2416 (exit $ac_status); } &&
2417 { ac_try='test -s conftest.$ac_objext'
2418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2419 (eval $ac_try) 2>&5
2420 ac_status=$?
2421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2422 (exit $ac_status); }; }; then
2423 break
2424else
2425 echo "$as_me: failed program was:" >&5
2426cat conftest.$ac_ext >&5
2427fi
2428rm -f conftest.$ac_objext conftest.$ac_ext
2429done
2430rm -f conftest*
2431if test -n "$ac_declaration"; then
2432 echo '#ifdef __cplusplus' >>confdefs.h
2433 echo $ac_declaration >>confdefs.h
2434 echo '#endif' >>confdefs.h
2435fi
2436
2437else
2438 echo "$as_me: failed program was:" >&5
2439cat conftest.$ac_ext >&5
2440fi
2441rm -f conftest.$ac_objext conftest.$ac_ext
2442ac_ext=c
2443ac_cpp='$CPP $CPPFLAGS'
2444ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2445ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2446ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002447
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002448
2449# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002450
2451ac_ext=c
2452ac_cpp='$CPP $CPPFLAGS'
2453ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2454ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2455ac_compiler_gnu=$ac_cv_c_compiler_gnu
2456echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2457echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002458# On Suns, sometimes $CPP names a directory.
2459if test -n "$CPP" && test -d "$CPP"; then
2460 CPP=
2461fi
2462if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002463 if test "${ac_cv_prog_CPP+set}" = set; then
2464 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002465else
Martin v. Löwis11437992002-04-12 09:54:03 +00002466 # Double quotes because CPP needs to be expanded
2467 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2468 do
2469 ac_preproc_ok=false
2470for ac_c_preproc_warn_flag in '' yes
2471do
2472 # Use a header file that comes with gcc, so configuring glibc
2473 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002474 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 # not just through cpp. "Syntax error" is here to catch this case.
2476 cat >conftest.$ac_ext <<_ACEOF
2477#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002478#include "confdefs.h"
2479#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 Syntax error
2481_ACEOF
2482if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2483 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2484 ac_status=$?
2485 egrep -v '^ *\+' conftest.er1 >conftest.err
2486 rm -f conftest.er1
2487 cat conftest.err >&5
2488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2489 (exit $ac_status); } >/dev/null; then
2490 if test -s conftest.err; then
2491 ac_cpp_err=$ac_c_preproc_warn_flag
2492 else
2493 ac_cpp_err=
2494 fi
2495else
2496 ac_cpp_err=yes
2497fi
2498if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002499 :
2500else
Martin v. Löwis11437992002-04-12 09:54:03 +00002501 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002502 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002503 # Broken: fails on valid input.
2504continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002505fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002506rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002507
Martin v. Löwis11437992002-04-12 09:54:03 +00002508 # OK, works on sane cases. Now check whether non-existent headers
2509 # can be detected and how.
2510 cat >conftest.$ac_ext <<_ACEOF
2511#line $LINENO "configure"
2512#include "confdefs.h"
2513#include <ac_nonexistent.h>
2514_ACEOF
2515if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2516 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2517 ac_status=$?
2518 egrep -v '^ *\+' conftest.er1 >conftest.err
2519 rm -f conftest.er1
2520 cat conftest.err >&5
2521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2522 (exit $ac_status); } >/dev/null; then
2523 if test -s conftest.err; then
2524 ac_cpp_err=$ac_c_preproc_warn_flag
2525 else
2526 ac_cpp_err=
2527 fi
2528else
2529 ac_cpp_err=yes
2530fi
2531if test -z "$ac_cpp_err"; then
2532 # Broken: success on invalid input.
2533continue
2534else
2535 echo "$as_me: failed program was:" >&5
2536 cat conftest.$ac_ext >&5
2537 # Passes both tests.
2538ac_preproc_ok=:
2539break
2540fi
2541rm -f conftest.err conftest.$ac_ext
2542
2543done
2544# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2545rm -f conftest.err conftest.$ac_ext
2546if $ac_preproc_ok; then
2547 break
2548fi
2549
2550 done
2551 ac_cv_prog_CPP=$CPP
2552
2553fi
2554 CPP=$ac_cv_prog_CPP
2555else
2556 ac_cv_prog_CPP=$CPP
2557fi
2558echo "$as_me:$LINENO: result: $CPP" >&5
2559echo "${ECHO_T}$CPP" >&6
2560ac_preproc_ok=false
2561for ac_c_preproc_warn_flag in '' yes
2562do
2563 # Use a header file that comes with gcc, so configuring glibc
2564 # with a fresh cross-compiler works.
2565 # On the NeXT, cc -E runs the code through the compiler's parser,
2566 # not just through cpp. "Syntax error" is here to catch this case.
2567 cat >conftest.$ac_ext <<_ACEOF
2568#line $LINENO "configure"
2569#include "confdefs.h"
2570#include <assert.h>
2571 Syntax error
2572_ACEOF
2573if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2574 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2575 ac_status=$?
2576 egrep -v '^ *\+' conftest.er1 >conftest.err
2577 rm -f conftest.er1
2578 cat conftest.err >&5
2579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2580 (exit $ac_status); } >/dev/null; then
2581 if test -s conftest.err; then
2582 ac_cpp_err=$ac_c_preproc_warn_flag
2583 else
2584 ac_cpp_err=
2585 fi
2586else
2587 ac_cpp_err=yes
2588fi
2589if test -z "$ac_cpp_err"; then
2590 :
2591else
2592 echo "$as_me: failed program was:" >&5
2593 cat conftest.$ac_ext >&5
2594 # Broken: fails on valid input.
2595continue
2596fi
2597rm -f conftest.err conftest.$ac_ext
2598
2599 # OK, works on sane cases. Now check whether non-existent headers
2600 # can be detected and how.
2601 cat >conftest.$ac_ext <<_ACEOF
2602#line $LINENO "configure"
2603#include "confdefs.h"
2604#include <ac_nonexistent.h>
2605_ACEOF
2606if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2607 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2608 ac_status=$?
2609 egrep -v '^ *\+' conftest.er1 >conftest.err
2610 rm -f conftest.er1
2611 cat conftest.err >&5
2612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2613 (exit $ac_status); } >/dev/null; then
2614 if test -s conftest.err; then
2615 ac_cpp_err=$ac_c_preproc_warn_flag
2616 else
2617 ac_cpp_err=
2618 fi
2619else
2620 ac_cpp_err=yes
2621fi
2622if test -z "$ac_cpp_err"; then
2623 # Broken: success on invalid input.
2624continue
2625else
2626 echo "$as_me: failed program was:" >&5
2627 cat conftest.$ac_ext >&5
2628 # Passes both tests.
2629ac_preproc_ok=:
2630break
2631fi
2632rm -f conftest.err conftest.$ac_ext
2633
2634done
2635# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2636rm -f conftest.err conftest.$ac_ext
2637if $ac_preproc_ok; then
2638 :
2639else
2640 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2641echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2642 { (exit 1); exit 1; }; }
2643fi
2644
2645ac_ext=c
2646ac_cpp='$CPP $CPPFLAGS'
2647ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2648ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2649ac_compiler_gnu=$ac_cv_c_compiler_gnu
2650
2651
2652
2653echo "$as_me:$LINENO: checking for AIX" >&5
2654echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2655cat >conftest.$ac_ext <<_ACEOF
2656#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002657#include "confdefs.h"
2658#ifdef _AIX
2659 yes
2660#endif
2661
Martin v. Löwis11437992002-04-12 09:54:03 +00002662_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002663if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2664 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 echo "$as_me:$LINENO: result: yes" >&5
2666echo "${ECHO_T}yes" >&6
2667cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002668#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002669_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002670
2671else
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 echo "$as_me:$LINENO: result: no" >&5
2673echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002674fi
2675rm -f conftest*
2676
Michael W. Hudson54241132001-12-07 15:38:26 +00002677
Martin v. Löwis11437992002-04-12 09:54:03 +00002678echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2679echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2680if test "${ac_cv_header_stdc+set}" = set; then
2681 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002682else
Martin v. Löwis11437992002-04-12 09:54:03 +00002683 cat >conftest.$ac_ext <<_ACEOF
2684#line $LINENO "configure"
2685#include "confdefs.h"
2686#include <stdlib.h>
2687#include <stdarg.h>
2688#include <string.h>
2689#include <float.h>
2690
2691_ACEOF
2692if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2693 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2694 ac_status=$?
2695 egrep -v '^ *\+' conftest.er1 >conftest.err
2696 rm -f conftest.er1
2697 cat conftest.err >&5
2698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2699 (exit $ac_status); } >/dev/null; then
2700 if test -s conftest.err; then
2701 ac_cpp_err=$ac_c_preproc_warn_flag
2702 else
2703 ac_cpp_err=
2704 fi
2705else
2706 ac_cpp_err=yes
2707fi
2708if test -z "$ac_cpp_err"; then
2709 ac_cv_header_stdc=yes
2710else
2711 echo "$as_me: failed program was:" >&5
2712 cat conftest.$ac_ext >&5
2713 ac_cv_header_stdc=no
2714fi
2715rm -f conftest.err conftest.$ac_ext
2716
2717if test $ac_cv_header_stdc = yes; then
2718 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2719 cat >conftest.$ac_ext <<_ACEOF
2720#line $LINENO "configure"
2721#include "confdefs.h"
2722#include <string.h>
2723
2724_ACEOF
2725if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2726 egrep "memchr" >/dev/null 2>&1; then
2727 :
2728else
2729 ac_cv_header_stdc=no
2730fi
2731rm -f conftest*
2732
2733fi
2734
2735if test $ac_cv_header_stdc = yes; then
2736 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2737 cat >conftest.$ac_ext <<_ACEOF
2738#line $LINENO "configure"
2739#include "confdefs.h"
2740#include <stdlib.h>
2741
2742_ACEOF
2743if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2744 egrep "free" >/dev/null 2>&1; then
2745 :
2746else
2747 ac_cv_header_stdc=no
2748fi
2749rm -f conftest*
2750
2751fi
2752
2753if test $ac_cv_header_stdc = yes; then
2754 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2755 if test "$cross_compiling" = yes; then
2756 :
2757else
2758 cat >conftest.$ac_ext <<_ACEOF
2759#line $LINENO "configure"
2760#include "confdefs.h"
2761#include <ctype.h>
2762#if ((' ' & 0x0FF) == 0x020)
2763# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2764# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2765#else
2766# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2767 || ('j' <= (c) && (c) <= 'r') \
2768 || ('s' <= (c) && (c) <= 'z'))
2769# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2770#endif
2771
2772#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2773int
2774main ()
2775{
2776 int i;
2777 for (i = 0; i < 256; i++)
2778 if (XOR (islower (i), ISLOWER (i))
2779 || toupper (i) != TOUPPER (i))
2780 exit(2);
2781 exit (0);
2782}
2783_ACEOF
2784rm -f conftest$ac_exeext
2785if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2786 (eval $ac_link) 2>&5
2787 ac_status=$?
2788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2789 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2791 (eval $ac_try) 2>&5
2792 ac_status=$?
2793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2794 (exit $ac_status); }; }; then
2795 :
2796else
2797 echo "$as_me: program exited with status $ac_status" >&5
2798echo "$as_me: failed program was:" >&5
2799cat conftest.$ac_ext >&5
2800( exit $ac_status )
2801ac_cv_header_stdc=no
2802fi
2803rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2804fi
2805fi
2806fi
2807echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2808echo "${ECHO_T}$ac_cv_header_stdc" >&6
2809if test $ac_cv_header_stdc = yes; then
2810
2811cat >>confdefs.h <<\_ACEOF
2812#define STDC_HEADERS 1
2813_ACEOF
2814
2815fi
2816
2817# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2828 inttypes.h stdint.h unistd.h
2829do
2830as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2831echo "$as_me:$LINENO: checking for $ac_header" >&5
2832echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2833if eval "test \"\${$as_ac_Header+set}\" = set"; then
2834 echo $ECHO_N "(cached) $ECHO_C" >&6
2835else
2836 cat >conftest.$ac_ext <<_ACEOF
2837#line $LINENO "configure"
2838#include "confdefs.h"
2839$ac_includes_default
2840
2841#include <$ac_header>
2842_ACEOF
2843rm -f conftest.$ac_objext
2844if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2845 (eval $ac_compile) 2>&5
2846 ac_status=$?
2847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2848 (exit $ac_status); } &&
2849 { ac_try='test -s conftest.$ac_objext'
2850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2851 (eval $ac_try) 2>&5
2852 ac_status=$?
2853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2854 (exit $ac_status); }; }; then
2855 eval "$as_ac_Header=yes"
2856else
2857 echo "$as_me: failed program was:" >&5
2858cat conftest.$ac_ext >&5
2859eval "$as_ac_Header=no"
2860fi
2861rm -f conftest.$ac_objext conftest.$ac_ext
2862fi
2863echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2864echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2865if test `eval echo '${'$as_ac_Header'}'` = yes; then
2866 cat >>confdefs.h <<_ACEOF
2867#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2868_ACEOF
2869
2870fi
2871
2872done
2873
2874
2875if test "${ac_cv_header_minix_config_h+set}" = set; then
2876 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2877echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2878if test "${ac_cv_header_minix_config_h+set}" = set; then
2879 echo $ECHO_N "(cached) $ECHO_C" >&6
2880fi
2881echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2882echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2883else
2884 # Is the header compilable?
2885echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2886echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2887cat >conftest.$ac_ext <<_ACEOF
2888#line $LINENO "configure"
2889#include "confdefs.h"
2890$ac_includes_default
2891#include <minix/config.h>
2892_ACEOF
2893rm -f conftest.$ac_objext
2894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2895 (eval $ac_compile) 2>&5
2896 ac_status=$?
2897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2898 (exit $ac_status); } &&
2899 { ac_try='test -s conftest.$ac_objext'
2900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2901 (eval $ac_try) 2>&5
2902 ac_status=$?
2903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2904 (exit $ac_status); }; }; then
2905 ac_header_compiler=yes
2906else
2907 echo "$as_me: failed program was:" >&5
2908cat conftest.$ac_ext >&5
2909ac_header_compiler=no
2910fi
2911rm -f conftest.$ac_objext conftest.$ac_ext
2912echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2913echo "${ECHO_T}$ac_header_compiler" >&6
2914
2915# Is the header present?
2916echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2917echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2918cat >conftest.$ac_ext <<_ACEOF
2919#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002920#include "confdefs.h"
2921#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002922_ACEOF
2923if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2924 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2925 ac_status=$?
2926 egrep -v '^ *\+' conftest.er1 >conftest.err
2927 rm -f conftest.er1
2928 cat conftest.err >&5
2929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2930 (exit $ac_status); } >/dev/null; then
2931 if test -s conftest.err; then
2932 ac_cpp_err=$ac_c_preproc_warn_flag
2933 else
2934 ac_cpp_err=
2935 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002936else
Martin v. Löwis11437992002-04-12 09:54:03 +00002937 ac_cpp_err=yes
2938fi
2939if test -z "$ac_cpp_err"; then
2940 ac_header_preproc=yes
2941else
2942 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002943 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002944 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002945fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002946rm -f conftest.err conftest.$ac_ext
2947echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2948echo "${ECHO_T}$ac_header_preproc" >&6
2949
2950# So? What about this header?
2951case $ac_header_compiler:$ac_header_preproc in
2952 yes:no )
2953 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2954echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2955 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2956echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2957 no:yes )
2958 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2959echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2960 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2961echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2962 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2963echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2964esac
2965echo "$as_me:$LINENO: checking for minix/config.h" >&5
2966echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2967if test "${ac_cv_header_minix_config_h+set}" = set; then
2968 echo $ECHO_N "(cached) $ECHO_C" >&6
2969else
2970 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002971fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002972echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2973echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2974
2975fi
2976if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002977 MINIX=yes
2978else
Martin v. Löwis11437992002-04-12 09:54:03 +00002979 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002980fi
2981
Martin v. Löwis11437992002-04-12 09:54:03 +00002982
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002983if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002984
2985cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002986#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002987_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002988
Martin v. Löwis11437992002-04-12 09:54:03 +00002989
2990cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002991#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002992_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002993
Martin v. Löwis11437992002-04-12 09:54:03 +00002994
2995cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002996#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002997_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002998
2999fi
3000
3001
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003002# Check for unsupported systems
3003case $ac_sys_system/$ac_sys_release in
3004SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3005 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3006 echo See README for details.
3007 exit 1;;
3008esac
3009
3010if test "$MINIX" = yes; then
3011 echo This system \(MINIX\) is no longer supported.
3012 echo Read README for details.
3013 exit 1
3014fi
3015
Michael W. Hudson54241132001-12-07 15:38:26 +00003016
Martin v. Löwis11437992002-04-12 09:54:03 +00003017echo "$as_me:$LINENO: checking for --with-suffix" >&5
3018echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003019
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003020# Check whether --with-suffix or --without-suffix was given.
3021if test "${with_suffix+set}" = set; then
3022 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003023
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003024 case $withval in
3025 no) EXEEXT=;;
3026 yes) EXEEXT=.exe;;
3027 *) EXEEXT=$withval;;
3028 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003029fi;
3030echo "$as_me:$LINENO: result: $EXEEXT" >&5
3031echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003032
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003033# Test whether we're running on a non-case-sensitive system, in which
3034# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003035
Martin v. Löwis11437992002-04-12 09:54:03 +00003036echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3037echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003038if test ! -d CaseSensitiveTestDir; then
3039mkdir CaseSensitiveTestDir
3040fi
3041
3042if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003043then
Martin v. Löwis11437992002-04-12 09:54:03 +00003044 echo "$as_me:$LINENO: result: yes" >&5
3045echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003046 BUILDEXEEXT=.exe
3047else
Martin v. Löwis11437992002-04-12 09:54:03 +00003048 echo "$as_me:$LINENO: result: no" >&5
3049echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003050 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003051fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003052rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003053
Guido van Rossumdd997f71998-10-07 19:58:26 +00003054case $MACHDEP in
3055bsdos*)
3056 case $CC in
3057 gcc) CC="$CC -D_HAVE_BSDI";;
3058 esac;;
3059esac
3060
Guido van Rossum24b1e751997-08-21 02:29:16 +00003061case $ac_sys_system in
3062hp*|HP*)
3063 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003064 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003065 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003066Monterey*)
3067 case $CC in
3068 cc) CC="$CC -Wl,-Bexport";;
3069 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003070SunOS*)
3071 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003072
3073cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003074#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003075_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003076
3077 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003078esac
3079
Michael W. Hudson54241132001-12-07 15:38:26 +00003080
3081
Martin v. Löwis11437992002-04-12 09:54:03 +00003082echo "$as_me:$LINENO: checking LIBRARY" >&5
3083echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003084if test -z "$LIBRARY"
3085then
3086 LIBRARY='libpython$(VERSION).a'
3087fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003088echo "$as_me:$LINENO: result: $LIBRARY" >&5
3089echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003090
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003091# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003092# name of the library into which to insert object files). BLDLIBRARY is also
3093# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3094# is blank as the main program is not linked directly against LDLIBRARY.
3095# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3096# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3097# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3098# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003099#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003100# RUNSHARED is used to run shared python without installed libraries
3101#
3102# INSTSONAME is the name of the shared library that will be use to install
3103# on the system - some systems like version suffix, others don't
3104
3105
Michael W. Hudson54241132001-12-07 15:38:26 +00003106
3107
3108
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003109
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003110LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003111BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003112INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003113DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003114LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003115RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003116
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003117# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003118# If CXX is set, and if it is needed to link a main function that was
3119# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3120# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003121# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003122# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003123
Martin v. Löwis11437992002-04-12 09:54:03 +00003124echo "$as_me:$LINENO: checking LINKCC" >&5
3125echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003126if test -z "$LINKCC"
3127then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003128 if test -z "$CXX"; then
3129 LINKCC="\$(PURIFY) \$(CC)"
3130 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003131 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003132 $CXX -c conftest.$ac_ext 2>&5
3133 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3134 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3135 then
3136 LINKCC="\$(PURIFY) \$(CC)"
3137 else
3138 LINKCC="\$(PURIFY) \$(CXX)"
3139 fi
3140 rm -fr conftest*
3141 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003142 case $ac_sys_system in
3143 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003144 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003145 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003146 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003147 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003148 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003149 esac
3150fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003151echo "$as_me:$LINENO: result: $LINKCC" >&5
3152echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003153
Martin v. Löwis11437992002-04-12 09:54:03 +00003154echo "$as_me:$LINENO: checking for --enable-shared" >&5
3155echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003156# Check whether --enable-shared or --disable-shared was given.
3157if test "${enable_shared+set}" = set; then
3158 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003159
Martin v. Löwis11437992002-04-12 09:54:03 +00003160fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003161
3162if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003163then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003164 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003165 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003166 enable_shared="yes";;
3167 *)
3168 enable_shared="no";;
3169 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003170fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003171echo "$as_me:$LINENO: result: $enable_shared" >&5
3172echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003173
3174
Martin v. Löwis11437992002-04-12 09:54:03 +00003175echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3176echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003177
Guido van Rossumb8552162001-09-05 14:58:11 +00003178# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3179# library that we build, but we do not want to link against it (we
3180# will find it with a -framework option). For this reason there is an
3181# extra variable BLDLIBRARY against which Python and the extension
3182# modules are linked, BLDLIBRARY. This is normally the same as
3183# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003184if test "$enable_framework"
3185then
3186 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3187 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3188 BLDLIBRARY=''
3189else
3190 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003191fi
Jack Jansene578a632001-08-15 01:27:14 +00003192
Martin v. Löwis1142de32002-03-29 16:28:31 +00003193# Other platforms follow
3194if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003195
3196cat >>confdefs.h <<\_ACEOF
3197#define Py_ENABLE_SHARED 1
3198_ACEOF
3199
Martin v. Löwis1142de32002-03-29 16:28:31 +00003200 case $ac_sys_system in
3201 BeOS*)
3202 LDLIBRARY='libpython$(VERSION).so'
3203 ;;
3204 CYGWIN*)
3205 LDLIBRARY='libpython$(VERSION).dll.a'
3206 DLLLIBRARY='libpython$(VERSION).dll'
3207 ;;
3208 SunOS*)
3209 LDLIBRARY='libpython$(VERSION).so'
3210 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3211 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3212 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003213 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003214 LDLIBRARY='libpython$(VERSION).so'
3215 BLDLIBRARY='-L. -lpython$(VERSION)'
3216 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3217 INSTSONAME="$LDLIBRARY".$SOVERSION
3218 ;;
3219 hp*|HP*)
3220 LDLIBRARY='libpython$(VERSION).sl'
3221 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3222 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3223 ;;
3224 OSF*)
3225 LDLIBRARY='libpython$(VERSION).so'
3226 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3227 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3228 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003229 atheos*)
3230 LDLIBRARY='libpython$(VERSION).so'
3231 BLDLIBRARY='-L. -lpython$(VERSION)'
3232 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3233 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003234 esac
3235 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3236 case $MACHDEP in
3237 dguxR4)
3238 LDLIBRARY='libpython$(VERSION).so'
3239 OPT="$OPT -pic"
3240 ;;
3241 esac
3242fi
3243
Martin v. Löwis11437992002-04-12 09:54:03 +00003244echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3245echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003246
Martin v. Löwis11437992002-04-12 09:54:03 +00003247if test -n "$ac_tool_prefix"; then
3248 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3249set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3250echo "$as_me:$LINENO: checking for $ac_word" >&5
3251echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3252if test "${ac_cv_prog_RANLIB+set}" = set; then
3253 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003254else
3255 if test -n "$RANLIB"; then
3256 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3257else
Martin v. Löwis11437992002-04-12 09:54:03 +00003258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3259for as_dir in $PATH
3260do
3261 IFS=$as_save_IFS
3262 test -z "$as_dir" && as_dir=.
3263 for ac_exec_ext in '' $ac_executable_extensions; do
3264 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3265 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3266 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3267 break 2
3268 fi
3269done
3270done
3271
Guido van Rossum627b2d71993-12-24 10:39:16 +00003272fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003273fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003274RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003275if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003276 echo "$as_me:$LINENO: result: $RANLIB" >&5
3277echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003278else
Martin v. Löwis11437992002-04-12 09:54:03 +00003279 echo "$as_me:$LINENO: result: no" >&5
3280echo "${ECHO_T}no" >&6
3281fi
3282
3283fi
3284if test -z "$ac_cv_prog_RANLIB"; then
3285 ac_ct_RANLIB=$RANLIB
3286 # Extract the first word of "ranlib", so it can be a program name with args.
3287set dummy ranlib; ac_word=$2
3288echo "$as_me:$LINENO: checking for $ac_word" >&5
3289echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3290if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3291 echo $ECHO_N "(cached) $ECHO_C" >&6
3292else
3293 if test -n "$ac_ct_RANLIB"; then
3294 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3295else
3296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3297for as_dir in $PATH
3298do
3299 IFS=$as_save_IFS
3300 test -z "$as_dir" && as_dir=.
3301 for ac_exec_ext in '' $ac_executable_extensions; do
3302 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3303 ac_cv_prog_ac_ct_RANLIB="ranlib"
3304 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3305 break 2
3306 fi
3307done
3308done
3309
3310 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3311fi
3312fi
3313ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3314if test -n "$ac_ct_RANLIB"; then
3315 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3316echo "${ECHO_T}$ac_ct_RANLIB" >&6
3317else
3318 echo "$as_me:$LINENO: result: no" >&5
3319echo "${ECHO_T}no" >&6
3320fi
3321
3322 RANLIB=$ac_ct_RANLIB
3323else
3324 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003325fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003326
3327
Guido van Rossum7f43da71994-08-01 12:15:30 +00003328for ac_prog in ar aal
3329do
Martin v. Löwis11437992002-04-12 09:54:03 +00003330 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003331set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003332echo "$as_me:$LINENO: checking for $ac_word" >&5
3333echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3334if test "${ac_cv_prog_AR+set}" = set; then
3335 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003336else
3337 if test -n "$AR"; then
3338 ac_cv_prog_AR="$AR" # Let the user override the test.
3339else
Martin v. Löwis11437992002-04-12 09:54:03 +00003340as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3341for as_dir in $PATH
3342do
3343 IFS=$as_save_IFS
3344 test -z "$as_dir" && as_dir=.
3345 for ac_exec_ext in '' $ac_executable_extensions; do
3346 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3347 ac_cv_prog_AR="$ac_prog"
3348 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3349 break 2
3350 fi
3351done
3352done
3353
Guido van Rossum7f43da71994-08-01 12:15:30 +00003354fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003355fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003356AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003357if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003358 echo "$as_me:$LINENO: result: $AR" >&5
3359echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003360else
Martin v. Löwis11437992002-04-12 09:54:03 +00003361 echo "$as_me:$LINENO: result: no" >&5
3362echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003363fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003364
Martin v. Löwis11437992002-04-12 09:54:03 +00003365 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003366done
3367test -n "$AR" || AR="ar"
3368
Michael W. Hudson54241132001-12-07 15:38:26 +00003369
Neil Schemenauera42c8272001-03-31 00:01:55 +00003370case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003371bsdos*|hp*|HP*)
3372 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003373 if test -z "$INSTALL"
3374 then
3375 INSTALL="${srcdir}/install-sh -c"
3376 fi
3377esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003378ac_aux_dir=
3379for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3380 if test -f $ac_dir/install-sh; then
3381 ac_aux_dir=$ac_dir
3382 ac_install_sh="$ac_aux_dir/install-sh -c"
3383 break
3384 elif test -f $ac_dir/install.sh; then
3385 ac_aux_dir=$ac_dir
3386 ac_install_sh="$ac_aux_dir/install.sh -c"
3387 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003388 elif test -f $ac_dir/shtool; then
3389 ac_aux_dir=$ac_dir
3390 ac_install_sh="$ac_aux_dir/shtool install -c"
3391 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003392 fi
3393done
3394if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003395 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3396echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3397 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003398fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003399ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3400ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3401ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003402
3403# Find a good install program. We prefer a C program (faster),
3404# so one script is as good as another. But avoid the broken or
3405# incompatible versions:
3406# SysV /etc/install, /usr/sbin/install
3407# SunOS /usr/etc/install
3408# IRIX /sbin/install
3409# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003410# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003411# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3412# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3413# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3414# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003415echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3416echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003417if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003418if test "${ac_cv_path_install+set}" = set; then
3419 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003420else
Martin v. Löwis11437992002-04-12 09:54:03 +00003421 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3422for as_dir in $PATH
3423do
3424 IFS=$as_save_IFS
3425 test -z "$as_dir" && as_dir=.
3426 # Account for people who put trailing slashes in PATH elements.
3427case $as_dir/ in
3428 ./ | .// | /cC/* | \
3429 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3430 /usr/ucb/* ) ;;
3431 *)
3432 # OSF1 and SCO ODT 3.0 have their own names for install.
3433 # Don't use installbsd from OSF since it installs stuff as root
3434 # by default.
3435 for ac_prog in ginstall scoinst install; do
3436 for ac_exec_ext in '' $ac_executable_extensions; do
3437 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3438 if test $ac_prog = install &&
3439 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3440 # AIX install. It has an incompatible calling convention.
3441 :
3442 elif test $ac_prog = install &&
3443 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3444 # program-specific install script used by HP pwplus--don't use.
3445 :
3446 else
3447 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3448 break 3
3449 fi
3450 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003451 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003452 done
3453 ;;
3454esac
3455done
3456
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003457
3458fi
3459 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003460 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003461 else
3462 # As a last resort, use the slow shell script. We don't cache a
3463 # path for INSTALL within a source directory, because that will
3464 # break other packages using the cache if that directory is
3465 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003466 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003467 fi
3468fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003469echo "$as_me:$LINENO: result: $INSTALL" >&5
3470echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003471
3472# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3473# It thinks the first close brace ends the variable substitution.
3474test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3475
Martin v. Löwis11437992002-04-12 09:54:03 +00003476test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003477
3478test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3479
Michael W. Hudson54241132001-12-07 15:38:26 +00003480
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003481# Not every filesystem supports hard links
3482
3483if test -z "$LN" ; then
3484 case $ac_sys_system in
3485 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003486 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003487 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003488 *) LN=ln;;
3489 esac
3490fi
3491
Fred Drake109d9862001-07-11 06:27:56 +00003492# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003493echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3494echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3495
Fred Drake109d9862001-07-11 06:27:56 +00003496# Check whether --with-pydebug or --without-pydebug was given.
3497if test "${with_pydebug+set}" = set; then
3498 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003499
Fred Drake109d9862001-07-11 06:27:56 +00003500if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003501then
3502
3503cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003504#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003505_ACEOF
3506
3507 echo "$as_me:$LINENO: result: yes" >&5
3508echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003509 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003510else echo "$as_me:$LINENO: result: no" >&5
3511echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003512fi
3513else
Martin v. Löwis11437992002-04-12 09:54:03 +00003514 echo "$as_me:$LINENO: result: no" >&5
3515echo "${ECHO_T}no" >&6
3516fi;
Fred Drake109d9862001-07-11 06:27:56 +00003517
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003518# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003519
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003520if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003521then
Neal Norwitzd957f392002-09-25 21:26:19 +00003522 case $GCC in
Guido van Rossumedca74a1997-07-18 23:29:40 +00003523 yes)
3524 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003525 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003526 if test "$Py_DEBUG" = 'true' ; then
3527 # Optimization messes up debuggers, so turn it off for
3528 # debug builds.
3529 OPT="-g -Wall -Wstrict-prototypes"
3530 else
3531 OPT="-g -O3 -Wall -Wstrict-prototypes"
3532 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003533 *)
Fred Drake109d9862001-07-11 06:27:56 +00003534 OPT="-O3 -Wall -Wstrict-prototypes";;
3535 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003536 case $ac_sys_system in
3537 SCO_SV*) OPT="$OPT -m486 -DSCO5";;
3538 esac
Fred Drake109d9862001-07-11 06:27:56 +00003539 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003540 *)
3541 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003542 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003543 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003544 SCO_SV*)
3545 CFLAGS="$CFLAGS -belf"
3546 OPT="-belf -O -Ki486 -DSCO5";;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003547 *)
3548 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003549 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003550 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003551 case $ac_sys_system in
3552 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003553 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003554 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003555fi
3556
Fred Drakee1ceaa02001-12-04 20:55:47 +00003557if test "$Py_DEBUG" = 'true'; then
3558 :
3559else
3560 OPT="-DNDEBUG $OPT"
3561fi
3562
Trent Mick635f6fb2000-08-23 21:33:05 +00003563# The current (beta) Monterey compiler dies with optimizations
3564case $ac_sys_system in
3565Monterey*) OPT="";;
3566esac
3567
Guido van Rossum563e7081996-09-10 18:20:48 +00003568if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003569then
3570 OPT="$OPT $ac_arch_flags"
3571fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003572
Martin v. Löwis11437992002-04-12 09:54:03 +00003573echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3574echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3575if test "${ac_cv_opt_olimit_ok+set}" = set; then
3576 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003577else
3578 ac_save_cc="$CC"
3579CC="$CC -OPT:Olimit=0"
3580if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003581 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003582else
Martin v. Löwis11437992002-04-12 09:54:03 +00003583 cat >conftest.$ac_ext <<_ACEOF
3584#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003585#include "confdefs.h"
3586int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003587_ACEOF
3588rm -f conftest$ac_exeext
3589if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3590 (eval $ac_link) 2>&5
3591 ac_status=$?
3592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3593 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3595 (eval $ac_try) 2>&5
3596 ac_status=$?
3597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3598 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003599 ac_cv_opt_olimit_ok=yes
3600else
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 echo "$as_me: program exited with status $ac_status" >&5
3602echo "$as_me: failed program was:" >&5
3603cat conftest.$ac_ext >&5
3604( exit $ac_status )
3605ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003606fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003607rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003608fi
Guido van Rossum91922671997-10-09 20:24:13 +00003609CC="$ac_save_cc"
3610fi
3611
Martin v. Löwis11437992002-04-12 09:54:03 +00003612echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3613echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003614if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003615 case $ac_sys_system in
3616 Darwin*) OPT="$OPT" ;;
3617 *) OPT="$OPT -OPT:Olimit=0";;
3618 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003619else
Martin v. Löwis11437992002-04-12 09:54:03 +00003620 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3621echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3622 if test "${ac_cv_olimit_ok+set}" = set; then
3623 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003624else
3625 ac_save_cc="$CC"
3626 CC="$CC -Olimit 1500"
3627 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003628 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003629else
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 cat >conftest.$ac_ext <<_ACEOF
3631#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003632#include "confdefs.h"
3633int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003634_ACEOF
3635rm -f conftest$ac_exeext
3636if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3637 (eval $ac_link) 2>&5
3638 ac_status=$?
3639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3640 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3642 (eval $ac_try) 2>&5
3643 ac_status=$?
3644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3645 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003646 ac_cv_olimit_ok=yes
3647else
Martin v. Löwis11437992002-04-12 09:54:03 +00003648 echo "$as_me: program exited with status $ac_status" >&5
3649echo "$as_me: failed program was:" >&5
3650cat conftest.$ac_ext >&5
3651( exit $ac_status )
3652ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003653fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003654rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003655fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003656 CC="$ac_save_cc"
3657fi
3658
Martin v. Löwis11437992002-04-12 09:54:03 +00003659 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3660echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003661 if test $ac_cv_olimit_ok = yes; then
3662 OPT="$OPT -Olimit 1500"
3663 fi
3664fi
3665
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003666# On some compilers, pthreads are available without further options
3667# (e.g. MacOS X). On some of these systems, the compiler will not
3668# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3669# So we have to see first whether pthreads are available without
3670# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003671echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3672echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3673if test "${ac_cv_pthread_is_default+set}" = set; then
3674 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003675else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003676 if test "$cross_compiling" = yes; then
3677 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003678else
Martin v. Löwis11437992002-04-12 09:54:03 +00003679 cat >conftest.$ac_ext <<_ACEOF
3680#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003681#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003682
Martin v. Löwis130fb172001-07-19 11:00:41 +00003683#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003684
3685void* routine(void* p){return NULL;}
3686
3687int main(){
3688 pthread_t p;
3689 if(pthread_create(&p,NULL,routine,NULL)!=0)
3690 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003691 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003692 return 0;
3693}
3694
Martin v. Löwis11437992002-04-12 09:54:03 +00003695_ACEOF
3696rm -f conftest$ac_exeext
3697if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3698 (eval $ac_link) 2>&5
3699 ac_status=$?
3700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3701 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3703 (eval $ac_try) 2>&5
3704 ac_status=$?
3705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3706 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003707 ac_cv_pthread_is_default=yes
3708else
Martin v. Löwis11437992002-04-12 09:54:03 +00003709 echo "$as_me: program exited with status $ac_status" >&5
3710echo "$as_me: failed program was:" >&5
3711cat conftest.$ac_ext >&5
3712( exit $ac_status )
3713ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003714fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003715rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003716fi
3717
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003718fi
3719
Martin v. Löwis11437992002-04-12 09:54:03 +00003720echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3721echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003722
Michael W. Hudson54241132001-12-07 15:38:26 +00003723
Martin v. Löwis11437992002-04-12 09:54:03 +00003724if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003725then
3726 ac_cv_kpthread=no
3727else
3728# -Kpthread, if available, provides the right #defines
3729# and linker options to make pthread_create available
3730# Some compilers won't report that they do not support -Kpthread,
3731# so we need to run a program to see whether it really made the
3732# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003733echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3734echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3735if test "${ac_cv_kpthread+set}" = set; then
3736 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003737else
3738 ac_save_cc="$CC"
3739CC="$CC -Kpthread"
3740if test "$cross_compiling" = yes; then
3741 ac_cv_kpthread=no
3742else
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 cat >conftest.$ac_ext <<_ACEOF
3744#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003745#include "confdefs.h"
3746
3747#include <pthread.h>
3748
3749void* routine(void* p){return NULL;}
3750
3751int main(){
3752 pthread_t p;
3753 if(pthread_create(&p,NULL,routine,NULL)!=0)
3754 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003755 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003756 return 0;
3757}
3758
Martin v. Löwis11437992002-04-12 09:54:03 +00003759_ACEOF
3760rm -f conftest$ac_exeext
3761if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3762 (eval $ac_link) 2>&5
3763 ac_status=$?
3764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3765 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3767 (eval $ac_try) 2>&5
3768 ac_status=$?
3769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3770 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003771 ac_cv_kpthread=yes
3772else
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 echo "$as_me: program exited with status $ac_status" >&5
3774echo "$as_me: failed program was:" >&5
3775cat conftest.$ac_ext >&5
3776( exit $ac_status )
3777ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003778fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003779rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003780fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003781CC="$ac_save_cc"
3782fi
3783
Martin v. Löwis11437992002-04-12 09:54:03 +00003784echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3785echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003786fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003787
Michael W. Hudson54241132001-12-07 15:38:26 +00003788
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003789# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003790echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3791echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3792if test "${ac_cv_header_stdc+set}" = set; then
3793 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003794else
Martin v. Löwis11437992002-04-12 09:54:03 +00003795 cat >conftest.$ac_ext <<_ACEOF
3796#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003797#include "confdefs.h"
3798#include <stdlib.h>
3799#include <stdarg.h>
3800#include <string.h>
3801#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003802
3803_ACEOF
3804if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3805 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3806 ac_status=$?
3807 egrep -v '^ *\+' conftest.er1 >conftest.err
3808 rm -f conftest.er1
3809 cat conftest.err >&5
3810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3811 (exit $ac_status); } >/dev/null; then
3812 if test -s conftest.err; then
3813 ac_cpp_err=$ac_c_preproc_warn_flag
3814 else
3815 ac_cpp_err=
3816 fi
3817else
3818 ac_cpp_err=yes
3819fi
3820if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003821 ac_cv_header_stdc=yes
3822else
Martin v. Löwis11437992002-04-12 09:54:03 +00003823 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003824 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003825 ac_cv_header_stdc=no
3826fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003827rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003828
3829if test $ac_cv_header_stdc = yes; then
3830 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003831 cat >conftest.$ac_ext <<_ACEOF
3832#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003833#include "confdefs.h"
3834#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003835
3836_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003837if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3838 egrep "memchr" >/dev/null 2>&1; then
3839 :
3840else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003841 ac_cv_header_stdc=no
3842fi
3843rm -f conftest*
3844
3845fi
3846
3847if test $ac_cv_header_stdc = yes; then
3848 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 cat >conftest.$ac_ext <<_ACEOF
3850#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003851#include "confdefs.h"
3852#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003853
3854_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003855if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3856 egrep "free" >/dev/null 2>&1; then
3857 :
3858else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003859 ac_cv_header_stdc=no
3860fi
3861rm -f conftest*
3862
3863fi
3864
3865if test $ac_cv_header_stdc = yes; then
3866 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003867 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003868 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003869else
Martin v. Löwis11437992002-04-12 09:54:03 +00003870 cat >conftest.$ac_ext <<_ACEOF
3871#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003872#include "confdefs.h"
3873#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003874#if ((' ' & 0x0FF) == 0x020)
3875# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3876# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3877#else
3878# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3879 || ('j' <= (c) && (c) <= 'r') \
3880 || ('s' <= (c) && (c) <= 'z'))
3881# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3882#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003883
Martin v. Löwis11437992002-04-12 09:54:03 +00003884#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3885int
3886main ()
3887{
3888 int i;
3889 for (i = 0; i < 256; i++)
3890 if (XOR (islower (i), ISLOWER (i))
3891 || toupper (i) != TOUPPER (i))
3892 exit(2);
3893 exit (0);
3894}
3895_ACEOF
3896rm -f conftest$ac_exeext
3897if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3898 (eval $ac_link) 2>&5
3899 ac_status=$?
3900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3901 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3903 (eval $ac_try) 2>&5
3904 ac_status=$?
3905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3906 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003907 :
3908else
Martin v. Löwis11437992002-04-12 09:54:03 +00003909 echo "$as_me: program exited with status $ac_status" >&5
3910echo "$as_me: failed program was:" >&5
3911cat conftest.$ac_ext >&5
3912( exit $ac_status )
3913ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003914fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003915rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003916fi
3917fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003918fi
3919echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3920echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003921if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003922
3923cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003924#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003925_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003926
3927fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003928
Martin v. Löwis11437992002-04-12 09:54:03 +00003929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
Martin v. Löwis11437992002-04-12 09:54:03 +00003966for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003967libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003968signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003969sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003970sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00003971sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003972sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003973do
Martin v. Löwis11437992002-04-12 09:54:03 +00003974as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3975if eval "test \"\${$as_ac_Header+set}\" = set"; then
3976 echo "$as_me:$LINENO: checking for $ac_header" >&5
3977echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3978if eval "test \"\${$as_ac_Header+set}\" = set"; then
3979 echo $ECHO_N "(cached) $ECHO_C" >&6
3980fi
3981echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3982echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003983else
Martin v. Löwis11437992002-04-12 09:54:03 +00003984 # Is the header compilable?
3985echo "$as_me:$LINENO: checking $ac_header usability" >&5
3986echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3987cat >conftest.$ac_ext <<_ACEOF
3988#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003989#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003990$ac_includes_default
3991#include <$ac_header>
3992_ACEOF
3993rm -f conftest.$ac_objext
3994if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3995 (eval $ac_compile) 2>&5
3996 ac_status=$?
3997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3998 (exit $ac_status); } &&
3999 { ac_try='test -s conftest.$ac_objext'
4000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4001 (eval $ac_try) 2>&5
4002 ac_status=$?
4003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4004 (exit $ac_status); }; }; then
4005 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004006else
Martin v. Löwis11437992002-04-12 09:54:03 +00004007 echo "$as_me: failed program was:" >&5
4008cat conftest.$ac_ext >&5
4009ac_header_compiler=no
4010fi
4011rm -f conftest.$ac_objext conftest.$ac_ext
4012echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4013echo "${ECHO_T}$ac_header_compiler" >&6
4014
4015# Is the header present?
4016echo "$as_me:$LINENO: checking $ac_header presence" >&5
4017echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4018cat >conftest.$ac_ext <<_ACEOF
4019#line $LINENO "configure"
4020#include "confdefs.h"
4021#include <$ac_header>
4022_ACEOF
4023if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4024 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4025 ac_status=$?
4026 egrep -v '^ *\+' conftest.er1 >conftest.err
4027 rm -f conftest.er1
4028 cat conftest.err >&5
4029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4030 (exit $ac_status); } >/dev/null; then
4031 if test -s conftest.err; then
4032 ac_cpp_err=$ac_c_preproc_warn_flag
4033 else
4034 ac_cpp_err=
4035 fi
4036else
4037 ac_cpp_err=yes
4038fi
4039if test -z "$ac_cpp_err"; then
4040 ac_header_preproc=yes
4041else
4042 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004043 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004044 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004045fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004046rm -f conftest.err conftest.$ac_ext
4047echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4048echo "${ECHO_T}$ac_header_preproc" >&6
4049
4050# So? What about this header?
4051case $ac_header_compiler:$ac_header_preproc in
4052 yes:no )
4053 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4054echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4055 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4056echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4057 no:yes )
4058 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4059echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4060 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4061echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4062 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4063echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4064esac
4065echo "$as_me:$LINENO: checking for $ac_header" >&5
4066echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4067if eval "test \"\${$as_ac_Header+set}\" = set"; then
4068 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004069else
Martin v. Löwis11437992002-04-12 09:54:03 +00004070 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004071fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004072echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4073echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4074
4075fi
4076if test `eval echo '${'$as_ac_Header'}'` = yes; then
4077 cat >>confdefs.h <<_ACEOF
4078#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4079_ACEOF
4080
4081fi
4082
Guido van Rossum627b2d71993-12-24 10:39:16 +00004083done
4084
Martin v. Löwis11437992002-04-12 09:54:03 +00004085
4086
4087
4088
4089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004090ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004091for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4092 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4093echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4094echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4095if eval "test \"\${$as_ac_Header+set}\" = set"; then
4096 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004097else
Martin v. Löwis11437992002-04-12 09:54:03 +00004098 cat >conftest.$ac_ext <<_ACEOF
4099#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004100#include "confdefs.h"
4101#include <sys/types.h>
4102#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004103
4104#ifdef F77_DUMMY_MAIN
4105# ifdef __cplusplus
4106 extern "C"
4107# endif
4108 int F77_DUMMY_MAIN() { return 1; }
4109#endif
4110int
4111main ()
4112{
4113if ((DIR *) 0)
4114return 0;
4115 ;
4116 return 0;
4117}
4118_ACEOF
4119rm -f conftest.$ac_objext
4120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4121 (eval $ac_compile) 2>&5
4122 ac_status=$?
4123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4124 (exit $ac_status); } &&
4125 { ac_try='test -s conftest.$ac_objext'
4126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4127 (eval $ac_try) 2>&5
4128 ac_status=$?
4129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4130 (exit $ac_status); }; }; then
4131 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004132else
Martin v. Löwis11437992002-04-12 09:54:03 +00004133 echo "$as_me: failed program was:" >&5
4134cat conftest.$ac_ext >&5
4135eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004136fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004137rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004138fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004139echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4140echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4141if test `eval echo '${'$as_ac_Header'}'` = yes; then
4142 cat >>confdefs.h <<_ACEOF
4143#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4144_ACEOF
4145
4146ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004147fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149done
4150# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4151if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4153echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4154if test "${ac_cv_search_opendir+set}" = set; then
4155 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004156else
Martin v. Löwis11437992002-04-12 09:54:03 +00004157 ac_func_search_save_LIBS=$LIBS
4158ac_cv_search_opendir=no
4159cat >conftest.$ac_ext <<_ACEOF
4160#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004161#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004162
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004163/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004164#ifdef __cplusplus
4165extern "C"
4166#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004167/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004168 builtin and then its argument prototype would still apply. */
4169char opendir ();
4170#ifdef F77_DUMMY_MAIN
4171# ifdef __cplusplus
4172 extern "C"
4173# endif
4174 int F77_DUMMY_MAIN() { return 1; }
4175#endif
4176int
4177main ()
4178{
4179opendir ();
4180 ;
4181 return 0;
4182}
4183_ACEOF
4184rm -f conftest.$ac_objext conftest$ac_exeext
4185if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4186 (eval $ac_link) 2>&5
4187 ac_status=$?
4188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4189 (exit $ac_status); } &&
4190 { ac_try='test -s conftest$ac_exeext'
4191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4192 (eval $ac_try) 2>&5
4193 ac_status=$?
4194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4195 (exit $ac_status); }; }; then
4196 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004197else
Martin v. Löwis11437992002-04-12 09:54:03 +00004198 echo "$as_me: failed program was:" >&5
4199cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004200fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004201rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4202if test "$ac_cv_search_opendir" = no; then
4203 for ac_lib in dir; do
4204 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4205 cat >conftest.$ac_ext <<_ACEOF
4206#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004207#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004208
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004209/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004210#ifdef __cplusplus
4211extern "C"
4212#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004213/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004214 builtin and then its argument prototype would still apply. */
4215char opendir ();
4216#ifdef F77_DUMMY_MAIN
4217# ifdef __cplusplus
4218 extern "C"
4219# endif
4220 int F77_DUMMY_MAIN() { return 1; }
4221#endif
4222int
4223main ()
4224{
4225opendir ();
4226 ;
4227 return 0;
4228}
4229_ACEOF
4230rm -f conftest.$ac_objext conftest$ac_exeext
4231if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4232 (eval $ac_link) 2>&5
4233 ac_status=$?
4234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4235 (exit $ac_status); } &&
4236 { ac_try='test -s conftest$ac_exeext'
4237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4238 (eval $ac_try) 2>&5
4239 ac_status=$?
4240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4241 (exit $ac_status); }; }; then
4242 ac_cv_search_opendir="-l$ac_lib"
4243break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004244else
Martin v. Löwis11437992002-04-12 09:54:03 +00004245 echo "$as_me: failed program was:" >&5
4246cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004247fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004248rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4249 done
4250fi
4251LIBS=$ac_func_search_save_LIBS
4252fi
4253echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4254echo "${ECHO_T}$ac_cv_search_opendir" >&6
4255if test "$ac_cv_search_opendir" != no; then
4256 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004257
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004258fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004259
Michael W. Hudson54241132001-12-07 15:38:26 +00004260else
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4262echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4263if test "${ac_cv_search_opendir+set}" = set; then
4264 echo $ECHO_N "(cached) $ECHO_C" >&6
4265else
4266 ac_func_search_save_LIBS=$LIBS
4267ac_cv_search_opendir=no
4268cat >conftest.$ac_ext <<_ACEOF
4269#line $LINENO "configure"
4270#include "confdefs.h"
4271
4272/* Override any gcc2 internal prototype to avoid an error. */
4273#ifdef __cplusplus
4274extern "C"
4275#endif
4276/* We use char because int might match the return type of a gcc2
4277 builtin and then its argument prototype would still apply. */
4278char opendir ();
4279#ifdef F77_DUMMY_MAIN
4280# ifdef __cplusplus
4281 extern "C"
4282# endif
4283 int F77_DUMMY_MAIN() { return 1; }
4284#endif
4285int
4286main ()
4287{
4288opendir ();
4289 ;
4290 return 0;
4291}
4292_ACEOF
4293rm -f conftest.$ac_objext conftest$ac_exeext
4294if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4295 (eval $ac_link) 2>&5
4296 ac_status=$?
4297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4298 (exit $ac_status); } &&
4299 { ac_try='test -s conftest$ac_exeext'
4300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4301 (eval $ac_try) 2>&5
4302 ac_status=$?
4303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4304 (exit $ac_status); }; }; then
4305 ac_cv_search_opendir="none required"
4306else
4307 echo "$as_me: failed program was:" >&5
4308cat conftest.$ac_ext >&5
4309fi
4310rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4311if test "$ac_cv_search_opendir" = no; then
4312 for ac_lib in x; do
4313 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4314 cat >conftest.$ac_ext <<_ACEOF
4315#line $LINENO "configure"
4316#include "confdefs.h"
4317
4318/* Override any gcc2 internal prototype to avoid an error. */
4319#ifdef __cplusplus
4320extern "C"
4321#endif
4322/* We use char because int might match the return type of a gcc2
4323 builtin and then its argument prototype would still apply. */
4324char opendir ();
4325#ifdef F77_DUMMY_MAIN
4326# ifdef __cplusplus
4327 extern "C"
4328# endif
4329 int F77_DUMMY_MAIN() { return 1; }
4330#endif
4331int
4332main ()
4333{
4334opendir ();
4335 ;
4336 return 0;
4337}
4338_ACEOF
4339rm -f conftest.$ac_objext conftest$ac_exeext
4340if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4341 (eval $ac_link) 2>&5
4342 ac_status=$?
4343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4344 (exit $ac_status); } &&
4345 { ac_try='test -s conftest$ac_exeext'
4346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4347 (eval $ac_try) 2>&5
4348 ac_status=$?
4349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4350 (exit $ac_status); }; }; then
4351 ac_cv_search_opendir="-l$ac_lib"
4352break
4353else
4354 echo "$as_me: failed program was:" >&5
4355cat conftest.$ac_ext >&5
4356fi
4357rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4358 done
4359fi
4360LIBS=$ac_func_search_save_LIBS
4361fi
4362echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4363echo "${ECHO_T}$ac_cv_search_opendir" >&6
4364if test "$ac_cv_search_opendir" != no; then
4365 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4366
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004367fi
4368
4369fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004370
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004371echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4372echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4373if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4374 echo $ECHO_N "(cached) $ECHO_C" >&6
4375else
4376 cat >conftest.$ac_ext <<_ACEOF
4377#line $LINENO "configure"
4378#include "confdefs.h"
4379#include <sys/types.h>
4380#ifdef F77_DUMMY_MAIN
4381# ifdef __cplusplus
4382 extern "C"
4383# endif
4384 int F77_DUMMY_MAIN() { return 1; }
4385#endif
4386int
4387main ()
4388{
4389return makedev(0, 0);
4390 ;
4391 return 0;
4392}
4393_ACEOF
4394rm -f conftest.$ac_objext conftest$ac_exeext
4395if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4396 (eval $ac_link) 2>&5
4397 ac_status=$?
4398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4399 (exit $ac_status); } &&
4400 { ac_try='test -s conftest$ac_exeext'
4401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4402 (eval $ac_try) 2>&5
4403 ac_status=$?
4404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4405 (exit $ac_status); }; }; then
4406 ac_cv_header_sys_types_h_makedev=yes
4407else
4408 echo "$as_me: failed program was:" >&5
4409cat conftest.$ac_ext >&5
4410ac_cv_header_sys_types_h_makedev=no
4411fi
4412rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4413
4414fi
4415echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4416echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4417
4418if test $ac_cv_header_sys_types_h_makedev = no; then
4419if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4420 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4421echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4422if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4423 echo $ECHO_N "(cached) $ECHO_C" >&6
4424fi
4425echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4426echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4427else
4428 # Is the header compilable?
4429echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4430echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4431cat >conftest.$ac_ext <<_ACEOF
4432#line $LINENO "configure"
4433#include "confdefs.h"
4434$ac_includes_default
4435#include <sys/mkdev.h>
4436_ACEOF
4437rm -f conftest.$ac_objext
4438if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4439 (eval $ac_compile) 2>&5
4440 ac_status=$?
4441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4442 (exit $ac_status); } &&
4443 { ac_try='test -s conftest.$ac_objext'
4444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4445 (eval $ac_try) 2>&5
4446 ac_status=$?
4447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4448 (exit $ac_status); }; }; then
4449 ac_header_compiler=yes
4450else
4451 echo "$as_me: failed program was:" >&5
4452cat conftest.$ac_ext >&5
4453ac_header_compiler=no
4454fi
4455rm -f conftest.$ac_objext conftest.$ac_ext
4456echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4457echo "${ECHO_T}$ac_header_compiler" >&6
4458
4459# Is the header present?
4460echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4461echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4462cat >conftest.$ac_ext <<_ACEOF
4463#line $LINENO "configure"
4464#include "confdefs.h"
4465#include <sys/mkdev.h>
4466_ACEOF
4467if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4468 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4469 ac_status=$?
4470 egrep -v '^ *\+' conftest.er1 >conftest.err
4471 rm -f conftest.er1
4472 cat conftest.err >&5
4473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4474 (exit $ac_status); } >/dev/null; then
4475 if test -s conftest.err; then
4476 ac_cpp_err=$ac_c_preproc_warn_flag
4477 else
4478 ac_cpp_err=
4479 fi
4480else
4481 ac_cpp_err=yes
4482fi
4483if test -z "$ac_cpp_err"; then
4484 ac_header_preproc=yes
4485else
4486 echo "$as_me: failed program was:" >&5
4487 cat conftest.$ac_ext >&5
4488 ac_header_preproc=no
4489fi
4490rm -f conftest.err conftest.$ac_ext
4491echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4492echo "${ECHO_T}$ac_header_preproc" >&6
4493
4494# So? What about this header?
4495case $ac_header_compiler:$ac_header_preproc in
4496 yes:no )
4497 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4498echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4499 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4500echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4501 no:yes )
4502 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4503echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4504 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4505echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4506 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4507echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4508esac
4509echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4510echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4511if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4512 echo $ECHO_N "(cached) $ECHO_C" >&6
4513else
4514 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4515fi
4516echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4517echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4518
4519fi
4520if test $ac_cv_header_sys_mkdev_h = yes; then
4521
4522cat >>confdefs.h <<\_ACEOF
4523#define MAJOR_IN_MKDEV 1
4524_ACEOF
4525
4526fi
4527
4528
4529
4530 if test $ac_cv_header_sys_mkdev_h = no; then
4531 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4532 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4533echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4534if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4535 echo $ECHO_N "(cached) $ECHO_C" >&6
4536fi
4537echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4538echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4539else
4540 # Is the header compilable?
4541echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4542echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4543cat >conftest.$ac_ext <<_ACEOF
4544#line $LINENO "configure"
4545#include "confdefs.h"
4546$ac_includes_default
4547#include <sys/sysmacros.h>
4548_ACEOF
4549rm -f conftest.$ac_objext
4550if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4551 (eval $ac_compile) 2>&5
4552 ac_status=$?
4553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4554 (exit $ac_status); } &&
4555 { ac_try='test -s conftest.$ac_objext'
4556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4557 (eval $ac_try) 2>&5
4558 ac_status=$?
4559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4560 (exit $ac_status); }; }; then
4561 ac_header_compiler=yes
4562else
4563 echo "$as_me: failed program was:" >&5
4564cat conftest.$ac_ext >&5
4565ac_header_compiler=no
4566fi
4567rm -f conftest.$ac_objext conftest.$ac_ext
4568echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4569echo "${ECHO_T}$ac_header_compiler" >&6
4570
4571# Is the header present?
4572echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4573echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4574cat >conftest.$ac_ext <<_ACEOF
4575#line $LINENO "configure"
4576#include "confdefs.h"
4577#include <sys/sysmacros.h>
4578_ACEOF
4579if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4580 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4581 ac_status=$?
4582 egrep -v '^ *\+' conftest.er1 >conftest.err
4583 rm -f conftest.er1
4584 cat conftest.err >&5
4585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4586 (exit $ac_status); } >/dev/null; then
4587 if test -s conftest.err; then
4588 ac_cpp_err=$ac_c_preproc_warn_flag
4589 else
4590 ac_cpp_err=
4591 fi
4592else
4593 ac_cpp_err=yes
4594fi
4595if test -z "$ac_cpp_err"; then
4596 ac_header_preproc=yes
4597else
4598 echo "$as_me: failed program was:" >&5
4599 cat conftest.$ac_ext >&5
4600 ac_header_preproc=no
4601fi
4602rm -f conftest.err conftest.$ac_ext
4603echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4604echo "${ECHO_T}$ac_header_preproc" >&6
4605
4606# So? What about this header?
4607case $ac_header_compiler:$ac_header_preproc in
4608 yes:no )
4609 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4610echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4611 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4612echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4613 no:yes )
4614 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4615echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4616 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4617echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4618 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4619echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4620esac
4621echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4622echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4623if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4624 echo $ECHO_N "(cached) $ECHO_C" >&6
4625else
4626 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4627fi
4628echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4629echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4630
4631fi
4632if test $ac_cv_header_sys_sysmacros_h = yes; then
4633
4634cat >>confdefs.h <<\_ACEOF
4635#define MAJOR_IN_SYSMACROS 1
4636_ACEOF
4637
4638fi
4639
4640
4641 fi
4642fi
4643
Michael W. Hudson54241132001-12-07 15:38:26 +00004644
Guido van Rossum627b2d71993-12-24 10:39:16 +00004645# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004646was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004647echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4648echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4649cat >conftest.$ac_ext <<_ACEOF
4650#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004651#include "confdefs.h"
4652#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004653
4654_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004655if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4656 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004657 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004658else
Martin v. Löwis11437992002-04-12 09:54:03 +00004659
4660
4661cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004662#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004663_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004664
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004665
Guido van Rossum627b2d71993-12-24 10:39:16 +00004666fi
4667rm -f conftest*
4668
Martin v. Löwis11437992002-04-12 09:54:03 +00004669echo "$as_me:$LINENO: result: $was_it_defined" >&5
4670echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004671
Neal Norwitz11690112002-07-30 01:08:28 +00004672# Check whether using makedev requires defining _OSF_SOURCE
4673echo "$as_me:$LINENO: checking for makedev" >&5
4674echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4675cat >conftest.$ac_ext <<_ACEOF
4676#line $LINENO "configure"
4677#include "confdefs.h"
4678 #include <sys/types.h>
4679#ifdef F77_DUMMY_MAIN
4680# ifdef __cplusplus
4681 extern "C"
4682# endif
4683 int F77_DUMMY_MAIN() { return 1; }
4684#endif
4685int
4686main ()
4687{
4688 makedev(0, 0)
4689 ;
4690 return 0;
4691}
4692_ACEOF
4693rm -f conftest.$ac_objext conftest$ac_exeext
4694if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4695 (eval $ac_link) 2>&5
4696 ac_status=$?
4697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4698 (exit $ac_status); } &&
4699 { ac_try='test -s conftest$ac_exeext'
4700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4701 (eval $ac_try) 2>&5
4702 ac_status=$?
4703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4704 (exit $ac_status); }; }; then
4705 ac_cv_has_makedev=yes
4706else
4707 echo "$as_me: failed program was:" >&5
4708cat conftest.$ac_ext >&5
4709ac_cv_has_makedev=no
4710fi
4711rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4712if test "$ac_cv_has_makedev" = "no"; then
4713 # we didn't link, try if _OSF_SOURCE will allow us to link
4714 cat >conftest.$ac_ext <<_ACEOF
4715#line $LINENO "configure"
4716#include "confdefs.h"
4717
4718 #define _OSF_SOURCE 1
4719 #include <sys/types.h>
4720
4721#ifdef F77_DUMMY_MAIN
4722# ifdef __cplusplus
4723 extern "C"
4724# endif
4725 int F77_DUMMY_MAIN() { return 1; }
4726#endif
4727int
4728main ()
4729{
4730 makedev(0, 0)
4731 ;
4732 return 0;
4733}
4734_ACEOF
4735rm -f conftest.$ac_objext conftest$ac_exeext
4736if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4737 (eval $ac_link) 2>&5
4738 ac_status=$?
4739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4740 (exit $ac_status); } &&
4741 { ac_try='test -s conftest$ac_exeext'
4742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4743 (eval $ac_try) 2>&5
4744 ac_status=$?
4745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4746 (exit $ac_status); }; }; then
4747 ac_cv_has_makedev=yes
4748else
4749 echo "$as_me: failed program was:" >&5
4750cat conftest.$ac_ext >&5
4751ac_cv_has_makedev=no
4752fi
4753rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4754 if test "$ac_cv_has_makedev" = "yes"; then
4755
4756cat >>confdefs.h <<\_ACEOF
4757#define _OSF_SOURCE 1
4758_ACEOF
4759
4760 fi
4761fi
4762echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4763echo "${ECHO_T}$ac_cv_has_makedev" >&6
4764if test "$ac_cv_has_makedev" = "yes"; then
4765
4766cat >>confdefs.h <<\_ACEOF
4767#define HAVE_MAKEDEV 1
4768_ACEOF
4769
4770fi
4771
Martin v. Löwis399a6892002-10-04 10:22:02 +00004772# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4773# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4774# defined, but the compiler does not support pragma redefine_extname,
4775# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4776# structures (such as rlimit64) without declaring them. As a
4777# work-around, disable LFS on such configurations
4778
4779use_lfs=yes
4780echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4781echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4782cat >conftest.$ac_ext <<_ACEOF
4783#line $LINENO "configure"
4784#include "confdefs.h"
4785
4786#define _LARGEFILE_SOURCE 1
4787#define _FILE_OFFSET_BITS 64
4788#include <sys/resource.h>
4789
4790#ifdef F77_DUMMY_MAIN
4791# ifdef __cplusplus
4792 extern "C"
4793# endif
4794 int F77_DUMMY_MAIN() { return 1; }
4795#endif
4796int
4797main ()
4798{
4799struct rlimit foo;
4800 ;
4801 return 0;
4802}
4803_ACEOF
4804rm -f conftest.$ac_objext
4805if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4806 (eval $ac_compile) 2>&5
4807 ac_status=$?
4808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4809 (exit $ac_status); } &&
4810 { ac_try='test -s conftest.$ac_objext'
4811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4812 (eval $ac_try) 2>&5
4813 ac_status=$?
4814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4815 (exit $ac_status); }; }; then
4816 sol_lfs_bug=no
4817else
4818 echo "$as_me: failed program was:" >&5
4819cat conftest.$ac_ext >&5
4820sol_lfs_bug=yes
4821fi
4822rm -f conftest.$ac_objext conftest.$ac_ext
4823echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4824echo "${ECHO_T}$sol_lfs_bug" >&6
4825if test "$sol_lfs_bug" = "yes"; then
4826 use_lfs=no
4827fi
4828
4829if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004830# Two defines needed to enable largefile support on various platforms
4831# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004832
Martin v. Löwis11437992002-04-12 09:54:03 +00004833cat >>confdefs.h <<\_ACEOF
4834#define _LARGEFILE_SOURCE 1
4835_ACEOF
4836
4837
4838cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004839#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004840_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004841
Martin v. Löwis399a6892002-10-04 10:22:02 +00004842fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004843
Guido van Rossum84e7b241996-08-19 21:59:00 +00004844# Add some code to confdefs.h so that the test for off_t works on SCO
4845cat >> confdefs.h <<\EOF
4846#if defined(SCO_DS)
4847#undef _OFF_T
4848#endif
4849EOF
4850
Guido van Rossumef2255b2000-03-10 22:30:29 +00004851# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004852echo "$as_me:$LINENO: checking for mode_t" >&5
4853echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4854if test "${ac_cv_type_mode_t+set}" = set; then
4855 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004856else
Martin v. Löwis11437992002-04-12 09:54:03 +00004857 cat >conftest.$ac_ext <<_ACEOF
4858#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004859#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004860$ac_includes_default
4861#ifdef F77_DUMMY_MAIN
4862# ifdef __cplusplus
4863 extern "C"
4864# endif
4865 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004866#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004867int
4868main ()
4869{
4870if ((mode_t *) 0)
4871 return 0;
4872if (sizeof (mode_t))
4873 return 0;
4874 ;
4875 return 0;
4876}
4877_ACEOF
4878rm -f conftest.$ac_objext
4879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4880 (eval $ac_compile) 2>&5
4881 ac_status=$?
4882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4883 (exit $ac_status); } &&
4884 { ac_try='test -s conftest.$ac_objext'
4885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4886 (eval $ac_try) 2>&5
4887 ac_status=$?
4888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4889 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004890 ac_cv_type_mode_t=yes
4891else
Martin v. Löwis11437992002-04-12 09:54:03 +00004892 echo "$as_me: failed program was:" >&5
4893cat conftest.$ac_ext >&5
4894ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004895fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004896rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004897fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004898echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4899echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4900if test $ac_cv_type_mode_t = yes; then
4901 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004902else
Martin v. Löwis11437992002-04-12 09:54:03 +00004903
4904cat >>confdefs.h <<_ACEOF
4905#define mode_t int
4906_ACEOF
4907
4908fi
4909
4910echo "$as_me:$LINENO: checking for off_t" >&5
4911echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4912if test "${ac_cv_type_off_t+set}" = set; then
4913 echo $ECHO_N "(cached) $ECHO_C" >&6
4914else
4915 cat >conftest.$ac_ext <<_ACEOF
4916#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004917#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004918$ac_includes_default
4919#ifdef F77_DUMMY_MAIN
4920# ifdef __cplusplus
4921 extern "C"
4922# endif
4923 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004924#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004925int
4926main ()
4927{
4928if ((off_t *) 0)
4929 return 0;
4930if (sizeof (off_t))
4931 return 0;
4932 ;
4933 return 0;
4934}
4935_ACEOF
4936rm -f conftest.$ac_objext
4937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4938 (eval $ac_compile) 2>&5
4939 ac_status=$?
4940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4941 (exit $ac_status); } &&
4942 { ac_try='test -s conftest.$ac_objext'
4943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4944 (eval $ac_try) 2>&5
4945 ac_status=$?
4946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4947 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004948 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004949else
Martin v. Löwis11437992002-04-12 09:54:03 +00004950 echo "$as_me: failed program was:" >&5
4951cat conftest.$ac_ext >&5
4952ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004953fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004954rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004955fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004956echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4957echo "${ECHO_T}$ac_cv_type_off_t" >&6
4958if test $ac_cv_type_off_t = yes; then
4959 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004960else
Martin v. Löwis11437992002-04-12 09:54:03 +00004961
4962cat >>confdefs.h <<_ACEOF
4963#define off_t long
4964_ACEOF
4965
4966fi
4967
4968echo "$as_me:$LINENO: checking for pid_t" >&5
4969echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4970if test "${ac_cv_type_pid_t+set}" = set; then
4971 echo $ECHO_N "(cached) $ECHO_C" >&6
4972else
4973 cat >conftest.$ac_ext <<_ACEOF
4974#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004975#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004976$ac_includes_default
4977#ifdef F77_DUMMY_MAIN
4978# ifdef __cplusplus
4979 extern "C"
4980# endif
4981 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004983int
4984main ()
4985{
4986if ((pid_t *) 0)
4987 return 0;
4988if (sizeof (pid_t))
4989 return 0;
4990 ;
4991 return 0;
4992}
4993_ACEOF
4994rm -f conftest.$ac_objext
4995if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4996 (eval $ac_compile) 2>&5
4997 ac_status=$?
4998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4999 (exit $ac_status); } &&
5000 { ac_try='test -s conftest.$ac_objext'
5001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5002 (eval $ac_try) 2>&5
5003 ac_status=$?
5004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5005 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005006 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005007else
Martin v. Löwis11437992002-04-12 09:54:03 +00005008 echo "$as_me: failed program was:" >&5
5009cat conftest.$ac_ext >&5
5010ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005011fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005012rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005013fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005014echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5015echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5016if test $ac_cv_type_pid_t = yes; then
5017 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005018else
Martin v. Löwis11437992002-04-12 09:54:03 +00005019
5020cat >>confdefs.h <<_ACEOF
5021#define pid_t int
5022_ACEOF
5023
5024fi
5025
5026echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5027echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5028if test "${ac_cv_type_signal+set}" = set; then
5029 echo $ECHO_N "(cached) $ECHO_C" >&6
5030else
5031 cat >conftest.$ac_ext <<_ACEOF
5032#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005033#include "confdefs.h"
5034#include <sys/types.h>
5035#include <signal.h>
5036#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005037# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005038#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005039#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005040extern "C" void (*signal (int, void (*)(int)))(int);
5041#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005042void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005043#endif
5044
Martin v. Löwis11437992002-04-12 09:54:03 +00005045#ifdef F77_DUMMY_MAIN
5046# ifdef __cplusplus
5047 extern "C"
5048# endif
5049 int F77_DUMMY_MAIN() { return 1; }
5050#endif
5051int
5052main ()
5053{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005054int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005055 ;
5056 return 0;
5057}
5058_ACEOF
5059rm -f conftest.$ac_objext
5060if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5061 (eval $ac_compile) 2>&5
5062 ac_status=$?
5063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5064 (exit $ac_status); } &&
5065 { ac_try='test -s conftest.$ac_objext'
5066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5067 (eval $ac_try) 2>&5
5068 ac_status=$?
5069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5070 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005071 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005072else
Martin v. Löwis11437992002-04-12 09:54:03 +00005073 echo "$as_me: failed program was:" >&5
5074cat conftest.$ac_ext >&5
5075ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005076fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005077rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005078fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005079echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5080echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005081
Martin v. Löwis11437992002-04-12 09:54:03 +00005082cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005083#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005084_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005085
Michael W. Hudson54241132001-12-07 15:38:26 +00005086
Martin v. Löwis11437992002-04-12 09:54:03 +00005087echo "$as_me:$LINENO: checking for size_t" >&5
5088echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5089if test "${ac_cv_type_size_t+set}" = set; then
5090 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005091else
Martin v. Löwis11437992002-04-12 09:54:03 +00005092 cat >conftest.$ac_ext <<_ACEOF
5093#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005094#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005095$ac_includes_default
5096#ifdef F77_DUMMY_MAIN
5097# ifdef __cplusplus
5098 extern "C"
5099# endif
5100 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005102int
5103main ()
5104{
5105if ((size_t *) 0)
5106 return 0;
5107if (sizeof (size_t))
5108 return 0;
5109 ;
5110 return 0;
5111}
5112_ACEOF
5113rm -f conftest.$ac_objext
5114if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5115 (eval $ac_compile) 2>&5
5116 ac_status=$?
5117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5118 (exit $ac_status); } &&
5119 { ac_try='test -s conftest.$ac_objext'
5120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5121 (eval $ac_try) 2>&5
5122 ac_status=$?
5123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5124 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005125 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005126else
Martin v. Löwis11437992002-04-12 09:54:03 +00005127 echo "$as_me: failed program was:" >&5
5128cat conftest.$ac_ext >&5
5129ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005130fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005131rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005132fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005133echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5134echo "${ECHO_T}$ac_cv_type_size_t" >&6
5135if test $ac_cv_type_size_t = yes; then
5136 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005137else
Martin v. Löwis11437992002-04-12 09:54:03 +00005138
5139cat >>confdefs.h <<_ACEOF
5140#define size_t unsigned
5141_ACEOF
5142
5143fi
5144
5145echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5146echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5147if test "${ac_cv_type_uid_t+set}" = set; then
5148 echo $ECHO_N "(cached) $ECHO_C" >&6
5149else
5150 cat >conftest.$ac_ext <<_ACEOF
5151#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005152#include "confdefs.h"
5153#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005154
5155_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005156if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5157 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005158 ac_cv_type_uid_t=yes
5159else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005160 ac_cv_type_uid_t=no
5161fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005162rm -f conftest*
5163
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005164fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005165echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5166echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005167if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005168
Martin v. Löwis11437992002-04-12 09:54:03 +00005169cat >>confdefs.h <<\_ACEOF
5170#define uid_t int
5171_ACEOF
5172
5173
5174cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005175#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005176_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005177
5178fi
5179
Jack Jansendd19cf82001-12-06 22:36:17 +00005180
Michael W. Hudson54241132001-12-07 15:38:26 +00005181# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005182echo "$as_me:$LINENO: checking for int" >&5
5183echo $ECHO_N "checking for int... $ECHO_C" >&6
5184if test "${ac_cv_type_int+set}" = set; then
5185 echo $ECHO_N "(cached) $ECHO_C" >&6
5186else
5187 cat >conftest.$ac_ext <<_ACEOF
5188#line $LINENO "configure"
5189#include "confdefs.h"
5190$ac_includes_default
5191#ifdef F77_DUMMY_MAIN
5192# ifdef __cplusplus
5193 extern "C"
5194# endif
5195 int F77_DUMMY_MAIN() { return 1; }
5196#endif
5197int
5198main ()
5199{
5200if ((int *) 0)
5201 return 0;
5202if (sizeof (int))
5203 return 0;
5204 ;
5205 return 0;
5206}
5207_ACEOF
5208rm -f conftest.$ac_objext
5209if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5210 (eval $ac_compile) 2>&5
5211 ac_status=$?
5212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5213 (exit $ac_status); } &&
5214 { ac_try='test -s conftest.$ac_objext'
5215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5216 (eval $ac_try) 2>&5
5217 ac_status=$?
5218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5219 (exit $ac_status); }; }; then
5220 ac_cv_type_int=yes
5221else
5222 echo "$as_me: failed program was:" >&5
5223cat conftest.$ac_ext >&5
5224ac_cv_type_int=no
5225fi
5226rm -f conftest.$ac_objext conftest.$ac_ext
5227fi
5228echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5229echo "${ECHO_T}$ac_cv_type_int" >&6
5230
5231echo "$as_me:$LINENO: checking size of int" >&5
5232echo $ECHO_N "checking size of int... $ECHO_C" >&6
5233if test "${ac_cv_sizeof_int+set}" = set; then
5234 echo $ECHO_N "(cached) $ECHO_C" >&6
5235else
5236 if test "$ac_cv_type_int" = yes; then
5237 # The cast to unsigned long works around a bug in the HP C Compiler
5238 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5239 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5240 # This bug is HP SR number 8606223364.
5241 if test "$cross_compiling" = yes; then
5242 # Depending upon the size, compute the lo and hi bounds.
5243cat >conftest.$ac_ext <<_ACEOF
5244#line $LINENO "configure"
5245#include "confdefs.h"
5246$ac_includes_default
5247#ifdef F77_DUMMY_MAIN
5248# ifdef __cplusplus
5249 extern "C"
5250# endif
5251 int F77_DUMMY_MAIN() { return 1; }
5252#endif
5253int
5254main ()
5255{
5256static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5257test_array [0] = 0
5258
5259 ;
5260 return 0;
5261}
5262_ACEOF
5263rm -f conftest.$ac_objext
5264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5265 (eval $ac_compile) 2>&5
5266 ac_status=$?
5267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5268 (exit $ac_status); } &&
5269 { ac_try='test -s conftest.$ac_objext'
5270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5271 (eval $ac_try) 2>&5
5272 ac_status=$?
5273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5274 (exit $ac_status); }; }; then
5275 ac_lo=0 ac_mid=0
5276 while :; do
5277 cat >conftest.$ac_ext <<_ACEOF
5278#line $LINENO "configure"
5279#include "confdefs.h"
5280$ac_includes_default
5281#ifdef F77_DUMMY_MAIN
5282# ifdef __cplusplus
5283 extern "C"
5284# endif
5285 int F77_DUMMY_MAIN() { return 1; }
5286#endif
5287int
5288main ()
5289{
5290static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5291test_array [0] = 0
5292
5293 ;
5294 return 0;
5295}
5296_ACEOF
5297rm -f conftest.$ac_objext
5298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5299 (eval $ac_compile) 2>&5
5300 ac_status=$?
5301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5302 (exit $ac_status); } &&
5303 { ac_try='test -s conftest.$ac_objext'
5304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5305 (eval $ac_try) 2>&5
5306 ac_status=$?
5307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5308 (exit $ac_status); }; }; then
5309 ac_hi=$ac_mid; break
5310else
5311 echo "$as_me: failed program was:" >&5
5312cat conftest.$ac_ext >&5
5313ac_lo=`expr $ac_mid + 1`
5314 if test $ac_lo -le $ac_mid; then
5315 ac_lo= ac_hi=
5316 break
5317 fi
5318 ac_mid=`expr 2 '*' $ac_mid + 1`
5319fi
5320rm -f conftest.$ac_objext conftest.$ac_ext
5321 done
5322else
5323 echo "$as_me: failed program was:" >&5
5324cat conftest.$ac_ext >&5
5325cat >conftest.$ac_ext <<_ACEOF
5326#line $LINENO "configure"
5327#include "confdefs.h"
5328$ac_includes_default
5329#ifdef F77_DUMMY_MAIN
5330# ifdef __cplusplus
5331 extern "C"
5332# endif
5333 int F77_DUMMY_MAIN() { return 1; }
5334#endif
5335int
5336main ()
5337{
5338static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5339test_array [0] = 0
5340
5341 ;
5342 return 0;
5343}
5344_ACEOF
5345rm -f conftest.$ac_objext
5346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5347 (eval $ac_compile) 2>&5
5348 ac_status=$?
5349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5350 (exit $ac_status); } &&
5351 { ac_try='test -s conftest.$ac_objext'
5352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5353 (eval $ac_try) 2>&5
5354 ac_status=$?
5355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5356 (exit $ac_status); }; }; then
5357 ac_hi=-1 ac_mid=-1
5358 while :; do
5359 cat >conftest.$ac_ext <<_ACEOF
5360#line $LINENO "configure"
5361#include "confdefs.h"
5362$ac_includes_default
5363#ifdef F77_DUMMY_MAIN
5364# ifdef __cplusplus
5365 extern "C"
5366# endif
5367 int F77_DUMMY_MAIN() { return 1; }
5368#endif
5369int
5370main ()
5371{
5372static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5373test_array [0] = 0
5374
5375 ;
5376 return 0;
5377}
5378_ACEOF
5379rm -f conftest.$ac_objext
5380if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5381 (eval $ac_compile) 2>&5
5382 ac_status=$?
5383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5384 (exit $ac_status); } &&
5385 { ac_try='test -s conftest.$ac_objext'
5386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5387 (eval $ac_try) 2>&5
5388 ac_status=$?
5389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5390 (exit $ac_status); }; }; then
5391 ac_lo=$ac_mid; break
5392else
5393 echo "$as_me: failed program was:" >&5
5394cat conftest.$ac_ext >&5
5395ac_hi=`expr '(' $ac_mid ')' - 1`
5396 if test $ac_mid -le $ac_hi; then
5397 ac_lo= ac_hi=
5398 break
5399 fi
5400 ac_mid=`expr 2 '*' $ac_mid`
5401fi
5402rm -f conftest.$ac_objext conftest.$ac_ext
5403 done
5404else
5405 echo "$as_me: failed program was:" >&5
5406cat conftest.$ac_ext >&5
5407ac_lo= ac_hi=
5408fi
5409rm -f conftest.$ac_objext conftest.$ac_ext
5410fi
5411rm -f conftest.$ac_objext conftest.$ac_ext
5412# Binary search between lo and hi bounds.
5413while test "x$ac_lo" != "x$ac_hi"; do
5414 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5415 cat >conftest.$ac_ext <<_ACEOF
5416#line $LINENO "configure"
5417#include "confdefs.h"
5418$ac_includes_default
5419#ifdef F77_DUMMY_MAIN
5420# ifdef __cplusplus
5421 extern "C"
5422# endif
5423 int F77_DUMMY_MAIN() { return 1; }
5424#endif
5425int
5426main ()
5427{
5428static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5429test_array [0] = 0
5430
5431 ;
5432 return 0;
5433}
5434_ACEOF
5435rm -f conftest.$ac_objext
5436if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5437 (eval $ac_compile) 2>&5
5438 ac_status=$?
5439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5440 (exit $ac_status); } &&
5441 { ac_try='test -s conftest.$ac_objext'
5442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5443 (eval $ac_try) 2>&5
5444 ac_status=$?
5445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5446 (exit $ac_status); }; }; then
5447 ac_hi=$ac_mid
5448else
5449 echo "$as_me: failed program was:" >&5
5450cat conftest.$ac_ext >&5
5451ac_lo=`expr '(' $ac_mid ')' + 1`
5452fi
5453rm -f conftest.$ac_objext conftest.$ac_ext
5454done
5455case $ac_lo in
5456?*) ac_cv_sizeof_int=$ac_lo;;
5457'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5458echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5459 { (exit 1); exit 1; }; } ;;
5460esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005461else
5462 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005463 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5464echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5465 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005466else
Martin v. Löwis11437992002-04-12 09:54:03 +00005467 cat >conftest.$ac_ext <<_ACEOF
5468#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005469#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005470$ac_includes_default
5471long longval () { return (long) (sizeof (int)); }
5472unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005473#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005474#include <stdlib.h>
5475#ifdef F77_DUMMY_MAIN
5476# ifdef __cplusplus
5477 extern "C"
5478# endif
5479 int F77_DUMMY_MAIN() { return 1; }
5480#endif
5481int
5482main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005483{
Martin v. Löwis11437992002-04-12 09:54:03 +00005484
5485 FILE *f = fopen ("conftest.val", "w");
5486 if (! f)
5487 exit (1);
5488 if (((long) (sizeof (int))) < 0)
5489 {
5490 long i = longval ();
5491 if (i != ((long) (sizeof (int))))
5492 exit (1);
5493 fprintf (f, "%ld\n", i);
5494 }
5495 else
5496 {
5497 unsigned long i = ulongval ();
5498 if (i != ((long) (sizeof (int))))
5499 exit (1);
5500 fprintf (f, "%lu\n", i);
5501 }
5502 exit (ferror (f) || fclose (f) != 0);
5503
5504 ;
5505 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005506}
Martin v. Löwis11437992002-04-12 09:54:03 +00005507_ACEOF
5508rm -f conftest$ac_exeext
5509if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5510 (eval $ac_link) 2>&5
5511 ac_status=$?
5512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5513 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5515 (eval $ac_try) 2>&5
5516 ac_status=$?
5517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5518 (exit $ac_status); }; }; then
5519 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005520else
Martin v. Löwis11437992002-04-12 09:54:03 +00005521 echo "$as_me: program exited with status $ac_status" >&5
5522echo "$as_me: failed program was:" >&5
5523cat conftest.$ac_ext >&5
5524( exit $ac_status )
5525{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5526echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5527 { (exit 1); exit 1; }; }
5528fi
5529rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5530fi
5531fi
5532rm -f conftest.val
5533else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005534 ac_cv_sizeof_int=0
5535fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005536fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005537echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5538echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5539cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005540#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005541_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005542
5543
Martin v. Löwis11437992002-04-12 09:54:03 +00005544echo "$as_me:$LINENO: checking for long" >&5
5545echo $ECHO_N "checking for long... $ECHO_C" >&6
5546if test "${ac_cv_type_long+set}" = set; then
5547 echo $ECHO_N "(cached) $ECHO_C" >&6
5548else
5549 cat >conftest.$ac_ext <<_ACEOF
5550#line $LINENO "configure"
5551#include "confdefs.h"
5552$ac_includes_default
5553#ifdef F77_DUMMY_MAIN
5554# ifdef __cplusplus
5555 extern "C"
5556# endif
5557 int F77_DUMMY_MAIN() { return 1; }
5558#endif
5559int
5560main ()
5561{
5562if ((long *) 0)
5563 return 0;
5564if (sizeof (long))
5565 return 0;
5566 ;
5567 return 0;
5568}
5569_ACEOF
5570rm -f conftest.$ac_objext
5571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5572 (eval $ac_compile) 2>&5
5573 ac_status=$?
5574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5575 (exit $ac_status); } &&
5576 { ac_try='test -s conftest.$ac_objext'
5577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5578 (eval $ac_try) 2>&5
5579 ac_status=$?
5580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5581 (exit $ac_status); }; }; then
5582 ac_cv_type_long=yes
5583else
5584 echo "$as_me: failed program was:" >&5
5585cat conftest.$ac_ext >&5
5586ac_cv_type_long=no
5587fi
5588rm -f conftest.$ac_objext conftest.$ac_ext
5589fi
5590echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5591echo "${ECHO_T}$ac_cv_type_long" >&6
5592
5593echo "$as_me:$LINENO: checking size of long" >&5
5594echo $ECHO_N "checking size of long... $ECHO_C" >&6
5595if test "${ac_cv_sizeof_long+set}" = set; then
5596 echo $ECHO_N "(cached) $ECHO_C" >&6
5597else
5598 if test "$ac_cv_type_long" = yes; then
5599 # The cast to unsigned long works around a bug in the HP C Compiler
5600 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5601 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5602 # This bug is HP SR number 8606223364.
5603 if test "$cross_compiling" = yes; then
5604 # Depending upon the size, compute the lo and hi bounds.
5605cat >conftest.$ac_ext <<_ACEOF
5606#line $LINENO "configure"
5607#include "confdefs.h"
5608$ac_includes_default
5609#ifdef F77_DUMMY_MAIN
5610# ifdef __cplusplus
5611 extern "C"
5612# endif
5613 int F77_DUMMY_MAIN() { return 1; }
5614#endif
5615int
5616main ()
5617{
5618static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5619test_array [0] = 0
5620
5621 ;
5622 return 0;
5623}
5624_ACEOF
5625rm -f conftest.$ac_objext
5626if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5627 (eval $ac_compile) 2>&5
5628 ac_status=$?
5629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5630 (exit $ac_status); } &&
5631 { ac_try='test -s conftest.$ac_objext'
5632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5633 (eval $ac_try) 2>&5
5634 ac_status=$?
5635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5636 (exit $ac_status); }; }; then
5637 ac_lo=0 ac_mid=0
5638 while :; do
5639 cat >conftest.$ac_ext <<_ACEOF
5640#line $LINENO "configure"
5641#include "confdefs.h"
5642$ac_includes_default
5643#ifdef F77_DUMMY_MAIN
5644# ifdef __cplusplus
5645 extern "C"
5646# endif
5647 int F77_DUMMY_MAIN() { return 1; }
5648#endif
5649int
5650main ()
5651{
5652static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5653test_array [0] = 0
5654
5655 ;
5656 return 0;
5657}
5658_ACEOF
5659rm -f conftest.$ac_objext
5660if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5661 (eval $ac_compile) 2>&5
5662 ac_status=$?
5663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5664 (exit $ac_status); } &&
5665 { ac_try='test -s conftest.$ac_objext'
5666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5667 (eval $ac_try) 2>&5
5668 ac_status=$?
5669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5670 (exit $ac_status); }; }; then
5671 ac_hi=$ac_mid; break
5672else
5673 echo "$as_me: failed program was:" >&5
5674cat conftest.$ac_ext >&5
5675ac_lo=`expr $ac_mid + 1`
5676 if test $ac_lo -le $ac_mid; then
5677 ac_lo= ac_hi=
5678 break
5679 fi
5680 ac_mid=`expr 2 '*' $ac_mid + 1`
5681fi
5682rm -f conftest.$ac_objext conftest.$ac_ext
5683 done
5684else
5685 echo "$as_me: failed program was:" >&5
5686cat conftest.$ac_ext >&5
5687cat >conftest.$ac_ext <<_ACEOF
5688#line $LINENO "configure"
5689#include "confdefs.h"
5690$ac_includes_default
5691#ifdef F77_DUMMY_MAIN
5692# ifdef __cplusplus
5693 extern "C"
5694# endif
5695 int F77_DUMMY_MAIN() { return 1; }
5696#endif
5697int
5698main ()
5699{
5700static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5701test_array [0] = 0
5702
5703 ;
5704 return 0;
5705}
5706_ACEOF
5707rm -f conftest.$ac_objext
5708if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5709 (eval $ac_compile) 2>&5
5710 ac_status=$?
5711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5712 (exit $ac_status); } &&
5713 { ac_try='test -s conftest.$ac_objext'
5714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5715 (eval $ac_try) 2>&5
5716 ac_status=$?
5717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5718 (exit $ac_status); }; }; then
5719 ac_hi=-1 ac_mid=-1
5720 while :; do
5721 cat >conftest.$ac_ext <<_ACEOF
5722#line $LINENO "configure"
5723#include "confdefs.h"
5724$ac_includes_default
5725#ifdef F77_DUMMY_MAIN
5726# ifdef __cplusplus
5727 extern "C"
5728# endif
5729 int F77_DUMMY_MAIN() { return 1; }
5730#endif
5731int
5732main ()
5733{
5734static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5735test_array [0] = 0
5736
5737 ;
5738 return 0;
5739}
5740_ACEOF
5741rm -f conftest.$ac_objext
5742if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5743 (eval $ac_compile) 2>&5
5744 ac_status=$?
5745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5746 (exit $ac_status); } &&
5747 { ac_try='test -s conftest.$ac_objext'
5748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5749 (eval $ac_try) 2>&5
5750 ac_status=$?
5751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5752 (exit $ac_status); }; }; then
5753 ac_lo=$ac_mid; break
5754else
5755 echo "$as_me: failed program was:" >&5
5756cat conftest.$ac_ext >&5
5757ac_hi=`expr '(' $ac_mid ')' - 1`
5758 if test $ac_mid -le $ac_hi; then
5759 ac_lo= ac_hi=
5760 break
5761 fi
5762 ac_mid=`expr 2 '*' $ac_mid`
5763fi
5764rm -f conftest.$ac_objext conftest.$ac_ext
5765 done
5766else
5767 echo "$as_me: failed program was:" >&5
5768cat conftest.$ac_ext >&5
5769ac_lo= ac_hi=
5770fi
5771rm -f conftest.$ac_objext conftest.$ac_ext
5772fi
5773rm -f conftest.$ac_objext conftest.$ac_ext
5774# Binary search between lo and hi bounds.
5775while test "x$ac_lo" != "x$ac_hi"; do
5776 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5777 cat >conftest.$ac_ext <<_ACEOF
5778#line $LINENO "configure"
5779#include "confdefs.h"
5780$ac_includes_default
5781#ifdef F77_DUMMY_MAIN
5782# ifdef __cplusplus
5783 extern "C"
5784# endif
5785 int F77_DUMMY_MAIN() { return 1; }
5786#endif
5787int
5788main ()
5789{
5790static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5791test_array [0] = 0
5792
5793 ;
5794 return 0;
5795}
5796_ACEOF
5797rm -f conftest.$ac_objext
5798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5799 (eval $ac_compile) 2>&5
5800 ac_status=$?
5801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5802 (exit $ac_status); } &&
5803 { ac_try='test -s conftest.$ac_objext'
5804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5805 (eval $ac_try) 2>&5
5806 ac_status=$?
5807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5808 (exit $ac_status); }; }; then
5809 ac_hi=$ac_mid
5810else
5811 echo "$as_me: failed program was:" >&5
5812cat conftest.$ac_ext >&5
5813ac_lo=`expr '(' $ac_mid ')' + 1`
5814fi
5815rm -f conftest.$ac_objext conftest.$ac_ext
5816done
5817case $ac_lo in
5818?*) ac_cv_sizeof_long=$ac_lo;;
5819'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5820echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5821 { (exit 1); exit 1; }; } ;;
5822esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005823else
5824 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005825 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5826echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5827 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005828else
Martin v. Löwis11437992002-04-12 09:54:03 +00005829 cat >conftest.$ac_ext <<_ACEOF
5830#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005831#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005832$ac_includes_default
5833long longval () { return (long) (sizeof (long)); }
5834unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005835#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005836#include <stdlib.h>
5837#ifdef F77_DUMMY_MAIN
5838# ifdef __cplusplus
5839 extern "C"
5840# endif
5841 int F77_DUMMY_MAIN() { return 1; }
5842#endif
5843int
5844main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005845{
Martin v. Löwis11437992002-04-12 09:54:03 +00005846
5847 FILE *f = fopen ("conftest.val", "w");
5848 if (! f)
5849 exit (1);
5850 if (((long) (sizeof (long))) < 0)
5851 {
5852 long i = longval ();
5853 if (i != ((long) (sizeof (long))))
5854 exit (1);
5855 fprintf (f, "%ld\n", i);
5856 }
5857 else
5858 {
5859 unsigned long i = ulongval ();
5860 if (i != ((long) (sizeof (long))))
5861 exit (1);
5862 fprintf (f, "%lu\n", i);
5863 }
5864 exit (ferror (f) || fclose (f) != 0);
5865
5866 ;
5867 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005868}
Martin v. Löwis11437992002-04-12 09:54:03 +00005869_ACEOF
5870rm -f conftest$ac_exeext
5871if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5872 (eval $ac_link) 2>&5
5873 ac_status=$?
5874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5875 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5877 (eval $ac_try) 2>&5
5878 ac_status=$?
5879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5880 (exit $ac_status); }; }; then
5881 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005882else
Martin v. Löwis11437992002-04-12 09:54:03 +00005883 echo "$as_me: program exited with status $ac_status" >&5
5884echo "$as_me: failed program was:" >&5
5885cat conftest.$ac_ext >&5
5886( exit $ac_status )
5887{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5888echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5889 { (exit 1); exit 1; }; }
5890fi
5891rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5892fi
5893fi
5894rm -f conftest.val
5895else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005896 ac_cv_sizeof_long=0
5897fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005898fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005899echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5900echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5901cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005902#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005903_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005904
5905
Martin v. Löwis11437992002-04-12 09:54:03 +00005906echo "$as_me:$LINENO: checking for void *" >&5
5907echo $ECHO_N "checking for void *... $ECHO_C" >&6
5908if test "${ac_cv_type_void_p+set}" = set; then
5909 echo $ECHO_N "(cached) $ECHO_C" >&6
5910else
5911 cat >conftest.$ac_ext <<_ACEOF
5912#line $LINENO "configure"
5913#include "confdefs.h"
5914$ac_includes_default
5915#ifdef F77_DUMMY_MAIN
5916# ifdef __cplusplus
5917 extern "C"
5918# endif
5919 int F77_DUMMY_MAIN() { return 1; }
5920#endif
5921int
5922main ()
5923{
5924if ((void * *) 0)
5925 return 0;
5926if (sizeof (void *))
5927 return 0;
5928 ;
5929 return 0;
5930}
5931_ACEOF
5932rm -f conftest.$ac_objext
5933if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5934 (eval $ac_compile) 2>&5
5935 ac_status=$?
5936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5937 (exit $ac_status); } &&
5938 { ac_try='test -s conftest.$ac_objext'
5939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5940 (eval $ac_try) 2>&5
5941 ac_status=$?
5942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5943 (exit $ac_status); }; }; then
5944 ac_cv_type_void_p=yes
5945else
5946 echo "$as_me: failed program was:" >&5
5947cat conftest.$ac_ext >&5
5948ac_cv_type_void_p=no
5949fi
5950rm -f conftest.$ac_objext conftest.$ac_ext
5951fi
5952echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5953echo "${ECHO_T}$ac_cv_type_void_p" >&6
5954
5955echo "$as_me:$LINENO: checking size of void *" >&5
5956echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5957if test "${ac_cv_sizeof_void_p+set}" = set; then
5958 echo $ECHO_N "(cached) $ECHO_C" >&6
5959else
5960 if test "$ac_cv_type_void_p" = yes; then
5961 # The cast to unsigned long works around a bug in the HP C Compiler
5962 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5963 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5964 # This bug is HP SR number 8606223364.
5965 if test "$cross_compiling" = yes; then
5966 # Depending upon the size, compute the lo and hi bounds.
5967cat >conftest.$ac_ext <<_ACEOF
5968#line $LINENO "configure"
5969#include "confdefs.h"
5970$ac_includes_default
5971#ifdef F77_DUMMY_MAIN
5972# ifdef __cplusplus
5973 extern "C"
5974# endif
5975 int F77_DUMMY_MAIN() { return 1; }
5976#endif
5977int
5978main ()
5979{
5980static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5981test_array [0] = 0
5982
5983 ;
5984 return 0;
5985}
5986_ACEOF
5987rm -f conftest.$ac_objext
5988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5989 (eval $ac_compile) 2>&5
5990 ac_status=$?
5991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5992 (exit $ac_status); } &&
5993 { ac_try='test -s conftest.$ac_objext'
5994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5995 (eval $ac_try) 2>&5
5996 ac_status=$?
5997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5998 (exit $ac_status); }; }; then
5999 ac_lo=0 ac_mid=0
6000 while :; do
6001 cat >conftest.$ac_ext <<_ACEOF
6002#line $LINENO "configure"
6003#include "confdefs.h"
6004$ac_includes_default
6005#ifdef F77_DUMMY_MAIN
6006# ifdef __cplusplus
6007 extern "C"
6008# endif
6009 int F77_DUMMY_MAIN() { return 1; }
6010#endif
6011int
6012main ()
6013{
6014static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6015test_array [0] = 0
6016
6017 ;
6018 return 0;
6019}
6020_ACEOF
6021rm -f conftest.$ac_objext
6022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6023 (eval $ac_compile) 2>&5
6024 ac_status=$?
6025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6026 (exit $ac_status); } &&
6027 { ac_try='test -s conftest.$ac_objext'
6028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6029 (eval $ac_try) 2>&5
6030 ac_status=$?
6031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6032 (exit $ac_status); }; }; then
6033 ac_hi=$ac_mid; break
6034else
6035 echo "$as_me: failed program was:" >&5
6036cat conftest.$ac_ext >&5
6037ac_lo=`expr $ac_mid + 1`
6038 if test $ac_lo -le $ac_mid; then
6039 ac_lo= ac_hi=
6040 break
6041 fi
6042 ac_mid=`expr 2 '*' $ac_mid + 1`
6043fi
6044rm -f conftest.$ac_objext conftest.$ac_ext
6045 done
6046else
6047 echo "$as_me: failed program was:" >&5
6048cat conftest.$ac_ext >&5
6049cat >conftest.$ac_ext <<_ACEOF
6050#line $LINENO "configure"
6051#include "confdefs.h"
6052$ac_includes_default
6053#ifdef F77_DUMMY_MAIN
6054# ifdef __cplusplus
6055 extern "C"
6056# endif
6057 int F77_DUMMY_MAIN() { return 1; }
6058#endif
6059int
6060main ()
6061{
6062static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6063test_array [0] = 0
6064
6065 ;
6066 return 0;
6067}
6068_ACEOF
6069rm -f conftest.$ac_objext
6070if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6071 (eval $ac_compile) 2>&5
6072 ac_status=$?
6073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6074 (exit $ac_status); } &&
6075 { ac_try='test -s conftest.$ac_objext'
6076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6077 (eval $ac_try) 2>&5
6078 ac_status=$?
6079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6080 (exit $ac_status); }; }; then
6081 ac_hi=-1 ac_mid=-1
6082 while :; do
6083 cat >conftest.$ac_ext <<_ACEOF
6084#line $LINENO "configure"
6085#include "confdefs.h"
6086$ac_includes_default
6087#ifdef F77_DUMMY_MAIN
6088# ifdef __cplusplus
6089 extern "C"
6090# endif
6091 int F77_DUMMY_MAIN() { return 1; }
6092#endif
6093int
6094main ()
6095{
6096static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6097test_array [0] = 0
6098
6099 ;
6100 return 0;
6101}
6102_ACEOF
6103rm -f conftest.$ac_objext
6104if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6105 (eval $ac_compile) 2>&5
6106 ac_status=$?
6107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6108 (exit $ac_status); } &&
6109 { ac_try='test -s conftest.$ac_objext'
6110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6111 (eval $ac_try) 2>&5
6112 ac_status=$?
6113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6114 (exit $ac_status); }; }; then
6115 ac_lo=$ac_mid; break
6116else
6117 echo "$as_me: failed program was:" >&5
6118cat conftest.$ac_ext >&5
6119ac_hi=`expr '(' $ac_mid ')' - 1`
6120 if test $ac_mid -le $ac_hi; then
6121 ac_lo= ac_hi=
6122 break
6123 fi
6124 ac_mid=`expr 2 '*' $ac_mid`
6125fi
6126rm -f conftest.$ac_objext conftest.$ac_ext
6127 done
6128else
6129 echo "$as_me: failed program was:" >&5
6130cat conftest.$ac_ext >&5
6131ac_lo= ac_hi=
6132fi
6133rm -f conftest.$ac_objext conftest.$ac_ext
6134fi
6135rm -f conftest.$ac_objext conftest.$ac_ext
6136# Binary search between lo and hi bounds.
6137while test "x$ac_lo" != "x$ac_hi"; do
6138 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6139 cat >conftest.$ac_ext <<_ACEOF
6140#line $LINENO "configure"
6141#include "confdefs.h"
6142$ac_includes_default
6143#ifdef F77_DUMMY_MAIN
6144# ifdef __cplusplus
6145 extern "C"
6146# endif
6147 int F77_DUMMY_MAIN() { return 1; }
6148#endif
6149int
6150main ()
6151{
6152static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6153test_array [0] = 0
6154
6155 ;
6156 return 0;
6157}
6158_ACEOF
6159rm -f conftest.$ac_objext
6160if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6161 (eval $ac_compile) 2>&5
6162 ac_status=$?
6163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6164 (exit $ac_status); } &&
6165 { ac_try='test -s conftest.$ac_objext'
6166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6167 (eval $ac_try) 2>&5
6168 ac_status=$?
6169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6170 (exit $ac_status); }; }; then
6171 ac_hi=$ac_mid
6172else
6173 echo "$as_me: failed program was:" >&5
6174cat conftest.$ac_ext >&5
6175ac_lo=`expr '(' $ac_mid ')' + 1`
6176fi
6177rm -f conftest.$ac_objext conftest.$ac_ext
6178done
6179case $ac_lo in
6180?*) ac_cv_sizeof_void_p=$ac_lo;;
6181'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6182echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6183 { (exit 1); exit 1; }; } ;;
6184esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006185else
6186 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006187 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6188echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6189 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006190else
Martin v. Löwis11437992002-04-12 09:54:03 +00006191 cat >conftest.$ac_ext <<_ACEOF
6192#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006193#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006194$ac_includes_default
6195long longval () { return (long) (sizeof (void *)); }
6196unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006197#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006198#include <stdlib.h>
6199#ifdef F77_DUMMY_MAIN
6200# ifdef __cplusplus
6201 extern "C"
6202# endif
6203 int F77_DUMMY_MAIN() { return 1; }
6204#endif
6205int
6206main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006207{
Martin v. Löwis11437992002-04-12 09:54:03 +00006208
6209 FILE *f = fopen ("conftest.val", "w");
6210 if (! f)
6211 exit (1);
6212 if (((long) (sizeof (void *))) < 0)
6213 {
6214 long i = longval ();
6215 if (i != ((long) (sizeof (void *))))
6216 exit (1);
6217 fprintf (f, "%ld\n", i);
6218 }
6219 else
6220 {
6221 unsigned long i = ulongval ();
6222 if (i != ((long) (sizeof (void *))))
6223 exit (1);
6224 fprintf (f, "%lu\n", i);
6225 }
6226 exit (ferror (f) || fclose (f) != 0);
6227
6228 ;
6229 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006230}
Martin v. Löwis11437992002-04-12 09:54:03 +00006231_ACEOF
6232rm -f conftest$ac_exeext
6233if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6234 (eval $ac_link) 2>&5
6235 ac_status=$?
6236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6237 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6239 (eval $ac_try) 2>&5
6240 ac_status=$?
6241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6242 (exit $ac_status); }; }; then
6243 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006244else
Martin v. Löwis11437992002-04-12 09:54:03 +00006245 echo "$as_me: program exited with status $ac_status" >&5
6246echo "$as_me: failed program was:" >&5
6247cat conftest.$ac_ext >&5
6248( exit $ac_status )
6249{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6250echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6251 { (exit 1); exit 1; }; }
6252fi
6253rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6254fi
6255fi
6256rm -f conftest.val
6257else
Guido van Rossumad678af1998-10-02 14:42:15 +00006258 ac_cv_sizeof_void_p=0
6259fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006260fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006261echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6262echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6263cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006264#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006265_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006266
6267
Martin v. Löwis11437992002-04-12 09:54:03 +00006268echo "$as_me:$LINENO: checking for char" >&5
6269echo $ECHO_N "checking for char... $ECHO_C" >&6
6270if test "${ac_cv_type_char+set}" = set; then
6271 echo $ECHO_N "(cached) $ECHO_C" >&6
6272else
6273 cat >conftest.$ac_ext <<_ACEOF
6274#line $LINENO "configure"
6275#include "confdefs.h"
6276$ac_includes_default
6277#ifdef F77_DUMMY_MAIN
6278# ifdef __cplusplus
6279 extern "C"
6280# endif
6281 int F77_DUMMY_MAIN() { return 1; }
6282#endif
6283int
6284main ()
6285{
6286if ((char *) 0)
6287 return 0;
6288if (sizeof (char))
6289 return 0;
6290 ;
6291 return 0;
6292}
6293_ACEOF
6294rm -f conftest.$ac_objext
6295if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6296 (eval $ac_compile) 2>&5
6297 ac_status=$?
6298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6299 (exit $ac_status); } &&
6300 { ac_try='test -s conftest.$ac_objext'
6301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6302 (eval $ac_try) 2>&5
6303 ac_status=$?
6304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6305 (exit $ac_status); }; }; then
6306 ac_cv_type_char=yes
6307else
6308 echo "$as_me: failed program was:" >&5
6309cat conftest.$ac_ext >&5
6310ac_cv_type_char=no
6311fi
6312rm -f conftest.$ac_objext conftest.$ac_ext
6313fi
6314echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6315echo "${ECHO_T}$ac_cv_type_char" >&6
6316
6317echo "$as_me:$LINENO: checking size of char" >&5
6318echo $ECHO_N "checking size of char... $ECHO_C" >&6
6319if test "${ac_cv_sizeof_char+set}" = set; then
6320 echo $ECHO_N "(cached) $ECHO_C" >&6
6321else
6322 if test "$ac_cv_type_char" = yes; then
6323 # The cast to unsigned long works around a bug in the HP C Compiler
6324 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6325 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6326 # This bug is HP SR number 8606223364.
6327 if test "$cross_compiling" = yes; then
6328 # Depending upon the size, compute the lo and hi bounds.
6329cat >conftest.$ac_ext <<_ACEOF
6330#line $LINENO "configure"
6331#include "confdefs.h"
6332$ac_includes_default
6333#ifdef F77_DUMMY_MAIN
6334# ifdef __cplusplus
6335 extern "C"
6336# endif
6337 int F77_DUMMY_MAIN() { return 1; }
6338#endif
6339int
6340main ()
6341{
6342static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6343test_array [0] = 0
6344
6345 ;
6346 return 0;
6347}
6348_ACEOF
6349rm -f conftest.$ac_objext
6350if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6351 (eval $ac_compile) 2>&5
6352 ac_status=$?
6353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6354 (exit $ac_status); } &&
6355 { ac_try='test -s conftest.$ac_objext'
6356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6357 (eval $ac_try) 2>&5
6358 ac_status=$?
6359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6360 (exit $ac_status); }; }; then
6361 ac_lo=0 ac_mid=0
6362 while :; do
6363 cat >conftest.$ac_ext <<_ACEOF
6364#line $LINENO "configure"
6365#include "confdefs.h"
6366$ac_includes_default
6367#ifdef F77_DUMMY_MAIN
6368# ifdef __cplusplus
6369 extern "C"
6370# endif
6371 int F77_DUMMY_MAIN() { return 1; }
6372#endif
6373int
6374main ()
6375{
6376static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6377test_array [0] = 0
6378
6379 ;
6380 return 0;
6381}
6382_ACEOF
6383rm -f conftest.$ac_objext
6384if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6385 (eval $ac_compile) 2>&5
6386 ac_status=$?
6387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6388 (exit $ac_status); } &&
6389 { ac_try='test -s conftest.$ac_objext'
6390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6391 (eval $ac_try) 2>&5
6392 ac_status=$?
6393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6394 (exit $ac_status); }; }; then
6395 ac_hi=$ac_mid; break
6396else
6397 echo "$as_me: failed program was:" >&5
6398cat conftest.$ac_ext >&5
6399ac_lo=`expr $ac_mid + 1`
6400 if test $ac_lo -le $ac_mid; then
6401 ac_lo= ac_hi=
6402 break
6403 fi
6404 ac_mid=`expr 2 '*' $ac_mid + 1`
6405fi
6406rm -f conftest.$ac_objext conftest.$ac_ext
6407 done
6408else
6409 echo "$as_me: failed program was:" >&5
6410cat conftest.$ac_ext >&5
6411cat >conftest.$ac_ext <<_ACEOF
6412#line $LINENO "configure"
6413#include "confdefs.h"
6414$ac_includes_default
6415#ifdef F77_DUMMY_MAIN
6416# ifdef __cplusplus
6417 extern "C"
6418# endif
6419 int F77_DUMMY_MAIN() { return 1; }
6420#endif
6421int
6422main ()
6423{
6424static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6425test_array [0] = 0
6426
6427 ;
6428 return 0;
6429}
6430_ACEOF
6431rm -f conftest.$ac_objext
6432if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6433 (eval $ac_compile) 2>&5
6434 ac_status=$?
6435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6436 (exit $ac_status); } &&
6437 { ac_try='test -s conftest.$ac_objext'
6438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6439 (eval $ac_try) 2>&5
6440 ac_status=$?
6441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6442 (exit $ac_status); }; }; then
6443 ac_hi=-1 ac_mid=-1
6444 while :; do
6445 cat >conftest.$ac_ext <<_ACEOF
6446#line $LINENO "configure"
6447#include "confdefs.h"
6448$ac_includes_default
6449#ifdef F77_DUMMY_MAIN
6450# ifdef __cplusplus
6451 extern "C"
6452# endif
6453 int F77_DUMMY_MAIN() { return 1; }
6454#endif
6455int
6456main ()
6457{
6458static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6459test_array [0] = 0
6460
6461 ;
6462 return 0;
6463}
6464_ACEOF
6465rm -f conftest.$ac_objext
6466if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6467 (eval $ac_compile) 2>&5
6468 ac_status=$?
6469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6470 (exit $ac_status); } &&
6471 { ac_try='test -s conftest.$ac_objext'
6472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6473 (eval $ac_try) 2>&5
6474 ac_status=$?
6475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6476 (exit $ac_status); }; }; then
6477 ac_lo=$ac_mid; break
6478else
6479 echo "$as_me: failed program was:" >&5
6480cat conftest.$ac_ext >&5
6481ac_hi=`expr '(' $ac_mid ')' - 1`
6482 if test $ac_mid -le $ac_hi; then
6483 ac_lo= ac_hi=
6484 break
6485 fi
6486 ac_mid=`expr 2 '*' $ac_mid`
6487fi
6488rm -f conftest.$ac_objext conftest.$ac_ext
6489 done
6490else
6491 echo "$as_me: failed program was:" >&5
6492cat conftest.$ac_ext >&5
6493ac_lo= ac_hi=
6494fi
6495rm -f conftest.$ac_objext conftest.$ac_ext
6496fi
6497rm -f conftest.$ac_objext conftest.$ac_ext
6498# Binary search between lo and hi bounds.
6499while test "x$ac_lo" != "x$ac_hi"; do
6500 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6501 cat >conftest.$ac_ext <<_ACEOF
6502#line $LINENO "configure"
6503#include "confdefs.h"
6504$ac_includes_default
6505#ifdef F77_DUMMY_MAIN
6506# ifdef __cplusplus
6507 extern "C"
6508# endif
6509 int F77_DUMMY_MAIN() { return 1; }
6510#endif
6511int
6512main ()
6513{
6514static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6515test_array [0] = 0
6516
6517 ;
6518 return 0;
6519}
6520_ACEOF
6521rm -f conftest.$ac_objext
6522if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6523 (eval $ac_compile) 2>&5
6524 ac_status=$?
6525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6526 (exit $ac_status); } &&
6527 { ac_try='test -s conftest.$ac_objext'
6528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6529 (eval $ac_try) 2>&5
6530 ac_status=$?
6531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6532 (exit $ac_status); }; }; then
6533 ac_hi=$ac_mid
6534else
6535 echo "$as_me: failed program was:" >&5
6536cat conftest.$ac_ext >&5
6537ac_lo=`expr '(' $ac_mid ')' + 1`
6538fi
6539rm -f conftest.$ac_objext conftest.$ac_ext
6540done
6541case $ac_lo in
6542?*) ac_cv_sizeof_char=$ac_lo;;
6543'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6544echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6545 { (exit 1); exit 1; }; } ;;
6546esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006547else
6548 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006549 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6550echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6551 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006552else
Martin v. Löwis11437992002-04-12 09:54:03 +00006553 cat >conftest.$ac_ext <<_ACEOF
6554#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006555#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006556$ac_includes_default
6557long longval () { return (long) (sizeof (char)); }
6558unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006559#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006560#include <stdlib.h>
6561#ifdef F77_DUMMY_MAIN
6562# ifdef __cplusplus
6563 extern "C"
6564# endif
6565 int F77_DUMMY_MAIN() { return 1; }
6566#endif
6567int
6568main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006569{
Martin v. Löwis11437992002-04-12 09:54:03 +00006570
6571 FILE *f = fopen ("conftest.val", "w");
6572 if (! f)
6573 exit (1);
6574 if (((long) (sizeof (char))) < 0)
6575 {
6576 long i = longval ();
6577 if (i != ((long) (sizeof (char))))
6578 exit (1);
6579 fprintf (f, "%ld\n", i);
6580 }
6581 else
6582 {
6583 unsigned long i = ulongval ();
6584 if (i != ((long) (sizeof (char))))
6585 exit (1);
6586 fprintf (f, "%lu\n", i);
6587 }
6588 exit (ferror (f) || fclose (f) != 0);
6589
6590 ;
6591 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006592}
Martin v. Löwis11437992002-04-12 09:54:03 +00006593_ACEOF
6594rm -f conftest$ac_exeext
6595if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6596 (eval $ac_link) 2>&5
6597 ac_status=$?
6598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6599 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6601 (eval $ac_try) 2>&5
6602 ac_status=$?
6603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6604 (exit $ac_status); }; }; then
6605 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006606else
Martin v. Löwis11437992002-04-12 09:54:03 +00006607 echo "$as_me: program exited with status $ac_status" >&5
6608echo "$as_me: failed program was:" >&5
6609cat conftest.$ac_ext >&5
6610( exit $ac_status )
6611{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6612echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6613 { (exit 1); exit 1; }; }
6614fi
6615rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6616fi
6617fi
6618rm -f conftest.val
6619else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006620 ac_cv_sizeof_char=0
6621fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006622fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006623echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6624echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6625cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006626#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006627_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006628
6629
Martin v. Löwis11437992002-04-12 09:54:03 +00006630echo "$as_me:$LINENO: checking for short" >&5
6631echo $ECHO_N "checking for short... $ECHO_C" >&6
6632if test "${ac_cv_type_short+set}" = set; then
6633 echo $ECHO_N "(cached) $ECHO_C" >&6
6634else
6635 cat >conftest.$ac_ext <<_ACEOF
6636#line $LINENO "configure"
6637#include "confdefs.h"
6638$ac_includes_default
6639#ifdef F77_DUMMY_MAIN
6640# ifdef __cplusplus
6641 extern "C"
6642# endif
6643 int F77_DUMMY_MAIN() { return 1; }
6644#endif
6645int
6646main ()
6647{
6648if ((short *) 0)
6649 return 0;
6650if (sizeof (short))
6651 return 0;
6652 ;
6653 return 0;
6654}
6655_ACEOF
6656rm -f conftest.$ac_objext
6657if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6658 (eval $ac_compile) 2>&5
6659 ac_status=$?
6660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6661 (exit $ac_status); } &&
6662 { ac_try='test -s conftest.$ac_objext'
6663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6664 (eval $ac_try) 2>&5
6665 ac_status=$?
6666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6667 (exit $ac_status); }; }; then
6668 ac_cv_type_short=yes
6669else
6670 echo "$as_me: failed program was:" >&5
6671cat conftest.$ac_ext >&5
6672ac_cv_type_short=no
6673fi
6674rm -f conftest.$ac_objext conftest.$ac_ext
6675fi
6676echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6677echo "${ECHO_T}$ac_cv_type_short" >&6
6678
6679echo "$as_me:$LINENO: checking size of short" >&5
6680echo $ECHO_N "checking size of short... $ECHO_C" >&6
6681if test "${ac_cv_sizeof_short+set}" = set; then
6682 echo $ECHO_N "(cached) $ECHO_C" >&6
6683else
6684 if test "$ac_cv_type_short" = yes; then
6685 # The cast to unsigned long works around a bug in the HP C Compiler
6686 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6687 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6688 # This bug is HP SR number 8606223364.
6689 if test "$cross_compiling" = yes; then
6690 # Depending upon the size, compute the lo and hi bounds.
6691cat >conftest.$ac_ext <<_ACEOF
6692#line $LINENO "configure"
6693#include "confdefs.h"
6694$ac_includes_default
6695#ifdef F77_DUMMY_MAIN
6696# ifdef __cplusplus
6697 extern "C"
6698# endif
6699 int F77_DUMMY_MAIN() { return 1; }
6700#endif
6701int
6702main ()
6703{
6704static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6705test_array [0] = 0
6706
6707 ;
6708 return 0;
6709}
6710_ACEOF
6711rm -f conftest.$ac_objext
6712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6713 (eval $ac_compile) 2>&5
6714 ac_status=$?
6715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6716 (exit $ac_status); } &&
6717 { ac_try='test -s conftest.$ac_objext'
6718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6719 (eval $ac_try) 2>&5
6720 ac_status=$?
6721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6722 (exit $ac_status); }; }; then
6723 ac_lo=0 ac_mid=0
6724 while :; do
6725 cat >conftest.$ac_ext <<_ACEOF
6726#line $LINENO "configure"
6727#include "confdefs.h"
6728$ac_includes_default
6729#ifdef F77_DUMMY_MAIN
6730# ifdef __cplusplus
6731 extern "C"
6732# endif
6733 int F77_DUMMY_MAIN() { return 1; }
6734#endif
6735int
6736main ()
6737{
6738static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6739test_array [0] = 0
6740
6741 ;
6742 return 0;
6743}
6744_ACEOF
6745rm -f conftest.$ac_objext
6746if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6747 (eval $ac_compile) 2>&5
6748 ac_status=$?
6749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6750 (exit $ac_status); } &&
6751 { ac_try='test -s conftest.$ac_objext'
6752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6753 (eval $ac_try) 2>&5
6754 ac_status=$?
6755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6756 (exit $ac_status); }; }; then
6757 ac_hi=$ac_mid; break
6758else
6759 echo "$as_me: failed program was:" >&5
6760cat conftest.$ac_ext >&5
6761ac_lo=`expr $ac_mid + 1`
6762 if test $ac_lo -le $ac_mid; then
6763 ac_lo= ac_hi=
6764 break
6765 fi
6766 ac_mid=`expr 2 '*' $ac_mid + 1`
6767fi
6768rm -f conftest.$ac_objext conftest.$ac_ext
6769 done
6770else
6771 echo "$as_me: failed program was:" >&5
6772cat conftest.$ac_ext >&5
6773cat >conftest.$ac_ext <<_ACEOF
6774#line $LINENO "configure"
6775#include "confdefs.h"
6776$ac_includes_default
6777#ifdef F77_DUMMY_MAIN
6778# ifdef __cplusplus
6779 extern "C"
6780# endif
6781 int F77_DUMMY_MAIN() { return 1; }
6782#endif
6783int
6784main ()
6785{
6786static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6787test_array [0] = 0
6788
6789 ;
6790 return 0;
6791}
6792_ACEOF
6793rm -f conftest.$ac_objext
6794if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6795 (eval $ac_compile) 2>&5
6796 ac_status=$?
6797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6798 (exit $ac_status); } &&
6799 { ac_try='test -s conftest.$ac_objext'
6800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6801 (eval $ac_try) 2>&5
6802 ac_status=$?
6803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6804 (exit $ac_status); }; }; then
6805 ac_hi=-1 ac_mid=-1
6806 while :; do
6807 cat >conftest.$ac_ext <<_ACEOF
6808#line $LINENO "configure"
6809#include "confdefs.h"
6810$ac_includes_default
6811#ifdef F77_DUMMY_MAIN
6812# ifdef __cplusplus
6813 extern "C"
6814# endif
6815 int F77_DUMMY_MAIN() { return 1; }
6816#endif
6817int
6818main ()
6819{
6820static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6821test_array [0] = 0
6822
6823 ;
6824 return 0;
6825}
6826_ACEOF
6827rm -f conftest.$ac_objext
6828if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6829 (eval $ac_compile) 2>&5
6830 ac_status=$?
6831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6832 (exit $ac_status); } &&
6833 { ac_try='test -s conftest.$ac_objext'
6834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6835 (eval $ac_try) 2>&5
6836 ac_status=$?
6837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6838 (exit $ac_status); }; }; then
6839 ac_lo=$ac_mid; break
6840else
6841 echo "$as_me: failed program was:" >&5
6842cat conftest.$ac_ext >&5
6843ac_hi=`expr '(' $ac_mid ')' - 1`
6844 if test $ac_mid -le $ac_hi; then
6845 ac_lo= ac_hi=
6846 break
6847 fi
6848 ac_mid=`expr 2 '*' $ac_mid`
6849fi
6850rm -f conftest.$ac_objext conftest.$ac_ext
6851 done
6852else
6853 echo "$as_me: failed program was:" >&5
6854cat conftest.$ac_ext >&5
6855ac_lo= ac_hi=
6856fi
6857rm -f conftest.$ac_objext conftest.$ac_ext
6858fi
6859rm -f conftest.$ac_objext conftest.$ac_ext
6860# Binary search between lo and hi bounds.
6861while test "x$ac_lo" != "x$ac_hi"; do
6862 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6863 cat >conftest.$ac_ext <<_ACEOF
6864#line $LINENO "configure"
6865#include "confdefs.h"
6866$ac_includes_default
6867#ifdef F77_DUMMY_MAIN
6868# ifdef __cplusplus
6869 extern "C"
6870# endif
6871 int F77_DUMMY_MAIN() { return 1; }
6872#endif
6873int
6874main ()
6875{
6876static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6877test_array [0] = 0
6878
6879 ;
6880 return 0;
6881}
6882_ACEOF
6883rm -f conftest.$ac_objext
6884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6885 (eval $ac_compile) 2>&5
6886 ac_status=$?
6887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6888 (exit $ac_status); } &&
6889 { ac_try='test -s conftest.$ac_objext'
6890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6891 (eval $ac_try) 2>&5
6892 ac_status=$?
6893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6894 (exit $ac_status); }; }; then
6895 ac_hi=$ac_mid
6896else
6897 echo "$as_me: failed program was:" >&5
6898cat conftest.$ac_ext >&5
6899ac_lo=`expr '(' $ac_mid ')' + 1`
6900fi
6901rm -f conftest.$ac_objext conftest.$ac_ext
6902done
6903case $ac_lo in
6904?*) ac_cv_sizeof_short=$ac_lo;;
6905'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6906echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6907 { (exit 1); exit 1; }; } ;;
6908esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006909else
6910 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006911 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6912echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6913 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006914else
Martin v. Löwis11437992002-04-12 09:54:03 +00006915 cat >conftest.$ac_ext <<_ACEOF
6916#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006917#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006918$ac_includes_default
6919long longval () { return (long) (sizeof (short)); }
6920unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006921#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006922#include <stdlib.h>
6923#ifdef F77_DUMMY_MAIN
6924# ifdef __cplusplus
6925 extern "C"
6926# endif
6927 int F77_DUMMY_MAIN() { return 1; }
6928#endif
6929int
6930main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006931{
Martin v. Löwis11437992002-04-12 09:54:03 +00006932
6933 FILE *f = fopen ("conftest.val", "w");
6934 if (! f)
6935 exit (1);
6936 if (((long) (sizeof (short))) < 0)
6937 {
6938 long i = longval ();
6939 if (i != ((long) (sizeof (short))))
6940 exit (1);
6941 fprintf (f, "%ld\n", i);
6942 }
6943 else
6944 {
6945 unsigned long i = ulongval ();
6946 if (i != ((long) (sizeof (short))))
6947 exit (1);
6948 fprintf (f, "%lu\n", i);
6949 }
6950 exit (ferror (f) || fclose (f) != 0);
6951
6952 ;
6953 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006954}
Martin v. Löwis11437992002-04-12 09:54:03 +00006955_ACEOF
6956rm -f conftest$ac_exeext
6957if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6958 (eval $ac_link) 2>&5
6959 ac_status=$?
6960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6961 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6963 (eval $ac_try) 2>&5
6964 ac_status=$?
6965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6966 (exit $ac_status); }; }; then
6967 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006968else
Martin v. Löwis11437992002-04-12 09:54:03 +00006969 echo "$as_me: program exited with status $ac_status" >&5
6970echo "$as_me: failed program was:" >&5
6971cat conftest.$ac_ext >&5
6972( exit $ac_status )
6973{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6974echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6975 { (exit 1); exit 1; }; }
6976fi
6977rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6978fi
6979fi
6980rm -f conftest.val
6981else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006982 ac_cv_sizeof_short=0
6983fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006984fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006985echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6986echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6987cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006988#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006989_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006990
6991
Martin v. Löwis11437992002-04-12 09:54:03 +00006992echo "$as_me:$LINENO: checking for float" >&5
6993echo $ECHO_N "checking for float... $ECHO_C" >&6
6994if test "${ac_cv_type_float+set}" = set; then
6995 echo $ECHO_N "(cached) $ECHO_C" >&6
6996else
6997 cat >conftest.$ac_ext <<_ACEOF
6998#line $LINENO "configure"
6999#include "confdefs.h"
7000$ac_includes_default
7001#ifdef F77_DUMMY_MAIN
7002# ifdef __cplusplus
7003 extern "C"
7004# endif
7005 int F77_DUMMY_MAIN() { return 1; }
7006#endif
7007int
7008main ()
7009{
7010if ((float *) 0)
7011 return 0;
7012if (sizeof (float))
7013 return 0;
7014 ;
7015 return 0;
7016}
7017_ACEOF
7018rm -f conftest.$ac_objext
7019if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7020 (eval $ac_compile) 2>&5
7021 ac_status=$?
7022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7023 (exit $ac_status); } &&
7024 { ac_try='test -s conftest.$ac_objext'
7025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7026 (eval $ac_try) 2>&5
7027 ac_status=$?
7028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7029 (exit $ac_status); }; }; then
7030 ac_cv_type_float=yes
7031else
7032 echo "$as_me: failed program was:" >&5
7033cat conftest.$ac_ext >&5
7034ac_cv_type_float=no
7035fi
7036rm -f conftest.$ac_objext conftest.$ac_ext
7037fi
7038echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7039echo "${ECHO_T}$ac_cv_type_float" >&6
7040
7041echo "$as_me:$LINENO: checking size of float" >&5
7042echo $ECHO_N "checking size of float... $ECHO_C" >&6
7043if test "${ac_cv_sizeof_float+set}" = set; then
7044 echo $ECHO_N "(cached) $ECHO_C" >&6
7045else
7046 if test "$ac_cv_type_float" = yes; then
7047 # The cast to unsigned long works around a bug in the HP C Compiler
7048 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7049 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7050 # This bug is HP SR number 8606223364.
7051 if test "$cross_compiling" = yes; then
7052 # Depending upon the size, compute the lo and hi bounds.
7053cat >conftest.$ac_ext <<_ACEOF
7054#line $LINENO "configure"
7055#include "confdefs.h"
7056$ac_includes_default
7057#ifdef F77_DUMMY_MAIN
7058# ifdef __cplusplus
7059 extern "C"
7060# endif
7061 int F77_DUMMY_MAIN() { return 1; }
7062#endif
7063int
7064main ()
7065{
7066static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7067test_array [0] = 0
7068
7069 ;
7070 return 0;
7071}
7072_ACEOF
7073rm -f conftest.$ac_objext
7074if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7075 (eval $ac_compile) 2>&5
7076 ac_status=$?
7077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7078 (exit $ac_status); } &&
7079 { ac_try='test -s conftest.$ac_objext'
7080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7081 (eval $ac_try) 2>&5
7082 ac_status=$?
7083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7084 (exit $ac_status); }; }; then
7085 ac_lo=0 ac_mid=0
7086 while :; do
7087 cat >conftest.$ac_ext <<_ACEOF
7088#line $LINENO "configure"
7089#include "confdefs.h"
7090$ac_includes_default
7091#ifdef F77_DUMMY_MAIN
7092# ifdef __cplusplus
7093 extern "C"
7094# endif
7095 int F77_DUMMY_MAIN() { return 1; }
7096#endif
7097int
7098main ()
7099{
7100static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7101test_array [0] = 0
7102
7103 ;
7104 return 0;
7105}
7106_ACEOF
7107rm -f conftest.$ac_objext
7108if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7109 (eval $ac_compile) 2>&5
7110 ac_status=$?
7111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7112 (exit $ac_status); } &&
7113 { ac_try='test -s conftest.$ac_objext'
7114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7115 (eval $ac_try) 2>&5
7116 ac_status=$?
7117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7118 (exit $ac_status); }; }; then
7119 ac_hi=$ac_mid; break
7120else
7121 echo "$as_me: failed program was:" >&5
7122cat conftest.$ac_ext >&5
7123ac_lo=`expr $ac_mid + 1`
7124 if test $ac_lo -le $ac_mid; then
7125 ac_lo= ac_hi=
7126 break
7127 fi
7128 ac_mid=`expr 2 '*' $ac_mid + 1`
7129fi
7130rm -f conftest.$ac_objext conftest.$ac_ext
7131 done
7132else
7133 echo "$as_me: failed program was:" >&5
7134cat conftest.$ac_ext >&5
7135cat >conftest.$ac_ext <<_ACEOF
7136#line $LINENO "configure"
7137#include "confdefs.h"
7138$ac_includes_default
7139#ifdef F77_DUMMY_MAIN
7140# ifdef __cplusplus
7141 extern "C"
7142# endif
7143 int F77_DUMMY_MAIN() { return 1; }
7144#endif
7145int
7146main ()
7147{
7148static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7149test_array [0] = 0
7150
7151 ;
7152 return 0;
7153}
7154_ACEOF
7155rm -f conftest.$ac_objext
7156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7157 (eval $ac_compile) 2>&5
7158 ac_status=$?
7159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7160 (exit $ac_status); } &&
7161 { ac_try='test -s conftest.$ac_objext'
7162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7163 (eval $ac_try) 2>&5
7164 ac_status=$?
7165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7166 (exit $ac_status); }; }; then
7167 ac_hi=-1 ac_mid=-1
7168 while :; do
7169 cat >conftest.$ac_ext <<_ACEOF
7170#line $LINENO "configure"
7171#include "confdefs.h"
7172$ac_includes_default
7173#ifdef F77_DUMMY_MAIN
7174# ifdef __cplusplus
7175 extern "C"
7176# endif
7177 int F77_DUMMY_MAIN() { return 1; }
7178#endif
7179int
7180main ()
7181{
7182static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7183test_array [0] = 0
7184
7185 ;
7186 return 0;
7187}
7188_ACEOF
7189rm -f conftest.$ac_objext
7190if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7191 (eval $ac_compile) 2>&5
7192 ac_status=$?
7193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7194 (exit $ac_status); } &&
7195 { ac_try='test -s conftest.$ac_objext'
7196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7197 (eval $ac_try) 2>&5
7198 ac_status=$?
7199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7200 (exit $ac_status); }; }; then
7201 ac_lo=$ac_mid; break
7202else
7203 echo "$as_me: failed program was:" >&5
7204cat conftest.$ac_ext >&5
7205ac_hi=`expr '(' $ac_mid ')' - 1`
7206 if test $ac_mid -le $ac_hi; then
7207 ac_lo= ac_hi=
7208 break
7209 fi
7210 ac_mid=`expr 2 '*' $ac_mid`
7211fi
7212rm -f conftest.$ac_objext conftest.$ac_ext
7213 done
7214else
7215 echo "$as_me: failed program was:" >&5
7216cat conftest.$ac_ext >&5
7217ac_lo= ac_hi=
7218fi
7219rm -f conftest.$ac_objext conftest.$ac_ext
7220fi
7221rm -f conftest.$ac_objext conftest.$ac_ext
7222# Binary search between lo and hi bounds.
7223while test "x$ac_lo" != "x$ac_hi"; do
7224 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7225 cat >conftest.$ac_ext <<_ACEOF
7226#line $LINENO "configure"
7227#include "confdefs.h"
7228$ac_includes_default
7229#ifdef F77_DUMMY_MAIN
7230# ifdef __cplusplus
7231 extern "C"
7232# endif
7233 int F77_DUMMY_MAIN() { return 1; }
7234#endif
7235int
7236main ()
7237{
7238static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7239test_array [0] = 0
7240
7241 ;
7242 return 0;
7243}
7244_ACEOF
7245rm -f conftest.$ac_objext
7246if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7247 (eval $ac_compile) 2>&5
7248 ac_status=$?
7249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7250 (exit $ac_status); } &&
7251 { ac_try='test -s conftest.$ac_objext'
7252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7253 (eval $ac_try) 2>&5
7254 ac_status=$?
7255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7256 (exit $ac_status); }; }; then
7257 ac_hi=$ac_mid
7258else
7259 echo "$as_me: failed program was:" >&5
7260cat conftest.$ac_ext >&5
7261ac_lo=`expr '(' $ac_mid ')' + 1`
7262fi
7263rm -f conftest.$ac_objext conftest.$ac_ext
7264done
7265case $ac_lo in
7266?*) ac_cv_sizeof_float=$ac_lo;;
7267'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7268echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7269 { (exit 1); exit 1; }; } ;;
7270esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007271else
7272 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007273 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7274echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7275 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007276else
Martin v. Löwis11437992002-04-12 09:54:03 +00007277 cat >conftest.$ac_ext <<_ACEOF
7278#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007279#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007280$ac_includes_default
7281long longval () { return (long) (sizeof (float)); }
7282unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007283#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007284#include <stdlib.h>
7285#ifdef F77_DUMMY_MAIN
7286# ifdef __cplusplus
7287 extern "C"
7288# endif
7289 int F77_DUMMY_MAIN() { return 1; }
7290#endif
7291int
7292main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007293{
Martin v. Löwis11437992002-04-12 09:54:03 +00007294
7295 FILE *f = fopen ("conftest.val", "w");
7296 if (! f)
7297 exit (1);
7298 if (((long) (sizeof (float))) < 0)
7299 {
7300 long i = longval ();
7301 if (i != ((long) (sizeof (float))))
7302 exit (1);
7303 fprintf (f, "%ld\n", i);
7304 }
7305 else
7306 {
7307 unsigned long i = ulongval ();
7308 if (i != ((long) (sizeof (float))))
7309 exit (1);
7310 fprintf (f, "%lu\n", i);
7311 }
7312 exit (ferror (f) || fclose (f) != 0);
7313
7314 ;
7315 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007316}
Martin v. Löwis11437992002-04-12 09:54:03 +00007317_ACEOF
7318rm -f conftest$ac_exeext
7319if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7320 (eval $ac_link) 2>&5
7321 ac_status=$?
7322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7323 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7325 (eval $ac_try) 2>&5
7326 ac_status=$?
7327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7328 (exit $ac_status); }; }; then
7329 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007330else
Martin v. Löwis11437992002-04-12 09:54:03 +00007331 echo "$as_me: program exited with status $ac_status" >&5
7332echo "$as_me: failed program was:" >&5
7333cat conftest.$ac_ext >&5
7334( exit $ac_status )
7335{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7336echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7337 { (exit 1); exit 1; }; }
7338fi
7339rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7340fi
7341fi
7342rm -f conftest.val
7343else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007344 ac_cv_sizeof_float=0
7345fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007346fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007347echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7348echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7349cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007350#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007351_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007352
7353
Martin v. Löwis11437992002-04-12 09:54:03 +00007354echo "$as_me:$LINENO: checking for double" >&5
7355echo $ECHO_N "checking for double... $ECHO_C" >&6
7356if test "${ac_cv_type_double+set}" = set; then
7357 echo $ECHO_N "(cached) $ECHO_C" >&6
7358else
7359 cat >conftest.$ac_ext <<_ACEOF
7360#line $LINENO "configure"
7361#include "confdefs.h"
7362$ac_includes_default
7363#ifdef F77_DUMMY_MAIN
7364# ifdef __cplusplus
7365 extern "C"
7366# endif
7367 int F77_DUMMY_MAIN() { return 1; }
7368#endif
7369int
7370main ()
7371{
7372if ((double *) 0)
7373 return 0;
7374if (sizeof (double))
7375 return 0;
7376 ;
7377 return 0;
7378}
7379_ACEOF
7380rm -f conftest.$ac_objext
7381if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7382 (eval $ac_compile) 2>&5
7383 ac_status=$?
7384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7385 (exit $ac_status); } &&
7386 { ac_try='test -s conftest.$ac_objext'
7387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7388 (eval $ac_try) 2>&5
7389 ac_status=$?
7390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7391 (exit $ac_status); }; }; then
7392 ac_cv_type_double=yes
7393else
7394 echo "$as_me: failed program was:" >&5
7395cat conftest.$ac_ext >&5
7396ac_cv_type_double=no
7397fi
7398rm -f conftest.$ac_objext conftest.$ac_ext
7399fi
7400echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7401echo "${ECHO_T}$ac_cv_type_double" >&6
7402
7403echo "$as_me:$LINENO: checking size of double" >&5
7404echo $ECHO_N "checking size of double... $ECHO_C" >&6
7405if test "${ac_cv_sizeof_double+set}" = set; then
7406 echo $ECHO_N "(cached) $ECHO_C" >&6
7407else
7408 if test "$ac_cv_type_double" = yes; then
7409 # The cast to unsigned long works around a bug in the HP C Compiler
7410 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7411 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7412 # This bug is HP SR number 8606223364.
7413 if test "$cross_compiling" = yes; then
7414 # Depending upon the size, compute the lo and hi bounds.
7415cat >conftest.$ac_ext <<_ACEOF
7416#line $LINENO "configure"
7417#include "confdefs.h"
7418$ac_includes_default
7419#ifdef F77_DUMMY_MAIN
7420# ifdef __cplusplus
7421 extern "C"
7422# endif
7423 int F77_DUMMY_MAIN() { return 1; }
7424#endif
7425int
7426main ()
7427{
7428static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7429test_array [0] = 0
7430
7431 ;
7432 return 0;
7433}
7434_ACEOF
7435rm -f conftest.$ac_objext
7436if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7437 (eval $ac_compile) 2>&5
7438 ac_status=$?
7439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7440 (exit $ac_status); } &&
7441 { ac_try='test -s conftest.$ac_objext'
7442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7443 (eval $ac_try) 2>&5
7444 ac_status=$?
7445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7446 (exit $ac_status); }; }; then
7447 ac_lo=0 ac_mid=0
7448 while :; do
7449 cat >conftest.$ac_ext <<_ACEOF
7450#line $LINENO "configure"
7451#include "confdefs.h"
7452$ac_includes_default
7453#ifdef F77_DUMMY_MAIN
7454# ifdef __cplusplus
7455 extern "C"
7456# endif
7457 int F77_DUMMY_MAIN() { return 1; }
7458#endif
7459int
7460main ()
7461{
7462static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7463test_array [0] = 0
7464
7465 ;
7466 return 0;
7467}
7468_ACEOF
7469rm -f conftest.$ac_objext
7470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7471 (eval $ac_compile) 2>&5
7472 ac_status=$?
7473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7474 (exit $ac_status); } &&
7475 { ac_try='test -s conftest.$ac_objext'
7476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7477 (eval $ac_try) 2>&5
7478 ac_status=$?
7479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7480 (exit $ac_status); }; }; then
7481 ac_hi=$ac_mid; break
7482else
7483 echo "$as_me: failed program was:" >&5
7484cat conftest.$ac_ext >&5
7485ac_lo=`expr $ac_mid + 1`
7486 if test $ac_lo -le $ac_mid; then
7487 ac_lo= ac_hi=
7488 break
7489 fi
7490 ac_mid=`expr 2 '*' $ac_mid + 1`
7491fi
7492rm -f conftest.$ac_objext conftest.$ac_ext
7493 done
7494else
7495 echo "$as_me: failed program was:" >&5
7496cat conftest.$ac_ext >&5
7497cat >conftest.$ac_ext <<_ACEOF
7498#line $LINENO "configure"
7499#include "confdefs.h"
7500$ac_includes_default
7501#ifdef F77_DUMMY_MAIN
7502# ifdef __cplusplus
7503 extern "C"
7504# endif
7505 int F77_DUMMY_MAIN() { return 1; }
7506#endif
7507int
7508main ()
7509{
7510static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7511test_array [0] = 0
7512
7513 ;
7514 return 0;
7515}
7516_ACEOF
7517rm -f conftest.$ac_objext
7518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7519 (eval $ac_compile) 2>&5
7520 ac_status=$?
7521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7522 (exit $ac_status); } &&
7523 { ac_try='test -s conftest.$ac_objext'
7524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7525 (eval $ac_try) 2>&5
7526 ac_status=$?
7527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7528 (exit $ac_status); }; }; then
7529 ac_hi=-1 ac_mid=-1
7530 while :; do
7531 cat >conftest.$ac_ext <<_ACEOF
7532#line $LINENO "configure"
7533#include "confdefs.h"
7534$ac_includes_default
7535#ifdef F77_DUMMY_MAIN
7536# ifdef __cplusplus
7537 extern "C"
7538# endif
7539 int F77_DUMMY_MAIN() { return 1; }
7540#endif
7541int
7542main ()
7543{
7544static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7545test_array [0] = 0
7546
7547 ;
7548 return 0;
7549}
7550_ACEOF
7551rm -f conftest.$ac_objext
7552if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7553 (eval $ac_compile) 2>&5
7554 ac_status=$?
7555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7556 (exit $ac_status); } &&
7557 { ac_try='test -s conftest.$ac_objext'
7558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7559 (eval $ac_try) 2>&5
7560 ac_status=$?
7561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7562 (exit $ac_status); }; }; then
7563 ac_lo=$ac_mid; break
7564else
7565 echo "$as_me: failed program was:" >&5
7566cat conftest.$ac_ext >&5
7567ac_hi=`expr '(' $ac_mid ')' - 1`
7568 if test $ac_mid -le $ac_hi; then
7569 ac_lo= ac_hi=
7570 break
7571 fi
7572 ac_mid=`expr 2 '*' $ac_mid`
7573fi
7574rm -f conftest.$ac_objext conftest.$ac_ext
7575 done
7576else
7577 echo "$as_me: failed program was:" >&5
7578cat conftest.$ac_ext >&5
7579ac_lo= ac_hi=
7580fi
7581rm -f conftest.$ac_objext conftest.$ac_ext
7582fi
7583rm -f conftest.$ac_objext conftest.$ac_ext
7584# Binary search between lo and hi bounds.
7585while test "x$ac_lo" != "x$ac_hi"; do
7586 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7587 cat >conftest.$ac_ext <<_ACEOF
7588#line $LINENO "configure"
7589#include "confdefs.h"
7590$ac_includes_default
7591#ifdef F77_DUMMY_MAIN
7592# ifdef __cplusplus
7593 extern "C"
7594# endif
7595 int F77_DUMMY_MAIN() { return 1; }
7596#endif
7597int
7598main ()
7599{
7600static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7601test_array [0] = 0
7602
7603 ;
7604 return 0;
7605}
7606_ACEOF
7607rm -f conftest.$ac_objext
7608if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7609 (eval $ac_compile) 2>&5
7610 ac_status=$?
7611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7612 (exit $ac_status); } &&
7613 { ac_try='test -s conftest.$ac_objext'
7614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7615 (eval $ac_try) 2>&5
7616 ac_status=$?
7617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7618 (exit $ac_status); }; }; then
7619 ac_hi=$ac_mid
7620else
7621 echo "$as_me: failed program was:" >&5
7622cat conftest.$ac_ext >&5
7623ac_lo=`expr '(' $ac_mid ')' + 1`
7624fi
7625rm -f conftest.$ac_objext conftest.$ac_ext
7626done
7627case $ac_lo in
7628?*) ac_cv_sizeof_double=$ac_lo;;
7629'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7630echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7631 { (exit 1); exit 1; }; } ;;
7632esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007633else
7634 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007635 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7636echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7637 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007638else
Martin v. Löwis11437992002-04-12 09:54:03 +00007639 cat >conftest.$ac_ext <<_ACEOF
7640#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007641#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007642$ac_includes_default
7643long longval () { return (long) (sizeof (double)); }
7644unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007645#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007646#include <stdlib.h>
7647#ifdef F77_DUMMY_MAIN
7648# ifdef __cplusplus
7649 extern "C"
7650# endif
7651 int F77_DUMMY_MAIN() { return 1; }
7652#endif
7653int
7654main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007655{
Martin v. Löwis11437992002-04-12 09:54:03 +00007656
7657 FILE *f = fopen ("conftest.val", "w");
7658 if (! f)
7659 exit (1);
7660 if (((long) (sizeof (double))) < 0)
7661 {
7662 long i = longval ();
7663 if (i != ((long) (sizeof (double))))
7664 exit (1);
7665 fprintf (f, "%ld\n", i);
7666 }
7667 else
7668 {
7669 unsigned long i = ulongval ();
7670 if (i != ((long) (sizeof (double))))
7671 exit (1);
7672 fprintf (f, "%lu\n", i);
7673 }
7674 exit (ferror (f) || fclose (f) != 0);
7675
7676 ;
7677 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007678}
Martin v. Löwis11437992002-04-12 09:54:03 +00007679_ACEOF
7680rm -f conftest$ac_exeext
7681if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7682 (eval $ac_link) 2>&5
7683 ac_status=$?
7684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7685 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7687 (eval $ac_try) 2>&5
7688 ac_status=$?
7689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7690 (exit $ac_status); }; }; then
7691 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007692else
Martin v. Löwis11437992002-04-12 09:54:03 +00007693 echo "$as_me: program exited with status $ac_status" >&5
7694echo "$as_me: failed program was:" >&5
7695cat conftest.$ac_ext >&5
7696( exit $ac_status )
7697{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7698echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7699 { (exit 1); exit 1; }; }
7700fi
7701rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7702fi
7703fi
7704rm -f conftest.val
7705else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007706 ac_cv_sizeof_double=0
7707fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007708fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007709echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7710echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7711cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007712#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007713_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007714
7715
Martin v. Löwis11437992002-04-12 09:54:03 +00007716echo "$as_me:$LINENO: checking for fpos_t" >&5
7717echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7718if test "${ac_cv_type_fpos_t+set}" = set; then
7719 echo $ECHO_N "(cached) $ECHO_C" >&6
7720else
7721 cat >conftest.$ac_ext <<_ACEOF
7722#line $LINENO "configure"
7723#include "confdefs.h"
7724$ac_includes_default
7725#ifdef F77_DUMMY_MAIN
7726# ifdef __cplusplus
7727 extern "C"
7728# endif
7729 int F77_DUMMY_MAIN() { return 1; }
7730#endif
7731int
7732main ()
7733{
7734if ((fpos_t *) 0)
7735 return 0;
7736if (sizeof (fpos_t))
7737 return 0;
7738 ;
7739 return 0;
7740}
7741_ACEOF
7742rm -f conftest.$ac_objext
7743if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7744 (eval $ac_compile) 2>&5
7745 ac_status=$?
7746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7747 (exit $ac_status); } &&
7748 { ac_try='test -s conftest.$ac_objext'
7749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7750 (eval $ac_try) 2>&5
7751 ac_status=$?
7752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7753 (exit $ac_status); }; }; then
7754 ac_cv_type_fpos_t=yes
7755else
7756 echo "$as_me: failed program was:" >&5
7757cat conftest.$ac_ext >&5
7758ac_cv_type_fpos_t=no
7759fi
7760rm -f conftest.$ac_objext conftest.$ac_ext
7761fi
7762echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7763echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7764
7765echo "$as_me:$LINENO: checking size of fpos_t" >&5
7766echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7767if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7768 echo $ECHO_N "(cached) $ECHO_C" >&6
7769else
7770 if test "$ac_cv_type_fpos_t" = yes; then
7771 # The cast to unsigned long works around a bug in the HP C Compiler
7772 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7773 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7774 # This bug is HP SR number 8606223364.
7775 if test "$cross_compiling" = yes; then
7776 # Depending upon the size, compute the lo and hi bounds.
7777cat >conftest.$ac_ext <<_ACEOF
7778#line $LINENO "configure"
7779#include "confdefs.h"
7780$ac_includes_default
7781#ifdef F77_DUMMY_MAIN
7782# ifdef __cplusplus
7783 extern "C"
7784# endif
7785 int F77_DUMMY_MAIN() { return 1; }
7786#endif
7787int
7788main ()
7789{
7790static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7791test_array [0] = 0
7792
7793 ;
7794 return 0;
7795}
7796_ACEOF
7797rm -f conftest.$ac_objext
7798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7799 (eval $ac_compile) 2>&5
7800 ac_status=$?
7801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7802 (exit $ac_status); } &&
7803 { ac_try='test -s conftest.$ac_objext'
7804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7805 (eval $ac_try) 2>&5
7806 ac_status=$?
7807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7808 (exit $ac_status); }; }; then
7809 ac_lo=0 ac_mid=0
7810 while :; do
7811 cat >conftest.$ac_ext <<_ACEOF
7812#line $LINENO "configure"
7813#include "confdefs.h"
7814$ac_includes_default
7815#ifdef F77_DUMMY_MAIN
7816# ifdef __cplusplus
7817 extern "C"
7818# endif
7819 int F77_DUMMY_MAIN() { return 1; }
7820#endif
7821int
7822main ()
7823{
7824static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7825test_array [0] = 0
7826
7827 ;
7828 return 0;
7829}
7830_ACEOF
7831rm -f conftest.$ac_objext
7832if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7833 (eval $ac_compile) 2>&5
7834 ac_status=$?
7835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7836 (exit $ac_status); } &&
7837 { ac_try='test -s conftest.$ac_objext'
7838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7839 (eval $ac_try) 2>&5
7840 ac_status=$?
7841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7842 (exit $ac_status); }; }; then
7843 ac_hi=$ac_mid; break
7844else
7845 echo "$as_me: failed program was:" >&5
7846cat conftest.$ac_ext >&5
7847ac_lo=`expr $ac_mid + 1`
7848 if test $ac_lo -le $ac_mid; then
7849 ac_lo= ac_hi=
7850 break
7851 fi
7852 ac_mid=`expr 2 '*' $ac_mid + 1`
7853fi
7854rm -f conftest.$ac_objext conftest.$ac_ext
7855 done
7856else
7857 echo "$as_me: failed program was:" >&5
7858cat conftest.$ac_ext >&5
7859cat >conftest.$ac_ext <<_ACEOF
7860#line $LINENO "configure"
7861#include "confdefs.h"
7862$ac_includes_default
7863#ifdef F77_DUMMY_MAIN
7864# ifdef __cplusplus
7865 extern "C"
7866# endif
7867 int F77_DUMMY_MAIN() { return 1; }
7868#endif
7869int
7870main ()
7871{
7872static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7873test_array [0] = 0
7874
7875 ;
7876 return 0;
7877}
7878_ACEOF
7879rm -f conftest.$ac_objext
7880if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7881 (eval $ac_compile) 2>&5
7882 ac_status=$?
7883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7884 (exit $ac_status); } &&
7885 { ac_try='test -s conftest.$ac_objext'
7886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7887 (eval $ac_try) 2>&5
7888 ac_status=$?
7889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7890 (exit $ac_status); }; }; then
7891 ac_hi=-1 ac_mid=-1
7892 while :; do
7893 cat >conftest.$ac_ext <<_ACEOF
7894#line $LINENO "configure"
7895#include "confdefs.h"
7896$ac_includes_default
7897#ifdef F77_DUMMY_MAIN
7898# ifdef __cplusplus
7899 extern "C"
7900# endif
7901 int F77_DUMMY_MAIN() { return 1; }
7902#endif
7903int
7904main ()
7905{
7906static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7907test_array [0] = 0
7908
7909 ;
7910 return 0;
7911}
7912_ACEOF
7913rm -f conftest.$ac_objext
7914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7915 (eval $ac_compile) 2>&5
7916 ac_status=$?
7917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7918 (exit $ac_status); } &&
7919 { ac_try='test -s conftest.$ac_objext'
7920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7921 (eval $ac_try) 2>&5
7922 ac_status=$?
7923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7924 (exit $ac_status); }; }; then
7925 ac_lo=$ac_mid; break
7926else
7927 echo "$as_me: failed program was:" >&5
7928cat conftest.$ac_ext >&5
7929ac_hi=`expr '(' $ac_mid ')' - 1`
7930 if test $ac_mid -le $ac_hi; then
7931 ac_lo= ac_hi=
7932 break
7933 fi
7934 ac_mid=`expr 2 '*' $ac_mid`
7935fi
7936rm -f conftest.$ac_objext conftest.$ac_ext
7937 done
7938else
7939 echo "$as_me: failed program was:" >&5
7940cat conftest.$ac_ext >&5
7941ac_lo= ac_hi=
7942fi
7943rm -f conftest.$ac_objext conftest.$ac_ext
7944fi
7945rm -f conftest.$ac_objext conftest.$ac_ext
7946# Binary search between lo and hi bounds.
7947while test "x$ac_lo" != "x$ac_hi"; do
7948 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7949 cat >conftest.$ac_ext <<_ACEOF
7950#line $LINENO "configure"
7951#include "confdefs.h"
7952$ac_includes_default
7953#ifdef F77_DUMMY_MAIN
7954# ifdef __cplusplus
7955 extern "C"
7956# endif
7957 int F77_DUMMY_MAIN() { return 1; }
7958#endif
7959int
7960main ()
7961{
7962static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7963test_array [0] = 0
7964
7965 ;
7966 return 0;
7967}
7968_ACEOF
7969rm -f conftest.$ac_objext
7970if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7971 (eval $ac_compile) 2>&5
7972 ac_status=$?
7973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7974 (exit $ac_status); } &&
7975 { ac_try='test -s conftest.$ac_objext'
7976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7977 (eval $ac_try) 2>&5
7978 ac_status=$?
7979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7980 (exit $ac_status); }; }; then
7981 ac_hi=$ac_mid
7982else
7983 echo "$as_me: failed program was:" >&5
7984cat conftest.$ac_ext >&5
7985ac_lo=`expr '(' $ac_mid ')' + 1`
7986fi
7987rm -f conftest.$ac_objext conftest.$ac_ext
7988done
7989case $ac_lo in
7990?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7991'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7992echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7993 { (exit 1); exit 1; }; } ;;
7994esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007995else
7996 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7998echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7999 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008000else
Martin v. Löwis11437992002-04-12 09:54:03 +00008001 cat >conftest.$ac_ext <<_ACEOF
8002#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008003#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008004$ac_includes_default
8005long longval () { return (long) (sizeof (fpos_t)); }
8006unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008007#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008008#include <stdlib.h>
8009#ifdef F77_DUMMY_MAIN
8010# ifdef __cplusplus
8011 extern "C"
8012# endif
8013 int F77_DUMMY_MAIN() { return 1; }
8014#endif
8015int
8016main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008017{
Martin v. Löwis11437992002-04-12 09:54:03 +00008018
8019 FILE *f = fopen ("conftest.val", "w");
8020 if (! f)
8021 exit (1);
8022 if (((long) (sizeof (fpos_t))) < 0)
8023 {
8024 long i = longval ();
8025 if (i != ((long) (sizeof (fpos_t))))
8026 exit (1);
8027 fprintf (f, "%ld\n", i);
8028 }
8029 else
8030 {
8031 unsigned long i = ulongval ();
8032 if (i != ((long) (sizeof (fpos_t))))
8033 exit (1);
8034 fprintf (f, "%lu\n", i);
8035 }
8036 exit (ferror (f) || fclose (f) != 0);
8037
8038 ;
8039 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008040}
Martin v. Löwis11437992002-04-12 09:54:03 +00008041_ACEOF
8042rm -f conftest$ac_exeext
8043if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8044 (eval $ac_link) 2>&5
8045 ac_status=$?
8046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8047 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8049 (eval $ac_try) 2>&5
8050 ac_status=$?
8051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8052 (exit $ac_status); }; }; then
8053 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008054else
Martin v. Löwis11437992002-04-12 09:54:03 +00008055 echo "$as_me: program exited with status $ac_status" >&5
8056echo "$as_me: failed program was:" >&5
8057cat conftest.$ac_ext >&5
8058( exit $ac_status )
8059{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8060echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8061 { (exit 1); exit 1; }; }
8062fi
8063rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8064fi
8065fi
8066rm -f conftest.val
8067else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008068 ac_cv_sizeof_fpos_t=0
8069fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008070fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008071echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8072echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8073cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008074#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008075_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008076
Michael W. Hudson54241132001-12-07 15:38:26 +00008077
8078
Martin v. Löwis11437992002-04-12 09:54:03 +00008079echo "$as_me:$LINENO: checking for long long support" >&5
8080echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008081have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008082cat >conftest.$ac_ext <<_ACEOF
8083#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008084#include "confdefs.h"
8085
Martin v. Löwis11437992002-04-12 09:54:03 +00008086#ifdef F77_DUMMY_MAIN
8087# ifdef __cplusplus
8088 extern "C"
8089# endif
8090 int F77_DUMMY_MAIN() { return 1; }
8091#endif
8092int
8093main ()
8094{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008095long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008096 ;
8097 return 0;
8098}
8099_ACEOF
8100rm -f conftest.$ac_objext
8101if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8102 (eval $ac_compile) 2>&5
8103 ac_status=$?
8104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8105 (exit $ac_status); } &&
8106 { ac_try='test -s conftest.$ac_objext'
8107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8108 (eval $ac_try) 2>&5
8109 ac_status=$?
8110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8111 (exit $ac_status); }; }; then
8112
8113
8114cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008115#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008116_ACEOF
8117
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008118 have_long_long=yes
8119
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008120else
Martin v. Löwis11437992002-04-12 09:54:03 +00008121 echo "$as_me: failed program was:" >&5
8122cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008123fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008124rm -f conftest.$ac_objext conftest.$ac_ext
8125echo "$as_me:$LINENO: result: $have_long_long" >&5
8126echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008127if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008128echo "$as_me:$LINENO: checking for long long" >&5
8129echo $ECHO_N "checking for long long... $ECHO_C" >&6
8130if test "${ac_cv_type_long_long+set}" = set; then
8131 echo $ECHO_N "(cached) $ECHO_C" >&6
8132else
8133 cat >conftest.$ac_ext <<_ACEOF
8134#line $LINENO "configure"
8135#include "confdefs.h"
8136$ac_includes_default
8137#ifdef F77_DUMMY_MAIN
8138# ifdef __cplusplus
8139 extern "C"
8140# endif
8141 int F77_DUMMY_MAIN() { return 1; }
8142#endif
8143int
8144main ()
8145{
8146if ((long long *) 0)
8147 return 0;
8148if (sizeof (long long))
8149 return 0;
8150 ;
8151 return 0;
8152}
8153_ACEOF
8154rm -f conftest.$ac_objext
8155if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8156 (eval $ac_compile) 2>&5
8157 ac_status=$?
8158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8159 (exit $ac_status); } &&
8160 { ac_try='test -s conftest.$ac_objext'
8161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8162 (eval $ac_try) 2>&5
8163 ac_status=$?
8164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8165 (exit $ac_status); }; }; then
8166 ac_cv_type_long_long=yes
8167else
8168 echo "$as_me: failed program was:" >&5
8169cat conftest.$ac_ext >&5
8170ac_cv_type_long_long=no
8171fi
8172rm -f conftest.$ac_objext conftest.$ac_ext
8173fi
8174echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8175echo "${ECHO_T}$ac_cv_type_long_long" >&6
8176
8177echo "$as_me:$LINENO: checking size of long long" >&5
8178echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8179if test "${ac_cv_sizeof_long_long+set}" = set; then
8180 echo $ECHO_N "(cached) $ECHO_C" >&6
8181else
8182 if test "$ac_cv_type_long_long" = yes; then
8183 # The cast to unsigned long works around a bug in the HP C Compiler
8184 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8185 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8186 # This bug is HP SR number 8606223364.
8187 if test "$cross_compiling" = yes; then
8188 # Depending upon the size, compute the lo and hi bounds.
8189cat >conftest.$ac_ext <<_ACEOF
8190#line $LINENO "configure"
8191#include "confdefs.h"
8192$ac_includes_default
8193#ifdef F77_DUMMY_MAIN
8194# ifdef __cplusplus
8195 extern "C"
8196# endif
8197 int F77_DUMMY_MAIN() { return 1; }
8198#endif
8199int
8200main ()
8201{
8202static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8203test_array [0] = 0
8204
8205 ;
8206 return 0;
8207}
8208_ACEOF
8209rm -f conftest.$ac_objext
8210if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8211 (eval $ac_compile) 2>&5
8212 ac_status=$?
8213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8214 (exit $ac_status); } &&
8215 { ac_try='test -s conftest.$ac_objext'
8216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8217 (eval $ac_try) 2>&5
8218 ac_status=$?
8219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8220 (exit $ac_status); }; }; then
8221 ac_lo=0 ac_mid=0
8222 while :; do
8223 cat >conftest.$ac_ext <<_ACEOF
8224#line $LINENO "configure"
8225#include "confdefs.h"
8226$ac_includes_default
8227#ifdef F77_DUMMY_MAIN
8228# ifdef __cplusplus
8229 extern "C"
8230# endif
8231 int F77_DUMMY_MAIN() { return 1; }
8232#endif
8233int
8234main ()
8235{
8236static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8237test_array [0] = 0
8238
8239 ;
8240 return 0;
8241}
8242_ACEOF
8243rm -f conftest.$ac_objext
8244if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8245 (eval $ac_compile) 2>&5
8246 ac_status=$?
8247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8248 (exit $ac_status); } &&
8249 { ac_try='test -s conftest.$ac_objext'
8250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8251 (eval $ac_try) 2>&5
8252 ac_status=$?
8253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8254 (exit $ac_status); }; }; then
8255 ac_hi=$ac_mid; break
8256else
8257 echo "$as_me: failed program was:" >&5
8258cat conftest.$ac_ext >&5
8259ac_lo=`expr $ac_mid + 1`
8260 if test $ac_lo -le $ac_mid; then
8261 ac_lo= ac_hi=
8262 break
8263 fi
8264 ac_mid=`expr 2 '*' $ac_mid + 1`
8265fi
8266rm -f conftest.$ac_objext conftest.$ac_ext
8267 done
8268else
8269 echo "$as_me: failed program was:" >&5
8270cat conftest.$ac_ext >&5
8271cat >conftest.$ac_ext <<_ACEOF
8272#line $LINENO "configure"
8273#include "confdefs.h"
8274$ac_includes_default
8275#ifdef F77_DUMMY_MAIN
8276# ifdef __cplusplus
8277 extern "C"
8278# endif
8279 int F77_DUMMY_MAIN() { return 1; }
8280#endif
8281int
8282main ()
8283{
8284static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8285test_array [0] = 0
8286
8287 ;
8288 return 0;
8289}
8290_ACEOF
8291rm -f conftest.$ac_objext
8292if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8293 (eval $ac_compile) 2>&5
8294 ac_status=$?
8295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8296 (exit $ac_status); } &&
8297 { ac_try='test -s conftest.$ac_objext'
8298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8299 (eval $ac_try) 2>&5
8300 ac_status=$?
8301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8302 (exit $ac_status); }; }; then
8303 ac_hi=-1 ac_mid=-1
8304 while :; do
8305 cat >conftest.$ac_ext <<_ACEOF
8306#line $LINENO "configure"
8307#include "confdefs.h"
8308$ac_includes_default
8309#ifdef F77_DUMMY_MAIN
8310# ifdef __cplusplus
8311 extern "C"
8312# endif
8313 int F77_DUMMY_MAIN() { return 1; }
8314#endif
8315int
8316main ()
8317{
8318static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8319test_array [0] = 0
8320
8321 ;
8322 return 0;
8323}
8324_ACEOF
8325rm -f conftest.$ac_objext
8326if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8327 (eval $ac_compile) 2>&5
8328 ac_status=$?
8329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8330 (exit $ac_status); } &&
8331 { ac_try='test -s conftest.$ac_objext'
8332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8333 (eval $ac_try) 2>&5
8334 ac_status=$?
8335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8336 (exit $ac_status); }; }; then
8337 ac_lo=$ac_mid; break
8338else
8339 echo "$as_me: failed program was:" >&5
8340cat conftest.$ac_ext >&5
8341ac_hi=`expr '(' $ac_mid ')' - 1`
8342 if test $ac_mid -le $ac_hi; then
8343 ac_lo= ac_hi=
8344 break
8345 fi
8346 ac_mid=`expr 2 '*' $ac_mid`
8347fi
8348rm -f conftest.$ac_objext conftest.$ac_ext
8349 done
8350else
8351 echo "$as_me: failed program was:" >&5
8352cat conftest.$ac_ext >&5
8353ac_lo= ac_hi=
8354fi
8355rm -f conftest.$ac_objext conftest.$ac_ext
8356fi
8357rm -f conftest.$ac_objext conftest.$ac_ext
8358# Binary search between lo and hi bounds.
8359while test "x$ac_lo" != "x$ac_hi"; do
8360 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8361 cat >conftest.$ac_ext <<_ACEOF
8362#line $LINENO "configure"
8363#include "confdefs.h"
8364$ac_includes_default
8365#ifdef F77_DUMMY_MAIN
8366# ifdef __cplusplus
8367 extern "C"
8368# endif
8369 int F77_DUMMY_MAIN() { return 1; }
8370#endif
8371int
8372main ()
8373{
8374static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8375test_array [0] = 0
8376
8377 ;
8378 return 0;
8379}
8380_ACEOF
8381rm -f conftest.$ac_objext
8382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8383 (eval $ac_compile) 2>&5
8384 ac_status=$?
8385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8386 (exit $ac_status); } &&
8387 { ac_try='test -s conftest.$ac_objext'
8388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8389 (eval $ac_try) 2>&5
8390 ac_status=$?
8391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8392 (exit $ac_status); }; }; then
8393 ac_hi=$ac_mid
8394else
8395 echo "$as_me: failed program was:" >&5
8396cat conftest.$ac_ext >&5
8397ac_lo=`expr '(' $ac_mid ')' + 1`
8398fi
8399rm -f conftest.$ac_objext conftest.$ac_ext
8400done
8401case $ac_lo in
8402?*) ac_cv_sizeof_long_long=$ac_lo;;
8403'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8404echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8405 { (exit 1); exit 1; }; } ;;
8406esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008407else
8408 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008409 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8410echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8411 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008412else
Martin v. Löwis11437992002-04-12 09:54:03 +00008413 cat >conftest.$ac_ext <<_ACEOF
8414#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008415#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008416$ac_includes_default
8417long longval () { return (long) (sizeof (long long)); }
8418unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008419#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008420#include <stdlib.h>
8421#ifdef F77_DUMMY_MAIN
8422# ifdef __cplusplus
8423 extern "C"
8424# endif
8425 int F77_DUMMY_MAIN() { return 1; }
8426#endif
8427int
8428main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008429{
Martin v. Löwis11437992002-04-12 09:54:03 +00008430
8431 FILE *f = fopen ("conftest.val", "w");
8432 if (! f)
8433 exit (1);
8434 if (((long) (sizeof (long long))) < 0)
8435 {
8436 long i = longval ();
8437 if (i != ((long) (sizeof (long long))))
8438 exit (1);
8439 fprintf (f, "%ld\n", i);
8440 }
8441 else
8442 {
8443 unsigned long i = ulongval ();
8444 if (i != ((long) (sizeof (long long))))
8445 exit (1);
8446 fprintf (f, "%lu\n", i);
8447 }
8448 exit (ferror (f) || fclose (f) != 0);
8449
8450 ;
8451 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008452}
Martin v. Löwis11437992002-04-12 09:54:03 +00008453_ACEOF
8454rm -f conftest$ac_exeext
8455if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8456 (eval $ac_link) 2>&5
8457 ac_status=$?
8458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8459 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8461 (eval $ac_try) 2>&5
8462 ac_status=$?
8463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8464 (exit $ac_status); }; }; then
8465 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008466else
Martin v. Löwis11437992002-04-12 09:54:03 +00008467 echo "$as_me: program exited with status $ac_status" >&5
8468echo "$as_me: failed program was:" >&5
8469cat conftest.$ac_ext >&5
8470( exit $ac_status )
8471{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8472echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8473 { (exit 1); exit 1; }; }
8474fi
8475rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8476fi
8477fi
8478rm -f conftest.val
8479else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008480 ac_cv_sizeof_long_long=0
8481fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008482fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008483echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8484echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8485cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008486#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008487_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008488
Michael W. Hudson54241132001-12-07 15:38:26 +00008489
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008490fi
8491
Martin v. Löwis11437992002-04-12 09:54:03 +00008492echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8493echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008494have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008495cat >conftest.$ac_ext <<_ACEOF
8496#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008497#include "confdefs.h"
8498
Martin v. Löwis11437992002-04-12 09:54:03 +00008499#ifdef F77_DUMMY_MAIN
8500# ifdef __cplusplus
8501 extern "C"
8502# endif
8503 int F77_DUMMY_MAIN() { return 1; }
8504#endif
8505int
8506main ()
8507{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008508uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008509 ;
8510 return 0;
8511}
8512_ACEOF
8513rm -f conftest.$ac_objext
8514if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8515 (eval $ac_compile) 2>&5
8516 ac_status=$?
8517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8518 (exit $ac_status); } &&
8519 { ac_try='test -s conftest.$ac_objext'
8520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8521 (eval $ac_try) 2>&5
8522 ac_status=$?
8523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8524 (exit $ac_status); }; }; then
8525
8526
8527cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008528#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008529_ACEOF
8530
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008531 have_uintptr_t=yes
8532
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008533else
Martin v. Löwis11437992002-04-12 09:54:03 +00008534 echo "$as_me: failed program was:" >&5
8535cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008536fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008537rm -f conftest.$ac_objext conftest.$ac_ext
8538echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8539echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008540if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008541echo "$as_me:$LINENO: checking for uintptr_t" >&5
8542echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8543if test "${ac_cv_type_uintptr_t+set}" = set; then
8544 echo $ECHO_N "(cached) $ECHO_C" >&6
8545else
8546 cat >conftest.$ac_ext <<_ACEOF
8547#line $LINENO "configure"
8548#include "confdefs.h"
8549$ac_includes_default
8550#ifdef F77_DUMMY_MAIN
8551# ifdef __cplusplus
8552 extern "C"
8553# endif
8554 int F77_DUMMY_MAIN() { return 1; }
8555#endif
8556int
8557main ()
8558{
8559if ((uintptr_t *) 0)
8560 return 0;
8561if (sizeof (uintptr_t))
8562 return 0;
8563 ;
8564 return 0;
8565}
8566_ACEOF
8567rm -f conftest.$ac_objext
8568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8569 (eval $ac_compile) 2>&5
8570 ac_status=$?
8571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8572 (exit $ac_status); } &&
8573 { ac_try='test -s conftest.$ac_objext'
8574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8575 (eval $ac_try) 2>&5
8576 ac_status=$?
8577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8578 (exit $ac_status); }; }; then
8579 ac_cv_type_uintptr_t=yes
8580else
8581 echo "$as_me: failed program was:" >&5
8582cat conftest.$ac_ext >&5
8583ac_cv_type_uintptr_t=no
8584fi
8585rm -f conftest.$ac_objext conftest.$ac_ext
8586fi
8587echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8588echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8589
8590echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8591echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8592if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8593 echo $ECHO_N "(cached) $ECHO_C" >&6
8594else
8595 if test "$ac_cv_type_uintptr_t" = yes; then
8596 # The cast to unsigned long works around a bug in the HP C Compiler
8597 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8598 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8599 # This bug is HP SR number 8606223364.
8600 if test "$cross_compiling" = yes; then
8601 # Depending upon the size, compute the lo and hi bounds.
8602cat >conftest.$ac_ext <<_ACEOF
8603#line $LINENO "configure"
8604#include "confdefs.h"
8605$ac_includes_default
8606#ifdef F77_DUMMY_MAIN
8607# ifdef __cplusplus
8608 extern "C"
8609# endif
8610 int F77_DUMMY_MAIN() { return 1; }
8611#endif
8612int
8613main ()
8614{
8615static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8616test_array [0] = 0
8617
8618 ;
8619 return 0;
8620}
8621_ACEOF
8622rm -f conftest.$ac_objext
8623if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8624 (eval $ac_compile) 2>&5
8625 ac_status=$?
8626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8627 (exit $ac_status); } &&
8628 { ac_try='test -s conftest.$ac_objext'
8629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8630 (eval $ac_try) 2>&5
8631 ac_status=$?
8632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8633 (exit $ac_status); }; }; then
8634 ac_lo=0 ac_mid=0
8635 while :; do
8636 cat >conftest.$ac_ext <<_ACEOF
8637#line $LINENO "configure"
8638#include "confdefs.h"
8639$ac_includes_default
8640#ifdef F77_DUMMY_MAIN
8641# ifdef __cplusplus
8642 extern "C"
8643# endif
8644 int F77_DUMMY_MAIN() { return 1; }
8645#endif
8646int
8647main ()
8648{
8649static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8650test_array [0] = 0
8651
8652 ;
8653 return 0;
8654}
8655_ACEOF
8656rm -f conftest.$ac_objext
8657if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8658 (eval $ac_compile) 2>&5
8659 ac_status=$?
8660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8661 (exit $ac_status); } &&
8662 { ac_try='test -s conftest.$ac_objext'
8663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8664 (eval $ac_try) 2>&5
8665 ac_status=$?
8666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8667 (exit $ac_status); }; }; then
8668 ac_hi=$ac_mid; break
8669else
8670 echo "$as_me: failed program was:" >&5
8671cat conftest.$ac_ext >&5
8672ac_lo=`expr $ac_mid + 1`
8673 if test $ac_lo -le $ac_mid; then
8674 ac_lo= ac_hi=
8675 break
8676 fi
8677 ac_mid=`expr 2 '*' $ac_mid + 1`
8678fi
8679rm -f conftest.$ac_objext conftest.$ac_ext
8680 done
8681else
8682 echo "$as_me: failed program was:" >&5
8683cat conftest.$ac_ext >&5
8684cat >conftest.$ac_ext <<_ACEOF
8685#line $LINENO "configure"
8686#include "confdefs.h"
8687$ac_includes_default
8688#ifdef F77_DUMMY_MAIN
8689# ifdef __cplusplus
8690 extern "C"
8691# endif
8692 int F77_DUMMY_MAIN() { return 1; }
8693#endif
8694int
8695main ()
8696{
8697static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8698test_array [0] = 0
8699
8700 ;
8701 return 0;
8702}
8703_ACEOF
8704rm -f conftest.$ac_objext
8705if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8706 (eval $ac_compile) 2>&5
8707 ac_status=$?
8708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8709 (exit $ac_status); } &&
8710 { ac_try='test -s conftest.$ac_objext'
8711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8712 (eval $ac_try) 2>&5
8713 ac_status=$?
8714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8715 (exit $ac_status); }; }; then
8716 ac_hi=-1 ac_mid=-1
8717 while :; do
8718 cat >conftest.$ac_ext <<_ACEOF
8719#line $LINENO "configure"
8720#include "confdefs.h"
8721$ac_includes_default
8722#ifdef F77_DUMMY_MAIN
8723# ifdef __cplusplus
8724 extern "C"
8725# endif
8726 int F77_DUMMY_MAIN() { return 1; }
8727#endif
8728int
8729main ()
8730{
8731static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8732test_array [0] = 0
8733
8734 ;
8735 return 0;
8736}
8737_ACEOF
8738rm -f conftest.$ac_objext
8739if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8740 (eval $ac_compile) 2>&5
8741 ac_status=$?
8742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8743 (exit $ac_status); } &&
8744 { ac_try='test -s conftest.$ac_objext'
8745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8746 (eval $ac_try) 2>&5
8747 ac_status=$?
8748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8749 (exit $ac_status); }; }; then
8750 ac_lo=$ac_mid; break
8751else
8752 echo "$as_me: failed program was:" >&5
8753cat conftest.$ac_ext >&5
8754ac_hi=`expr '(' $ac_mid ')' - 1`
8755 if test $ac_mid -le $ac_hi; then
8756 ac_lo= ac_hi=
8757 break
8758 fi
8759 ac_mid=`expr 2 '*' $ac_mid`
8760fi
8761rm -f conftest.$ac_objext conftest.$ac_ext
8762 done
8763else
8764 echo "$as_me: failed program was:" >&5
8765cat conftest.$ac_ext >&5
8766ac_lo= ac_hi=
8767fi
8768rm -f conftest.$ac_objext conftest.$ac_ext
8769fi
8770rm -f conftest.$ac_objext conftest.$ac_ext
8771# Binary search between lo and hi bounds.
8772while test "x$ac_lo" != "x$ac_hi"; do
8773 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8774 cat >conftest.$ac_ext <<_ACEOF
8775#line $LINENO "configure"
8776#include "confdefs.h"
8777$ac_includes_default
8778#ifdef F77_DUMMY_MAIN
8779# ifdef __cplusplus
8780 extern "C"
8781# endif
8782 int F77_DUMMY_MAIN() { return 1; }
8783#endif
8784int
8785main ()
8786{
8787static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8788test_array [0] = 0
8789
8790 ;
8791 return 0;
8792}
8793_ACEOF
8794rm -f conftest.$ac_objext
8795if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8796 (eval $ac_compile) 2>&5
8797 ac_status=$?
8798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799 (exit $ac_status); } &&
8800 { ac_try='test -s conftest.$ac_objext'
8801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8802 (eval $ac_try) 2>&5
8803 ac_status=$?
8804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8805 (exit $ac_status); }; }; then
8806 ac_hi=$ac_mid
8807else
8808 echo "$as_me: failed program was:" >&5
8809cat conftest.$ac_ext >&5
8810ac_lo=`expr '(' $ac_mid ')' + 1`
8811fi
8812rm -f conftest.$ac_objext conftest.$ac_ext
8813done
8814case $ac_lo in
8815?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8816'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8817echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8818 { (exit 1); exit 1; }; } ;;
8819esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008820else
8821 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008822 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8823echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8824 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008825else
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 cat >conftest.$ac_ext <<_ACEOF
8827#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008828#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008829$ac_includes_default
8830long longval () { return (long) (sizeof (uintptr_t)); }
8831unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008832#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008833#include <stdlib.h>
8834#ifdef F77_DUMMY_MAIN
8835# ifdef __cplusplus
8836 extern "C"
8837# endif
8838 int F77_DUMMY_MAIN() { return 1; }
8839#endif
8840int
8841main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008842{
Martin v. Löwis11437992002-04-12 09:54:03 +00008843
8844 FILE *f = fopen ("conftest.val", "w");
8845 if (! f)
8846 exit (1);
8847 if (((long) (sizeof (uintptr_t))) < 0)
8848 {
8849 long i = longval ();
8850 if (i != ((long) (sizeof (uintptr_t))))
8851 exit (1);
8852 fprintf (f, "%ld\n", i);
8853 }
8854 else
8855 {
8856 unsigned long i = ulongval ();
8857 if (i != ((long) (sizeof (uintptr_t))))
8858 exit (1);
8859 fprintf (f, "%lu\n", i);
8860 }
8861 exit (ferror (f) || fclose (f) != 0);
8862
8863 ;
8864 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008865}
Martin v. Löwis11437992002-04-12 09:54:03 +00008866_ACEOF
8867rm -f conftest$ac_exeext
8868if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8869 (eval $ac_link) 2>&5
8870 ac_status=$?
8871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8872 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8874 (eval $ac_try) 2>&5
8875 ac_status=$?
8876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8877 (exit $ac_status); }; }; then
8878 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008879else
Martin v. Löwis11437992002-04-12 09:54:03 +00008880 echo "$as_me: program exited with status $ac_status" >&5
8881echo "$as_me: failed program was:" >&5
8882cat conftest.$ac_ext >&5
8883( exit $ac_status )
8884{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8885echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8886 { (exit 1); exit 1; }; }
8887fi
8888rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8889fi
8890fi
8891rm -f conftest.val
8892else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008893 ac_cv_sizeof_uintptr_t=0
8894fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008895fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008896echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8897echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8898cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008899#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008900_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008901
Michael W. Hudson54241132001-12-07 15:38:26 +00008902
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008903fi
8904
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008905# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008906echo "$as_me:$LINENO: checking size of off_t" >&5
8907echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8908if test "${ac_cv_sizeof_off_t+set}" = set; then
8909 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008910else
8911 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008912 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008913else
Martin v. Löwis11437992002-04-12 09:54:03 +00008914 cat >conftest.$ac_ext <<_ACEOF
8915#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008916#include "confdefs.h"
8917#include <stdio.h>
8918#include <sys/types.h>
8919main()
8920{
8921 FILE *f=fopen("conftestval", "w");
8922 if (!f) exit(1);
8923 fprintf(f, "%d\n", sizeof(off_t));
8924 exit(0);
8925}
Martin v. Löwis11437992002-04-12 09:54:03 +00008926_ACEOF
8927rm -f conftest$ac_exeext
8928if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8929 (eval $ac_link) 2>&5
8930 ac_status=$?
8931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8932 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8934 (eval $ac_try) 2>&5
8935 ac_status=$?
8936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8937 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008938 ac_cv_sizeof_off_t=`cat conftestval`
8939else
Martin v. Löwis11437992002-04-12 09:54:03 +00008940 echo "$as_me: program exited with status $ac_status" >&5
8941echo "$as_me: failed program was:" >&5
8942cat conftest.$ac_ext >&5
8943( exit $ac_status )
8944ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008945fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008946rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008947fi
8948
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008949fi
8950
Martin v. Löwis11437992002-04-12 09:54:03 +00008951echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8952echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8953
8954cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008955#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008956_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008957
Michael W. Hudson54241132001-12-07 15:38:26 +00008958
Martin v. Löwis11437992002-04-12 09:54:03 +00008959echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8960echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008961if test "$have_long_long" = yes -a \
8962 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8963 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008964
Martin v. Löwis11437992002-04-12 09:54:03 +00008965cat >>confdefs.h <<\_ACEOF
8966#define HAVE_LARGEFILE_SUPPORT 1
8967_ACEOF
8968
8969 echo "$as_me:$LINENO: result: yes" >&5
8970echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008971else
Martin v. Löwis11437992002-04-12 09:54:03 +00008972 echo "$as_me:$LINENO: result: no" >&5
8973echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008974fi
8975
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008976# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008977echo "$as_me:$LINENO: checking size of time_t" >&5
8978echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8979if test "${ac_cv_sizeof_time_t+set}" = set; then
8980 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008981else
8982 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008983 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008984else
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 cat >conftest.$ac_ext <<_ACEOF
8986#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008987#include "confdefs.h"
8988#include <stdio.h>
8989#include <time.h>
8990main()
8991{
8992 FILE *f=fopen("conftestval", "w");
8993 if (!f) exit(1);
8994 fprintf(f, "%d\n", sizeof(time_t));
8995 exit(0);
8996}
Martin v. Löwis11437992002-04-12 09:54:03 +00008997_ACEOF
8998rm -f conftest$ac_exeext
8999if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9000 (eval $ac_link) 2>&5
9001 ac_status=$?
9002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9003 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9005 (eval $ac_try) 2>&5
9006 ac_status=$?
9007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9008 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009009 ac_cv_sizeof_time_t=`cat conftestval`
9010else
Martin v. Löwis11437992002-04-12 09:54:03 +00009011 echo "$as_me: program exited with status $ac_status" >&5
9012echo "$as_me: failed program was:" >&5
9013cat conftest.$ac_ext >&5
9014( exit $ac_status )
9015ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009016fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009017rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009018fi
9019
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009020fi
9021
Martin v. Löwis11437992002-04-12 09:54:03 +00009022echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9023echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9024
9025cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009026#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009027_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009028
Michael W. Hudson54241132001-12-07 15:38:26 +00009029
9030
Trent Mick635f6fb2000-08-23 21:33:05 +00009031# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009032ac_save_cc="$CC"
9033if test "$ac_cv_kpthread" = "yes"
9034then CC="$CC -Kpthread"
9035fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009036echo "$as_me:$LINENO: checking for pthread_t" >&5
9037echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009038have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009039cat >conftest.$ac_ext <<_ACEOF
9040#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009041#include "confdefs.h"
9042#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009043#ifdef F77_DUMMY_MAIN
9044# ifdef __cplusplus
9045 extern "C"
9046# endif
9047 int F77_DUMMY_MAIN() { return 1; }
9048#endif
9049int
9050main ()
9051{
Guido van Rossum12580492000-09-24 16:47:19 +00009052pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009053 ;
9054 return 0;
9055}
9056_ACEOF
9057rm -f conftest.$ac_objext
9058if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9059 (eval $ac_compile) 2>&5
9060 ac_status=$?
9061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9062 (exit $ac_status); } &&
9063 { ac_try='test -s conftest.$ac_objext'
9064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9065 (eval $ac_try) 2>&5
9066 ac_status=$?
9067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9068 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009069 have_pthread_t=yes
9070else
Martin v. Löwis11437992002-04-12 09:54:03 +00009071 echo "$as_me: failed program was:" >&5
9072cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009073fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009074rm -f conftest.$ac_objext conftest.$ac_ext
9075echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9076echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009077if test "$have_pthread_t" = yes ; then
9078 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009079 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9080echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9081 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9082 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009083else
9084 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009085 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009086else
Martin v. Löwis11437992002-04-12 09:54:03 +00009087 cat >conftest.$ac_ext <<_ACEOF
9088#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009089#include "confdefs.h"
9090#include <stdio.h>
9091 #include <pthread.h>
9092 main()
9093 {
9094 FILE *f=fopen("conftestval", "w");
9095 if (!f) exit(1);
9096 fprintf(f, "%d\n", sizeof(pthread_t));
9097 exit(0);
9098 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009099_ACEOF
9100rm -f conftest$ac_exeext
9101if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9102 (eval $ac_link) 2>&5
9103 ac_status=$?
9104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9105 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9107 (eval $ac_try) 2>&5
9108 ac_status=$?
9109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9110 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009111 ac_cv_sizeof_pthread_t=`cat conftestval`
9112else
Martin v. Löwis11437992002-04-12 09:54:03 +00009113 echo "$as_me: program exited with status $ac_status" >&5
9114echo "$as_me: failed program was:" >&5
9115cat conftest.$ac_ext >&5
9116( exit $ac_status )
9117ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009118fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009119rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009120fi
9121
Trent Mick635f6fb2000-08-23 21:33:05 +00009122fi
9123
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9125echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9126
9127cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009128#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009129_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009130
9131fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009132CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009133
Martin v. Löwis11437992002-04-12 09:54:03 +00009134echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9135echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009136# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9137if test "${enable_toolbox_glue+set}" = set; then
9138 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009139
Martin v. Löwis11437992002-04-12 09:54:03 +00009140fi;
Jack Jansene578a632001-08-15 01:27:14 +00009141
9142if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009143then
Jack Jansene578a632001-08-15 01:27:14 +00009144 case $ac_sys_system/$ac_sys_release in
9145 Darwin/*)
9146 enable_toolbox_glue="yes";;
9147 *)
9148 enable_toolbox_glue="no";;
9149 esac
9150fi
9151case "$enable_toolbox_glue" in
9152yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009153 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009154 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009155 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009156
9157cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009158#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009159_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009160
9161 ;;
9162*)
9163 extra_frameworks=""
9164 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009165 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009166 ;;
9167esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009168echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9169echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009170
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009171
9172case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009173 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009174 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009175 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009176 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9177 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009178 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009179 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009180 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009181 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9182 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009183esac
9184
Martin v. Löwis11437992002-04-12 09:54:03 +00009185echo "$as_me:$LINENO: checking for --enable-framework" >&5
9186echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009187if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009188then
Jack Jansenca06bc62001-08-03 15:32:23 +00009189 OPT="$OPT -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009190 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009191 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009192 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009193
Martin v. Löwis11437992002-04-12 09:54:03 +00009194cat >>confdefs.h <<\_ACEOF
9195#define WITH_NEXT_FRAMEWORK 1
9196_ACEOF
9197
9198 echo "$as_me:$LINENO: result: yes" >&5
9199echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009200else
Martin v. Löwis11437992002-04-12 09:54:03 +00009201 echo "$as_me:$LINENO: result: no" >&5
9202echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009203fi
9204
Martin v. Löwis11437992002-04-12 09:54:03 +00009205echo "$as_me:$LINENO: checking for dyld" >&5
9206echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009207case $ac_sys_system/$ac_sys_release in
9208 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009209
Martin v. Löwis11437992002-04-12 09:54:03 +00009210cat >>confdefs.h <<\_ACEOF
9211#define WITH_DYLD 1
9212_ACEOF
9213
9214 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9215echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009216 ;;
9217 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009218 echo "$as_me:$LINENO: result: no" >&5
9219echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009220 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009221esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009222
Guido van Rossum0a516c91994-09-12 10:58:40 +00009223# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009224
Michael W. Hudson54241132001-12-07 15:38:26 +00009225
9226
9227
9228
Guido van Rossum0a516c91994-09-12 10:58:40 +00009229# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009230# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009231echo "$as_me:$LINENO: checking SO" >&5
9232echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009233if test -z "$SO"
9234then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009235 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009236 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009237 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009238 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009239 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009240fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009241echo "$as_me:$LINENO: result: $SO" >&5
9242echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009243# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009244# -- "ld" on SunOS 4.x.x, "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009245# (Shared libraries in this instance are shared modules to be loaded into
9246# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009247echo "$as_me:$LINENO: checking LDSHARED" >&5
9248echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009249if test -z "$LDSHARED"
9250then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009251 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009252 AIX*)
9253 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009254 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009255 ;;
9256 BeOS*)
9257 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009258 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009259 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009260 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009261 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009262 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009263 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009264 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009265 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009266 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009267 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009268 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009269 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9270 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009271 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009272 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9273 if test "$enable_framework" ; then
9274 # Link against the framework. All externals should be defined.
9275 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9276 else
9277 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009278 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009279 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009280 Darwin/*)
9281 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9282 if test "$enable_framework" ; then
9283 # Link against the framework. All externals should be defined.
9284 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9285 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009286 # No framework, use the Python app as bundle-loader
9287 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9288 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009289 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009290 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009291 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009292 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009293 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009294 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009295 then
9296 LDSHARED="cc -shared ${LDFLAGS}"
9297 else
9298 LDSHARED="ld -Bshareable ${LDFLAGS}"
9299 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009300 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009301 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009302 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009303 then LDSHARED='$(CC) -shared'
9304 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009305 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009306 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009307 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009308 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009309 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009310 *) LDSHARED="ld";;
9311 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009312fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009313echo "$as_me:$LINENO: result: $LDSHARED" >&5
9314echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009315BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009316# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009317# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009318echo "$as_me:$LINENO: checking CCSHARED" >&5
9319echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009320if test -z "$CCSHARED"
9321then
Guido van Rossum07397971997-04-29 21:49:50 +00009322 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009323 SunOS*) if test "$GCC" = yes;
9324 then CCSHARED="-fPIC";
9325 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009326 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009327 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009328 else CCSHARED="+z";
9329 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009330 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009331 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009332 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009333 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009334 if test "$GCC" = "yes"
9335 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009336 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009337 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009338 SCO_SV*)
9339 if test "$GCC" = "yes"
9340 then CCSHARED="-fPIC"
9341 else CCSHARED="-Kpic -belf"
9342 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009343 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009344 IRIX*/6*) case $CC in
9345 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009346 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009347 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009348 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009349 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009350fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009351echo "$as_me:$LINENO: result: $CCSHARED" >&5
9352echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009353# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009354# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009355echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9356echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009357if test -z "$LINKFORSHARED"
9358then
Guido van Rossum07397971997-04-29 21:49:50 +00009359 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009360 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009361 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009362 LINKFORSHARED="-Wl,-E -Wl,+s";;
9363# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009364 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009365 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009366 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009367 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009368 # -u __dummy makes the linker aware of the objc runtime
9369 # in System.framework; otherwise, __objcInit (referenced in
9370 # crt1.o) gets erroneously defined as common, which breaks dynamic
9371 # loading of any modules which reference it in System.framework.
9372 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9373 # not used by the core itself but which needs to be in the core so
9374 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00009375 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009376 if test "$enable_framework"
9377 then
9378 LINKFORSHARED="$LINKFORSHARED -framework Python"
9379 fi
9380 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009381 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009382 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009383 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009385 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9386 then
9387 LINKFORSHARED="-Wl,--export-dynamic"
9388 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009389 SunOS/5*) case $CC in
9390 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009391 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009392 then
9393 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009394 fi;;
9395 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009396 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009397fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009398echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9399echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009400
Michael W. Hudson54241132001-12-07 15:38:26 +00009401
Martin v. Löwis11437992002-04-12 09:54:03 +00009402echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9403echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009404if test ! "$LIBRARY" = "$LDLIBRARY"
9405then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009406 case $ac_sys_system in
9407 CYGWIN*)
9408 # Cygwin needs CCSHARED when building extension DLLs
9409 # but not when building the interpreter DLL.
9410 CFLAGSFORSHARED='';;
9411 *)
9412 CFLAGSFORSHARED='$(CCSHARED)'
9413 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009414fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009415echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9416echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009417
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009418# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9419# library (with --enable-shared).
9420# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009421# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9422# if it is not required, since it creates a dependency of the shared library
9423# to LIBS. This, in turn, means that applications linking the shared libpython
9424# don't need to link LIBS explicitly. The default should be only changed
9425# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009426
9427echo "$as_me:$LINENO: checking SHLIBS" >&5
9428echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9429case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009430 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009431 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009432esac
9433echo "$as_me:$LINENO: result: $SHLIBS" >&5
9434echo "${ECHO_T}$SHLIBS" >&6
9435
9436
Guido van Rossum627b2d71993-12-24 10:39:16 +00009437# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009438
9439echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9440echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9441if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9442 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009443else
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009445LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009446cat >conftest.$ac_ext <<_ACEOF
9447#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009448#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009449
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009450/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009451#ifdef __cplusplus
9452extern "C"
9453#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009454/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009455 builtin and then its argument prototype would still apply. */
9456char dlopen ();
9457#ifdef F77_DUMMY_MAIN
9458# ifdef __cplusplus
9459 extern "C"
9460# endif
9461 int F77_DUMMY_MAIN() { return 1; }
9462#endif
9463int
9464main ()
9465{
9466dlopen ();
9467 ;
9468 return 0;
9469}
9470_ACEOF
9471rm -f conftest.$ac_objext conftest$ac_exeext
9472if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9473 (eval $ac_link) 2>&5
9474 ac_status=$?
9475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9476 (exit $ac_status); } &&
9477 { ac_try='test -s conftest$ac_exeext'
9478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9479 (eval $ac_try) 2>&5
9480 ac_status=$?
9481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9482 (exit $ac_status); }; }; then
9483 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009484else
Martin v. Löwis11437992002-04-12 09:54:03 +00009485 echo "$as_me: failed program was:" >&5
9486cat conftest.$ac_ext >&5
9487ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009488fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009489rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9490LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009491fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009492echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9493echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9494if test $ac_cv_lib_dl_dlopen = yes; then
9495 cat >>confdefs.h <<_ACEOF
9496#define HAVE_LIBDL 1
9497_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009498
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009499 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009500
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009501fi
9502 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009503
9504echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9505echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9506if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9507 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009508else
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009510LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009511cat >conftest.$ac_ext <<_ACEOF
9512#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009513#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009514
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009515/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009516#ifdef __cplusplus
9517extern "C"
9518#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009519/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 builtin and then its argument prototype would still apply. */
9521char shl_load ();
9522#ifdef F77_DUMMY_MAIN
9523# ifdef __cplusplus
9524 extern "C"
9525# endif
9526 int F77_DUMMY_MAIN() { return 1; }
9527#endif
9528int
9529main ()
9530{
9531shl_load ();
9532 ;
9533 return 0;
9534}
9535_ACEOF
9536rm -f conftest.$ac_objext conftest$ac_exeext
9537if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9538 (eval $ac_link) 2>&5
9539 ac_status=$?
9540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9541 (exit $ac_status); } &&
9542 { ac_try='test -s conftest$ac_exeext'
9543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9544 (eval $ac_try) 2>&5
9545 ac_status=$?
9546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9547 (exit $ac_status); }; }; then
9548 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009549else
Martin v. Löwis11437992002-04-12 09:54:03 +00009550 echo "$as_me: failed program was:" >&5
9551cat conftest.$ac_ext >&5
9552ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009554rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9555LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009556fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009557echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9558echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9559if test $ac_cv_lib_dld_shl_load = yes; then
9560 cat >>confdefs.h <<_ACEOF
9561#define HAVE_LIBDLD 1
9562_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009563
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009564 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009565
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009566fi
9567 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009568echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9569echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9570if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009571 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009572else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009573 ac_func_search_save_LIBS=$LIBS
9574ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009575cat >conftest.$ac_ext <<_ACEOF
9576#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009577#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009578
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009579/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009580#ifdef __cplusplus
9581extern "C"
9582#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009583/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009584 builtin and then its argument prototype would still apply. */
9585char sem_init ();
9586#ifdef F77_DUMMY_MAIN
9587# ifdef __cplusplus
9588 extern "C"
9589# endif
9590 int F77_DUMMY_MAIN() { return 1; }
9591#endif
9592int
9593main ()
9594{
9595sem_init ();
9596 ;
9597 return 0;
9598}
9599_ACEOF
9600rm -f conftest.$ac_objext conftest$ac_exeext
9601if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9602 (eval $ac_link) 2>&5
9603 ac_status=$?
9604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9605 (exit $ac_status); } &&
9606 { ac_try='test -s conftest$ac_exeext'
9607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9608 (eval $ac_try) 2>&5
9609 ac_status=$?
9610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9611 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009612 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009613else
Martin v. Löwis11437992002-04-12 09:54:03 +00009614 echo "$as_me: failed program was:" >&5
9615cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009616fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009617rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009618if test "$ac_cv_search_sem_init" = no; then
9619 for ac_lib in rt posix4; do
9620 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9621 cat >conftest.$ac_ext <<_ACEOF
9622#line $LINENO "configure"
9623#include "confdefs.h"
9624
9625/* Override any gcc2 internal prototype to avoid an error. */
9626#ifdef __cplusplus
9627extern "C"
9628#endif
9629/* We use char because int might match the return type of a gcc2
9630 builtin and then its argument prototype would still apply. */
9631char sem_init ();
9632#ifdef F77_DUMMY_MAIN
9633# ifdef __cplusplus
9634 extern "C"
9635# endif
9636 int F77_DUMMY_MAIN() { return 1; }
9637#endif
9638int
9639main ()
9640{
9641sem_init ();
9642 ;
9643 return 0;
9644}
Martin v. Löwis11437992002-04-12 09:54:03 +00009645_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009646rm -f conftest.$ac_objext conftest$ac_exeext
9647if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9648 (eval $ac_link) 2>&5
9649 ac_status=$?
9650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9651 (exit $ac_status); } &&
9652 { ac_try='test -s conftest$ac_exeext'
9653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9654 (eval $ac_try) 2>&5
9655 ac_status=$?
9656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9657 (exit $ac_status); }; }; then
9658 ac_cv_search_sem_init="-l$ac_lib"
9659break
9660else
9661 echo "$as_me: failed program was:" >&5
9662cat conftest.$ac_ext >&5
9663fi
9664rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9665 done
9666fi
9667LIBS=$ac_func_search_save_LIBS
9668fi
9669echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9670echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9671if test "$ac_cv_search_sem_init" != no; then
9672 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009673
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009674fi
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009675 # 'Real Time' functions on Solaris,
9676 # posix4 on Solaris 2.6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009677
9678# checks for system dependent C++ extensions support
9679case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9681echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9682 cat >conftest.$ac_ext <<_ACEOF
9683#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009684#include "confdefs.h"
9685#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009686#ifdef F77_DUMMY_MAIN
9687# ifdef __cplusplus
9688 extern "C"
9689# endif
9690 int F77_DUMMY_MAIN() { return 1; }
9691#endif
9692int
9693main ()
9694{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009695loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009696 ;
9697 return 0;
9698}
9699_ACEOF
9700rm -f conftest.$ac_objext conftest$ac_exeext
9701if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9702 (eval $ac_link) 2>&5
9703 ac_status=$?
9704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9705 (exit $ac_status); } &&
9706 { ac_try='test -s conftest$ac_exeext'
9707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9708 (eval $ac_try) 2>&5
9709 ac_status=$?
9710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9711 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009712
Martin v. Löwis11437992002-04-12 09:54:03 +00009713cat >>confdefs.h <<\_ACEOF
9714#define AIX_GENUINE_CPLUSPLUS 1
9715_ACEOF
9716
9717 echo "$as_me:$LINENO: result: yes" >&5
9718echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009719else
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 echo "$as_me: failed program was:" >&5
9721cat conftest.$ac_ext >&5
9722echo "$as_me:$LINENO: result: no" >&5
9723echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009724fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009725rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009726 *) ;;
9727esac
9728
Guido van Rossum70c7f481998-03-26 18:44:10 +00009729# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009730# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009731# BeOS' sockets are stashed in libnet.
9732case "$ac_sys_system" in
9733IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009734*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009735echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9736echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9737if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9738 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009739else
Martin v. Löwis11437992002-04-12 09:54:03 +00009740 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009741LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009742cat >conftest.$ac_ext <<_ACEOF
9743#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009744#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009745
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009746/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009747#ifdef __cplusplus
9748extern "C"
9749#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009750/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009751 builtin and then its argument prototype would still apply. */
9752char t_open ();
9753#ifdef F77_DUMMY_MAIN
9754# ifdef __cplusplus
9755 extern "C"
9756# endif
9757 int F77_DUMMY_MAIN() { return 1; }
9758#endif
9759int
9760main ()
9761{
9762t_open ();
9763 ;
9764 return 0;
9765}
9766_ACEOF
9767rm -f conftest.$ac_objext conftest$ac_exeext
9768if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9769 (eval $ac_link) 2>&5
9770 ac_status=$?
9771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9772 (exit $ac_status); } &&
9773 { ac_try='test -s conftest$ac_exeext'
9774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9775 (eval $ac_try) 2>&5
9776 ac_status=$?
9777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778 (exit $ac_status); }; }; then
9779 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009780else
Martin v. Löwis11437992002-04-12 09:54:03 +00009781 echo "$as_me: failed program was:" >&5
9782cat conftest.$ac_ext >&5
9783ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009784fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009785rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9786LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009787fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009788echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9789echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9790if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009791 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009792fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009793 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009794echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9795echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9796if test "${ac_cv_lib_socket_socket+set}" = set; then
9797 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009798else
Martin v. Löwis11437992002-04-12 09:54:03 +00009799 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009800LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009801cat >conftest.$ac_ext <<_ACEOF
9802#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009803#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009804
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009805/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009806#ifdef __cplusplus
9807extern "C"
9808#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009809/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 builtin and then its argument prototype would still apply. */
9811char socket ();
9812#ifdef F77_DUMMY_MAIN
9813# ifdef __cplusplus
9814 extern "C"
9815# endif
9816 int F77_DUMMY_MAIN() { return 1; }
9817#endif
9818int
9819main ()
9820{
9821socket ();
9822 ;
9823 return 0;
9824}
9825_ACEOF
9826rm -f conftest.$ac_objext conftest$ac_exeext
9827if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9828 (eval $ac_link) 2>&5
9829 ac_status=$?
9830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9831 (exit $ac_status); } &&
9832 { ac_try='test -s conftest$ac_exeext'
9833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9834 (eval $ac_try) 2>&5
9835 ac_status=$?
9836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9837 (exit $ac_status); }; }; then
9838 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009839else
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 echo "$as_me: failed program was:" >&5
9841cat conftest.$ac_ext >&5
9842ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009843fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009844rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9845LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009846fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009847echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9848echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9849if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009850 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009851fi
9852 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009853;;
9854esac
9855case "$ac_sys_system" in
9856BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009857echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9858echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9859if test "${ac_cv_lib_net_socket+set}" = set; then
9860 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009861else
Martin v. Löwis11437992002-04-12 09:54:03 +00009862 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009863LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009864cat >conftest.$ac_ext <<_ACEOF
9865#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009866#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009867
Guido van Rossumad678af1998-10-02 14:42:15 +00009868/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009869#ifdef __cplusplus
9870extern "C"
9871#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009872/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009873 builtin and then its argument prototype would still apply. */
9874char socket ();
9875#ifdef F77_DUMMY_MAIN
9876# ifdef __cplusplus
9877 extern "C"
9878# endif
9879 int F77_DUMMY_MAIN() { return 1; }
9880#endif
9881int
9882main ()
9883{
9884socket ();
9885 ;
9886 return 0;
9887}
9888_ACEOF
9889rm -f conftest.$ac_objext conftest$ac_exeext
9890if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9891 (eval $ac_link) 2>&5
9892 ac_status=$?
9893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9894 (exit $ac_status); } &&
9895 { ac_try='test -s conftest$ac_exeext'
9896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9897 (eval $ac_try) 2>&5
9898 ac_status=$?
9899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9900 (exit $ac_status); }; }; then
9901 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009902else
Martin v. Löwis11437992002-04-12 09:54:03 +00009903 echo "$as_me: failed program was:" >&5
9904cat conftest.$ac_ext >&5
9905ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009906fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009907rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9908LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009909fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009910echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9911echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9912if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009913 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009914fi
9915 # BeOS
9916;;
9917esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009918
Martin v. Löwis11437992002-04-12 09:54:03 +00009919echo "$as_me:$LINENO: checking for --with-libs" >&5
9920echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9921
Guido van Rossuma68acba1996-07-31 17:36:39 +00009922# Check whether --with-libs or --without-libs was given.
9923if test "${with_libs+set}" = set; then
9924 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009925
9926echo "$as_me:$LINENO: result: $withval" >&5
9927echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009928LIBS="$withval $LIBS"
9929
9930else
Martin v. Löwis11437992002-04-12 09:54:03 +00009931 echo "$as_me:$LINENO: result: no" >&5
9932echo "${ECHO_T}no" >&6
9933fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009934
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009935# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009936
9937
Martin v. Löwis11437992002-04-12 09:54:03 +00009938echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9939echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9940
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009941# Check whether --with-signal-module or --without-signal-module was given.
9942if test "${with_signal_module+set}" = set; then
9943 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009944
Martin v. Löwis11437992002-04-12 09:54:03 +00009945fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009946
9947if test -z "$with_signal_module"
9948then with_signal_module="yes"
9949fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009950echo "$as_me:$LINENO: result: $with_signal_module" >&5
9951echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009952
9953if test "${with_signal_module}" = "yes"; then
9954 USE_SIGNAL_MODULE=""
9955 SIGNAL_OBJS=""
9956else
9957 USE_SIGNAL_MODULE="#"
9958 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9959fi
9960
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009961# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009962
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009963USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009964
Martin v. Löwis11437992002-04-12 09:54:03 +00009965echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9966echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9967
Guido van Rossumec2f0731997-01-22 20:54:01 +00009968
9969# Check whether --with-dec-threads or --without-dec-threads was given.
9970if test "${with_dec_threads+set}" = set; then
9971 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009972
9973echo "$as_me:$LINENO: result: $withval" >&5
9974echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009975LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009976if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009977 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009978fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009979else
Martin v. Löwis11437992002-04-12 09:54:03 +00009980 echo "$as_me:$LINENO: result: no" >&5
9981echo "${ECHO_T}no" >&6
9982fi;
9983
9984# Templates for things AC_DEFINEd more than once.
9985# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009986
9987
Martin v. Löwis11437992002-04-12 09:54:03 +00009988
9989
9990
9991
9992
9993echo "$as_me:$LINENO: checking for --with-threads" >&5
9994echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9995
Guido van Rossumec2f0731997-01-22 20:54:01 +00009996# Check whether --with-threads or --without-threads was given.
9997if test "${with_threads+set}" = set; then
9998 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009999
Martin v. Löwis11437992002-04-12 09:54:03 +000010000fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010001
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010002# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010003
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010004# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010005if test "${with_thread+set}" = set; then
10006 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010007 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010008fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010009
10010if test -z "$with_threads"
10011then with_threads="yes"
10012fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010013echo "$as_me:$LINENO: result: $with_threads" >&5
10014echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010015
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010016
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010017if test "$with_threads" = "no"
10018then
10019 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010020elif test "$ac_cv_pthread_is_default" = yes
10021then
Martin v. Löwis11437992002-04-12 09:54:03 +000010022 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010023#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010024_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010025
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010026 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010027 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010028#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010029_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010030
10031 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010032 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010033elif test "$ac_cv_kpthread" = "yes"
10034then
10035 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010036 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010037#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010038_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010039
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010040 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010041 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010042else
10043 if test ! -z "$with_threads" -a -d "$with_threads"
10044 then LDFLAGS="$LDFLAGS -L$with_threads"
10045 fi
10046 if test ! -z "$withval" -a -d "$withval"
10047 then LDFLAGS="$LDFLAGS -L$withval"
10048 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010049
10050 # According to the POSIX spec, a pthreads implementation must
10051 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010052 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10053echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10054 cat >conftest.$ac_ext <<_ACEOF
10055#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010056#include "confdefs.h"
10057#include <unistd.h>
10058 #ifdef _POSIX_THREADS
10059 yes
10060 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010061
10062_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10064 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010065 unistd_defines_pthreads=yes
10066else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010067 unistd_defines_pthreads=no
10068fi
10069rm -f conftest*
10070
Martin v. Löwis11437992002-04-12 09:54:03 +000010071 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10072echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010073
Martin v. Löwis11437992002-04-12 09:54:03 +000010074 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010075#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010076_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010077
Martin v. Löwis11437992002-04-12 09:54:03 +000010078 if test "${ac_cv_header_cthreads_h+set}" = set; then
10079 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10080echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10081if test "${ac_cv_header_cthreads_h+set}" = set; then
10082 echo $ECHO_N "(cached) $ECHO_C" >&6
10083fi
10084echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10085echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010086else
Martin v. Löwis11437992002-04-12 09:54:03 +000010087 # Is the header compilable?
10088echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10089echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10090cat >conftest.$ac_ext <<_ACEOF
10091#line $LINENO "configure"
10092#include "confdefs.h"
10093$ac_includes_default
10094#include <cthreads.h>
10095_ACEOF
10096rm -f conftest.$ac_objext
10097if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10098 (eval $ac_compile) 2>&5
10099 ac_status=$?
10100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10101 (exit $ac_status); } &&
10102 { ac_try='test -s conftest.$ac_objext'
10103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10104 (eval $ac_try) 2>&5
10105 ac_status=$?
10106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10107 (exit $ac_status); }; }; then
10108 ac_header_compiler=yes
10109else
10110 echo "$as_me: failed program was:" >&5
10111cat conftest.$ac_ext >&5
10112ac_header_compiler=no
10113fi
10114rm -f conftest.$ac_objext conftest.$ac_ext
10115echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10116echo "${ECHO_T}$ac_header_compiler" >&6
10117
10118# Is the header present?
10119echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10120echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10121cat >conftest.$ac_ext <<_ACEOF
10122#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010123#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010124#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010125_ACEOF
10126if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10127 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10128 ac_status=$?
10129 egrep -v '^ *\+' conftest.er1 >conftest.err
10130 rm -f conftest.er1
10131 cat conftest.err >&5
10132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10133 (exit $ac_status); } >/dev/null; then
10134 if test -s conftest.err; then
10135 ac_cpp_err=$ac_c_preproc_warn_flag
10136 else
10137 ac_cpp_err=
10138 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010139else
Martin v. Löwis11437992002-04-12 09:54:03 +000010140 ac_cpp_err=yes
10141fi
10142if test -z "$ac_cpp_err"; then
10143 ac_header_preproc=yes
10144else
10145 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010146 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010147 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010148fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010149rm -f conftest.err conftest.$ac_ext
10150echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10151echo "${ECHO_T}$ac_header_preproc" >&6
10152
10153# So? What about this header?
10154case $ac_header_compiler:$ac_header_preproc in
10155 yes:no )
10156 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10157echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10158 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10159echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10160 no:yes )
10161 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10162echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10163 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10164echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10165 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10166echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10167esac
10168echo "$as_me:$LINENO: checking for cthreads.h" >&5
10169echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10170if test "${ac_cv_header_cthreads_h+set}" = set; then
10171 echo $ECHO_N "(cached) $ECHO_C" >&6
10172else
10173 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010174fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010175echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10176echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10177
10178fi
10179if test $ac_cv_header_cthreads_h = yes; then
10180 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010181#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010182_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010183
Martin v. Löwis11437992002-04-12 09:54:03 +000010184 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010185#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010186_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010187
Martin v. Löwis11437992002-04-12 09:54:03 +000010188
10189cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010190#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010191_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010192
10193 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010194 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010195else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010196
Martin v. Löwis11437992002-04-12 09:54:03 +000010197 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10198 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10199echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10200if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10201 echo $ECHO_N "(cached) $ECHO_C" >&6
10202fi
10203echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10204echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010205else
Martin v. Löwis11437992002-04-12 09:54:03 +000010206 # Is the header compilable?
10207echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10208echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10209cat >conftest.$ac_ext <<_ACEOF
10210#line $LINENO "configure"
10211#include "confdefs.h"
10212$ac_includes_default
10213#include <mach/cthreads.h>
10214_ACEOF
10215rm -f conftest.$ac_objext
10216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10217 (eval $ac_compile) 2>&5
10218 ac_status=$?
10219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10220 (exit $ac_status); } &&
10221 { ac_try='test -s conftest.$ac_objext'
10222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10223 (eval $ac_try) 2>&5
10224 ac_status=$?
10225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10226 (exit $ac_status); }; }; then
10227 ac_header_compiler=yes
10228else
10229 echo "$as_me: failed program was:" >&5
10230cat conftest.$ac_ext >&5
10231ac_header_compiler=no
10232fi
10233rm -f conftest.$ac_objext conftest.$ac_ext
10234echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10235echo "${ECHO_T}$ac_header_compiler" >&6
10236
10237# Is the header present?
10238echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10239echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10240cat >conftest.$ac_ext <<_ACEOF
10241#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010242#include "confdefs.h"
10243#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010244_ACEOF
10245if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10246 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10247 ac_status=$?
10248 egrep -v '^ *\+' conftest.er1 >conftest.err
10249 rm -f conftest.er1
10250 cat conftest.err >&5
10251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10252 (exit $ac_status); } >/dev/null; then
10253 if test -s conftest.err; then
10254 ac_cpp_err=$ac_c_preproc_warn_flag
10255 else
10256 ac_cpp_err=
10257 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010258else
Martin v. Löwis11437992002-04-12 09:54:03 +000010259 ac_cpp_err=yes
10260fi
10261if test -z "$ac_cpp_err"; then
10262 ac_header_preproc=yes
10263else
10264 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010265 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010267fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010268rm -f conftest.err conftest.$ac_ext
10269echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10270echo "${ECHO_T}$ac_header_preproc" >&6
10271
10272# So? What about this header?
10273case $ac_header_compiler:$ac_header_preproc in
10274 yes:no )
10275 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10276echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10277 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10278echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10279 no:yes )
10280 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10281echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10282 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10283echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10284 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10285echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10286esac
10287echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10288echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10289if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10290 echo $ECHO_N "(cached) $ECHO_C" >&6
10291else
10292 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010293fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010294echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10295echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10296
10297fi
10298if test $ac_cv_header_mach_cthreads_h = yes; then
10299 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010300#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010301_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010302
Martin v. Löwis11437992002-04-12 09:54:03 +000010303 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010304#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010305_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010306
Martin v. Löwis11437992002-04-12 09:54:03 +000010307
10308cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010309#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010310_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010311
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010312 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010313else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010314
Martin v. Löwis11437992002-04-12 09:54:03 +000010315 echo "$as_me:$LINENO: checking for --with-pth" >&5
10316echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10317
10318# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010319if test "${with_pth+set}" = set; then
10320 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010321 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010322echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010323 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010324#define WITH_THREAD 1
10325_ACEOF
10326
10327
10328cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010329#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010330_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010331
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010332 LIBS="-lpth $LIBS"
10333 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010334else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010335 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010336echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010337
10338 # Just looking for pthread_create in libpthread is not enough:
10339 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10340 # So we really have to include pthread.h, and then link.
10341 _libs=$LIBS
10342 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010343 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10344echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10345 cat >conftest.$ac_ext <<_ACEOF
10346#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010347#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010348#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010349
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010350void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010351#ifdef F77_DUMMY_MAIN
10352# ifdef __cplusplus
10353 extern "C"
10354# endif
10355 int F77_DUMMY_MAIN() { return 1; }
10356#endif
10357int
10358main ()
10359{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010360
10361pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010362 ;
10363 return 0;
10364}
10365_ACEOF
10366rm -f conftest.$ac_objext conftest$ac_exeext
10367if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10368 (eval $ac_link) 2>&5
10369 ac_status=$?
10370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10371 (exit $ac_status); } &&
10372 { ac_try='test -s conftest$ac_exeext'
10373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10374 (eval $ac_try) 2>&5
10375 ac_status=$?
10376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10377 (exit $ac_status); }; }; then
10378
10379 echo "$as_me:$LINENO: result: yes" >&5
10380echo "${ECHO_T}yes" >&6
10381 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010382#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010383_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010384
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010385 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010386 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010387else
Martin v. Löwis11437992002-04-12 09:54:03 +000010388 echo "$as_me: failed program was:" >&5
10389cat conftest.$ac_ext >&5
10390
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010391 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010392 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10393echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10394if test "${ac_cv_func_pthread_detach+set}" = set; then
10395 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010396else
Martin v. Löwis11437992002-04-12 09:54:03 +000010397 cat >conftest.$ac_ext <<_ACEOF
10398#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010399#include "confdefs.h"
10400/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010401 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010402#include <assert.h>
10403/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010404#ifdef __cplusplus
10405extern "C"
10406#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010407/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010408 builtin and then its argument prototype would still apply. */
10409char pthread_detach ();
10410char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010411
Martin v. Löwis11437992002-04-12 09:54:03 +000010412#ifdef F77_DUMMY_MAIN
10413# ifdef __cplusplus
10414 extern "C"
10415# endif
10416 int F77_DUMMY_MAIN() { return 1; }
10417#endif
10418int
10419main ()
10420{
Guido van Rossumad678af1998-10-02 14:42:15 +000010421/* The GNU C library defines this for functions which it implements
10422 to always fail with ENOSYS. Some functions are actually named
10423 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010424#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010425choke me
10426#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010427f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010428#endif
10429
Martin v. Löwis11437992002-04-12 09:54:03 +000010430 ;
10431 return 0;
10432}
10433_ACEOF
10434rm -f conftest.$ac_objext conftest$ac_exeext
10435if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10436 (eval $ac_link) 2>&5
10437 ac_status=$?
10438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10439 (exit $ac_status); } &&
10440 { ac_try='test -s conftest$ac_exeext'
10441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10442 (eval $ac_try) 2>&5
10443 ac_status=$?
10444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10445 (exit $ac_status); }; }; then
10446 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010447else
Martin v. Löwis11437992002-04-12 09:54:03 +000010448 echo "$as_me: failed program was:" >&5
10449cat conftest.$ac_ext >&5
10450ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010451fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010452rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010453fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010454echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10455echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10456if test $ac_cv_func_pthread_detach = yes; then
10457 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010458#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010459_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010460
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010461 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010462 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010463else
Guido van Rossumad678af1998-10-02 14:42:15 +000010464
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010465 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10466 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10467echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10468if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10469 echo $ECHO_N "(cached) $ECHO_C" >&6
10470fi
10471echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10472echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10473else
10474 # Is the header compilable?
10475echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10476echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10477cat >conftest.$ac_ext <<_ACEOF
10478#line $LINENO "configure"
10479#include "confdefs.h"
10480$ac_includes_default
10481#include <atheos/threads.h>
10482_ACEOF
10483rm -f conftest.$ac_objext
10484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10485 (eval $ac_compile) 2>&5
10486 ac_status=$?
10487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10488 (exit $ac_status); } &&
10489 { ac_try='test -s conftest.$ac_objext'
10490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10491 (eval $ac_try) 2>&5
10492 ac_status=$?
10493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10494 (exit $ac_status); }; }; then
10495 ac_header_compiler=yes
10496else
10497 echo "$as_me: failed program was:" >&5
10498cat conftest.$ac_ext >&5
10499ac_header_compiler=no
10500fi
10501rm -f conftest.$ac_objext conftest.$ac_ext
10502echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10503echo "${ECHO_T}$ac_header_compiler" >&6
10504
10505# Is the header present?
10506echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10507echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10508cat >conftest.$ac_ext <<_ACEOF
10509#line $LINENO "configure"
10510#include "confdefs.h"
10511#include <atheos/threads.h>
10512_ACEOF
10513if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10514 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10515 ac_status=$?
10516 egrep -v '^ *\+' conftest.er1 >conftest.err
10517 rm -f conftest.er1
10518 cat conftest.err >&5
10519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10520 (exit $ac_status); } >/dev/null; then
10521 if test -s conftest.err; then
10522 ac_cpp_err=$ac_c_preproc_warn_flag
10523 else
10524 ac_cpp_err=
10525 fi
10526else
10527 ac_cpp_err=yes
10528fi
10529if test -z "$ac_cpp_err"; then
10530 ac_header_preproc=yes
10531else
10532 echo "$as_me: failed program was:" >&5
10533 cat conftest.$ac_ext >&5
10534 ac_header_preproc=no
10535fi
10536rm -f conftest.err conftest.$ac_ext
10537echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10538echo "${ECHO_T}$ac_header_preproc" >&6
10539
10540# So? What about this header?
10541case $ac_header_compiler:$ac_header_preproc in
10542 yes:no )
10543 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10544echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10545 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10546echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10547 no:yes )
10548 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10549echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10550 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10551echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10552 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10553echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10554esac
10555echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10556echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10557if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10558 echo $ECHO_N "(cached) $ECHO_C" >&6
10559else
10560 ac_cv_header_atheos_threads_h=$ac_header_preproc
10561fi
10562echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10563echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10564
10565fi
10566if test $ac_cv_header_atheos_threads_h = yes; then
10567 cat >>confdefs.h <<\_ACEOF
10568#define WITH_THREAD 1
10569_ACEOF
10570
10571
10572cat >>confdefs.h <<\_ACEOF
10573#define ATHEOS_THREADS 1
10574_ACEOF
10575
10576 THREADOBJ="Python/thread.o"
10577else
10578
Martin v. Löwis11437992002-04-12 09:54:03 +000010579 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10580 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10581echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10582if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10583 echo $ECHO_N "(cached) $ECHO_C" >&6
10584fi
10585echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10586echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010587else
Martin v. Löwis11437992002-04-12 09:54:03 +000010588 # Is the header compilable?
10589echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10590echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10591cat >conftest.$ac_ext <<_ACEOF
10592#line $LINENO "configure"
10593#include "confdefs.h"
10594$ac_includes_default
10595#include <kernel/OS.h>
10596_ACEOF
10597rm -f conftest.$ac_objext
10598if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10599 (eval $ac_compile) 2>&5
10600 ac_status=$?
10601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10602 (exit $ac_status); } &&
10603 { ac_try='test -s conftest.$ac_objext'
10604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10605 (eval $ac_try) 2>&5
10606 ac_status=$?
10607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10608 (exit $ac_status); }; }; then
10609 ac_header_compiler=yes
10610else
10611 echo "$as_me: failed program was:" >&5
10612cat conftest.$ac_ext >&5
10613ac_header_compiler=no
10614fi
10615rm -f conftest.$ac_objext conftest.$ac_ext
10616echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10617echo "${ECHO_T}$ac_header_compiler" >&6
10618
10619# Is the header present?
10620echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10621echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10622cat >conftest.$ac_ext <<_ACEOF
10623#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010624#include "confdefs.h"
10625#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010626_ACEOF
10627if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10628 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10629 ac_status=$?
10630 egrep -v '^ *\+' conftest.er1 >conftest.err
10631 rm -f conftest.er1
10632 cat conftest.err >&5
10633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10634 (exit $ac_status); } >/dev/null; then
10635 if test -s conftest.err; then
10636 ac_cpp_err=$ac_c_preproc_warn_flag
10637 else
10638 ac_cpp_err=
10639 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010640else
Martin v. Löwis11437992002-04-12 09:54:03 +000010641 ac_cpp_err=yes
10642fi
10643if test -z "$ac_cpp_err"; then
10644 ac_header_preproc=yes
10645else
10646 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010647 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010648 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010649fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010650rm -f conftest.err conftest.$ac_ext
10651echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10652echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010653
Martin v. Löwis11437992002-04-12 09:54:03 +000010654# So? What about this header?
10655case $ac_header_compiler:$ac_header_preproc in
10656 yes:no )
10657 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10658echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10659 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10660echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10661 no:yes )
10662 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10663echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10664 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10665echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10666 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10667echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10668esac
10669echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10670echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10671if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10672 echo $ECHO_N "(cached) $ECHO_C" >&6
10673else
10674 ac_cv_header_kernel_OS_h=$ac_header_preproc
10675fi
10676echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10677echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10678
10679fi
10680if test $ac_cv_header_kernel_OS_h = yes; then
10681 cat >>confdefs.h <<\_ACEOF
10682#define WITH_THREAD 1
10683_ACEOF
10684
10685
10686cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010687#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010688_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010689
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010690 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010691else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010692
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10694echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10695if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10696 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010697else
Martin v. Löwis11437992002-04-12 09:54:03 +000010698 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010699LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010700cat >conftest.$ac_ext <<_ACEOF
10701#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010702#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010703
Greg Steinadf63d62000-07-05 10:38:09 +000010704/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010705#ifdef __cplusplus
10706extern "C"
10707#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010708/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010709 builtin and then its argument prototype would still apply. */
10710char pthread_create ();
10711#ifdef F77_DUMMY_MAIN
10712# ifdef __cplusplus
10713 extern "C"
10714# endif
10715 int F77_DUMMY_MAIN() { return 1; }
10716#endif
10717int
10718main ()
10719{
10720pthread_create ();
10721 ;
10722 return 0;
10723}
10724_ACEOF
10725rm -f conftest.$ac_objext conftest$ac_exeext
10726if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10727 (eval $ac_link) 2>&5
10728 ac_status=$?
10729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10730 (exit $ac_status); } &&
10731 { ac_try='test -s conftest$ac_exeext'
10732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10733 (eval $ac_try) 2>&5
10734 ac_status=$?
10735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10736 (exit $ac_status); }; }; then
10737 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010738else
Martin v. Löwis11437992002-04-12 09:54:03 +000010739 echo "$as_me: failed program was:" >&5
10740cat conftest.$ac_ext >&5
10741ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010742fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010743rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10744LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010745fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010746echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10747echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10748if test $ac_cv_lib_pthreads_pthread_create = yes; then
10749 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010750#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010751_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010752
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010753 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010754 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010755 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010756else
Greg Steinadf63d62000-07-05 10:38:09 +000010757
Martin v. Löwis11437992002-04-12 09:54:03 +000010758 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10759echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10760if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10761 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010762else
Martin v. Löwis11437992002-04-12 09:54:03 +000010763 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010764LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010765cat >conftest.$ac_ext <<_ACEOF
10766#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010767#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010768
Guido van Rossum49545951997-12-02 19:28:29 +000010769/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010770#ifdef __cplusplus
10771extern "C"
10772#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010773/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010774 builtin and then its argument prototype would still apply. */
10775char pthread_create ();
10776#ifdef F77_DUMMY_MAIN
10777# ifdef __cplusplus
10778 extern "C"
10779# endif
10780 int F77_DUMMY_MAIN() { return 1; }
10781#endif
10782int
10783main ()
10784{
10785pthread_create ();
10786 ;
10787 return 0;
10788}
10789_ACEOF
10790rm -f conftest.$ac_objext conftest$ac_exeext
10791if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10792 (eval $ac_link) 2>&5
10793 ac_status=$?
10794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10795 (exit $ac_status); } &&
10796 { ac_try='test -s conftest$ac_exeext'
10797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10798 (eval $ac_try) 2>&5
10799 ac_status=$?
10800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10801 (exit $ac_status); }; }; then
10802 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010803else
Martin v. Löwis11437992002-04-12 09:54:03 +000010804 echo "$as_me: failed program was:" >&5
10805cat conftest.$ac_ext >&5
10806ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010807fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010808rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10809LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010810fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010811echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10812echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10813if test $ac_cv_lib_c_r_pthread_create = yes; then
10814 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010815#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010816_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010817
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010818 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010819 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010820 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010821else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010822
Martin v. Löwis11437992002-04-12 09:54:03 +000010823 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10824echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10825if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10826 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010827else
Martin v. Löwis11437992002-04-12 09:54:03 +000010828 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010829LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010830cat >conftest.$ac_ext <<_ACEOF
10831#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010832#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010833
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010834/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010835#ifdef __cplusplus
10836extern "C"
10837#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010838/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010839 builtin and then its argument prototype would still apply. */
10840char __d6_pthread_create ();
10841#ifdef F77_DUMMY_MAIN
10842# ifdef __cplusplus
10843 extern "C"
10844# endif
10845 int F77_DUMMY_MAIN() { return 1; }
10846#endif
10847int
10848main ()
10849{
10850__d6_pthread_create ();
10851 ;
10852 return 0;
10853}
10854_ACEOF
10855rm -f conftest.$ac_objext conftest$ac_exeext
10856if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10857 (eval $ac_link) 2>&5
10858 ac_status=$?
10859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10860 (exit $ac_status); } &&
10861 { ac_try='test -s conftest$ac_exeext'
10862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10863 (eval $ac_try) 2>&5
10864 ac_status=$?
10865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10866 (exit $ac_status); }; }; then
10867 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010868else
Martin v. Löwis11437992002-04-12 09:54:03 +000010869 echo "$as_me: failed program was:" >&5
10870cat conftest.$ac_ext >&5
10871ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010872fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010873rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10874LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010875fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010876echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10877echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10878if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10879 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010880#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010881_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010882
Martin v. Löwis779ffc02002-12-02 22:17:01 +000010883 echo Systems with __d6_pthread_create are not supported anymore.
10884 echo See README
10885 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010886 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010887 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010888 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010889else
Guido van Rossum49545951997-12-02 19:28:29 +000010890
Martin v. Löwis11437992002-04-12 09:54:03 +000010891 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10892echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10893if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10894 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010895else
Martin v. Löwis11437992002-04-12 09:54:03 +000010896 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010897LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010898cat >conftest.$ac_ext <<_ACEOF
10899#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010900#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010901
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010902/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010903#ifdef __cplusplus
10904extern "C"
10905#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010906/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010907 builtin and then its argument prototype would still apply. */
10908char __pthread_create_system ();
10909#ifdef F77_DUMMY_MAIN
10910# ifdef __cplusplus
10911 extern "C"
10912# endif
10913 int F77_DUMMY_MAIN() { return 1; }
10914#endif
10915int
10916main ()
10917{
10918__pthread_create_system ();
10919 ;
10920 return 0;
10921}
10922_ACEOF
10923rm -f conftest.$ac_objext conftest$ac_exeext
10924if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10925 (eval $ac_link) 2>&5
10926 ac_status=$?
10927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10928 (exit $ac_status); } &&
10929 { ac_try='test -s conftest$ac_exeext'
10930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10931 (eval $ac_try) 2>&5
10932 ac_status=$?
10933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10934 (exit $ac_status); }; }; then
10935 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010936else
Martin v. Löwis11437992002-04-12 09:54:03 +000010937 echo "$as_me: failed program was:" >&5
10938cat conftest.$ac_ext >&5
10939ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010940fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010941rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10942LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010943fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010944echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10945echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10946if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10947 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010948#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010949_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010950
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010951 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010952 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010953 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010954else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010955
Martin v. Löwis11437992002-04-12 09:54:03 +000010956 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10957echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10958if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10959 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010960else
Martin v. Löwis11437992002-04-12 09:54:03 +000010961 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010962LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010963cat >conftest.$ac_ext <<_ACEOF
10964#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010965#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010966
Guido van Rossumb93a8621998-05-07 13:27:32 +000010967/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010968#ifdef __cplusplus
10969extern "C"
10970#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010971/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010972 builtin and then its argument prototype would still apply. */
10973char pthread_create ();
10974#ifdef F77_DUMMY_MAIN
10975# ifdef __cplusplus
10976 extern "C"
10977# endif
10978 int F77_DUMMY_MAIN() { return 1; }
10979#endif
10980int
10981main ()
10982{
10983pthread_create ();
10984 ;
10985 return 0;
10986}
10987_ACEOF
10988rm -f conftest.$ac_objext conftest$ac_exeext
10989if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10990 (eval $ac_link) 2>&5
10991 ac_status=$?
10992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10993 (exit $ac_status); } &&
10994 { ac_try='test -s conftest$ac_exeext'
10995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10996 (eval $ac_try) 2>&5
10997 ac_status=$?
10998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10999 (exit $ac_status); }; }; then
11000 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011001else
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 echo "$as_me: failed program was:" >&5
11003cat conftest.$ac_ext >&5
11004ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011005fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011006rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11007LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011008fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011009echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11010echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11011if test $ac_cv_lib_cma_pthread_create = yes; then
11012 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011013#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011014_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011015
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011016 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011017 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011018 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011019else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011020
Martin v. Löwis130fb172001-07-19 11:00:41 +000011021 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011022fi
11023
Guido van Rossum627b2d71993-12-24 10:39:16 +000011024
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011025fi
11026
Guido van Rossum0be3e491997-05-22 20:33:33 +000011027fi
11028
Guido van Rossum49545951997-12-02 19:28:29 +000011029fi
11030
Guido van Rossumb93a8621998-05-07 13:27:32 +000011031fi
11032
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011033fi
11034
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011035
Michael W. Hudson54241132001-12-07 15:38:26 +000011036fi
11037
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011038
11039fi
11040
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011041fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011042rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11043fi;
11044fi
11045
11046
11047fi
11048
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011049
Michael W. Hudson54241132001-12-07 15:38:26 +000011050
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011051 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011052 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011053
11054cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011055#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011056_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011057
11058 fi
11059
Martin v. Löwis11437992002-04-12 09:54:03 +000011060 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11061echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11062 if test "${ac_cv_pthread_system_supported+set}" = set; then
11063 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011064else
11065 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011066 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011067else
Martin v. Löwis11437992002-04-12 09:54:03 +000011068 cat >conftest.$ac_ext <<_ACEOF
11069#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011070#include "confdefs.h"
11071#include <pthread.h>
11072 void *foo(void *parm) {
11073 return NULL;
11074 }
11075 main() {
11076 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011077 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011078 if (pthread_attr_init(&attr)) exit(-1);
11079 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011080 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011081 exit(0);
11082 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011083_ACEOF
11084rm -f conftest$ac_exeext
11085if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11086 (eval $ac_link) 2>&5
11087 ac_status=$?
11088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11089 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11091 (eval $ac_try) 2>&5
11092 ac_status=$?
11093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11094 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011095 ac_cv_pthread_system_supported=yes
11096else
Martin v. Löwis11437992002-04-12 09:54:03 +000011097 echo "$as_me: program exited with status $ac_status" >&5
11098echo "$as_me: failed program was:" >&5
11099cat conftest.$ac_ext >&5
11100( exit $ac_status )
11101ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011103rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011104fi
11105
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011106fi
11107
Martin v. Löwis11437992002-04-12 09:54:03 +000011108 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11109echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011110 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011111
11112cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011113#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011114_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011115
11116 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011117
11118for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011119do
Martin v. Löwis11437992002-04-12 09:54:03 +000011120as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11121echo "$as_me:$LINENO: checking for $ac_func" >&5
11122echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11123if eval "test \"\${$as_ac_var+set}\" = set"; then
11124 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011125else
Martin v. Löwis11437992002-04-12 09:54:03 +000011126 cat >conftest.$ac_ext <<_ACEOF
11127#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011128#include "confdefs.h"
11129/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011130 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011131#include <assert.h>
11132/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011133#ifdef __cplusplus
11134extern "C"
11135#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011136/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011137 builtin and then its argument prototype would still apply. */
11138char $ac_func ();
11139char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011140
Martin v. Löwis11437992002-04-12 09:54:03 +000011141#ifdef F77_DUMMY_MAIN
11142# ifdef __cplusplus
11143 extern "C"
11144# endif
11145 int F77_DUMMY_MAIN() { return 1; }
11146#endif
11147int
11148main ()
11149{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011150/* The GNU C library defines this for functions which it implements
11151 to always fail with ENOSYS. Some functions are actually named
11152 something starting with __ and the normal name is an alias. */
11153#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11154choke me
11155#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011156f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011157#endif
11158
Martin v. Löwis11437992002-04-12 09:54:03 +000011159 ;
11160 return 0;
11161}
11162_ACEOF
11163rm -f conftest.$ac_objext conftest$ac_exeext
11164if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11165 (eval $ac_link) 2>&5
11166 ac_status=$?
11167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11168 (exit $ac_status); } &&
11169 { ac_try='test -s conftest$ac_exeext'
11170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11171 (eval $ac_try) 2>&5
11172 ac_status=$?
11173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11174 (exit $ac_status); }; }; then
11175 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011176else
Martin v. Löwis11437992002-04-12 09:54:03 +000011177 echo "$as_me: failed program was:" >&5
11178cat conftest.$ac_ext >&5
11179eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011180fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011181rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011182fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011183echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11184echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11185if test `eval echo '${'$as_ac_var'}'` = yes; then
11186 cat >>confdefs.h <<_ACEOF
11187#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11188_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011189
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011190fi
11191done
11192
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011193 fi
11194
Martin v. Löwis11437992002-04-12 09:54:03 +000011195 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11196echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11197if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11198 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011199else
Martin v. Löwis11437992002-04-12 09:54:03 +000011200 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011201LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011202cat >conftest.$ac_ext <<_ACEOF
11203#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011204#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011205
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011206/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011207#ifdef __cplusplus
11208extern "C"
11209#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011210/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011211 builtin and then its argument prototype would still apply. */
11212char usconfig ();
11213#ifdef F77_DUMMY_MAIN
11214# ifdef __cplusplus
11215 extern "C"
11216# endif
11217 int F77_DUMMY_MAIN() { return 1; }
11218#endif
11219int
11220main ()
11221{
11222usconfig ();
11223 ;
11224 return 0;
11225}
11226_ACEOF
11227rm -f conftest.$ac_objext conftest$ac_exeext
11228if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11229 (eval $ac_link) 2>&5
11230 ac_status=$?
11231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11232 (exit $ac_status); } &&
11233 { ac_try='test -s conftest$ac_exeext'
11234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11235 (eval $ac_try) 2>&5
11236 ac_status=$?
11237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11238 (exit $ac_status); }; }; then
11239 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011240else
Martin v. Löwis11437992002-04-12 09:54:03 +000011241 echo "$as_me: failed program was:" >&5
11242cat conftest.$ac_ext >&5
11243ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011244fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011245rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11246LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011247fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011248echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11249echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11250if test $ac_cv_lib_mpc_usconfig = yes; then
11251 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011252#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011253_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011254
Martin v. Löwis130fb172001-07-19 11:00:41 +000011255 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011256 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011257 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011258fi
11259
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011260
Neal Norwitza978ab02002-11-02 16:58:05 +000011261 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011262 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11263echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11264if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11265 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011266else
Martin v. Löwis11437992002-04-12 09:54:03 +000011267 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011268LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011269cat >conftest.$ac_ext <<_ACEOF
11270#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011271#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011272
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011273/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011274#ifdef __cplusplus
11275extern "C"
11276#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011277/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011278 builtin and then its argument prototype would still apply. */
11279char thr_create ();
11280#ifdef F77_DUMMY_MAIN
11281# ifdef __cplusplus
11282 extern "C"
11283# endif
11284 int F77_DUMMY_MAIN() { return 1; }
11285#endif
11286int
11287main ()
11288{
11289thr_create ();
11290 ;
11291 return 0;
11292}
11293_ACEOF
11294rm -f conftest.$ac_objext conftest$ac_exeext
11295if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11296 (eval $ac_link) 2>&5
11297 ac_status=$?
11298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11299 (exit $ac_status); } &&
11300 { ac_try='test -s conftest$ac_exeext'
11301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11302 (eval $ac_try) 2>&5
11303 ac_status=$?
11304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11305 (exit $ac_status); }; }; then
11306 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011307else
Martin v. Löwis11437992002-04-12 09:54:03 +000011308 echo "$as_me: failed program was:" >&5
11309cat conftest.$ac_ext >&5
11310ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011311fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011312rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11313LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011314fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011315echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11316echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11317if test $ac_cv_lib_thread_thr_create = yes; then
11318 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011319#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011320_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011321
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011322 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011323 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011324 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011325fi
11326
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011327 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011328
Martin v. Löwis130fb172001-07-19 11:00:41 +000011329 if test "$USE_THREAD_MODULE" != "#"
11330 then
11331 # If the above checks didn't disable threads, (at least) OSF1
11332 # needs this '-threads' argument during linking.
11333 case $ac_sys_system in
11334 OSF1) LDLAST=-threads;;
11335 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011336 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011337
11338 if test "$posix_threads" = yes -a \
11339 "$ac_sys_system" = "SunOS" -a \
11340 "$ac_sys_release" = "5.6"; then
11341
11342cat >>confdefs.h <<\_ACEOF
11343#define HAVE_PTHREAD_DESTRUCTOR 1
11344_ACEOF
11345
11346 fi
11347
Guido van Rossum627b2d71993-12-24 10:39:16 +000011348fi
11349
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011350# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011351
11352
11353echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11354echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011355# Check whether --enable-ipv6 or --disable-ipv6 was given.
11356if test "${enable_ipv6+set}" = set; then
11357 enableval="$enable_ipv6"
11358 case "$enableval" in
11359 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011360 echo "$as_me:$LINENO: result: no" >&5
11361echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011362 ipv6=no
11363 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011364 *) echo "$as_me:$LINENO: result: yes" >&5
11365echo "${ECHO_T}yes" >&6
11366 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011367#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011368_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011369
11370 ipv6=yes
11371 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011372 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011373else
Martin v. Löwis11437992002-04-12 09:54:03 +000011374
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011375 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011376 echo "$as_me:$LINENO: result: no" >&5
11377echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011378 ipv6=no
11379
11380else
Martin v. Löwis11437992002-04-12 09:54:03 +000011381 cat >conftest.$ac_ext <<_ACEOF
11382#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011383#include "confdefs.h"
11384 /* AF_INET6 available check */
11385#include <sys/types.h>
11386#include <sys/socket.h>
11387main()
11388{
11389 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11390 exit(1);
11391 else
11392 exit(0);
11393}
11394
Martin v. Löwis11437992002-04-12 09:54:03 +000011395_ACEOF
11396rm -f conftest$ac_exeext
11397if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11398 (eval $ac_link) 2>&5
11399 ac_status=$?
11400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11401 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11403 (eval $ac_try) 2>&5
11404 ac_status=$?
11405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11406 (exit $ac_status); }; }; then
11407 echo "$as_me:$LINENO: result: yes" >&5
11408echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011409 ipv6=yes
11410else
Martin v. Löwis11437992002-04-12 09:54:03 +000011411 echo "$as_me: program exited with status $ac_status" >&5
11412echo "$as_me: failed program was:" >&5
11413cat conftest.$ac_ext >&5
11414( exit $ac_status )
11415echo "$as_me:$LINENO: result: no" >&5
11416echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011417 ipv6=no
11418fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011419rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011420fi
11421
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011422if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011423 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11424echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11425 cat >conftest.$ac_ext <<_ACEOF
11426#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011427#include "confdefs.h"
11428#include <sys/types.h>
11429#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011430#ifdef F77_DUMMY_MAIN
11431# ifdef __cplusplus
11432 extern "C"
11433# endif
11434 int F77_DUMMY_MAIN() { return 1; }
11435#endif
11436int
11437main ()
11438{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011439struct sockaddr_in6 x;
11440x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011441 ;
11442 return 0;
11443}
11444_ACEOF
11445rm -f conftest.$ac_objext
11446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11447 (eval $ac_compile) 2>&5
11448 ac_status=$?
11449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11450 (exit $ac_status); } &&
11451 { ac_try='test -s conftest.$ac_objext'
11452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11453 (eval $ac_try) 2>&5
11454 ac_status=$?
11455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11456 (exit $ac_status); }; }; then
11457 echo "$as_me:$LINENO: result: yes" >&5
11458echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011459 ipv6=yes
11460else
Martin v. Löwis11437992002-04-12 09:54:03 +000011461 echo "$as_me: failed program was:" >&5
11462cat conftest.$ac_ext >&5
11463echo "$as_me:$LINENO: result: no" >&5
11464echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011465 ipv6=no
11466fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011467rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011468fi
11469
11470if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011471 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011472#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011473_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011474
11475fi
11476
Martin v. Löwis11437992002-04-12 09:54:03 +000011477fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011478
11479ipv6type=unknown
11480ipv6lib=none
11481ipv6trylibc=no
11482
11483if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011484 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11485echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011486 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11487 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011488 case $i in
11489 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011490 cat >conftest.$ac_ext <<_ACEOF
11491#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011492#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011493
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011494#include <netinet/in.h>
11495#ifdef IPV6_INRIA_VERSION
11496yes
11497#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011498_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011499if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11500 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011501 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011502fi
11503rm -f conftest*
11504
11505 ;;
11506 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011507 cat >conftest.$ac_ext <<_ACEOF
11508#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011509#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011510
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011511#include <netinet/in.h>
11512#ifdef __KAME__
11513yes
11514#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011515_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011516if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11517 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011518 ipv6type=$i;
11519 ipv6lib=inet6
11520 ipv6libdir=/usr/local/v6/lib
11521 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011522fi
11523rm -f conftest*
11524
11525 ;;
11526 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011527 cat >conftest.$ac_ext <<_ACEOF
11528#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011529#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011530
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011531#include <features.h>
11532#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11533yes
11534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011535_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011536if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11537 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011538 ipv6type=$i;
11539 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011540fi
11541rm -f conftest*
11542
11543 ;;
11544 linux-inet6)
11545 if test -d /usr/inet6; then
11546 ipv6type=$i
11547 ipv6lib=inet6
11548 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011549 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011550 fi
11551 ;;
11552 solaris)
11553 if test -f /etc/netconfig; then
11554 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11555 ipv6type=$i
11556 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011557 fi
11558 fi
11559 ;;
11560 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011561 cat >conftest.$ac_ext <<_ACEOF
11562#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011563#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011564
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011565#include <sys/param.h>
11566#ifdef _TOSHIBA_INET6
11567yes
11568#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011569_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011570if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11571 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011572 ipv6type=$i;
11573 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011574 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011575fi
11576rm -f conftest*
11577
11578 ;;
11579 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011580 cat >conftest.$ac_ext <<_ACEOF
11581#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011582#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011583
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011584#include </usr/local/v6/include/sys/v6config.h>
11585#ifdef __V6D__
11586yes
11587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011588_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011589if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11590 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011591 ipv6type=$i;
11592 ipv6lib=v6;
11593 ipv6libdir=/usr/local/v6/lib;
11594 OPT="-I/usr/local/v6/include $OPT"
11595fi
11596rm -f conftest*
11597
11598 ;;
11599 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011600 cat >conftest.$ac_ext <<_ACEOF
11601#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011602#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011603
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011604#include <sys/param.h>
11605#ifdef _ZETA_MINAMI_INET6
11606yes
11607#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011608_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011609if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11610 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011611 ipv6type=$i;
11612 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011613 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011614fi
11615rm -f conftest*
11616
11617 ;;
11618 esac
11619 if test "$ipv6type" != "unknown"; then
11620 break
11621 fi
11622 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011623 echo "$as_me:$LINENO: result: $ipv6type" >&5
11624echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011625fi
11626
11627if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11628 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11629 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11630 echo "using lib$ipv6lib"
11631 else
11632 if test $ipv6trylibc = "yes"; then
11633 echo "using libc"
11634 else
11635 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11636 echo "You need to fetch lib$ipv6lib.a from appropriate"
11637 echo 'ipv6 kit and compile beforehand.'
11638 exit 1
11639 fi
11640 fi
11641fi
11642
Jack Jansen7b8c7542002-04-14 20:12:41 +000011643# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011644echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11645echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011646
11647# Check whether --with-universal-newlines or --without-universal-newlines was given.
11648if test "${with_universal_newlines+set}" = set; then
11649 withval="$with_universal_newlines"
11650
11651fi;
11652
11653if test -z "$with_universal_newlines"
11654then with_universal_newlines="yes"
11655fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011656if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011657then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011658 echo --without-universal-newlines is unsupported, see README
11659 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011660else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011661
11662cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011663#define WITH_UNIVERSAL_NEWLINES 1
11664_ACEOF
11665
11666fi
11667echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11668echo "${ECHO_T}$with_universal_newlines" >&6
11669
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011670# Check for --with-doc-strings
11671echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11672echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11673
11674# Check whether --with-doc-strings or --without-doc-strings was given.
11675if test "${with_doc_strings+set}" = set; then
11676 withval="$with_doc_strings"
11677
11678fi;
11679
11680if test -z "$with_doc_strings"
11681then with_doc_strings="yes"
11682fi
11683if test "$with_doc_strings" != "no"
11684then
11685
11686cat >>confdefs.h <<\_ACEOF
11687#define WITH_DOC_STRINGS 1
11688_ACEOF
11689
11690fi
11691echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11692echo "${ECHO_T}$with_doc_strings" >&6
11693
Neil Schemenauera35c6882001-02-27 04:45:05 +000011694# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011695echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11696echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11697
Neil Schemenauera35c6882001-02-27 04:45:05 +000011698# Check whether --with-pymalloc or --without-pymalloc was given.
11699if test "${with_pymalloc+set}" = set; then
11700 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011701
Martin v. Löwis11437992002-04-12 09:54:03 +000011702fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011703
Neil Schemenauer16c22972002-03-22 15:34:49 +000011704if test -z "$with_pymalloc"
11705then with_pymalloc="yes"
11706fi
11707if test "$with_pymalloc" != "no"
11708then
Martin v. Löwis11437992002-04-12 09:54:03 +000011709
11710cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011711#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011712_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011713
11714fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011715echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11716echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011717
Barry Warsawef82cd72000-06-30 16:21:01 +000011718# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011719echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11720echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11721
Barry Warsawef82cd72000-06-30 16:21:01 +000011722# Check whether --with-wctype-functions or --without-wctype-functions was given.
11723if test "${with_wctype_functions+set}" = set; then
11724 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011725
Barry Warsawef82cd72000-06-30 16:21:01 +000011726if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011727then
11728
11729cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011730#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011731_ACEOF
11732
11733 echo "$as_me:$LINENO: result: yes" >&5
11734echo "${ECHO_T}yes" >&6
11735else echo "$as_me:$LINENO: result: no" >&5
11736echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011737fi
11738else
Martin v. Löwis11437992002-04-12 09:54:03 +000011739 echo "$as_me:$LINENO: result: no" >&5
11740echo "${ECHO_T}no" >&6
11741fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011742
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011743# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011744
Guido van Rossum98935bf2001-09-05 19:13:16 +000011745DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011746
Martin v. Löwis11437992002-04-12 09:54:03 +000011747echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11748echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11749
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011750# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011751if test "${with_sgi_dl+set}" = set; then
11752 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011753
11754echo "$as_me:$LINENO: result: $withval" >&5
11755echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011756echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011757exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011758
11759cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011760#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011761_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011762
Guido van Rossume97ee181999-12-20 21:27:22 +000011763DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011764dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011765if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011766then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011767else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11768echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11769 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011770fi
11771DLINCLDIR=${dldir}
11772LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011773else
Martin v. Löwis11437992002-04-12 09:54:03 +000011774 echo "$as_me:$LINENO: result: no" >&5
11775echo "${ECHO_T}no" >&6
11776fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011777
Martin v. Löwis11437992002-04-12 09:54:03 +000011778echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11779echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011780
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011781# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011782if test "${with_dl_dld+set}" = set; then
11783 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011784
11785echo "$as_me:$LINENO: result: $withval" >&5
11786echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011787echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011788exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011789
11790cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011791#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011792_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011793
Guido van Rossume97ee181999-12-20 21:27:22 +000011794DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011795dldir=`echo "$withval" | sed 's/,.*//'`
11796dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011797if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011798then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011799else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
11800echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
11801 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011802fi
11803DLINCLDIR=${dldir}
11804LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011805else
Martin v. Löwis11437992002-04-12 09:54:03 +000011806 echo "$as_me:$LINENO: result: no" >&5
11807echo "${ECHO_T}no" >&6
11808fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011809
Guido van Rossume97ee181999-12-20 21:27:22 +000011810# the dlopen() function means we might want to use dynload_shlib.o. some
11811# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011812
Thomas Wouters3a584202000-08-05 23:28:51 +000011813for ac_func in dlopen
11814do
Martin v. Löwis11437992002-04-12 09:54:03 +000011815as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11816echo "$as_me:$LINENO: checking for $ac_func" >&5
11817echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11818if eval "test \"\${$as_ac_var+set}\" = set"; then
11819 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011820else
Martin v. Löwis11437992002-04-12 09:54:03 +000011821 cat >conftest.$ac_ext <<_ACEOF
11822#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011823#include "confdefs.h"
11824/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011825 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011826#include <assert.h>
11827/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011828#ifdef __cplusplus
11829extern "C"
11830#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011831/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011832 builtin and then its argument prototype would still apply. */
11833char $ac_func ();
11834char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011835
Martin v. Löwis11437992002-04-12 09:54:03 +000011836#ifdef F77_DUMMY_MAIN
11837# ifdef __cplusplus
11838 extern "C"
11839# endif
11840 int F77_DUMMY_MAIN() { return 1; }
11841#endif
11842int
11843main ()
11844{
Guido van Rossume97ee181999-12-20 21:27:22 +000011845/* The GNU C library defines this for functions which it implements
11846 to always fail with ENOSYS. Some functions are actually named
11847 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011848#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011849choke me
11850#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011851f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011852#endif
11853
Martin v. Löwis11437992002-04-12 09:54:03 +000011854 ;
11855 return 0;
11856}
11857_ACEOF
11858rm -f conftest.$ac_objext conftest$ac_exeext
11859if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11860 (eval $ac_link) 2>&5
11861 ac_status=$?
11862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11863 (exit $ac_status); } &&
11864 { ac_try='test -s conftest$ac_exeext'
11865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11866 (eval $ac_try) 2>&5
11867 ac_status=$?
11868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11869 (exit $ac_status); }; }; then
11870 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011871else
Martin v. Löwis11437992002-04-12 09:54:03 +000011872 echo "$as_me: failed program was:" >&5
11873cat conftest.$ac_ext >&5
11874eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011875fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011876rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011877fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011878echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11879echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11880if test `eval echo '${'$as_ac_var'}'` = yes; then
11881 cat >>confdefs.h <<_ACEOF
11882#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11883_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011884
Guido van Rossume97ee181999-12-20 21:27:22 +000011885fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011886done
Guido van Rossume97ee181999-12-20 21:27:22 +000011887
Michael W. Hudson54241132001-12-07 15:38:26 +000011888
Guido van Rossume97ee181999-12-20 21:27:22 +000011889# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11890# loading of modules.
11891
Martin v. Löwis11437992002-04-12 09:54:03 +000011892echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11893echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011894if test -z "$DYNLOADFILE"
11895then
11896 case $ac_sys_system/$ac_sys_release in
11897 AIX*) DYNLOADFILE="dynload_aix.o";;
11898 BeOS*) DYNLOADFILE="dynload_beos.o";;
11899 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011900 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011901 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011902 *)
11903 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11904 # out any dynamic loading
11905 if test "$ac_cv_func_dlopen" = yes
11906 then DYNLOADFILE="dynload_shlib.o"
11907 else DYNLOADFILE="dynload_stub.o"
11908 fi
11909 ;;
11910 esac
11911fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011912echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11913echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011914if test "$DYNLOADFILE" != "dynload_stub.o"
11915then
Martin v. Löwis11437992002-04-12 09:54:03 +000011916
11917cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011918#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011919_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011920
11921fi
11922
Neil Schemenauer4e425612001-06-19 15:44:15 +000011923# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11924
Michael W. Hudson54241132001-12-07 15:38:26 +000011925
Martin v. Löwis11437992002-04-12 09:54:03 +000011926echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11927echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011928if test -z "$MACHDEP_OBJS"
11929then
Jack Jansene578a632001-08-15 01:27:14 +000011930 MACHDEP_OBJS=$extra_machdep_objs
11931else
11932 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011933fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011934echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11935echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011936
Guido van Rossum627b2d71993-12-24 10:39:16 +000011937# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
Martin v. Löwis9c36c292002-12-21 18:34:06 +000012011
Martin v. Löwis438b5342002-12-27 10:16:42 +000012012
Martin v. Löwisd5843682002-11-21 20:41:28 +000012013for ac_func in alarm chown clock confstr ctermid execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000012014 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012015 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
12016 getpriority getpwent getwd \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012017 hstrerror inet_pton kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012018 mremap nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000012019 putenv readlink \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012020 select setegid seteuid setgid \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000012021 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012022 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012023 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012024 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012025do
Martin v. Löwis11437992002-04-12 09:54:03 +000012026as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12027echo "$as_me:$LINENO: checking for $ac_func" >&5
12028echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12029if eval "test \"\${$as_ac_var+set}\" = set"; then
12030 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012031else
Martin v. Löwis11437992002-04-12 09:54:03 +000012032 cat >conftest.$ac_ext <<_ACEOF
12033#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012034#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012035/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012036 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012037#include <assert.h>
12038/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012039#ifdef __cplusplus
12040extern "C"
12041#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012042/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012043 builtin and then its argument prototype would still apply. */
12044char $ac_func ();
12045char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012046
Martin v. Löwis11437992002-04-12 09:54:03 +000012047#ifdef F77_DUMMY_MAIN
12048# ifdef __cplusplus
12049 extern "C"
12050# endif
12051 int F77_DUMMY_MAIN() { return 1; }
12052#endif
12053int
12054main ()
12055{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012056/* The GNU C library defines this for functions which it implements
12057 to always fail with ENOSYS. Some functions are actually named
12058 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012059#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012060choke me
12061#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012062f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012063#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012064
Martin v. Löwis11437992002-04-12 09:54:03 +000012065 ;
12066 return 0;
12067}
12068_ACEOF
12069rm -f conftest.$ac_objext conftest$ac_exeext
12070if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12071 (eval $ac_link) 2>&5
12072 ac_status=$?
12073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12074 (exit $ac_status); } &&
12075 { ac_try='test -s conftest$ac_exeext'
12076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12077 (eval $ac_try) 2>&5
12078 ac_status=$?
12079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12080 (exit $ac_status); }; }; then
12081 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012082else
Martin v. Löwis11437992002-04-12 09:54:03 +000012083 echo "$as_me: failed program was:" >&5
12084cat conftest.$ac_ext >&5
12085eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012086fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012087rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012088fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012089echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12090echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12091if test `eval echo '${'$as_ac_var'}'` = yes; then
12092 cat >>confdefs.h <<_ACEOF
12093#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12094_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012095
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012096fi
12097done
12098
Michael W. Hudson54241132001-12-07 15:38:26 +000012099
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012100# For some functions, having a definition is not sufficient, since
12101# we want to take their address.
12102echo "$as_me:$LINENO: checking for chroot" >&5
12103echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12104cat >conftest.$ac_ext <<_ACEOF
12105#line $LINENO "configure"
12106#include "confdefs.h"
12107#include <unistd.h>
12108#ifdef F77_DUMMY_MAIN
12109# ifdef __cplusplus
12110 extern "C"
12111# endif
12112 int F77_DUMMY_MAIN() { return 1; }
12113#endif
12114int
12115main ()
12116{
12117void *x=chroot
12118 ;
12119 return 0;
12120}
12121_ACEOF
12122rm -f conftest.$ac_objext
12123if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12124 (eval $ac_compile) 2>&5
12125 ac_status=$?
12126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12127 (exit $ac_status); } &&
12128 { ac_try='test -s conftest.$ac_objext'
12129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12130 (eval $ac_try) 2>&5
12131 ac_status=$?
12132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12133 (exit $ac_status); }; }; then
12134
12135cat >>confdefs.h <<\_ACEOF
12136#define HAVE_CHROOT 1
12137_ACEOF
12138
12139 echo "$as_me:$LINENO: result: yes" >&5
12140echo "${ECHO_T}yes" >&6
12141else
12142 echo "$as_me: failed program was:" >&5
12143cat conftest.$ac_ext >&5
12144echo "$as_me:$LINENO: result: no" >&5
12145echo "${ECHO_T}no" >&6
12146
12147fi
12148rm -f conftest.$ac_objext conftest.$ac_ext
12149echo "$as_me:$LINENO: checking for link" >&5
12150echo $ECHO_N "checking for link... $ECHO_C" >&6
12151cat >conftest.$ac_ext <<_ACEOF
12152#line $LINENO "configure"
12153#include "confdefs.h"
12154#include <unistd.h>
12155#ifdef F77_DUMMY_MAIN
12156# ifdef __cplusplus
12157 extern "C"
12158# endif
12159 int F77_DUMMY_MAIN() { return 1; }
12160#endif
12161int
12162main ()
12163{
12164void *x=link
12165 ;
12166 return 0;
12167}
12168_ACEOF
12169rm -f conftest.$ac_objext
12170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12171 (eval $ac_compile) 2>&5
12172 ac_status=$?
12173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12174 (exit $ac_status); } &&
12175 { ac_try='test -s conftest.$ac_objext'
12176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12177 (eval $ac_try) 2>&5
12178 ac_status=$?
12179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12180 (exit $ac_status); }; }; then
12181
12182cat >>confdefs.h <<\_ACEOF
12183#define HAVE_LINK 1
12184_ACEOF
12185
12186 echo "$as_me:$LINENO: result: yes" >&5
12187echo "${ECHO_T}yes" >&6
12188else
12189 echo "$as_me: failed program was:" >&5
12190cat conftest.$ac_ext >&5
12191echo "$as_me:$LINENO: result: no" >&5
12192echo "${ECHO_T}no" >&6
12193
12194fi
12195rm -f conftest.$ac_objext conftest.$ac_ext
12196echo "$as_me:$LINENO: checking for symlink" >&5
12197echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12198cat >conftest.$ac_ext <<_ACEOF
12199#line $LINENO "configure"
12200#include "confdefs.h"
12201#include <unistd.h>
12202#ifdef F77_DUMMY_MAIN
12203# ifdef __cplusplus
12204 extern "C"
12205# endif
12206 int F77_DUMMY_MAIN() { return 1; }
12207#endif
12208int
12209main ()
12210{
12211void *x=symlink
12212 ;
12213 return 0;
12214}
12215_ACEOF
12216rm -f conftest.$ac_objext
12217if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12218 (eval $ac_compile) 2>&5
12219 ac_status=$?
12220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12221 (exit $ac_status); } &&
12222 { ac_try='test -s conftest.$ac_objext'
12223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12224 (eval $ac_try) 2>&5
12225 ac_status=$?
12226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12227 (exit $ac_status); }; }; then
12228
12229cat >>confdefs.h <<\_ACEOF
12230#define HAVE_SYMLINK 1
12231_ACEOF
12232
12233 echo "$as_me:$LINENO: result: yes" >&5
12234echo "${ECHO_T}yes" >&6
12235else
12236 echo "$as_me: failed program was:" >&5
12237cat conftest.$ac_ext >&5
12238echo "$as_me:$LINENO: result: no" >&5
12239echo "${ECHO_T}no" >&6
12240
12241fi
12242rm -f conftest.$ac_objext conftest.$ac_ext
12243
Martin v. Löwisd5843682002-11-21 20:41:28 +000012244# On some systems (eg. FreeBSD 5), we would find a definition of the
12245# functions ctermid_r, setgroups in the library, but no prototype
12246# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12247# address to avoid compiler warnings and potential miscompilations
12248# because of the missing prototypes.
12249
12250echo "$as_me:$LINENO: checking for ctermid_r" >&5
12251echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12252cat >conftest.$ac_ext <<_ACEOF
12253#line $LINENO "configure"
12254#include "confdefs.h"
12255
12256#include "confdefs.h"
12257#include <stdio.h>
12258
12259#ifdef F77_DUMMY_MAIN
12260# ifdef __cplusplus
12261 extern "C"
12262# endif
12263 int F77_DUMMY_MAIN() { return 1; }
12264#endif
12265int
12266main ()
12267{
12268void* p = ctermid_r
12269 ;
12270 return 0;
12271}
12272_ACEOF
12273rm -f conftest.$ac_objext
12274if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12275 (eval $ac_compile) 2>&5
12276 ac_status=$?
12277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12278 (exit $ac_status); } &&
12279 { ac_try='test -s conftest.$ac_objext'
12280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12281 (eval $ac_try) 2>&5
12282 ac_status=$?
12283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12284 (exit $ac_status); }; }; then
12285
12286cat >>confdefs.h <<\_ACEOF
12287#define HAVE_CTERMID_R 1
12288_ACEOF
12289
12290 echo "$as_me:$LINENO: result: yes" >&5
12291echo "${ECHO_T}yes" >&6
12292else
12293 echo "$as_me: failed program was:" >&5
12294cat conftest.$ac_ext >&5
12295echo "$as_me:$LINENO: result: no" >&5
12296echo "${ECHO_T}no" >&6
12297
12298fi
12299rm -f conftest.$ac_objext conftest.$ac_ext
12300
12301echo "$as_me:$LINENO: checking for setgroups" >&5
12302echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
12303cat >conftest.$ac_ext <<_ACEOF
12304#line $LINENO "configure"
12305#include "confdefs.h"
12306
12307#include "confdefs.h"
12308#include <unistd.h.h>
12309
12310#ifdef F77_DUMMY_MAIN
12311# ifdef __cplusplus
12312 extern "C"
12313# endif
12314 int F77_DUMMY_MAIN() { return 1; }
12315#endif
12316int
12317main ()
12318{
12319void* p = setgroups
12320 ;
12321 return 0;
12322}
12323_ACEOF
12324rm -f conftest.$ac_objext
12325if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12326 (eval $ac_compile) 2>&5
12327 ac_status=$?
12328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12329 (exit $ac_status); } &&
12330 { ac_try='test -s conftest.$ac_objext'
12331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12332 (eval $ac_try) 2>&5
12333 ac_status=$?
12334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12335 (exit $ac_status); }; }; then
12336
12337cat >>confdefs.h <<\_ACEOF
12338#define HAVE_SETGROUPS 1
12339_ACEOF
12340
12341 echo "$as_me:$LINENO: result: yes" >&5
12342echo "${ECHO_T}yes" >&6
12343else
12344 echo "$as_me: failed program was:" >&5
12345cat conftest.$ac_ext >&5
12346echo "$as_me:$LINENO: result: no" >&5
12347echo "${ECHO_T}no" >&6
12348
12349fi
12350rm -f conftest.$ac_objext conftest.$ac_ext
12351
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012352# check for openpty and forkpty
12353
Martin v. Löwis11437992002-04-12 09:54:03 +000012354
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012355for ac_func in openpty
12356do
Martin v. Löwis11437992002-04-12 09:54:03 +000012357as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12358echo "$as_me:$LINENO: checking for $ac_func" >&5
12359echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12360if eval "test \"\${$as_ac_var+set}\" = set"; then
12361 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012362else
Martin v. Löwis11437992002-04-12 09:54:03 +000012363 cat >conftest.$ac_ext <<_ACEOF
12364#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012365#include "confdefs.h"
12366/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012367 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012368#include <assert.h>
12369/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012370#ifdef __cplusplus
12371extern "C"
12372#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012373/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012374 builtin and then its argument prototype would still apply. */
12375char $ac_func ();
12376char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012377
Martin v. Löwis11437992002-04-12 09:54:03 +000012378#ifdef F77_DUMMY_MAIN
12379# ifdef __cplusplus
12380 extern "C"
12381# endif
12382 int F77_DUMMY_MAIN() { return 1; }
12383#endif
12384int
12385main ()
12386{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012387/* The GNU C library defines this for functions which it implements
12388 to always fail with ENOSYS. Some functions are actually named
12389 something starting with __ and the normal name is an alias. */
12390#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12391choke me
12392#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012393f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012394#endif
12395
Martin v. Löwis11437992002-04-12 09:54:03 +000012396 ;
12397 return 0;
12398}
12399_ACEOF
12400rm -f conftest.$ac_objext conftest$ac_exeext
12401if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12402 (eval $ac_link) 2>&5
12403 ac_status=$?
12404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12405 (exit $ac_status); } &&
12406 { ac_try='test -s conftest$ac_exeext'
12407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12408 (eval $ac_try) 2>&5
12409 ac_status=$?
12410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12411 (exit $ac_status); }; }; then
12412 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012413else
Martin v. Löwis11437992002-04-12 09:54:03 +000012414 echo "$as_me: failed program was:" >&5
12415cat conftest.$ac_ext >&5
12416eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012417fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012418rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012419fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012420echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12421echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12422if test `eval echo '${'$as_ac_var'}'` = yes; then
12423 cat >>confdefs.h <<_ACEOF
12424#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12425_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012426
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012427else
Martin v. Löwis11437992002-04-12 09:54:03 +000012428 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
12429echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
12430if test "${ac_cv_lib_util_openpty+set}" = set; then
12431 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012432else
Martin v. Löwis11437992002-04-12 09:54:03 +000012433 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012434LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012435cat >conftest.$ac_ext <<_ACEOF
12436#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012437#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012438
Fred Drake8cef4cf2000-06-28 16:40:38 +000012439/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012440#ifdef __cplusplus
12441extern "C"
12442#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012443/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012444 builtin and then its argument prototype would still apply. */
12445char openpty ();
12446#ifdef F77_DUMMY_MAIN
12447# ifdef __cplusplus
12448 extern "C"
12449# endif
12450 int F77_DUMMY_MAIN() { return 1; }
12451#endif
12452int
12453main ()
12454{
12455openpty ();
12456 ;
12457 return 0;
12458}
12459_ACEOF
12460rm -f conftest.$ac_objext conftest$ac_exeext
12461if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12462 (eval $ac_link) 2>&5
12463 ac_status=$?
12464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12465 (exit $ac_status); } &&
12466 { ac_try='test -s conftest$ac_exeext'
12467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12468 (eval $ac_try) 2>&5
12469 ac_status=$?
12470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12471 (exit $ac_status); }; }; then
12472 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012473else
Martin v. Löwis11437992002-04-12 09:54:03 +000012474 echo "$as_me: failed program was:" >&5
12475cat conftest.$ac_ext >&5
12476ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012477fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012478rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12479LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012480fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012481echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
12482echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
12483if test $ac_cv_lib_util_openpty = yes; then
12484 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012485#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012486_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012487 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012488fi
12489
12490fi
12491done
12492
Martin v. Löwis11437992002-04-12 09:54:03 +000012493
Fred Drake8cef4cf2000-06-28 16:40:38 +000012494for ac_func in forkpty
12495do
Martin v. Löwis11437992002-04-12 09:54:03 +000012496as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12497echo "$as_me:$LINENO: checking for $ac_func" >&5
12498echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12499if eval "test \"\${$as_ac_var+set}\" = set"; then
12500 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012501else
Martin v. Löwis11437992002-04-12 09:54:03 +000012502 cat >conftest.$ac_ext <<_ACEOF
12503#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012504#include "confdefs.h"
12505/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012506 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000012507#include <assert.h>
12508/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012509#ifdef __cplusplus
12510extern "C"
12511#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012512/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012513 builtin and then its argument prototype would still apply. */
12514char $ac_func ();
12515char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000012516
Martin v. Löwis11437992002-04-12 09:54:03 +000012517#ifdef F77_DUMMY_MAIN
12518# ifdef __cplusplus
12519 extern "C"
12520# endif
12521 int F77_DUMMY_MAIN() { return 1; }
12522#endif
12523int
12524main ()
12525{
Fred Drake8cef4cf2000-06-28 16:40:38 +000012526/* The GNU C library defines this for functions which it implements
12527 to always fail with ENOSYS. Some functions are actually named
12528 something starting with __ and the normal name is an alias. */
12529#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12530choke me
12531#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012532f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000012533#endif
12534
Martin v. Löwis11437992002-04-12 09:54:03 +000012535 ;
12536 return 0;
12537}
12538_ACEOF
12539rm -f conftest.$ac_objext conftest$ac_exeext
12540if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12541 (eval $ac_link) 2>&5
12542 ac_status=$?
12543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12544 (exit $ac_status); } &&
12545 { ac_try='test -s conftest$ac_exeext'
12546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12547 (eval $ac_try) 2>&5
12548 ac_status=$?
12549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12550 (exit $ac_status); }; }; then
12551 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012552else
Martin v. Löwis11437992002-04-12 09:54:03 +000012553 echo "$as_me: failed program was:" >&5
12554cat conftest.$ac_ext >&5
12555eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012556fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012557rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012558fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012559echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12560echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12561if test `eval echo '${'$as_ac_var'}'` = yes; then
12562 cat >>confdefs.h <<_ACEOF
12563#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12564_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012565
Fred Drake8cef4cf2000-06-28 16:40:38 +000012566else
Martin v. Löwis11437992002-04-12 09:54:03 +000012567 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
12568echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
12569if test "${ac_cv_lib_util_forkpty+set}" = set; then
12570 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012571else
Martin v. Löwis11437992002-04-12 09:54:03 +000012572 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012573LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012574cat >conftest.$ac_ext <<_ACEOF
12575#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012576#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012577
Fred Drake8cef4cf2000-06-28 16:40:38 +000012578/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012579#ifdef __cplusplus
12580extern "C"
12581#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012582/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012583 builtin and then its argument prototype would still apply. */
12584char forkpty ();
12585#ifdef F77_DUMMY_MAIN
12586# ifdef __cplusplus
12587 extern "C"
12588# endif
12589 int F77_DUMMY_MAIN() { return 1; }
12590#endif
12591int
12592main ()
12593{
12594forkpty ();
12595 ;
12596 return 0;
12597}
12598_ACEOF
12599rm -f conftest.$ac_objext conftest$ac_exeext
12600if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12601 (eval $ac_link) 2>&5
12602 ac_status=$?
12603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12604 (exit $ac_status); } &&
12605 { ac_try='test -s conftest$ac_exeext'
12606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12607 (eval $ac_try) 2>&5
12608 ac_status=$?
12609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12610 (exit $ac_status); }; }; then
12611 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012612else
Martin v. Löwis11437992002-04-12 09:54:03 +000012613 echo "$as_me: failed program was:" >&5
12614cat conftest.$ac_ext >&5
12615ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012616fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012617rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12618LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012619fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012620echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
12621echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
12622if test $ac_cv_lib_util_forkpty = yes; then
12623 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012624#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012625_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012626 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012627fi
12628
12629fi
12630done
12631
Jack Jansendd19cf82001-12-06 22:36:17 +000012632
Michael W. Hudson54241132001-12-07 15:38:26 +000012633# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012634
12635
12636
12637
12638
12639
Fred Drake8cef4cf2000-06-28 16:40:38 +000012640for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
12641do
Martin v. Löwis11437992002-04-12 09:54:03 +000012642as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12643echo "$as_me:$LINENO: checking for $ac_func" >&5
12644echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12645if eval "test \"\${$as_ac_var+set}\" = set"; then
12646 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012647else
Martin v. Löwis11437992002-04-12 09:54:03 +000012648 cat >conftest.$ac_ext <<_ACEOF
12649#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012650#include "confdefs.h"
12651/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012652 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012653#include <assert.h>
12654/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012655#ifdef __cplusplus
12656extern "C"
12657#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012658/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012659 builtin and then its argument prototype would still apply. */
12660char $ac_func ();
12661char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012662
Martin v. Löwis11437992002-04-12 09:54:03 +000012663#ifdef F77_DUMMY_MAIN
12664# ifdef __cplusplus
12665 extern "C"
12666# endif
12667 int F77_DUMMY_MAIN() { return 1; }
12668#endif
12669int
12670main ()
12671{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012672/* The GNU C library defines this for functions which it implements
12673 to always fail with ENOSYS. Some functions are actually named
12674 something starting with __ and the normal name is an alias. */
12675#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12676choke me
12677#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012678f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012679#endif
12680
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 ;
12682 return 0;
12683}
12684_ACEOF
12685rm -f conftest.$ac_objext conftest$ac_exeext
12686if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12687 (eval $ac_link) 2>&5
12688 ac_status=$?
12689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12690 (exit $ac_status); } &&
12691 { ac_try='test -s conftest$ac_exeext'
12692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12693 (eval $ac_try) 2>&5
12694 ac_status=$?
12695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12696 (exit $ac_status); }; }; then
12697 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012698else
Martin v. Löwis11437992002-04-12 09:54:03 +000012699 echo "$as_me: failed program was:" >&5
12700cat conftest.$ac_ext >&5
12701eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012702fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012703rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012704fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012705echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12706echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12707if test `eval echo '${'$as_ac_var'}'` = yes; then
12708 cat >>confdefs.h <<_ACEOF
12709#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12710_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012711
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012712fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012713done
12714
Michael W. Hudson54241132001-12-07 15:38:26 +000012715
Martin v. Löwis11437992002-04-12 09:54:03 +000012716
12717
12718
12719
12720
Martin v. Löwis1142de32002-03-29 16:28:31 +000012721for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000012722do
Martin v. Löwis11437992002-04-12 09:54:03 +000012723as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12724echo "$as_me:$LINENO: checking for $ac_func" >&5
12725echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12726if eval "test \"\${$as_ac_var+set}\" = set"; then
12727 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012728else
Martin v. Löwis11437992002-04-12 09:54:03 +000012729 cat >conftest.$ac_ext <<_ACEOF
12730#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012731#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012732/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012733 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012734#include <assert.h>
12735/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012736#ifdef __cplusplus
12737extern "C"
12738#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012739/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012740 builtin and then its argument prototype would still apply. */
12741char $ac_func ();
12742char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012743
Martin v. Löwis11437992002-04-12 09:54:03 +000012744#ifdef F77_DUMMY_MAIN
12745# ifdef __cplusplus
12746 extern "C"
12747# endif
12748 int F77_DUMMY_MAIN() { return 1; }
12749#endif
12750int
12751main ()
12752{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012753/* The GNU C library defines this for functions which it implements
12754 to always fail with ENOSYS. Some functions are actually named
12755 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012756#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012757choke me
12758#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012759f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012760#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012761
Martin v. Löwis11437992002-04-12 09:54:03 +000012762 ;
12763 return 0;
12764}
12765_ACEOF
12766rm -f conftest.$ac_objext conftest$ac_exeext
12767if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12768 (eval $ac_link) 2>&5
12769 ac_status=$?
12770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12771 (exit $ac_status); } &&
12772 { ac_try='test -s conftest$ac_exeext'
12773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12774 (eval $ac_try) 2>&5
12775 ac_status=$?
12776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12777 (exit $ac_status); }; }; then
12778 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012779else
Martin v. Löwis11437992002-04-12 09:54:03 +000012780 echo "$as_me: failed program was:" >&5
12781cat conftest.$ac_ext >&5
12782eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012783fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012784rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000012785fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012786echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12787echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12788if test `eval echo '${'$as_ac_var'}'` = yes; then
12789 cat >>confdefs.h <<_ACEOF
12790#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12791_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000012792
Martin v. Löwis1142de32002-03-29 16:28:31 +000012793else
Martin v. Löwis11437992002-04-12 09:54:03 +000012794 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012795fi
12796done
12797
12798
Martin v. Löwis11437992002-04-12 09:54:03 +000012799
Martin v. Löwis1142de32002-03-29 16:28:31 +000012800for ac_func in getpgrp
12801do
Martin v. Löwis11437992002-04-12 09:54:03 +000012802as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12803echo "$as_me:$LINENO: checking for $ac_func" >&5
12804echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12805if eval "test \"\${$as_ac_var+set}\" = set"; then
12806 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000012807else
Martin v. Löwis11437992002-04-12 09:54:03 +000012808 cat >conftest.$ac_ext <<_ACEOF
12809#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012810#include "confdefs.h"
12811/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012812 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000012813#include <assert.h>
12814/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012815#ifdef __cplusplus
12816extern "C"
12817#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012818/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012819 builtin and then its argument prototype would still apply. */
12820char $ac_func ();
12821char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012822
Martin v. Löwis11437992002-04-12 09:54:03 +000012823#ifdef F77_DUMMY_MAIN
12824# ifdef __cplusplus
12825 extern "C"
12826# endif
12827 int F77_DUMMY_MAIN() { return 1; }
12828#endif
12829int
12830main ()
12831{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012832/* The GNU C library defines this for functions which it implements
12833 to always fail with ENOSYS. Some functions are actually named
12834 something starting with __ and the normal name is an alias. */
12835#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12836choke me
12837#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012838f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012839#endif
12840
Martin v. Löwis11437992002-04-12 09:54:03 +000012841 ;
12842 return 0;
12843}
12844_ACEOF
12845rm -f conftest.$ac_objext conftest$ac_exeext
12846if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12847 (eval $ac_link) 2>&5
12848 ac_status=$?
12849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12850 (exit $ac_status); } &&
12851 { ac_try='test -s conftest$ac_exeext'
12852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12853 (eval $ac_try) 2>&5
12854 ac_status=$?
12855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12856 (exit $ac_status); }; }; then
12857 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012858else
Martin v. Löwis11437992002-04-12 09:54:03 +000012859 echo "$as_me: failed program was:" >&5
12860cat conftest.$ac_ext >&5
12861eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012862fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012863rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012864fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012865echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12866echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12867if test `eval echo '${'$as_ac_var'}'` = yes; then
12868 cat >>confdefs.h <<_ACEOF
12869#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12870_ACEOF
12871 cat >conftest.$ac_ext <<_ACEOF
12872#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012873#include "confdefs.h"
12874#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012875#ifdef F77_DUMMY_MAIN
12876# ifdef __cplusplus
12877 extern "C"
12878# endif
12879 int F77_DUMMY_MAIN() { return 1; }
12880#endif
12881int
12882main ()
12883{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012884getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012885 ;
12886 return 0;
12887}
12888_ACEOF
12889rm -f conftest.$ac_objext
12890if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12891 (eval $ac_compile) 2>&5
12892 ac_status=$?
12893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12894 (exit $ac_status); } &&
12895 { ac_try='test -s conftest.$ac_objext'
12896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12897 (eval $ac_try) 2>&5
12898 ac_status=$?
12899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12900 (exit $ac_status); }; }; then
12901
12902cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012903#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012904_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012905
Martin v. Löwis11437992002-04-12 09:54:03 +000012906
Guido van Rossumf78abae1997-01-21 22:02:36 +000012907else
Martin v. Löwis11437992002-04-12 09:54:03 +000012908 echo "$as_me: failed program was:" >&5
12909cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012910fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012911rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012912
Guido van Rossum627b2d71993-12-24 10:39:16 +000012913fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012914done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012915
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012916echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12917echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12918if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012919 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012920else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012921 if test "$cross_compiling" = yes; then
12922 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12923echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12924 { (exit 1); exit 1; }; }
12925else
Martin v. Löwis11437992002-04-12 09:54:03 +000012926 cat >conftest.$ac_ext <<_ACEOF
12927#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012928#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012929#if HAVE_UNISTD_H
12930# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012931#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012932
Martin v. Löwis11437992002-04-12 09:54:03 +000012933#ifdef F77_DUMMY_MAIN
12934# ifdef __cplusplus
12935 extern "C"
12936# endif
12937 int F77_DUMMY_MAIN() { return 1; }
12938#endif
12939int
12940main ()
12941{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012942/* If this system has a BSD-style setpgrp which takes arguments,
12943 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12944 exit successfully. */
12945 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012946 ;
12947 return 0;
12948}
12949_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012950rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012951if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12952 (eval $ac_link) 2>&5
12953 ac_status=$?
12954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012955 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12957 (eval $ac_try) 2>&5
12958 ac_status=$?
12959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12960 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012961 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012962else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012963 echo "$as_me: program exited with status $ac_status" >&5
12964echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012965cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012966( exit $ac_status )
12967ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012968fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012969rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012970fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012971fi
12972echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12973echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12974if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012975
12976cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012977#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012978_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012979
12980fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012981
Martin v. Löwis11437992002-04-12 09:54:03 +000012982
Thomas Wouters3a584202000-08-05 23:28:51 +000012983for ac_func in gettimeofday
12984do
Martin v. Löwis11437992002-04-12 09:54:03 +000012985as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12986echo "$as_me:$LINENO: checking for $ac_func" >&5
12987echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12988if eval "test \"\${$as_ac_var+set}\" = set"; then
12989 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012990else
Martin v. Löwis11437992002-04-12 09:54:03 +000012991 cat >conftest.$ac_ext <<_ACEOF
12992#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012993#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012994/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012995 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012996#include <assert.h>
12997/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012998#ifdef __cplusplus
12999extern "C"
13000#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013001/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013002 builtin and then its argument prototype would still apply. */
13003char $ac_func ();
13004char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013005
Martin v. Löwis11437992002-04-12 09:54:03 +000013006#ifdef F77_DUMMY_MAIN
13007# ifdef __cplusplus
13008 extern "C"
13009# endif
13010 int F77_DUMMY_MAIN() { return 1; }
13011#endif
13012int
13013main ()
13014{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013015/* The GNU C library defines this for functions which it implements
13016 to always fail with ENOSYS. Some functions are actually named
13017 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013018#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013019choke me
13020#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013021f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013022#endif
13023
Martin v. Löwis11437992002-04-12 09:54:03 +000013024 ;
13025 return 0;
13026}
13027_ACEOF
13028rm -f conftest.$ac_objext conftest$ac_exeext
13029if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13030 (eval $ac_link) 2>&5
13031 ac_status=$?
13032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13033 (exit $ac_status); } &&
13034 { ac_try='test -s conftest$ac_exeext'
13035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13036 (eval $ac_try) 2>&5
13037 ac_status=$?
13038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13039 (exit $ac_status); }; }; then
13040 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013041else
Martin v. Löwis11437992002-04-12 09:54:03 +000013042 echo "$as_me: failed program was:" >&5
13043cat conftest.$ac_ext >&5
13044eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013045fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013046rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013047fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013048echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13049echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13050if test `eval echo '${'$as_ac_var'}'` = yes; then
13051 cat >>confdefs.h <<_ACEOF
13052#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13053_ACEOF
13054 cat >conftest.$ac_ext <<_ACEOF
13055#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013056#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013057#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013058#ifdef F77_DUMMY_MAIN
13059# ifdef __cplusplus
13060 extern "C"
13061# endif
13062 int F77_DUMMY_MAIN() { return 1; }
13063#endif
13064int
13065main ()
13066{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013067gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013068 ;
13069 return 0;
13070}
13071_ACEOF
13072rm -f conftest.$ac_objext
13073if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13074 (eval $ac_compile) 2>&5
13075 ac_status=$?
13076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13077 (exit $ac_status); } &&
13078 { ac_try='test -s conftest.$ac_objext'
13079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13080 (eval $ac_try) 2>&5
13081 ac_status=$?
13082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13083 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013084 :
13085else
Martin v. Löwis11437992002-04-12 09:54:03 +000013086 echo "$as_me: failed program was:" >&5
13087cat conftest.$ac_ext >&5
13088
13089cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013090#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013091_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013092
Martin v. Löwis11437992002-04-12 09:54:03 +000013093
Guido van Rossum627b2d71993-12-24 10:39:16 +000013094fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013095rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013096
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013097fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013098done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013099
Michael W. Hudson54241132001-12-07 15:38:26 +000013100
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013101echo "$as_me:$LINENO: checking for major" >&5
13102echo $ECHO_N "checking for major... $ECHO_C" >&6
13103cat >conftest.$ac_ext <<_ACEOF
13104#line $LINENO "configure"
13105#include "confdefs.h"
13106
13107 #if defined(MAJOR_IN_MKDEV)
13108 #include <sys/mkdev.h>
13109 #elif defined(MAJOR_IN_SYSMACROS)
13110 #include <sys/sysmacros.h>
13111 #else
13112 #include <sys/types.h>
13113 #endif
13114
13115#ifdef F77_DUMMY_MAIN
13116# ifdef __cplusplus
13117 extern "C"
13118# endif
13119 int F77_DUMMY_MAIN() { return 1; }
13120#endif
13121int
13122main ()
13123{
13124
13125 makedev(major(0),minor(0));
13126
13127 ;
13128 return 0;
13129}
13130_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013131rm -f conftest.$ac_objext conftest$ac_exeext
13132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13133 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013134 ac_status=$?
13135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13136 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013137 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13139 (eval $ac_try) 2>&5
13140 ac_status=$?
13141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13142 (exit $ac_status); }; }; then
13143
13144
13145cat >>confdefs.h <<\_ACEOF
13146#define HAVE_DEVICE_MACROS 1
13147_ACEOF
13148
13149 echo "$as_me:$LINENO: result: yes" >&5
13150echo "${ECHO_T}yes" >&6
13151
13152else
13153 echo "$as_me: failed program was:" >&5
13154cat conftest.$ac_ext >&5
13155
13156 echo "$as_me:$LINENO: result: no" >&5
13157echo "${ECHO_T}no" >&6
13158
13159fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013160rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013161
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013162# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013163# for [no]getaddrinfo in netdb.h.
13164echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13165echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13166cat >conftest.$ac_ext <<_ACEOF
13167#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013168#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013169
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013170#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013171#include <sys/socket.h>
13172#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013173#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013174
Martin v. Löwis11437992002-04-12 09:54:03 +000013175#ifdef F77_DUMMY_MAIN
13176# ifdef __cplusplus
13177 extern "C"
13178# endif
13179 int F77_DUMMY_MAIN() { return 1; }
13180#endif
13181int
13182main ()
13183{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013184
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013185getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013186
Martin v. Löwis11437992002-04-12 09:54:03 +000013187 ;
13188 return 0;
13189}
13190_ACEOF
13191rm -f conftest.$ac_objext conftest$ac_exeext
13192if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13193 (eval $ac_link) 2>&5
13194 ac_status=$?
13195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13196 (exit $ac_status); } &&
13197 { ac_try='test -s conftest$ac_exeext'
13198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13199 (eval $ac_try) 2>&5
13200 ac_status=$?
13201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13202 (exit $ac_status); }; }; then
13203
13204echo "$as_me:$LINENO: result: yes" >&5
13205echo "${ECHO_T}yes" >&6
13206echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13207echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013208if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013209 echo "$as_me:$LINENO: result: buggy" >&5
13210echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013211buggygetaddrinfo=yes
13212else
Martin v. Löwis11437992002-04-12 09:54:03 +000013213 cat >conftest.$ac_ext <<_ACEOF
13214#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013215#include "confdefs.h"
13216
13217#include <sys/types.h>
13218#include <netdb.h>
13219#include <string.h>
13220#include <sys/socket.h>
13221#include <netinet/in.h>
13222
13223main()
13224{
13225 int passive, gaierr, inet4 = 0, inet6 = 0;
13226 struct addrinfo hints, *ai, *aitop;
13227 char straddr[INET6_ADDRSTRLEN], strport[16];
13228
13229 for (passive = 0; passive <= 1; passive++) {
13230 memset(&hints, 0, sizeof(hints));
13231 hints.ai_family = AF_UNSPEC;
13232 hints.ai_flags = passive ? AI_PASSIVE : 0;
13233 hints.ai_socktype = SOCK_STREAM;
13234 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13235 (void)gai_strerror(gaierr);
13236 goto bad;
13237 }
13238 for (ai = aitop; ai; ai = ai->ai_next) {
13239 if (ai->ai_addr == NULL ||
13240 ai->ai_addrlen == 0 ||
13241 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13242 straddr, sizeof(straddr), strport, sizeof(strport),
13243 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13244 goto bad;
13245 }
13246 switch (ai->ai_family) {
13247 case AF_INET:
13248 if (strcmp(strport, "54321") != 0) {
13249 goto bad;
13250 }
13251 if (passive) {
13252 if (strcmp(straddr, "0.0.0.0") != 0) {
13253 goto bad;
13254 }
13255 } else {
13256 if (strcmp(straddr, "127.0.0.1") != 0) {
13257 goto bad;
13258 }
13259 }
13260 inet4++;
13261 break;
13262 case AF_INET6:
13263 if (strcmp(strport, "54321") != 0) {
13264 goto bad;
13265 }
13266 if (passive) {
13267 if (strcmp(straddr, "::") != 0) {
13268 goto bad;
13269 }
13270 } else {
13271 if (strcmp(straddr, "::1") != 0) {
13272 goto bad;
13273 }
13274 }
13275 inet6++;
13276 break;
13277 case AF_UNSPEC:
13278 goto bad;
13279 break;
13280 default:
13281 /* another family support? */
13282 break;
13283 }
13284 }
13285 }
13286
13287 if (!(inet4 == 0 || inet4 == 2))
13288 goto bad;
13289 if (!(inet6 == 0 || inet6 == 2))
13290 goto bad;
13291
13292 if (aitop)
13293 freeaddrinfo(aitop);
13294 exit(0);
13295
13296 bad:
13297 if (aitop)
13298 freeaddrinfo(aitop);
13299 exit(1);
13300}
13301
Martin v. Löwis11437992002-04-12 09:54:03 +000013302_ACEOF
13303rm -f conftest$ac_exeext
13304if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13305 (eval $ac_link) 2>&5
13306 ac_status=$?
13307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13308 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13310 (eval $ac_try) 2>&5
13311 ac_status=$?
13312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13313 (exit $ac_status); }; }; then
13314 echo "$as_me:$LINENO: result: good" >&5
13315echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013316buggygetaddrinfo=no
13317else
Martin v. Löwis11437992002-04-12 09:54:03 +000013318 echo "$as_me: program exited with status $ac_status" >&5
13319echo "$as_me: failed program was:" >&5
13320cat conftest.$ac_ext >&5
13321( exit $ac_status )
13322echo "$as_me:$LINENO: result: buggy" >&5
13323echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013324buggygetaddrinfo=yes
13325fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013326rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013327fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013328else
Martin v. Löwis11437992002-04-12 09:54:03 +000013329 echo "$as_me: failed program was:" >&5
13330cat conftest.$ac_ext >&5
13331
13332echo "$as_me:$LINENO: result: no" >&5
13333echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013334buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013335
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013336fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013337rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013338
13339if test "$buggygetaddrinfo" = "yes"; then
13340 if test "$ipv6" = "yes"; then
13341 echo 'Fatal: You must get working getaddrinfo() function.'
13342 echo ' or you can specify "--disable-ipv6"'.
13343 exit 1
13344 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013345else
Martin v. Löwis11437992002-04-12 09:54:03 +000013346
13347cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013348#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013349_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013350
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013351fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013352
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013353for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013354do
Martin v. Löwis11437992002-04-12 09:54:03 +000013355as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13356echo "$as_me:$LINENO: checking for $ac_func" >&5
13357echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13358if eval "test \"\${$as_ac_var+set}\" = set"; then
13359 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013360else
Martin v. Löwis11437992002-04-12 09:54:03 +000013361 cat >conftest.$ac_ext <<_ACEOF
13362#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013363#include "confdefs.h"
13364/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013365 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013366#include <assert.h>
13367/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013368#ifdef __cplusplus
13369extern "C"
13370#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013371/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013372 builtin and then its argument prototype would still apply. */
13373char $ac_func ();
13374char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013375
Martin v. Löwis11437992002-04-12 09:54:03 +000013376#ifdef F77_DUMMY_MAIN
13377# ifdef __cplusplus
13378 extern "C"
13379# endif
13380 int F77_DUMMY_MAIN() { return 1; }
13381#endif
13382int
13383main ()
13384{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013385/* The GNU C library defines this for functions which it implements
13386 to always fail with ENOSYS. Some functions are actually named
13387 something starting with __ and the normal name is an alias. */
13388#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13389choke me
13390#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013391f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013392#endif
13393
Martin v. Löwis11437992002-04-12 09:54:03 +000013394 ;
13395 return 0;
13396}
13397_ACEOF
13398rm -f conftest.$ac_objext conftest$ac_exeext
13399if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13400 (eval $ac_link) 2>&5
13401 ac_status=$?
13402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13403 (exit $ac_status); } &&
13404 { ac_try='test -s conftest$ac_exeext'
13405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13406 (eval $ac_try) 2>&5
13407 ac_status=$?
13408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13409 (exit $ac_status); }; }; then
13410 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013411else
Martin v. Löwis11437992002-04-12 09:54:03 +000013412 echo "$as_me: failed program was:" >&5
13413cat conftest.$ac_ext >&5
13414eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013415fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013416rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013417fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013418echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13419echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13420if test `eval echo '${'$as_ac_var'}'` = yes; then
13421 cat >>confdefs.h <<_ACEOF
13422#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13423_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013424
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013425fi
13426done
13427
Michael W. Hudson54241132001-12-07 15:38:26 +000013428
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013429# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000013430echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13431echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13432if test "${ac_cv_header_time+set}" = set; then
13433 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013434else
Martin v. Löwis11437992002-04-12 09:54:03 +000013435 cat >conftest.$ac_ext <<_ACEOF
13436#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013437#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013438#include <sys/types.h>
13439#include <sys/time.h>
13440#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013441
13442#ifdef F77_DUMMY_MAIN
13443# ifdef __cplusplus
13444 extern "C"
13445# endif
13446 int F77_DUMMY_MAIN() { return 1; }
13447#endif
13448int
13449main ()
13450{
13451if ((struct tm *) 0)
13452return 0;
13453 ;
13454 return 0;
13455}
13456_ACEOF
13457rm -f conftest.$ac_objext
13458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13459 (eval $ac_compile) 2>&5
13460 ac_status=$?
13461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13462 (exit $ac_status); } &&
13463 { ac_try='test -s conftest.$ac_objext'
13464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13465 (eval $ac_try) 2>&5
13466 ac_status=$?
13467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13468 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013469 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013470else
Martin v. Löwis11437992002-04-12 09:54:03 +000013471 echo "$as_me: failed program was:" >&5
13472cat conftest.$ac_ext >&5
13473ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013474fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013475rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013476fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013477echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
13478echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013479if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013480
13481cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013482#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013483_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013484
13485fi
13486
Martin v. Löwis11437992002-04-12 09:54:03 +000013487echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
13488echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
13489if test "${ac_cv_struct_tm+set}" = set; then
13490 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013491else
Martin v. Löwis11437992002-04-12 09:54:03 +000013492 cat >conftest.$ac_ext <<_ACEOF
13493#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013494#include "confdefs.h"
13495#include <sys/types.h>
13496#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013497
13498#ifdef F77_DUMMY_MAIN
13499# ifdef __cplusplus
13500 extern "C"
13501# endif
13502 int F77_DUMMY_MAIN() { return 1; }
13503#endif
13504int
13505main ()
13506{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013507struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000013508 ;
13509 return 0;
13510}
13511_ACEOF
13512rm -f conftest.$ac_objext
13513if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13514 (eval $ac_compile) 2>&5
13515 ac_status=$?
13516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13517 (exit $ac_status); } &&
13518 { ac_try='test -s conftest.$ac_objext'
13519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13520 (eval $ac_try) 2>&5
13521 ac_status=$?
13522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13523 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013524 ac_cv_struct_tm=time.h
13525else
Martin v. Löwis11437992002-04-12 09:54:03 +000013526 echo "$as_me: failed program was:" >&5
13527cat conftest.$ac_ext >&5
13528ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013529fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013530rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013531fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013532echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
13533echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013534if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013535
13536cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013537#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013538_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013539
13540fi
13541
Martin v. Löwis11437992002-04-12 09:54:03 +000013542echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13543echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
13544if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13545 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013546else
Martin v. Löwis11437992002-04-12 09:54:03 +000013547 cat >conftest.$ac_ext <<_ACEOF
13548#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013549#include "confdefs.h"
13550#include <sys/types.h>
13551#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013552
13553
13554#ifdef F77_DUMMY_MAIN
13555# ifdef __cplusplus
13556 extern "C"
13557# endif
13558 int F77_DUMMY_MAIN() { return 1; }
13559#endif
13560int
13561main ()
13562{
13563static struct tm ac_aggr;
13564if (ac_aggr.tm_zone)
13565return 0;
13566 ;
13567 return 0;
13568}
13569_ACEOF
13570rm -f conftest.$ac_objext
13571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13572 (eval $ac_compile) 2>&5
13573 ac_status=$?
13574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13575 (exit $ac_status); } &&
13576 { ac_try='test -s conftest.$ac_objext'
13577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13578 (eval $ac_try) 2>&5
13579 ac_status=$?
13580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13581 (exit $ac_status); }; }; then
13582 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013583else
Martin v. Löwis11437992002-04-12 09:54:03 +000013584 echo "$as_me: failed program was:" >&5
13585cat conftest.$ac_ext >&5
13586ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013587fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013588rm -f conftest.$ac_objext conftest.$ac_ext
13589fi
13590echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13591echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
13592if test $ac_cv_member_struct_tm_tm_zone = yes; then
13593
13594cat >>confdefs.h <<_ACEOF
13595#define HAVE_STRUCT_TM_TM_ZONE 1
13596_ACEOF
13597
13598
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013599fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013600
Martin v. Löwis11437992002-04-12 09:54:03 +000013601if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13602
13603cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013604#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013605_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013606
13607else
Martin v. Löwis11437992002-04-12 09:54:03 +000013608 echo "$as_me:$LINENO: checking for tzname" >&5
13609echo $ECHO_N "checking for tzname... $ECHO_C" >&6
13610if test "${ac_cv_var_tzname+set}" = set; then
13611 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013612else
Martin v. Löwis11437992002-04-12 09:54:03 +000013613 cat >conftest.$ac_ext <<_ACEOF
13614#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013615#include "confdefs.h"
13616#include <time.h>
13617#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013618extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013619#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013620
13621#ifdef F77_DUMMY_MAIN
13622# ifdef __cplusplus
13623 extern "C"
13624# endif
13625 int F77_DUMMY_MAIN() { return 1; }
13626#endif
13627int
13628main ()
13629{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013630atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000013631 ;
13632 return 0;
13633}
13634_ACEOF
13635rm -f conftest.$ac_objext conftest$ac_exeext
13636if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13637 (eval $ac_link) 2>&5
13638 ac_status=$?
13639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13640 (exit $ac_status); } &&
13641 { ac_try='test -s conftest$ac_exeext'
13642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13643 (eval $ac_try) 2>&5
13644 ac_status=$?
13645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13646 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013647 ac_cv_var_tzname=yes
13648else
Martin v. Löwis11437992002-04-12 09:54:03 +000013649 echo "$as_me: failed program was:" >&5
13650cat conftest.$ac_ext >&5
13651ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013652fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013653rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013654fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013655echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13656echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013657 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013658
13659cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013660#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013661_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013662
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013663 fi
13664fi
13665
Martin v. Löwis11437992002-04-12 09:54:03 +000013666echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
13667echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
13668if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
13669 echo $ECHO_N "(cached) $ECHO_C" >&6
13670else
13671 cat >conftest.$ac_ext <<_ACEOF
13672#line $LINENO "configure"
13673#include "confdefs.h"
13674$ac_includes_default
13675#ifdef F77_DUMMY_MAIN
13676# ifdef __cplusplus
13677 extern "C"
13678# endif
13679 int F77_DUMMY_MAIN() { return 1; }
13680#endif
13681int
13682main ()
13683{
13684static struct stat ac_aggr;
13685if (ac_aggr.st_rdev)
13686return 0;
13687 ;
13688 return 0;
13689}
13690_ACEOF
13691rm -f conftest.$ac_objext
13692if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13693 (eval $ac_compile) 2>&5
13694 ac_status=$?
13695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13696 (exit $ac_status); } &&
13697 { ac_try='test -s conftest.$ac_objext'
13698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13699 (eval $ac_try) 2>&5
13700 ac_status=$?
13701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13702 (exit $ac_status); }; }; then
13703 ac_cv_member_struct_stat_st_rdev=yes
13704else
13705 echo "$as_me: failed program was:" >&5
13706cat conftest.$ac_ext >&5
13707ac_cv_member_struct_stat_st_rdev=no
13708fi
13709rm -f conftest.$ac_objext conftest.$ac_ext
13710fi
13711echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
13712echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
13713if test $ac_cv_member_struct_stat_st_rdev = yes; then
13714
13715cat >>confdefs.h <<_ACEOF
13716#define HAVE_STRUCT_STAT_ST_RDEV 1
13717_ACEOF
13718
13719
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013720fi
13721
Martin v. Löwis11437992002-04-12 09:54:03 +000013722echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13723echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13724if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13725 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013726else
Martin v. Löwis11437992002-04-12 09:54:03 +000013727 cat >conftest.$ac_ext <<_ACEOF
13728#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013729#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013730$ac_includes_default
13731#ifdef F77_DUMMY_MAIN
13732# ifdef __cplusplus
13733 extern "C"
13734# endif
13735 int F77_DUMMY_MAIN() { return 1; }
13736#endif
13737int
13738main ()
13739{
13740static struct stat ac_aggr;
13741if (ac_aggr.st_blksize)
13742return 0;
13743 ;
13744 return 0;
13745}
13746_ACEOF
13747rm -f conftest.$ac_objext
13748if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13749 (eval $ac_compile) 2>&5
13750 ac_status=$?
13751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13752 (exit $ac_status); } &&
13753 { ac_try='test -s conftest.$ac_objext'
13754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13755 (eval $ac_try) 2>&5
13756 ac_status=$?
13757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13758 (exit $ac_status); }; }; then
13759 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013760else
Martin v. Löwis11437992002-04-12 09:54:03 +000013761 echo "$as_me: failed program was:" >&5
13762cat conftest.$ac_ext >&5
13763ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013764fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013765rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013766fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013767echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13768echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13769if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013770
Martin v. Löwis11437992002-04-12 09:54:03 +000013771cat >>confdefs.h <<_ACEOF
13772#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13773_ACEOF
13774
13775
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013776fi
13777
Martin v. Löwis11437992002-04-12 09:54:03 +000013778echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13779echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13780if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13781 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013782else
Martin v. Löwis11437992002-04-12 09:54:03 +000013783 cat >conftest.$ac_ext <<_ACEOF
13784#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013785#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013786$ac_includes_default
13787#ifdef F77_DUMMY_MAIN
13788# ifdef __cplusplus
13789 extern "C"
13790# endif
13791 int F77_DUMMY_MAIN() { return 1; }
13792#endif
13793int
13794main ()
13795{
13796static struct stat ac_aggr;
13797if (ac_aggr.st_blocks)
13798return 0;
13799 ;
13800 return 0;
13801}
13802_ACEOF
13803rm -f conftest.$ac_objext
13804if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13805 (eval $ac_compile) 2>&5
13806 ac_status=$?
13807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13808 (exit $ac_status); } &&
13809 { ac_try='test -s conftest.$ac_objext'
13810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13811 (eval $ac_try) 2>&5
13812 ac_status=$?
13813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13814 (exit $ac_status); }; }; then
13815 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013816else
Martin v. Löwis11437992002-04-12 09:54:03 +000013817 echo "$as_me: failed program was:" >&5
13818cat conftest.$ac_ext >&5
13819ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013820fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013821rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013822fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013823echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13824echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13825if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013826
Martin v. Löwis11437992002-04-12 09:54:03 +000013827cat >>confdefs.h <<_ACEOF
13828#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13829_ACEOF
13830
13831
13832cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013833#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013834_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013835
13836else
Martin v. Löwis11437992002-04-12 09:54:03 +000013837 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013838fi
13839
Michael W. Hudson54241132001-12-07 15:38:26 +000013840
Martin v. Löwis11437992002-04-12 09:54:03 +000013841
13842echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13843echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13844if test "${ac_cv_header_time_altzone+set}" = set; then
13845 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013846else
Martin v. Löwis11437992002-04-12 09:54:03 +000013847 cat >conftest.$ac_ext <<_ACEOF
13848#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013849#include "confdefs.h"
13850#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013851#ifdef F77_DUMMY_MAIN
13852# ifdef __cplusplus
13853 extern "C"
13854# endif
13855 int F77_DUMMY_MAIN() { return 1; }
13856#endif
13857int
13858main ()
13859{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013860return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013861 ;
13862 return 0;
13863}
13864_ACEOF
13865rm -f conftest.$ac_objext
13866if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13867 (eval $ac_compile) 2>&5
13868 ac_status=$?
13869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13870 (exit $ac_status); } &&
13871 { ac_try='test -s conftest.$ac_objext'
13872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13873 (eval $ac_try) 2>&5
13874 ac_status=$?
13875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13876 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013877 ac_cv_header_time_altzone=yes
13878else
Martin v. Löwis11437992002-04-12 09:54:03 +000013879 echo "$as_me: failed program was:" >&5
13880cat conftest.$ac_ext >&5
13881ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013882fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013883rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013884fi
13885
Martin v. Löwis11437992002-04-12 09:54:03 +000013886echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13887echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013888if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013889
13890cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013891#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013892_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013893
13894fi
13895
Guido van Rossumda88dad1995-01-26 00:46:29 +000013896was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013897echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13898echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13899cat >conftest.$ac_ext <<_ACEOF
13900#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013901#include "confdefs.h"
13902
13903#include <sys/types.h>
13904#include <sys/select.h>
13905#include <sys/time.h>
13906
Martin v. Löwis11437992002-04-12 09:54:03 +000013907#ifdef F77_DUMMY_MAIN
13908# ifdef __cplusplus
13909 extern "C"
13910# endif
13911 int F77_DUMMY_MAIN() { return 1; }
13912#endif
13913int
13914main ()
13915{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013916;
Martin v. Löwis11437992002-04-12 09:54:03 +000013917 ;
13918 return 0;
13919}
13920_ACEOF
13921rm -f conftest.$ac_objext
13922if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13923 (eval $ac_compile) 2>&5
13924 ac_status=$?
13925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13926 (exit $ac_status); } &&
13927 { ac_try='test -s conftest.$ac_objext'
13928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13929 (eval $ac_try) 2>&5
13930 ac_status=$?
13931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13932 (exit $ac_status); }; }; then
13933
13934
13935cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013936#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013937_ACEOF
13938
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013939 was_it_defined=yes
13940
Guido van Rossumf78abae1997-01-21 22:02:36 +000013941else
Martin v. Löwis11437992002-04-12 09:54:03 +000013942 echo "$as_me: failed program was:" >&5
13943cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013944fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013945rm -f conftest.$ac_objext conftest.$ac_ext
13946echo "$as_me:$LINENO: result: $was_it_defined" >&5
13947echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013948
Martin v. Löwis11437992002-04-12 09:54:03 +000013949echo "$as_me:$LINENO: checking for addrinfo" >&5
13950echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13951if test "${ac_cv_struct_addrinfo+set}" = set; then
13952 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013953else
Martin v. Löwis11437992002-04-12 09:54:03 +000013954 cat >conftest.$ac_ext <<_ACEOF
13955#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013956#include "confdefs.h"
13957
13958# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013959#ifdef F77_DUMMY_MAIN
13960# ifdef __cplusplus
13961 extern "C"
13962# endif
13963 int F77_DUMMY_MAIN() { return 1; }
13964#endif
13965int
13966main ()
13967{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013968struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013969 ;
13970 return 0;
13971}
13972_ACEOF
13973rm -f conftest.$ac_objext
13974if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13975 (eval $ac_compile) 2>&5
13976 ac_status=$?
13977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13978 (exit $ac_status); } &&
13979 { ac_try='test -s conftest.$ac_objext'
13980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13981 (eval $ac_try) 2>&5
13982 ac_status=$?
13983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13984 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013985 ac_cv_struct_addrinfo=yes
13986else
Martin v. Löwis11437992002-04-12 09:54:03 +000013987 echo "$as_me: failed program was:" >&5
13988cat conftest.$ac_ext >&5
13989ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013990fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013991rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013992fi
13993
Martin v. Löwis11437992002-04-12 09:54:03 +000013994echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13995echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013996if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013997
13998cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013999#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014000_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014001
14002fi
14003
Martin v. Löwis11437992002-04-12 09:54:03 +000014004echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
14005echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
14006if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
14007 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014008else
Martin v. Löwis11437992002-04-12 09:54:03 +000014009 cat >conftest.$ac_ext <<_ACEOF
14010#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014011#include "confdefs.h"
14012
14013# include <sys/types.h>
14014# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014015#ifdef F77_DUMMY_MAIN
14016# ifdef __cplusplus
14017 extern "C"
14018# endif
14019 int F77_DUMMY_MAIN() { return 1; }
14020#endif
14021int
14022main ()
14023{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014024struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014025 ;
14026 return 0;
14027}
14028_ACEOF
14029rm -f conftest.$ac_objext
14030if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14031 (eval $ac_compile) 2>&5
14032 ac_status=$?
14033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14034 (exit $ac_status); } &&
14035 { ac_try='test -s conftest.$ac_objext'
14036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14037 (eval $ac_try) 2>&5
14038 ac_status=$?
14039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14040 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014041 ac_cv_struct_sockaddr_storage=yes
14042else
Martin v. Löwis11437992002-04-12 09:54:03 +000014043 echo "$as_me: failed program was:" >&5
14044cat conftest.$ac_ext >&5
14045ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014046fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014047rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014048fi
14049
Martin v. Löwis11437992002-04-12 09:54:03 +000014050echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14051echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014052if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014053
14054cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014055#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014056_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014057
14058fi
14059
Guido van Rossum627b2d71993-12-24 10:39:16 +000014060# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014061
Michael W. Hudson54241132001-12-07 15:38:26 +000014062
Martin v. Löwis11437992002-04-12 09:54:03 +000014063echo "$as_me:$LINENO: checking whether char is unsigned" >&5
14064echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
14065if test "${ac_cv_c_char_unsigned+set}" = set; then
14066 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000014067else
Martin v. Löwis11437992002-04-12 09:54:03 +000014068 cat >conftest.$ac_ext <<_ACEOF
14069#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000014070#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014071$ac_includes_default
14072#ifdef F77_DUMMY_MAIN
14073# ifdef __cplusplus
14074 extern "C"
14075# endif
14076 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014078int
14079main ()
14080{
14081static int test_array [1 - 2 * !(((char) -1) < 0)];
14082test_array [0] = 0
14083
14084 ;
14085 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014086}
Martin v. Löwis11437992002-04-12 09:54:03 +000014087_ACEOF
14088rm -f conftest.$ac_objext
14089if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14090 (eval $ac_compile) 2>&5
14091 ac_status=$?
14092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14093 (exit $ac_status); } &&
14094 { ac_try='test -s conftest.$ac_objext'
14095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14096 (eval $ac_try) 2>&5
14097 ac_status=$?
14098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14099 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000014100 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014101else
14102 echo "$as_me: failed program was:" >&5
14103cat conftest.$ac_ext >&5
14104ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014105fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014106rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014107fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014108echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
14109echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014110if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014111 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014112#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014113_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014114
14115fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014116
Martin v. Löwis11437992002-04-12 09:54:03 +000014117echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
14118echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14119if test "${ac_cv_prog_cc_stdc+set}" = set; then
14120 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014121else
Martin v. Löwis11437992002-04-12 09:54:03 +000014122 ac_cv_prog_cc_stdc=no
14123ac_save_CC=$CC
14124cat >conftest.$ac_ext <<_ACEOF
14125#line $LINENO "configure"
14126#include "confdefs.h"
14127#include <stdarg.h>
14128#include <stdio.h>
14129#include <sys/types.h>
14130#include <sys/stat.h>
14131/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14132struct buf { int x; };
14133FILE * (*rcsopen) (struct buf *, struct stat *, int);
14134static char *e (p, i)
14135 char **p;
14136 int i;
14137{
14138 return p[i];
14139}
14140static char *f (char * (*g) (char **, int), char **p, ...)
14141{
14142 char *s;
14143 va_list v;
14144 va_start (v,p);
14145 s = g (p, va_arg (v,int));
14146 va_end (v);
14147 return s;
14148}
14149int test (int i, double x);
14150struct s1 {int (*f) (int a);};
14151struct s2 {int (*f) (double a);};
14152int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14153int argc;
14154char **argv;
14155#ifdef F77_DUMMY_MAIN
14156# ifdef __cplusplus
14157 extern "C"
14158# endif
14159 int F77_DUMMY_MAIN() { return 1; }
14160#endif
14161int
14162main ()
14163{
14164return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14165 ;
14166 return 0;
14167}
14168_ACEOF
14169# Don't try gcc -ansi; that turns off useful extensions and
14170# breaks some systems' header files.
14171# AIX -qlanglvl=ansi
14172# Ultrix and OSF/1 -std1
14173# HP-UX 10.20 and later -Ae
14174# HP-UX older versions -Aa -D_HPUX_SOURCE
14175# SVR4 -Xc -D__EXTENSIONS__
14176for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14177do
14178 CC="$ac_save_CC $ac_arg"
14179 rm -f conftest.$ac_objext
14180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14181 (eval $ac_compile) 2>&5
14182 ac_status=$?
14183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14184 (exit $ac_status); } &&
14185 { ac_try='test -s conftest.$ac_objext'
14186 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14187 (eval $ac_try) 2>&5
14188 ac_status=$?
14189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14190 (exit $ac_status); }; }; then
14191 ac_cv_prog_cc_stdc=$ac_arg
14192break
14193else
14194 echo "$as_me: failed program was:" >&5
14195cat conftest.$ac_ext >&5
14196fi
14197rm -f conftest.$ac_objext
14198done
14199rm -f conftest.$ac_ext conftest.$ac_objext
14200CC=$ac_save_CC
14201
14202fi
14203
14204case "x$ac_cv_prog_cc_stdc" in
14205 x|xno)
14206 echo "$as_me:$LINENO: result: none needed" >&5
14207echo "${ECHO_T}none needed" >&6 ;;
14208 *)
14209 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14210echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14211 CC="$CC $ac_cv_prog_cc_stdc" ;;
14212esac
14213
14214echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14215echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14216if test "${ac_cv_c_const+set}" = set; then
14217 echo $ECHO_N "(cached) $ECHO_C" >&6
14218else
14219 cat >conftest.$ac_ext <<_ACEOF
14220#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014221#include "confdefs.h"
14222
Martin v. Löwis11437992002-04-12 09:54:03 +000014223#ifdef F77_DUMMY_MAIN
14224# ifdef __cplusplus
14225 extern "C"
14226# endif
14227 int F77_DUMMY_MAIN() { return 1; }
14228#endif
14229int
14230main ()
14231{
14232/* FIXME: Include the comments suggested by Paul. */
14233#ifndef __cplusplus
14234 /* Ultrix mips cc rejects this. */
14235 typedef int charset[2];
14236 const charset x;
14237 /* SunOS 4.1.1 cc rejects this. */
14238 char const *const *ccp;
14239 char **p;
14240 /* NEC SVR4.0.2 mips cc rejects this. */
14241 struct point {int x, y;};
14242 static struct point const zero = {0,0};
14243 /* AIX XL C 1.02.0.0 rejects this.
14244 It does not let you subtract one const X* pointer from another in
14245 an arm of an if-expression whose if-part is not a constant
14246 expression */
14247 const char *g = "string";
14248 ccp = &g + (g ? g-g : 0);
14249 /* HPUX 7.0 cc rejects these. */
14250 ++ccp;
14251 p = (char**) ccp;
14252 ccp = (char const *const *) p;
14253 { /* SCO 3.2v4 cc rejects this. */
14254 char *t;
14255 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014256
Martin v. Löwis11437992002-04-12 09:54:03 +000014257 *t++ = 0;
14258 }
14259 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14260 int x[] = {25, 17};
14261 const int *foo = &x[0];
14262 ++foo;
14263 }
14264 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14265 typedef const int *iptr;
14266 iptr p = 0;
14267 ++p;
14268 }
14269 { /* AIX XL C 1.02.0.0 rejects this saying
14270 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14271 struct s { int j; const int *ap[3]; };
14272 struct s *b; b->j = 5;
14273 }
14274 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14275 const int foo = 10;
14276 }
14277#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014278
Martin v. Löwis11437992002-04-12 09:54:03 +000014279 ;
14280 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014281}
Martin v. Löwis11437992002-04-12 09:54:03 +000014282_ACEOF
14283rm -f conftest.$ac_objext
14284if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14285 (eval $ac_compile) 2>&5
14286 ac_status=$?
14287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14288 (exit $ac_status); } &&
14289 { ac_try='test -s conftest.$ac_objext'
14290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14291 (eval $ac_try) 2>&5
14292 ac_status=$?
14293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14294 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014295 ac_cv_c_const=yes
14296else
Martin v. Löwis11437992002-04-12 09:54:03 +000014297 echo "$as_me: failed program was:" >&5
14298cat conftest.$ac_ext >&5
14299ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014300fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014301rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014302fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014303echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14304echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014305if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014306
14307cat >>confdefs.h <<\_ACEOF
14308#define const
14309_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014310
14311fi
14312
Michael W. Hudson54241132001-12-07 15:38:26 +000014313
Guido van Rossumda88dad1995-01-26 00:46:29 +000014314works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014315echo "$as_me:$LINENO: checking for working volatile" >&5
14316echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14317cat >conftest.$ac_ext <<_ACEOF
14318#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014319#include "confdefs.h"
14320
Martin v. Löwis11437992002-04-12 09:54:03 +000014321#ifdef F77_DUMMY_MAIN
14322# ifdef __cplusplus
14323 extern "C"
14324# endif
14325 int F77_DUMMY_MAIN() { return 1; }
14326#endif
14327int
14328main ()
14329{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014330volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014331 ;
14332 return 0;
14333}
14334_ACEOF
14335rm -f conftest.$ac_objext
14336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14337 (eval $ac_compile) 2>&5
14338 ac_status=$?
14339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14340 (exit $ac_status); } &&
14341 { ac_try='test -s conftest.$ac_objext'
14342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14343 (eval $ac_try) 2>&5
14344 ac_status=$?
14345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14346 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014347 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014348else
Martin v. Löwis11437992002-04-12 09:54:03 +000014349 echo "$as_me: failed program was:" >&5
14350cat conftest.$ac_ext >&5
14351
14352cat >>confdefs.h <<\_ACEOF
14353#define volatile
14354_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014355
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014356
Guido van Rossum627b2d71993-12-24 10:39:16 +000014357fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014358rm -f conftest.$ac_objext conftest.$ac_ext
14359echo "$as_me:$LINENO: result: $works" >&5
14360echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014361
Guido van Rossumda88dad1995-01-26 00:46:29 +000014362works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014363echo "$as_me:$LINENO: checking for working signed char" >&5
14364echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14365cat >conftest.$ac_ext <<_ACEOF
14366#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014367#include "confdefs.h"
14368
Martin v. Löwis11437992002-04-12 09:54:03 +000014369#ifdef F77_DUMMY_MAIN
14370# ifdef __cplusplus
14371 extern "C"
14372# endif
14373 int F77_DUMMY_MAIN() { return 1; }
14374#endif
14375int
14376main ()
14377{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014378signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014379 ;
14380 return 0;
14381}
14382_ACEOF
14383rm -f conftest.$ac_objext
14384if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14385 (eval $ac_compile) 2>&5
14386 ac_status=$?
14387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14388 (exit $ac_status); } &&
14389 { ac_try='test -s conftest.$ac_objext'
14390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14391 (eval $ac_try) 2>&5
14392 ac_status=$?
14393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14394 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014395 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014396else
Martin v. Löwis11437992002-04-12 09:54:03 +000014397 echo "$as_me: failed program was:" >&5
14398cat conftest.$ac_ext >&5
14399
14400cat >>confdefs.h <<\_ACEOF
14401#define signed
14402_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000014403
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014404
Guido van Rossum7f43da71994-08-01 12:15:30 +000014405fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014406rm -f conftest.$ac_objext conftest.$ac_ext
14407echo "$as_me:$LINENO: result: $works" >&5
14408echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014409
Guido van Rossumda88dad1995-01-26 00:46:29 +000014410have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014411echo "$as_me:$LINENO: checking for prototypes" >&5
14412echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
14413cat >conftest.$ac_ext <<_ACEOF
14414#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014415#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014416int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014417#ifdef F77_DUMMY_MAIN
14418# ifdef __cplusplus
14419 extern "C"
14420# endif
14421 int F77_DUMMY_MAIN() { return 1; }
14422#endif
14423int
14424main ()
14425{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014426return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014427 ;
14428 return 0;
14429}
14430_ACEOF
14431rm -f conftest.$ac_objext
14432if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14433 (eval $ac_compile) 2>&5
14434 ac_status=$?
14435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14436 (exit $ac_status); } &&
14437 { ac_try='test -s conftest.$ac_objext'
14438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14439 (eval $ac_try) 2>&5
14440 ac_status=$?
14441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14442 (exit $ac_status); }; }; then
14443
14444
14445cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014446#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014447_ACEOF
14448
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014449 have_prototypes=yes
14450
Guido van Rossumf78abae1997-01-21 22:02:36 +000014451else
Martin v. Löwis11437992002-04-12 09:54:03 +000014452 echo "$as_me: failed program was:" >&5
14453cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014454fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014455rm -f conftest.$ac_objext conftest.$ac_ext
14456echo "$as_me:$LINENO: result: $have_prototypes" >&5
14457echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014458
Guido van Rossumda88dad1995-01-26 00:46:29 +000014459works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014460echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
14461echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
14462cat >conftest.$ac_ext <<_ACEOF
14463#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014464#include "confdefs.h"
14465
14466#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014467int foo(int x, ...) {
14468 va_list va;
14469 va_start(va, x);
14470 va_arg(va, int);
14471 va_arg(va, char *);
14472 va_arg(va, double);
14473 return 0;
14474}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014475
Martin v. Löwis11437992002-04-12 09:54:03 +000014476#ifdef F77_DUMMY_MAIN
14477# ifdef __cplusplus
14478 extern "C"
14479# endif
14480 int F77_DUMMY_MAIN() { return 1; }
14481#endif
14482int
14483main ()
14484{
Guido van Rossum90eea071996-08-30 20:58:57 +000014485return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014486 ;
14487 return 0;
14488}
14489_ACEOF
14490rm -f conftest.$ac_objext
14491if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14492 (eval $ac_compile) 2>&5
14493 ac_status=$?
14494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14495 (exit $ac_status); } &&
14496 { ac_try='test -s conftest.$ac_objext'
14497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14498 (eval $ac_try) 2>&5
14499 ac_status=$?
14500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14501 (exit $ac_status); }; }; then
14502
14503
14504cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014505#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014506_ACEOF
14507
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014508 works=yes
14509
Guido van Rossumf78abae1997-01-21 22:02:36 +000014510else
Martin v. Löwis11437992002-04-12 09:54:03 +000014511 echo "$as_me: failed program was:" >&5
14512cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000014513fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014514rm -f conftest.$ac_objext conftest.$ac_ext
14515echo "$as_me:$LINENO: result: $works" >&5
14516echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014517
Guido van Rossumda88dad1995-01-26 00:46:29 +000014518if test "$have_prototypes" = yes; then
14519bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014520echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
14521echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
14522cat >conftest.$ac_ext <<_ACEOF
14523#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014524#include "confdefs.h"
14525#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014526#ifdef F77_DUMMY_MAIN
14527# ifdef __cplusplus
14528 extern "C"
14529# endif
14530 int F77_DUMMY_MAIN() { return 1; }
14531#endif
14532int
14533main ()
14534{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014535char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000014536 ;
14537 return 0;
14538}
14539_ACEOF
14540rm -f conftest.$ac_objext
14541if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14542 (eval $ac_compile) 2>&5
14543 ac_status=$?
14544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14545 (exit $ac_status); } &&
14546 { ac_try='test -s conftest.$ac_objext'
14547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14548 (eval $ac_try) 2>&5
14549 ac_status=$?
14550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14551 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014552 :
14553else
Martin v. Löwis11437992002-04-12 09:54:03 +000014554 echo "$as_me: failed program was:" >&5
14555cat conftest.$ac_ext >&5
14556
14557cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014558#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014559_ACEOF
14560
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014561 bad_prototypes=yes
14562
Guido van Rossum627b2d71993-12-24 10:39:16 +000014563fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014564rm -f conftest.$ac_objext conftest.$ac_ext
14565echo "$as_me:$LINENO: result: $bad_prototypes" >&5
14566echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014567fi
14568
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014569# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000014570echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
14571echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
14572cat >conftest.$ac_ext <<_ACEOF
14573#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014574#include "confdefs.h"
14575#include <sys/types.h>
14576#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014577#ifdef F77_DUMMY_MAIN
14578# ifdef __cplusplus
14579 extern "C"
14580# endif
14581 int F77_DUMMY_MAIN() { return 1; }
14582#endif
14583int
14584main ()
14585{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014586struct sockaddr x;
14587x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014588 ;
14589 return 0;
14590}
14591_ACEOF
14592rm -f conftest.$ac_objext
14593if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14594 (eval $ac_compile) 2>&5
14595 ac_status=$?
14596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14597 (exit $ac_status); } &&
14598 { ac_try='test -s conftest.$ac_objext'
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 echo "$as_me:$LINENO: result: yes" >&5
14605echo "${ECHO_T}yes" >&6
14606
14607cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014608#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014609_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014610
14611else
Martin v. Löwis11437992002-04-12 09:54:03 +000014612 echo "$as_me: failed program was:" >&5
14613cat conftest.$ac_ext >&5
14614echo "$as_me:$LINENO: result: no" >&5
14615echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014616fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014617rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014618
Guido van Rossumda88dad1995-01-26 00:46:29 +000014619va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014620echo "$as_me:$LINENO: checking whether va_list is an array" >&5
14621echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
14622cat >conftest.$ac_ext <<_ACEOF
14623#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014624#include "confdefs.h"
14625
14626#ifdef HAVE_STDARG_PROTOTYPES
14627#include <stdarg.h>
14628#else
14629#include <varargs.h>
14630#endif
14631
Martin v. Löwis11437992002-04-12 09:54:03 +000014632#ifdef F77_DUMMY_MAIN
14633# ifdef __cplusplus
14634 extern "C"
14635# endif
14636 int F77_DUMMY_MAIN() { return 1; }
14637#endif
14638int
14639main ()
14640{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014641va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000014642 ;
14643 return 0;
14644}
14645_ACEOF
14646rm -f conftest.$ac_objext
14647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14648 (eval $ac_compile) 2>&5
14649 ac_status=$?
14650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14651 (exit $ac_status); } &&
14652 { ac_try='test -s conftest.$ac_objext'
14653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14654 (eval $ac_try) 2>&5
14655 ac_status=$?
14656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14657 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014658 :
14659else
Martin v. Löwis11437992002-04-12 09:54:03 +000014660 echo "$as_me: failed program was:" >&5
14661cat conftest.$ac_ext >&5
14662
14663
14664cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014665#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014666_ACEOF
14667
Guido van Rossumda88dad1995-01-26 00:46:29 +000014668 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014669
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014670fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014671rm -f conftest.$ac_objext conftest.$ac_ext
14672echo "$as_me:$LINENO: result: $va_list_is_array" >&5
14673echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014674
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014675# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014676
14677
14678
14679echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
14680echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
14681if test "${ac_cv_func_gethostbyname_r+set}" = set; then
14682 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014683else
Martin v. Löwis11437992002-04-12 09:54:03 +000014684 cat >conftest.$ac_ext <<_ACEOF
14685#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014686#include "confdefs.h"
14687/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014688 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014689#include <assert.h>
14690/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014691#ifdef __cplusplus
14692extern "C"
14693#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014694/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014695 builtin and then its argument prototype would still apply. */
14696char gethostbyname_r ();
14697char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014698
Martin v. Löwis11437992002-04-12 09:54:03 +000014699#ifdef F77_DUMMY_MAIN
14700# ifdef __cplusplus
14701 extern "C"
14702# endif
14703 int F77_DUMMY_MAIN() { return 1; }
14704#endif
14705int
14706main ()
14707{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014708/* The GNU C library defines this for functions which it implements
14709 to always fail with ENOSYS. Some functions are actually named
14710 something starting with __ and the normal name is an alias. */
14711#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
14712choke me
14713#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014714f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014715#endif
14716
Martin v. Löwis11437992002-04-12 09:54:03 +000014717 ;
14718 return 0;
14719}
14720_ACEOF
14721rm -f conftest.$ac_objext conftest$ac_exeext
14722if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14723 (eval $ac_link) 2>&5
14724 ac_status=$?
14725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14726 (exit $ac_status); } &&
14727 { ac_try='test -s conftest$ac_exeext'
14728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14729 (eval $ac_try) 2>&5
14730 ac_status=$?
14731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14732 (exit $ac_status); }; }; then
14733 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014734else
Martin v. Löwis11437992002-04-12 09:54:03 +000014735 echo "$as_me: failed program was:" >&5
14736cat conftest.$ac_ext >&5
14737ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014738fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014739rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014740fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014741echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
14742echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
14743if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014744
Martin v. Löwis11437992002-04-12 09:54:03 +000014745 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014746#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014747_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014748
Martin v. Löwis11437992002-04-12 09:54:03 +000014749 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
14750echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014751 OLD_CFLAGS=$CFLAGS
14752 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014753 cat >conftest.$ac_ext <<_ACEOF
14754#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014755#include "confdefs.h"
14756
14757# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014758
14759#ifdef F77_DUMMY_MAIN
14760# ifdef __cplusplus
14761 extern "C"
14762# endif
14763 int F77_DUMMY_MAIN() { return 1; }
14764#endif
14765int
14766main ()
14767{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014768
14769 char *name;
14770 struct hostent *he, *res;
14771 char buffer[2048];
14772 int buflen = 2048;
14773 int h_errnop;
14774
14775 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014776
14777 ;
14778 return 0;
14779}
14780_ACEOF
14781rm -f conftest.$ac_objext
14782if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14783 (eval $ac_compile) 2>&5
14784 ac_status=$?
14785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14786 (exit $ac_status); } &&
14787 { ac_try='test -s conftest.$ac_objext'
14788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14789 (eval $ac_try) 2>&5
14790 ac_status=$?
14791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14792 (exit $ac_status); }; }; then
14793
14794 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014795#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014796_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014797
Martin v. Löwis11437992002-04-12 09:54:03 +000014798
14799cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014800#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014801_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014802
Martin v. Löwis11437992002-04-12 09:54:03 +000014803 echo "$as_me:$LINENO: result: yes" >&5
14804echo "${ECHO_T}yes" >&6
14805
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014806else
Martin v. Löwis11437992002-04-12 09:54:03 +000014807 echo "$as_me: failed program was:" >&5
14808cat conftest.$ac_ext >&5
14809
14810 echo "$as_me:$LINENO: result: no" >&5
14811echo "${ECHO_T}no" >&6
14812 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14813echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14814 cat >conftest.$ac_ext <<_ACEOF
14815#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014816#include "confdefs.h"
14817
14818# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014819
14820#ifdef F77_DUMMY_MAIN
14821# ifdef __cplusplus
14822 extern "C"
14823# endif
14824 int F77_DUMMY_MAIN() { return 1; }
14825#endif
14826int
14827main ()
14828{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014829
14830 char *name;
14831 struct hostent *he;
14832 char buffer[2048];
14833 int buflen = 2048;
14834 int h_errnop;
14835
14836 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014837
14838 ;
14839 return 0;
14840}
14841_ACEOF
14842rm -f conftest.$ac_objext
14843if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14844 (eval $ac_compile) 2>&5
14845 ac_status=$?
14846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14847 (exit $ac_status); } &&
14848 { ac_try='test -s conftest.$ac_objext'
14849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14850 (eval $ac_try) 2>&5
14851 ac_status=$?
14852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14853 (exit $ac_status); }; }; then
14854
14855 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014856#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014857_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014858
Martin v. Löwis11437992002-04-12 09:54:03 +000014859
14860cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014861#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014862_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014863
Martin v. Löwis11437992002-04-12 09:54:03 +000014864 echo "$as_me:$LINENO: result: yes" >&5
14865echo "${ECHO_T}yes" >&6
14866
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014867else
Martin v. Löwis11437992002-04-12 09:54:03 +000014868 echo "$as_me: failed program was:" >&5
14869cat conftest.$ac_ext >&5
14870
14871 echo "$as_me:$LINENO: result: no" >&5
14872echo "${ECHO_T}no" >&6
14873 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14874echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14875 cat >conftest.$ac_ext <<_ACEOF
14876#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014877#include "confdefs.h"
14878
14879# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014880
14881#ifdef F77_DUMMY_MAIN
14882# ifdef __cplusplus
14883 extern "C"
14884# endif
14885 int F77_DUMMY_MAIN() { return 1; }
14886#endif
14887int
14888main ()
14889{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014890
14891 char *name;
14892 struct hostent *he;
14893 struct hostent_data data;
14894
14895 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014896
14897 ;
14898 return 0;
14899}
14900_ACEOF
14901rm -f conftest.$ac_objext
14902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14903 (eval $ac_compile) 2>&5
14904 ac_status=$?
14905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14906 (exit $ac_status); } &&
14907 { ac_try='test -s conftest.$ac_objext'
14908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14909 (eval $ac_try) 2>&5
14910 ac_status=$?
14911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14912 (exit $ac_status); }; }; then
14913
14914 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014915#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014916_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014917
Martin v. Löwis11437992002-04-12 09:54:03 +000014918
14919cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014920#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014921_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014922
Martin v. Löwis11437992002-04-12 09:54:03 +000014923 echo "$as_me:$LINENO: result: yes" >&5
14924echo "${ECHO_T}yes" >&6
14925
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014926else
Martin v. Löwis11437992002-04-12 09:54:03 +000014927 echo "$as_me: failed program was:" >&5
14928cat conftest.$ac_ext >&5
14929
14930 echo "$as_me:$LINENO: result: no" >&5
14931echo "${ECHO_T}no" >&6
14932
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014933fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014934rm -f conftest.$ac_objext conftest.$ac_ext
14935
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014936fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014937rm -f conftest.$ac_objext conftest.$ac_ext
14938
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014939fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014940rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014941 CFLAGS=$OLD_CFLAGS
14942
14943else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014944
Martin v. Löwis11437992002-04-12 09:54:03 +000014945
14946for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014947do
Martin v. Löwis11437992002-04-12 09:54:03 +000014948as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14949echo "$as_me:$LINENO: checking for $ac_func" >&5
14950echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14951if eval "test \"\${$as_ac_var+set}\" = set"; then
14952 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014953else
Martin v. Löwis11437992002-04-12 09:54:03 +000014954 cat >conftest.$ac_ext <<_ACEOF
14955#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014956#include "confdefs.h"
14957/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014958 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014959#include <assert.h>
14960/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014961#ifdef __cplusplus
14962extern "C"
14963#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014964/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014965 builtin and then its argument prototype would still apply. */
14966char $ac_func ();
14967char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014968
Martin v. Löwis11437992002-04-12 09:54:03 +000014969#ifdef F77_DUMMY_MAIN
14970# ifdef __cplusplus
14971 extern "C"
14972# endif
14973 int F77_DUMMY_MAIN() { return 1; }
14974#endif
14975int
14976main ()
14977{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014978/* The GNU C library defines this for functions which it implements
14979 to always fail with ENOSYS. Some functions are actually named
14980 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014981#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014982choke me
14983#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014984f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014985#endif
14986
Martin v. Löwis11437992002-04-12 09:54:03 +000014987 ;
14988 return 0;
14989}
14990_ACEOF
14991rm -f conftest.$ac_objext conftest$ac_exeext
14992if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14993 (eval $ac_link) 2>&5
14994 ac_status=$?
14995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14996 (exit $ac_status); } &&
14997 { ac_try='test -s conftest$ac_exeext'
14998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14999 (eval $ac_try) 2>&5
15000 ac_status=$?
15001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15002 (exit $ac_status); }; }; then
15003 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015004else
Martin v. Löwis11437992002-04-12 09:54:03 +000015005 echo "$as_me: failed program was:" >&5
15006cat conftest.$ac_ext >&5
15007eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015008fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015009rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015010fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015011echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15012echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15013if test `eval echo '${'$as_ac_var'}'` = yes; then
15014 cat >>confdefs.h <<_ACEOF
15015#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15016_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015017
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015018fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015019done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015020
Michael W. Hudson54241132001-12-07 15:38:26 +000015021
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015022fi
15023
Michael W. Hudson54241132001-12-07 15:38:26 +000015024
15025
15026
15027
15028
15029
Guido van Rossum627b2d71993-12-24 10:39:16 +000015030# checks for system services
15031# (none yet)
15032
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015033# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015034echo "$as_me:$LINENO: checking for __fpu_control" >&5
15035echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15036if test "${ac_cv_func___fpu_control+set}" = set; then
15037 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015038else
Martin v. Löwis11437992002-04-12 09:54:03 +000015039 cat >conftest.$ac_ext <<_ACEOF
15040#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015041#include "confdefs.h"
15042/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015044#include <assert.h>
15045/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015046#ifdef __cplusplus
15047extern "C"
15048#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015049/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015050 builtin and then its argument prototype would still apply. */
15051char __fpu_control ();
15052char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015053
Martin v. Löwis11437992002-04-12 09:54:03 +000015054#ifdef F77_DUMMY_MAIN
15055# ifdef __cplusplus
15056 extern "C"
15057# endif
15058 int F77_DUMMY_MAIN() { return 1; }
15059#endif
15060int
15061main ()
15062{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015063/* The GNU C library defines this for functions which it implements
15064 to always fail with ENOSYS. Some functions are actually named
15065 something starting with __ and the normal name is an alias. */
15066#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
15067choke me
15068#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015069f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015070#endif
15071
Martin v. Löwis11437992002-04-12 09:54:03 +000015072 ;
15073 return 0;
15074}
15075_ACEOF
15076rm -f conftest.$ac_objext conftest$ac_exeext
15077if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15078 (eval $ac_link) 2>&5
15079 ac_status=$?
15080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15081 (exit $ac_status); } &&
15082 { ac_try='test -s conftest$ac_exeext'
15083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15084 (eval $ac_try) 2>&5
15085 ac_status=$?
15086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15087 (exit $ac_status); }; }; then
15088 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015089else
Martin v. Löwis11437992002-04-12 09:54:03 +000015090 echo "$as_me: failed program was:" >&5
15091cat conftest.$ac_ext >&5
15092ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015093fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015094rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015095fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015096echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
15097echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
15098if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015099 :
15100else
Martin v. Löwis11437992002-04-12 09:54:03 +000015101
15102echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
15103echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
15104if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
15105 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015106else
Martin v. Löwis11437992002-04-12 09:54:03 +000015107 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015108LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015109cat >conftest.$ac_ext <<_ACEOF
15110#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015111#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015112
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015113/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015114#ifdef __cplusplus
15115extern "C"
15116#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015117/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015118 builtin and then its argument prototype would still apply. */
15119char __fpu_control ();
15120#ifdef F77_DUMMY_MAIN
15121# ifdef __cplusplus
15122 extern "C"
15123# endif
15124 int F77_DUMMY_MAIN() { return 1; }
15125#endif
15126int
15127main ()
15128{
15129__fpu_control ();
15130 ;
15131 return 0;
15132}
15133_ACEOF
15134rm -f conftest.$ac_objext conftest$ac_exeext
15135if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15136 (eval $ac_link) 2>&5
15137 ac_status=$?
15138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15139 (exit $ac_status); } &&
15140 { ac_try='test -s conftest$ac_exeext'
15141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15142 (eval $ac_try) 2>&5
15143 ac_status=$?
15144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15145 (exit $ac_status); }; }; then
15146 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015147else
Martin v. Löwis11437992002-04-12 09:54:03 +000015148 echo "$as_me: failed program was:" >&5
15149cat conftest.$ac_ext >&5
15150ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015151fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015152rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15153LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015154fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015155echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15156echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15157if test $ac_cv_lib_ieee___fpu_control = yes; then
15158 cat >>confdefs.h <<_ACEOF
15159#define HAVE_LIBIEEE 1
15160_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015161
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015162 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015163
Guido van Rossum627b2d71993-12-24 10:39:16 +000015164fi
15165
Michael W. Hudson54241132001-12-07 15:38:26 +000015166
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015167fi
15168
Michael W. Hudson54241132001-12-07 15:38:26 +000015169
Guido van Rossum7f253911997-05-09 02:42:48 +000015170# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015171echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15172echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15173
Guido van Rossum7f253911997-05-09 02:42:48 +000015174# Check whether --with-fpectl or --without-fpectl was given.
15175if test "${with_fpectl+set}" = set; then
15176 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015177
Guido van Rossum7f253911997-05-09 02:42:48 +000015178if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015179then
15180
15181cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015182#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015183_ACEOF
15184
15185 echo "$as_me:$LINENO: result: yes" >&5
15186echo "${ECHO_T}yes" >&6
15187else echo "$as_me:$LINENO: result: no" >&5
15188echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015189fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015190else
Martin v. Löwis11437992002-04-12 09:54:03 +000015191 echo "$as_me:$LINENO: result: no" >&5
15192echo "${ECHO_T}no" >&6
15193fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015194
Guido van Rossum7f43da71994-08-01 12:15:30 +000015195# check for --with-libm=...
15196
Guido van Rossum563e7081996-09-10 18:20:48 +000015197case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015198Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015199BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015200*) LIBM=-lm
15201esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015202echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15203echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15204
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015205# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015206if test "${with_libm+set}" = set; then
15207 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015208
Guido van Rossum7f253911997-05-09 02:42:48 +000015209if test "$withval" = no
15210then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015211 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15212echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015213elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015214then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015215 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15216echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15217else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15218echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15219 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015220fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015221else
Martin v. Löwis11437992002-04-12 09:54:03 +000015222 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15223echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15224fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015225
15226# check for --with-libc=...
15227
Martin v. Löwis11437992002-04-12 09:54:03 +000015228echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15229echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15230
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015231# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015232if test "${with_libc+set}" = set; then
15233 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015234
Guido van Rossum7f253911997-05-09 02:42:48 +000015235if test "$withval" = no
15236then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015237 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15238echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015239elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015240then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015241 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
15242echo "${ECHO_T}set LIBC=\"$withval\"" >&6
15243else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
15244echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
15245 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015246fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015247else
Martin v. Löwis11437992002-04-12 09:54:03 +000015248 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
15249echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
15250fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015251
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015252# check for hypot() in math library
15253LIBS_SAVE=$LIBS
15254LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000015255
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015256for ac_func in hypot
15257do
Martin v. Löwis11437992002-04-12 09:54:03 +000015258as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15259echo "$as_me:$LINENO: checking for $ac_func" >&5
15260echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15261if eval "test \"\${$as_ac_var+set}\" = set"; then
15262 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015263else
Martin v. Löwis11437992002-04-12 09:54:03 +000015264 cat >conftest.$ac_ext <<_ACEOF
15265#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015266#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015267/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015268 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015269#include <assert.h>
15270/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015271#ifdef __cplusplus
15272extern "C"
15273#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015274/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015275 builtin and then its argument prototype would still apply. */
15276char $ac_func ();
15277char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015278
Martin v. Löwis11437992002-04-12 09:54:03 +000015279#ifdef F77_DUMMY_MAIN
15280# ifdef __cplusplus
15281 extern "C"
15282# endif
15283 int F77_DUMMY_MAIN() { return 1; }
15284#endif
15285int
15286main ()
15287{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015288/* The GNU C library defines this for functions which it implements
15289 to always fail with ENOSYS. Some functions are actually named
15290 something starting with __ and the normal name is an alias. */
15291#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15292choke me
15293#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015294f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015295#endif
15296
Martin v. Löwis11437992002-04-12 09:54:03 +000015297 ;
15298 return 0;
15299}
15300_ACEOF
15301rm -f conftest.$ac_objext conftest$ac_exeext
15302if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15303 (eval $ac_link) 2>&5
15304 ac_status=$?
15305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15306 (exit $ac_status); } &&
15307 { ac_try='test -s conftest$ac_exeext'
15308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15309 (eval $ac_try) 2>&5
15310 ac_status=$?
15311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15312 (exit $ac_status); }; }; then
15313 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015314else
Martin v. Löwis11437992002-04-12 09:54:03 +000015315 echo "$as_me: failed program was:" >&5
15316cat conftest.$ac_ext >&5
15317eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015318fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015319rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015320fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015321echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15322echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15323if test `eval echo '${'$as_ac_var'}'` = yes; then
15324 cat >>confdefs.h <<_ACEOF
15325#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15326_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015327
Michael W. Hudson54241132001-12-07 15:38:26 +000015328else
Martin v. Löwis11437992002-04-12 09:54:03 +000015329 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015330fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015331done
15332
Michael W. Hudson54241132001-12-07 15:38:26 +000015333
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015334LIBS=$LIBS_SAVE
15335
Guido van Rossumef2255b2000-03-10 22:30:29 +000015336# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015337if test "${ac_cv_header_wchar_h+set}" = set; then
15338 echo "$as_me:$LINENO: checking for wchar.h" >&5
15339echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15340if test "${ac_cv_header_wchar_h+set}" = set; then
15341 echo $ECHO_N "(cached) $ECHO_C" >&6
15342fi
15343echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15344echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015345else
Martin v. Löwis11437992002-04-12 09:54:03 +000015346 # Is the header compilable?
15347echo "$as_me:$LINENO: checking wchar.h usability" >&5
15348echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15349cat >conftest.$ac_ext <<_ACEOF
15350#line $LINENO "configure"
15351#include "confdefs.h"
15352$ac_includes_default
15353#include <wchar.h>
15354_ACEOF
15355rm -f conftest.$ac_objext
15356if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15357 (eval $ac_compile) 2>&5
15358 ac_status=$?
15359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15360 (exit $ac_status); } &&
15361 { ac_try='test -s conftest.$ac_objext'
15362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15363 (eval $ac_try) 2>&5
15364 ac_status=$?
15365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15366 (exit $ac_status); }; }; then
15367 ac_header_compiler=yes
15368else
15369 echo "$as_me: failed program was:" >&5
15370cat conftest.$ac_ext >&5
15371ac_header_compiler=no
15372fi
15373rm -f conftest.$ac_objext conftest.$ac_ext
15374echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15375echo "${ECHO_T}$ac_header_compiler" >&6
15376
15377# Is the header present?
15378echo "$as_me:$LINENO: checking wchar.h presence" >&5
15379echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
15380cat >conftest.$ac_ext <<_ACEOF
15381#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015382#include "confdefs.h"
15383#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015384_ACEOF
15385if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15386 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15387 ac_status=$?
15388 egrep -v '^ *\+' conftest.er1 >conftest.err
15389 rm -f conftest.er1
15390 cat conftest.err >&5
15391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15392 (exit $ac_status); } >/dev/null; then
15393 if test -s conftest.err; then
15394 ac_cpp_err=$ac_c_preproc_warn_flag
15395 else
15396 ac_cpp_err=
15397 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015398else
Martin v. Löwis11437992002-04-12 09:54:03 +000015399 ac_cpp_err=yes
15400fi
15401if test -z "$ac_cpp_err"; then
15402 ac_header_preproc=yes
15403else
15404 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000015405 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015406 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015407fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015408rm -f conftest.err conftest.$ac_ext
15409echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15410echo "${ECHO_T}$ac_header_preproc" >&6
15411
15412# So? What about this header?
15413case $ac_header_compiler:$ac_header_preproc in
15414 yes:no )
15415 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
15416echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15417 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15418echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15419 no:yes )
15420 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
15421echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
15422 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
15423echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
15424 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15425echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15426esac
15427echo "$as_me:$LINENO: checking for wchar.h" >&5
15428echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15429if test "${ac_cv_header_wchar_h+set}" = set; then
15430 echo $ECHO_N "(cached) $ECHO_C" >&6
15431else
15432 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000015433fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015434echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15435echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
15436
15437fi
15438if test $ac_cv_header_wchar_h = yes; then
15439
15440
15441cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015442#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015443_ACEOF
15444
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015445 wchar_h="yes"
15446
Guido van Rossumef2255b2000-03-10 22:30:29 +000015447else
Martin v. Löwis11437992002-04-12 09:54:03 +000015448 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015449
15450fi
15451
Michael W. Hudson54241132001-12-07 15:38:26 +000015452
Martin v. Löwis11437992002-04-12 09:54:03 +000015453
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015454# determine wchar_t size
15455if test "$wchar_h" = yes
15456then
Martin v. Löwis11437992002-04-12 09:54:03 +000015457 echo "$as_me:$LINENO: checking for wchar_t" >&5
15458echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
15459if test "${ac_cv_type_wchar_t+set}" = set; then
15460 echo $ECHO_N "(cached) $ECHO_C" >&6
15461else
15462 cat >conftest.$ac_ext <<_ACEOF
15463#line $LINENO "configure"
15464#include "confdefs.h"
15465#include <wchar.h>
15466
15467#ifdef F77_DUMMY_MAIN
15468# ifdef __cplusplus
15469 extern "C"
15470# endif
15471 int F77_DUMMY_MAIN() { return 1; }
15472#endif
15473int
15474main ()
15475{
15476if ((wchar_t *) 0)
15477 return 0;
15478if (sizeof (wchar_t))
15479 return 0;
15480 ;
15481 return 0;
15482}
15483_ACEOF
15484rm -f conftest.$ac_objext
15485if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15486 (eval $ac_compile) 2>&5
15487 ac_status=$?
15488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15489 (exit $ac_status); } &&
15490 { ac_try='test -s conftest.$ac_objext'
15491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15492 (eval $ac_try) 2>&5
15493 ac_status=$?
15494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15495 (exit $ac_status); }; }; then
15496 ac_cv_type_wchar_t=yes
15497else
15498 echo "$as_me: failed program was:" >&5
15499cat conftest.$ac_ext >&5
15500ac_cv_type_wchar_t=no
15501fi
15502rm -f conftest.$ac_objext conftest.$ac_ext
15503fi
15504echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
15505echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
15506
15507echo "$as_me:$LINENO: checking size of wchar_t" >&5
15508echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
15509if test "${ac_cv_sizeof_wchar_t+set}" = set; then
15510 echo $ECHO_N "(cached) $ECHO_C" >&6
15511else
15512 if test "$ac_cv_type_wchar_t" = yes; then
15513 # The cast to unsigned long works around a bug in the HP C Compiler
15514 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15515 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15516 # This bug is HP SR number 8606223364.
15517 if test "$cross_compiling" = yes; then
15518 # Depending upon the size, compute the lo and hi bounds.
15519cat >conftest.$ac_ext <<_ACEOF
15520#line $LINENO "configure"
15521#include "confdefs.h"
15522#include <wchar.h>
15523
15524#ifdef F77_DUMMY_MAIN
15525# ifdef __cplusplus
15526 extern "C"
15527# endif
15528 int F77_DUMMY_MAIN() { return 1; }
15529#endif
15530int
15531main ()
15532{
15533static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
15534test_array [0] = 0
15535
15536 ;
15537 return 0;
15538}
15539_ACEOF
15540rm -f conftest.$ac_objext
15541if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15542 (eval $ac_compile) 2>&5
15543 ac_status=$?
15544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15545 (exit $ac_status); } &&
15546 { ac_try='test -s conftest.$ac_objext'
15547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15548 (eval $ac_try) 2>&5
15549 ac_status=$?
15550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15551 (exit $ac_status); }; }; then
15552 ac_lo=0 ac_mid=0
15553 while :; do
15554 cat >conftest.$ac_ext <<_ACEOF
15555#line $LINENO "configure"
15556#include "confdefs.h"
15557#include <wchar.h>
15558
15559#ifdef F77_DUMMY_MAIN
15560# ifdef __cplusplus
15561 extern "C"
15562# endif
15563 int F77_DUMMY_MAIN() { return 1; }
15564#endif
15565int
15566main ()
15567{
15568static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15569test_array [0] = 0
15570
15571 ;
15572 return 0;
15573}
15574_ACEOF
15575rm -f conftest.$ac_objext
15576if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15577 (eval $ac_compile) 2>&5
15578 ac_status=$?
15579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15580 (exit $ac_status); } &&
15581 { ac_try='test -s conftest.$ac_objext'
15582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15583 (eval $ac_try) 2>&5
15584 ac_status=$?
15585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15586 (exit $ac_status); }; }; then
15587 ac_hi=$ac_mid; break
15588else
15589 echo "$as_me: failed program was:" >&5
15590cat conftest.$ac_ext >&5
15591ac_lo=`expr $ac_mid + 1`
15592 if test $ac_lo -le $ac_mid; then
15593 ac_lo= ac_hi=
15594 break
15595 fi
15596 ac_mid=`expr 2 '*' $ac_mid + 1`
15597fi
15598rm -f conftest.$ac_objext conftest.$ac_ext
15599 done
15600else
15601 echo "$as_me: failed program was:" >&5
15602cat conftest.$ac_ext >&5
15603cat >conftest.$ac_ext <<_ACEOF
15604#line $LINENO "configure"
15605#include "confdefs.h"
15606#include <wchar.h>
15607
15608#ifdef F77_DUMMY_MAIN
15609# ifdef __cplusplus
15610 extern "C"
15611# endif
15612 int F77_DUMMY_MAIN() { return 1; }
15613#endif
15614int
15615main ()
15616{
15617static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
15618test_array [0] = 0
15619
15620 ;
15621 return 0;
15622}
15623_ACEOF
15624rm -f conftest.$ac_objext
15625if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15626 (eval $ac_compile) 2>&5
15627 ac_status=$?
15628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15629 (exit $ac_status); } &&
15630 { ac_try='test -s conftest.$ac_objext'
15631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15632 (eval $ac_try) 2>&5
15633 ac_status=$?
15634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15635 (exit $ac_status); }; }; then
15636 ac_hi=-1 ac_mid=-1
15637 while :; do
15638 cat >conftest.$ac_ext <<_ACEOF
15639#line $LINENO "configure"
15640#include "confdefs.h"
15641#include <wchar.h>
15642
15643#ifdef F77_DUMMY_MAIN
15644# ifdef __cplusplus
15645 extern "C"
15646# endif
15647 int F77_DUMMY_MAIN() { return 1; }
15648#endif
15649int
15650main ()
15651{
15652static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
15653test_array [0] = 0
15654
15655 ;
15656 return 0;
15657}
15658_ACEOF
15659rm -f conftest.$ac_objext
15660if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15661 (eval $ac_compile) 2>&5
15662 ac_status=$?
15663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15664 (exit $ac_status); } &&
15665 { ac_try='test -s conftest.$ac_objext'
15666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15667 (eval $ac_try) 2>&5
15668 ac_status=$?
15669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15670 (exit $ac_status); }; }; then
15671 ac_lo=$ac_mid; break
15672else
15673 echo "$as_me: failed program was:" >&5
15674cat conftest.$ac_ext >&5
15675ac_hi=`expr '(' $ac_mid ')' - 1`
15676 if test $ac_mid -le $ac_hi; then
15677 ac_lo= ac_hi=
15678 break
15679 fi
15680 ac_mid=`expr 2 '*' $ac_mid`
15681fi
15682rm -f conftest.$ac_objext conftest.$ac_ext
15683 done
15684else
15685 echo "$as_me: failed program was:" >&5
15686cat conftest.$ac_ext >&5
15687ac_lo= ac_hi=
15688fi
15689rm -f conftest.$ac_objext conftest.$ac_ext
15690fi
15691rm -f conftest.$ac_objext conftest.$ac_ext
15692# Binary search between lo and hi bounds.
15693while test "x$ac_lo" != "x$ac_hi"; do
15694 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15695 cat >conftest.$ac_ext <<_ACEOF
15696#line $LINENO "configure"
15697#include "confdefs.h"
15698#include <wchar.h>
15699
15700#ifdef F77_DUMMY_MAIN
15701# ifdef __cplusplus
15702 extern "C"
15703# endif
15704 int F77_DUMMY_MAIN() { return 1; }
15705#endif
15706int
15707main ()
15708{
15709static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15710test_array [0] = 0
15711
15712 ;
15713 return 0;
15714}
15715_ACEOF
15716rm -f conftest.$ac_objext
15717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15718 (eval $ac_compile) 2>&5
15719 ac_status=$?
15720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15721 (exit $ac_status); } &&
15722 { ac_try='test -s conftest.$ac_objext'
15723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15724 (eval $ac_try) 2>&5
15725 ac_status=$?
15726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15727 (exit $ac_status); }; }; then
15728 ac_hi=$ac_mid
15729else
15730 echo "$as_me: failed program was:" >&5
15731cat conftest.$ac_ext >&5
15732ac_lo=`expr '(' $ac_mid ')' + 1`
15733fi
15734rm -f conftest.$ac_objext conftest.$ac_ext
15735done
15736case $ac_lo in
15737?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15738'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15739echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15740 { (exit 1); exit 1; }; } ;;
15741esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015742else
15743 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015744 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15745echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15746 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015747else
Martin v. Löwis11437992002-04-12 09:54:03 +000015748 cat >conftest.$ac_ext <<_ACEOF
15749#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015750#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015751#include <wchar.h>
15752
15753long longval () { return (long) (sizeof (wchar_t)); }
15754unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015755#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015756#include <stdlib.h>
15757#ifdef F77_DUMMY_MAIN
15758# ifdef __cplusplus
15759 extern "C"
15760# endif
15761 int F77_DUMMY_MAIN() { return 1; }
15762#endif
15763int
15764main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015765{
Martin v. Löwis11437992002-04-12 09:54:03 +000015766
15767 FILE *f = fopen ("conftest.val", "w");
15768 if (! f)
15769 exit (1);
15770 if (((long) (sizeof (wchar_t))) < 0)
15771 {
15772 long i = longval ();
15773 if (i != ((long) (sizeof (wchar_t))))
15774 exit (1);
15775 fprintf (f, "%ld\n", i);
15776 }
15777 else
15778 {
15779 unsigned long i = ulongval ();
15780 if (i != ((long) (sizeof (wchar_t))))
15781 exit (1);
15782 fprintf (f, "%lu\n", i);
15783 }
15784 exit (ferror (f) || fclose (f) != 0);
15785
15786 ;
15787 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015788}
Martin v. Löwis11437992002-04-12 09:54:03 +000015789_ACEOF
15790rm -f conftest$ac_exeext
15791if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15792 (eval $ac_link) 2>&5
15793 ac_status=$?
15794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15795 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15797 (eval $ac_try) 2>&5
15798 ac_status=$?
15799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15800 (exit $ac_status); }; }; then
15801 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015802else
Martin v. Löwis11437992002-04-12 09:54:03 +000015803 echo "$as_me: program exited with status $ac_status" >&5
15804echo "$as_me: failed program was:" >&5
15805cat conftest.$ac_ext >&5
15806( exit $ac_status )
15807{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15808echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15809 { (exit 1); exit 1; }; }
15810fi
15811rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15812fi
15813fi
15814rm -f conftest.val
15815else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015816 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015817fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015818fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015819echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15820echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15821cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015822#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015823_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015824
Michael W. Hudson54241132001-12-07 15:38:26 +000015825
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015826fi
15827
Martin v. Löwis11437992002-04-12 09:54:03 +000015828echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15829echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015830# Check whether --enable-unicode or --disable-unicode was given.
15831if test "${enable_unicode+set}" = set; then
15832 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015833
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015834else
15835 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015836fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015837
15838if test $enable_unicode = yes
15839then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015840 # Without any arguments, Py_UNICODE defaults to two-byte mode
15841 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015842fi
15843
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015844
15845
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015846case "$enable_unicode" in
15847ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015848 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015849#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015850_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015851
15852 ;;
15853ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015854 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015855#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015856_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015857
15858 ;;
15859esac
15860
Michael W. Hudson54241132001-12-07 15:38:26 +000015861
Martin v. Löwis11437992002-04-12 09:54:03 +000015862
15863
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015864
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015865if test "$enable_unicode" = "no"
15866then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015867 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015868 echo "$as_me:$LINENO: result: not used" >&5
15869echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015870else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015871 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015872
15873cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015874#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015875_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015876
15877 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15878 then
15879 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015880
Martin v. Löwis11437992002-04-12 09:54:03 +000015881cat >>confdefs.h <<\_ACEOF
15882#define HAVE_USABLE_WCHAR_T 1
15883_ACEOF
15884
15885 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015886#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015887_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015888
15889 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15890 then
15891 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015892 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015893#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015894_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015895
15896 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15897 then
15898 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015899 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015900#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015901_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015902
15903 else
15904 PY_UNICODE_TYPE="no type found"
15905 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015906 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15907echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015908fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015909
15910# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015911echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15912echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15913if test "${ac_cv_c_bigendian+set}" = set; then
15914 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015915else
Martin v. Löwis11437992002-04-12 09:54:03 +000015916 # See if sys/param.h defines the BYTE_ORDER macro.
15917cat >conftest.$ac_ext <<_ACEOF
15918#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015919#include "confdefs.h"
15920#include <sys/types.h>
15921#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015922
Martin v. Löwis11437992002-04-12 09:54:03 +000015923#ifdef F77_DUMMY_MAIN
15924# ifdef __cplusplus
15925 extern "C"
15926# endif
15927 int F77_DUMMY_MAIN() { return 1; }
15928#endif
15929int
15930main ()
15931{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015932#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15933 bogus endian macros
15934#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015935
15936 ;
15937 return 0;
15938}
15939_ACEOF
15940rm -f conftest.$ac_objext
15941if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15942 (eval $ac_compile) 2>&5
15943 ac_status=$?
15944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15945 (exit $ac_status); } &&
15946 { ac_try='test -s conftest.$ac_objext'
15947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15948 (eval $ac_try) 2>&5
15949 ac_status=$?
15950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15951 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015952 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015953cat >conftest.$ac_ext <<_ACEOF
15954#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015955#include "confdefs.h"
15956#include <sys/types.h>
15957#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015958
Martin v. Löwis11437992002-04-12 09:54:03 +000015959#ifdef F77_DUMMY_MAIN
15960# ifdef __cplusplus
15961 extern "C"
15962# endif
15963 int F77_DUMMY_MAIN() { return 1; }
15964#endif
15965int
15966main ()
15967{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015968#if BYTE_ORDER != BIG_ENDIAN
15969 not big endian
15970#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015971
15972 ;
15973 return 0;
15974}
15975_ACEOF
15976rm -f conftest.$ac_objext
15977if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15978 (eval $ac_compile) 2>&5
15979 ac_status=$?
15980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15981 (exit $ac_status); } &&
15982 { ac_try='test -s conftest.$ac_objext'
15983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15984 (eval $ac_try) 2>&5
15985 ac_status=$?
15986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15987 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015988 ac_cv_c_bigendian=yes
15989else
Martin v. Löwis11437992002-04-12 09:54:03 +000015990 echo "$as_me: failed program was:" >&5
15991cat conftest.$ac_ext >&5
15992ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015993fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015994rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015995else
Martin v. Löwis11437992002-04-12 09:54:03 +000015996 echo "$as_me: failed program was:" >&5
15997cat conftest.$ac_ext >&5
15998# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015999if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016000 # try to guess the endianess by grep'ing values into an object file
16001 ac_cv_c_bigendian=unknown
16002 cat >conftest.$ac_ext <<_ACEOF
16003#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016004#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016005short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16006short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16007void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
16008short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16009short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16010void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
16011#ifdef F77_DUMMY_MAIN
16012# ifdef __cplusplus
16013 extern "C"
16014# endif
16015 int F77_DUMMY_MAIN() { return 1; }
16016#endif
16017int
16018main ()
16019{
16020 _ascii (); _ebcdic ();
16021 ;
16022 return 0;
16023}
16024_ACEOF
16025rm -f conftest.$ac_objext
16026if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16027 (eval $ac_compile) 2>&5
16028 ac_status=$?
16029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16030 (exit $ac_status); } &&
16031 { ac_try='test -s conftest.$ac_objext'
16032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16033 (eval $ac_try) 2>&5
16034 ac_status=$?
16035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16036 (exit $ac_status); }; }; then
16037 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
16038 ac_cv_c_bigendian=yes
16039fi
16040if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16041 if test "$ac_cv_c_bigendian" = unknown; then
16042 ac_cv_c_bigendian=no
16043 else
16044 # finding both strings is unlikely to happen, but who knows?
16045 ac_cv_c_bigendian=unknown
16046 fi
16047fi
16048else
16049 echo "$as_me: failed program was:" >&5
16050cat conftest.$ac_ext >&5
16051fi
16052rm -f conftest.$ac_objext conftest.$ac_ext
16053else
16054 cat >conftest.$ac_ext <<_ACEOF
16055#line $LINENO "configure"
16056#include "confdefs.h"
16057int
16058main ()
16059{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016060 /* Are we little or big endian? From Harbison&Steele. */
16061 union
16062 {
16063 long l;
16064 char c[sizeof (long)];
16065 } u;
16066 u.l = 1;
16067 exit (u.c[sizeof (long) - 1] == 1);
16068}
Martin v. Löwis11437992002-04-12 09:54:03 +000016069_ACEOF
16070rm -f conftest$ac_exeext
16071if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16072 (eval $ac_link) 2>&5
16073 ac_status=$?
16074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16075 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16077 (eval $ac_try) 2>&5
16078 ac_status=$?
16079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16080 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016081 ac_cv_c_bigendian=no
16082else
Martin v. Löwis11437992002-04-12 09:54:03 +000016083 echo "$as_me: program exited with status $ac_status" >&5
16084echo "$as_me: failed program was:" >&5
16085cat conftest.$ac_ext >&5
16086( exit $ac_status )
16087ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016088fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016089rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016090fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016091fi
16092rm -f conftest.$ac_objext conftest.$ac_ext
16093fi
16094echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16095echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16096case $ac_cv_c_bigendian in
16097 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016098
Martin v. Löwis11437992002-04-12 09:54:03 +000016099cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016100#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016101_ACEOF
16102 ;;
16103 no)
16104 ;;
16105 *)
16106 { { echo "$as_me:$LINENO: error: unknown endianess
16107presetting ac_cv_c_bigendian=no (or yes) will help" >&5
16108echo "$as_me: error: unknown endianess
16109presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16110 { (exit 1); exit 1; }; } ;;
16111esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016112
Michael W. Hudson54241132001-12-07 15:38:26 +000016113
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016114# Check whether right shifting a negative integer extends the sign bit
16115# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016116echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16117echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16118if test "${ac_cv_rshift_extends_sign+set}" = set; then
16119 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016120else
Martin v. Löwis11437992002-04-12 09:54:03 +000016121
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016122if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016123 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016124else
Martin v. Löwis11437992002-04-12 09:54:03 +000016125 cat >conftest.$ac_ext <<_ACEOF
16126#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016127#include "confdefs.h"
16128
16129int main()
16130{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016131 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016132}
16133
Martin v. Löwis11437992002-04-12 09:54:03 +000016134_ACEOF
16135rm -f conftest$ac_exeext
16136if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16137 (eval $ac_link) 2>&5
16138 ac_status=$?
16139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16140 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16142 (eval $ac_try) 2>&5
16143 ac_status=$?
16144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16145 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016146 ac_cv_rshift_extends_sign=yes
16147else
Martin v. Löwis11437992002-04-12 09:54:03 +000016148 echo "$as_me: program exited with status $ac_status" >&5
16149echo "$as_me: failed program was:" >&5
16150cat conftest.$ac_ext >&5
16151( exit $ac_status )
16152ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016153fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016154rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16155fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016156fi
16157
Martin v. Löwis11437992002-04-12 09:54:03 +000016158echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16159echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016160if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016161then
Martin v. Löwis11437992002-04-12 09:54:03 +000016162
16163cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016164#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016165_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016166
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016167fi
16168
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016169# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016170echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16171echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16172if test "${ac_cv_have_getc_unlocked+set}" = set; then
16173 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016174else
Martin v. Löwis11437992002-04-12 09:54:03 +000016175
16176cat >conftest.$ac_ext <<_ACEOF
16177#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016178#include "confdefs.h"
16179#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016180#ifdef F77_DUMMY_MAIN
16181# ifdef __cplusplus
16182 extern "C"
16183# endif
16184 int F77_DUMMY_MAIN() { return 1; }
16185#endif
16186int
16187main ()
16188{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016189
16190 FILE *f = fopen("/dev/null", "r");
16191 flockfile(f);
16192 getc_unlocked(f);
16193 funlockfile(f);
16194
Martin v. Löwis11437992002-04-12 09:54:03 +000016195 ;
16196 return 0;
16197}
16198_ACEOF
16199rm -f conftest.$ac_objext conftest$ac_exeext
16200if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16201 (eval $ac_link) 2>&5
16202 ac_status=$?
16203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16204 (exit $ac_status); } &&
16205 { ac_try='test -s conftest$ac_exeext'
16206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16207 (eval $ac_try) 2>&5
16208 ac_status=$?
16209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16210 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016211 ac_cv_have_getc_unlocked=yes
16212else
Martin v. Löwis11437992002-04-12 09:54:03 +000016213 echo "$as_me: failed program was:" >&5
16214cat conftest.$ac_ext >&5
16215ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016216fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016217rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016218fi
16219
Martin v. Löwis11437992002-04-12 09:54:03 +000016220echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16221echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016222if test "$ac_cv_have_getc_unlocked" = yes
16223then
Martin v. Löwis11437992002-04-12 09:54:03 +000016224
16225cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016226#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016227_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016228
16229fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016230
Martin v. Löwis0daad592001-09-30 21:09:59 +000016231# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000016232echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
16233echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
16234if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
16235 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000016236else
Martin v. Löwis11437992002-04-12 09:54:03 +000016237 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000016238LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016239cat >conftest.$ac_ext <<_ACEOF
16240#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000016241#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016242
Guido van Rossum353ae582001-07-10 16:45:32 +000016243/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016244#ifdef __cplusplus
16245extern "C"
16246#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000016247/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016248 builtin and then its argument prototype would still apply. */
16249char rl_pre_input_hook ();
16250#ifdef F77_DUMMY_MAIN
16251# ifdef __cplusplus
16252 extern "C"
16253# endif
16254 int F77_DUMMY_MAIN() { return 1; }
16255#endif
16256int
16257main ()
16258{
16259rl_pre_input_hook ();
16260 ;
16261 return 0;
16262}
16263_ACEOF
16264rm -f conftest.$ac_objext conftest$ac_exeext
16265if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16266 (eval $ac_link) 2>&5
16267 ac_status=$?
16268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16269 (exit $ac_status); } &&
16270 { ac_try='test -s conftest$ac_exeext'
16271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16272 (eval $ac_try) 2>&5
16273 ac_status=$?
16274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16275 (exit $ac_status); }; }; then
16276 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016277else
Martin v. Löwis11437992002-04-12 09:54:03 +000016278 echo "$as_me: failed program was:" >&5
16279cat conftest.$ac_ext >&5
16280ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016281fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016282rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16283LIBS=$ac_check_lib_save_LIBS
16284fi
16285echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16286echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16287if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016288
Martin v. Löwis11437992002-04-12 09:54:03 +000016289cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016290#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016291_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016292
Martin v. Löwis0daad592001-09-30 21:09:59 +000016293fi
16294
Michael W. Hudson54241132001-12-07 15:38:26 +000016295
Martin v. Löwis0daad592001-09-30 21:09:59 +000016296# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016297echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16298echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16299if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16300 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016301else
Martin v. Löwis11437992002-04-12 09:54:03 +000016302 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016303LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016304cat >conftest.$ac_ext <<_ACEOF
16305#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016306#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016307
Martin v. Löwis0daad592001-09-30 21:09:59 +000016308/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016309#ifdef __cplusplus
16310extern "C"
16311#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016312/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016313 builtin and then its argument prototype would still apply. */
16314char rl_completion_matches ();
16315#ifdef F77_DUMMY_MAIN
16316# ifdef __cplusplus
16317 extern "C"
16318# endif
16319 int F77_DUMMY_MAIN() { return 1; }
16320#endif
16321int
16322main ()
16323{
16324rl_completion_matches ();
16325 ;
16326 return 0;
16327}
16328_ACEOF
16329rm -f conftest.$ac_objext conftest$ac_exeext
16330if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16331 (eval $ac_link) 2>&5
16332 ac_status=$?
16333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16334 (exit $ac_status); } &&
16335 { ac_try='test -s conftest$ac_exeext'
16336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16337 (eval $ac_try) 2>&5
16338 ac_status=$?
16339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16340 (exit $ac_status); }; }; then
16341 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000016342else
Martin v. Löwis11437992002-04-12 09:54:03 +000016343 echo "$as_me: failed program was:" >&5
16344cat conftest.$ac_ext >&5
16345ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000016346fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016347rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16348LIBS=$ac_check_lib_save_LIBS
16349fi
16350echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
16351echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
16352if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016353
Martin v. Löwis11437992002-04-12 09:54:03 +000016354cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016355#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016356_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016357
Guido van Rossum353ae582001-07-10 16:45:32 +000016358fi
16359
Jack Jansendd19cf82001-12-06 22:36:17 +000016360
Martin v. Löwis11437992002-04-12 09:54:03 +000016361echo "$as_me:$LINENO: checking for broken nice()" >&5
16362echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
16363if test "${ac_cv_broken_nice+set}" = set; then
16364 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016365else
Martin v. Löwis11437992002-04-12 09:54:03 +000016366
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016367if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016368 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016369else
Martin v. Löwis11437992002-04-12 09:54:03 +000016370 cat >conftest.$ac_ext <<_ACEOF
16371#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016372#include "confdefs.h"
16373
16374int main()
16375{
16376 int val1 = nice(1);
16377 if (val1 != -1 && val1 == nice(2))
16378 exit(0);
16379 exit(1);
16380}
16381
Martin v. Löwis11437992002-04-12 09:54:03 +000016382_ACEOF
16383rm -f conftest$ac_exeext
16384if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16385 (eval $ac_link) 2>&5
16386 ac_status=$?
16387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16388 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16390 (eval $ac_try) 2>&5
16391 ac_status=$?
16392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16393 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016394 ac_cv_broken_nice=yes
16395else
Martin v. Löwis11437992002-04-12 09:54:03 +000016396 echo "$as_me: program exited with status $ac_status" >&5
16397echo "$as_me: failed program was:" >&5
16398cat conftest.$ac_ext >&5
16399( exit $ac_status )
16400ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016401fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016402rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16403fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016404fi
16405
Martin v. Löwis11437992002-04-12 09:54:03 +000016406echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
16407echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016408if test "$ac_cv_broken_nice" = yes
16409then
Martin v. Löwis11437992002-04-12 09:54:03 +000016410
16411cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016412#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016413_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016414
16415fi
16416
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016417# Look for subsecond timestamps in struct stat
16418echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
16419echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
16420if test "${ac_cv_stat_tv_nsec+set}" = set; then
16421 echo $ECHO_N "(cached) $ECHO_C" >&6
16422else
16423 cat >conftest.$ac_ext <<_ACEOF
16424#line $LINENO "configure"
16425#include "confdefs.h"
16426#include <sys/stat.h>
16427#ifdef F77_DUMMY_MAIN
16428# ifdef __cplusplus
16429 extern "C"
16430# endif
16431 int F77_DUMMY_MAIN() { return 1; }
16432#endif
16433int
16434main ()
16435{
16436
16437struct stat st;
16438st.st_mtim.tv_nsec = 1;
16439
16440 ;
16441 return 0;
16442}
16443_ACEOF
16444rm -f conftest.$ac_objext
16445if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16446 (eval $ac_compile) 2>&5
16447 ac_status=$?
16448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16449 (exit $ac_status); } &&
16450 { ac_try='test -s conftest.$ac_objext'
16451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16452 (eval $ac_try) 2>&5
16453 ac_status=$?
16454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16455 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016456 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016457else
16458 echo "$as_me: failed program was:" >&5
16459cat conftest.$ac_ext >&5
16460ac_cv_stat_tv_nsec=no
16461fi
16462rm -f conftest.$ac_objext conftest.$ac_ext
16463fi
16464
16465echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
16466echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
16467if test "$ac_cv_stat_tv_nsec" = yes
16468then
16469
16470cat >>confdefs.h <<\_ACEOF
16471#define HAVE_STAT_TV_NSEC 1
16472_ACEOF
16473
16474fi
16475
Jack Jansen666b1e72001-10-31 12:11:48 +000016476# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000016477echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
16478echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
16479if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
16480 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016481else
Martin v. Löwis11437992002-04-12 09:54:03 +000016482 cat >conftest.$ac_ext <<_ACEOF
16483#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016484#include "confdefs.h"
16485#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016486#ifdef F77_DUMMY_MAIN
16487# ifdef __cplusplus
16488 extern "C"
16489# endif
16490 int F77_DUMMY_MAIN() { return 1; }
16491#endif
16492int
16493main ()
16494{
Jack Jansen666b1e72001-10-31 12:11:48 +000016495
16496 int rtn;
16497 rtn = mvwdelch(0,0,0);
16498
Martin v. Löwis11437992002-04-12 09:54:03 +000016499 ;
16500 return 0;
16501}
16502_ACEOF
16503rm -f conftest.$ac_objext
16504if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16505 (eval $ac_compile) 2>&5
16506 ac_status=$?
16507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16508 (exit $ac_status); } &&
16509 { ac_try='test -s conftest.$ac_objext'
16510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16511 (eval $ac_try) 2>&5
16512 ac_status=$?
16513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16514 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016515 ac_cv_mvwdelch_is_expression=yes
16516else
Martin v. Löwis11437992002-04-12 09:54:03 +000016517 echo "$as_me: failed program was:" >&5
16518cat conftest.$ac_ext >&5
16519ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016520fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016521rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016522fi
16523
Martin v. Löwis11437992002-04-12 09:54:03 +000016524echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
16525echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016526
16527if test "$ac_cv_mvwdelch_is_expression" = yes
16528then
Martin v. Löwis11437992002-04-12 09:54:03 +000016529
16530cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016531#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016532_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016533
16534fi
16535
Martin v. Löwis11437992002-04-12 09:54:03 +000016536echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
16537echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
16538if test "${ac_cv_window_has_flags+set}" = set; then
16539 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016540else
Martin v. Löwis11437992002-04-12 09:54:03 +000016541 cat >conftest.$ac_ext <<_ACEOF
16542#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016543#include "confdefs.h"
16544#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016545#ifdef F77_DUMMY_MAIN
16546# ifdef __cplusplus
16547 extern "C"
16548# endif
16549 int F77_DUMMY_MAIN() { return 1; }
16550#endif
16551int
16552main ()
16553{
Jack Jansen666b1e72001-10-31 12:11:48 +000016554
16555 WINDOW *w;
16556 w->_flags = 0;
16557
Martin v. Löwis11437992002-04-12 09:54:03 +000016558 ;
16559 return 0;
16560}
16561_ACEOF
16562rm -f conftest.$ac_objext
16563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16564 (eval $ac_compile) 2>&5
16565 ac_status=$?
16566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16567 (exit $ac_status); } &&
16568 { ac_try='test -s conftest.$ac_objext'
16569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16570 (eval $ac_try) 2>&5
16571 ac_status=$?
16572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16573 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016574 ac_cv_window_has_flags=yes
16575else
Martin v. Löwis11437992002-04-12 09:54:03 +000016576 echo "$as_me: failed program was:" >&5
16577cat conftest.$ac_ext >&5
16578ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016579fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016580rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016581fi
16582
Martin v. Löwis11437992002-04-12 09:54:03 +000016583echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
16584echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016585
Jack Jansen666b1e72001-10-31 12:11:48 +000016586
16587if test "$ac_cv_window_has_flags" = yes
16588then
Martin v. Löwis11437992002-04-12 09:54:03 +000016589
16590cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016591#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016592_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016593
16594fi
16595
Martin v. Löwis11437992002-04-12 09:54:03 +000016596echo "$as_me:$LINENO: checking for socklen_t" >&5
16597echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
16598if test "${ac_cv_type_socklen_t+set}" = set; then
16599 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000016600else
Martin v. Löwis11437992002-04-12 09:54:03 +000016601 cat >conftest.$ac_ext <<_ACEOF
16602#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000016603#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000016604
16605#ifdef HAVE_SYS_TYPES_H
16606#include <sys/types.h>
16607#endif
16608#ifdef HAVE_SYS_SOCKET_H
16609#include <sys/socket.h>
16610#endif
16611
16612
Martin v. Löwis11437992002-04-12 09:54:03 +000016613#ifdef F77_DUMMY_MAIN
16614# ifdef __cplusplus
16615 extern "C"
16616# endif
16617 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016618#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016619int
16620main ()
16621{
16622if ((socklen_t *) 0)
16623 return 0;
16624if (sizeof (socklen_t))
16625 return 0;
16626 ;
16627 return 0;
16628}
16629_ACEOF
16630rm -f conftest.$ac_objext
16631if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16632 (eval $ac_compile) 2>&5
16633 ac_status=$?
16634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16635 (exit $ac_status); } &&
16636 { ac_try='test -s conftest.$ac_objext'
16637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16638 (eval $ac_try) 2>&5
16639 ac_status=$?
16640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16641 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016642 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000016643else
Martin v. Löwis11437992002-04-12 09:54:03 +000016644 echo "$as_me: failed program was:" >&5
16645cat conftest.$ac_ext >&5
16646ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000016647fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016648rm -f conftest.$ac_objext conftest.$ac_ext
16649fi
16650echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
16651echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
16652if test $ac_cv_type_socklen_t = yes; then
16653 :
16654else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016655
Martin v. Löwis01c04012002-11-11 14:58:44 +000016656cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016657#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000016658_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016659
16660fi
16661
Michael W. Hudson54241132001-12-07 15:38:26 +000016662
Michael W. Hudson54241132001-12-07 15:38:26 +000016663
16664
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016665for h in `(cd $srcdir;echo Python/thread_*.h)`
16666do
16667 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16668done
16669
Michael W. Hudson54241132001-12-07 15:38:26 +000016670
Jack Jansen0b06be72002-06-21 14:48:38 +000016671SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000016672echo "$as_me:$LINENO: checking for build directories" >&5
16673echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016674for dir in $SRCDIRS; do
16675 if test ! -d $dir; then
16676 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016677 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016678done
Martin v. Löwis11437992002-04-12 09:54:03 +000016679echo "$as_me:$LINENO: result: done" >&5
16680echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000016681
Guido van Rossum627b2d71993-12-24 10:39:16 +000016682# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000016683ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016684
Martin v. Löwis11437992002-04-12 09:54:03 +000016685cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016686# This file is a shell script that caches the results of configure
16687# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016688# scripts and configure runs, see configure's option --config-cache.
16689# It is not useful on other systems. If it contains results you don't
16690# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016691#
Martin v. Löwis11437992002-04-12 09:54:03 +000016692# config.status only pays attention to the cache file if you give it
16693# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016694#
Martin v. Löwis11437992002-04-12 09:54:03 +000016695# `ac_cv_env_foo' variables (set or unset) will be overriden when
16696# loading this file, other *unset* `ac_cv_foo' will be assigned the
16697# following values.
16698
16699_ACEOF
16700
Guido van Rossumf78abae1997-01-21 22:02:36 +000016701# The following way of writing the cache mishandles newlines in values,
16702# but we know of no workaround that is simple, portable, and efficient.
16703# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016704# Ultrix sh set writes to stderr and can't be redirected directly,
16705# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000016706{
16707 (set) 2>&1 |
16708 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16709 *ac_space=\ *)
16710 # `set' does not quote correctly, so add quotes (double-quote
16711 # substitution turns \\\\ into \\, and sed turns \\ into \).
16712 sed -n \
16713 "s/'/'\\\\''/g;
16714 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16715 ;;
16716 *)
16717 # `set' quotes correctly as required by POSIX, so do not add quotes.
16718 sed -n \
16719 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16720 ;;
16721 esac;
16722} |
16723 sed '
16724 t clear
16725 : clear
16726 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16727 t end
16728 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16729 : end' >>confcache
16730if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016731 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016732 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16733 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016734 else
16735 echo "not updating unwritable cache $cache_file"
16736 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016737fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016738rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016739
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016740test "x$prefix" = xNONE && prefix=$ac_default_prefix
16741# Let make expand exec_prefix.
16742test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016743
Martin v. Löwis11437992002-04-12 09:54:03 +000016744# VPATH may cause trouble with some makes, so we remove $(srcdir),
16745# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16746# trailing colons and then remove the whole line if VPATH becomes empty
16747# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016748if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016749 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16750s/:*\$(srcdir):*/:/;
16751s/:*\${srcdir}:*/:/;
16752s/:*@srcdir@:*/:/;
16753s/^\([^=]*=[ ]*\):*/\1/;
16754s/:*$//;
16755s/^[^=]*=[ ]*$//;
16756}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016757fi
16758
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016759DEFS=-DHAVE_CONFIG_H
16760
Martin v. Löwis11437992002-04-12 09:54:03 +000016761
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016762: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016763ac_clean_files_save=$ac_clean_files
16764ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16765{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16766echo "$as_me: creating $CONFIG_STATUS" >&6;}
16767cat >$CONFIG_STATUS <<_ACEOF
16768#! $SHELL
16769# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016770# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016771# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016772# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016773
Martin v. Löwis11437992002-04-12 09:54:03 +000016774debug=false
16775SHELL=\${CONFIG_SHELL-$SHELL}
16776_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016777
Martin v. Löwis11437992002-04-12 09:54:03 +000016778cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016779
Martin v. Löwis11437992002-04-12 09:54:03 +000016780## --------------------- ##
16781## M4sh Initialization. ##
16782## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016783
Martin v. Löwis11437992002-04-12 09:54:03 +000016784# Be Bourne compatible
16785if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16786 emulate sh
16787 NULLCMD=:
16788elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16789 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016790fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016791
Martin v. Löwis11437992002-04-12 09:54:03 +000016792# NLS nuisances.
16793# Support unset when possible.
16794if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16795 as_unset=unset
16796else
16797 as_unset=false
16798fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016799
Martin v. Löwis11437992002-04-12 09:54:03 +000016800(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16801 { $as_unset LANG || test "${LANG+set}" != set; } ||
16802 { LANG=C; export LANG; }
16803(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16804 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16805 { LC_ALL=C; export LC_ALL; }
16806(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16807 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16808 { LC_TIME=C; export LC_TIME; }
16809(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16810 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16811 { LC_CTYPE=C; export LC_CTYPE; }
16812(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16813 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16814 { LANGUAGE=C; export LANGUAGE; }
16815(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16816 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16817 { LC_COLLATE=C; export LC_COLLATE; }
16818(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16819 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16820 { LC_NUMERIC=C; export LC_NUMERIC; }
16821(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16822 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16823 { LC_MESSAGES=C; export LC_MESSAGES; }
16824
16825
16826# Name of the executable.
16827as_me=`(basename "$0") 2>/dev/null ||
16828$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16829 X"$0" : 'X\(//\)$' \| \
16830 X"$0" : 'X\(/\)$' \| \
16831 . : '\(.\)' 2>/dev/null ||
16832echo X/"$0" |
16833 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16834 /^X\/\(\/\/\)$/{ s//\1/; q; }
16835 /^X\/\(\/\).*/{ s//\1/; q; }
16836 s/.*/./; q'`
16837
16838# PATH needs CR, and LINENO needs CR and PATH.
16839# Avoid depending upon Character Ranges.
16840as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16841as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16842as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16843as_cr_digits='0123456789'
16844as_cr_alnum=$as_cr_Letters$as_cr_digits
16845
16846# The user is always right.
16847if test "${PATH_SEPARATOR+set}" != set; then
16848 echo "#! /bin/sh" >conftest.sh
16849 echo "exit 0" >>conftest.sh
16850 chmod +x conftest.sh
16851 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16852 PATH_SEPARATOR=';'
16853 else
16854 PATH_SEPARATOR=:
16855 fi
16856 rm -f conftest.sh
16857fi
16858
16859
16860 as_lineno_1=$LINENO
16861 as_lineno_2=$LINENO
16862 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16863 test "x$as_lineno_1" != "x$as_lineno_2" &&
16864 test "x$as_lineno_3" = "x$as_lineno_2" || {
16865 # Find who we are. Look in the path if we contain no path at all
16866 # relative or not.
16867 case $0 in
16868 *[\\/]* ) as_myself=$0 ;;
16869 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16870for as_dir in $PATH
16871do
16872 IFS=$as_save_IFS
16873 test -z "$as_dir" && as_dir=.
16874 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16875done
16876
16877 ;;
16878 esac
16879 # We did not find ourselves, most probably we were run as `sh COMMAND'
16880 # in which case we are not to be found in the path.
16881 if test "x$as_myself" = x; then
16882 as_myself=$0
16883 fi
16884 if test ! -f "$as_myself"; then
16885 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16886echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16887 { (exit 1); exit 1; }; }
16888 fi
16889 case $CONFIG_SHELL in
16890 '')
16891 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16892for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16893do
16894 IFS=$as_save_IFS
16895 test -z "$as_dir" && as_dir=.
16896 for as_base in sh bash ksh sh5; do
16897 case $as_dir in
16898 /*)
16899 if ("$as_dir/$as_base" -c '
16900 as_lineno_1=$LINENO
16901 as_lineno_2=$LINENO
16902 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16903 test "x$as_lineno_1" != "x$as_lineno_2" &&
16904 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16905 CONFIG_SHELL=$as_dir/$as_base
16906 export CONFIG_SHELL
16907 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16908 fi;;
16909 esac
16910 done
16911done
16912;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016913 esac
16914
Martin v. Löwis11437992002-04-12 09:54:03 +000016915 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16916 # uniformly replaced by the line number. The first 'sed' inserts a
16917 # line-number line before each line; the second 'sed' does the real
16918 # work. The second script uses 'N' to pair each line-number line
16919 # with the numbered line, and appends trailing '-' during
16920 # substitution so that $LINENO is not a special case at line end.
16921 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16922 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16923 sed '=' <$as_myself |
16924 sed '
16925 N
16926 s,$,-,
16927 : loop
16928 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16929 t loop
16930 s,-$,,
16931 s,^['$as_cr_digits']*\n,,
16932 ' >$as_me.lineno &&
16933 chmod +x $as_me.lineno ||
16934 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16935echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16936 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016937
Martin v. Löwis11437992002-04-12 09:54:03 +000016938 # Don't try to exec as it changes $[0], causing all sort of problems
16939 # (the dirname of $[0] is not the place where we might find the
16940 # original and so on. Autoconf is especially sensible to this).
16941 . ./$as_me.lineno
16942 # Exit status is that of the last command.
16943 exit
16944}
16945
16946
16947case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16948 *c*,-n*) ECHO_N= ECHO_C='
16949' ECHO_T=' ' ;;
16950 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16951 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16952esac
16953
16954if expr a : '\(a\)' >/dev/null 2>&1; then
16955 as_expr=expr
16956else
16957 as_expr=false
16958fi
16959
16960rm -f conf$$ conf$$.exe conf$$.file
16961echo >conf$$.file
16962if ln -s conf$$.file conf$$ 2>/dev/null; then
16963 # We could just check for DJGPP; but this test a) works b) is more generic
16964 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16965 if test -f conf$$.exe; then
16966 # Don't use ln at all; we don't have any links
16967 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016968 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016969 as_ln_s='ln -s'
16970 fi
16971elif ln conf$$.file conf$$ 2>/dev/null; then
16972 as_ln_s=ln
16973else
16974 as_ln_s='cp -p'
16975fi
16976rm -f conf$$ conf$$.exe conf$$.file
16977
16978as_executable_p="test -f"
16979
16980# Sed expression to map a string onto a valid CPP name.
16981as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16982
16983# Sed expression to map a string onto a valid variable name.
16984as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16985
16986
16987# IFS
16988# We need space, tab and new line, in precisely that order.
16989as_nl='
16990'
16991IFS=" $as_nl"
16992
16993# CDPATH.
16994$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16995
16996exec 6>&1
16997
16998# Open the log real soon, to keep \$[0] and so on meaningful, and to
16999# report actual input values of CONFIG_FILES etc. instead of their
17000# values after options handling. Logging --version etc. is OK.
17001exec 5>>config.log
17002{
17003 echo
17004 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17005## Running $as_me. ##
17006_ASBOX
17007} >&5
17008cat >&5 <<_CSEOF
17009
Martin v. Löwis88afe662002-10-26 13:47:44 +000017010This file was extended by python $as_me 2.3, which was
Martin v. Löwis11437992002-04-12 09:54:03 +000017011generated by GNU Autoconf 2.53. Invocation command line was
17012
17013 CONFIG_FILES = $CONFIG_FILES
17014 CONFIG_HEADERS = $CONFIG_HEADERS
17015 CONFIG_LINKS = $CONFIG_LINKS
17016 CONFIG_COMMANDS = $CONFIG_COMMANDS
17017 $ $0 $@
17018
17019_CSEOF
17020echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17021echo >&5
17022_ACEOF
17023
17024# Files that config.status was made for.
17025if test -n "$ac_config_files"; then
17026 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17027fi
17028
17029if test -n "$ac_config_headers"; then
17030 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17031fi
17032
17033if test -n "$ac_config_links"; then
17034 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17035fi
17036
17037if test -n "$ac_config_commands"; then
17038 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17039fi
17040
17041cat >>$CONFIG_STATUS <<\_ACEOF
17042
17043ac_cs_usage="\
17044\`$as_me' instantiates files from templates according to the
17045current configuration.
17046
17047Usage: $0 [OPTIONS] [FILE]...
17048
17049 -h, --help print this help, then exit
17050 -V, --version print version number, then exit
17051 -d, --debug don't remove temporary files
17052 --recheck update $as_me by reconfiguring in the same conditions
17053 --file=FILE[:TEMPLATE]
17054 instantiate the configuration file FILE
17055 --header=FILE[:TEMPLATE]
17056 instantiate the configuration header FILE
17057
17058Configuration files:
17059$config_files
17060
17061Configuration headers:
17062$config_headers
17063
17064Report bugs to <bug-autoconf@gnu.org>."
17065_ACEOF
17066
17067cat >>$CONFIG_STATUS <<_ACEOF
17068ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017069python config.status 2.3
Martin v. Löwis11437992002-04-12 09:54:03 +000017070configured by $0, generated by GNU Autoconf 2.53,
17071 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17072
17073Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17074Free Software Foundation, Inc.
17075This config.status script is free software; the Free Software Foundation
17076gives unlimited permission to copy, distribute and modify it."
17077srcdir=$srcdir
17078INSTALL="$INSTALL"
17079_ACEOF
17080
17081cat >>$CONFIG_STATUS <<\_ACEOF
17082# If no file are specified by the user, then we need to provide default
17083# value. By we need to know if files were specified by the user.
17084ac_need_defaults=:
17085while test $# != 0
17086do
17087 case $1 in
17088 --*=*)
17089 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17090 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17091 shift
17092 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17093 shift
17094 ;;
17095 -*);;
17096 *) # This is not an option, so the user has probably given explicit
17097 # arguments.
17098 ac_need_defaults=false;;
17099 esac
17100
17101 case $1 in
17102 # Handling of the options.
17103_ACEOF
17104cat >>$CONFIG_STATUS <<_ACEOF
17105 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17106 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17107 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17108_ACEOF
17109cat >>$CONFIG_STATUS <<\_ACEOF
17110 --version | --vers* | -V )
17111 echo "$ac_cs_version"; exit 0 ;;
17112 --he | --h)
17113 # Conflict between --help and --header
17114 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17115Try \`$0 --help' for more information." >&5
17116echo "$as_me: error: ambiguous option: $1
17117Try \`$0 --help' for more information." >&2;}
17118 { (exit 1); exit 1; }; };;
17119 --help | --hel | -h )
17120 echo "$ac_cs_usage"; exit 0 ;;
17121 --debug | --d* | -d )
17122 debug=: ;;
17123 --file | --fil | --fi | --f )
17124 shift
17125 CONFIG_FILES="$CONFIG_FILES $1"
17126 ac_need_defaults=false;;
17127 --header | --heade | --head | --hea )
17128 shift
17129 CONFIG_HEADERS="$CONFIG_HEADERS $1"
17130 ac_need_defaults=false;;
17131
17132 # This is an error.
17133 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17134Try \`$0 --help' for more information." >&5
17135echo "$as_me: error: unrecognized option: $1
17136Try \`$0 --help' for more information." >&2;}
17137 { (exit 1); exit 1; }; } ;;
17138
17139 *) ac_config_targets="$ac_config_targets $1" ;;
17140
17141 esac
17142 shift
17143done
17144
17145_ACEOF
17146
17147
17148
17149
17150
17151cat >>$CONFIG_STATUS <<\_ACEOF
17152for ac_config_target in $ac_config_targets
17153do
17154 case "$ac_config_target" in
17155 # Handling of arguments.
17156 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17157 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
17158 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17159 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17160echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17161 { (exit 1); exit 1; }; };;
17162 esac
17163done
17164
17165# If the user did not use the arguments to specify the items to instantiate,
17166# then the envvar interface is used. Set only those that are not.
17167# We use the long form for the default assignment because of an extremely
17168# bizarre bug on SunOS 4.1.3.
17169if $ac_need_defaults; then
17170 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17171 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17172fi
17173
17174# Create a temporary directory, and hook for its removal unless debugging.
17175$debug ||
17176{
17177 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17178 trap '{ (exit 1); exit 1; }' 1 2 13 15
17179}
17180
17181# Create a (secure) tmp directory for tmp files.
17182: ${TMPDIR=/tmp}
17183{
17184 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17185 test -n "$tmp" && test -d "$tmp"
17186} ||
17187{
17188 tmp=$TMPDIR/cs$$-$RANDOM
17189 (umask 077 && mkdir $tmp)
17190} ||
17191{
17192 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17193 { (exit 1); exit 1; }
17194}
17195
17196_ACEOF
17197
17198cat >>$CONFIG_STATUS <<_ACEOF
17199
17200#
17201# CONFIG_FILES section.
17202#
17203
17204# No need to generate the scripts if there are no CONFIG_FILES.
17205# This happens for instance when ./config.status config.h
17206if test -n "\$CONFIG_FILES"; then
17207 # Protect against being on the right side of a sed subst in config.status.
17208 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17209 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17210s,@SHELL@,$SHELL,;t t
17211s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17212s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17213s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17214s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17215s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17216s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17217s,@exec_prefix@,$exec_prefix,;t t
17218s,@prefix@,$prefix,;t t
17219s,@program_transform_name@,$program_transform_name,;t t
17220s,@bindir@,$bindir,;t t
17221s,@sbindir@,$sbindir,;t t
17222s,@libexecdir@,$libexecdir,;t t
17223s,@datadir@,$datadir,;t t
17224s,@sysconfdir@,$sysconfdir,;t t
17225s,@sharedstatedir@,$sharedstatedir,;t t
17226s,@localstatedir@,$localstatedir,;t t
17227s,@libdir@,$libdir,;t t
17228s,@includedir@,$includedir,;t t
17229s,@oldincludedir@,$oldincludedir,;t t
17230s,@infodir@,$infodir,;t t
17231s,@mandir@,$mandir,;t t
17232s,@build_alias@,$build_alias,;t t
17233s,@host_alias@,$host_alias,;t t
17234s,@target_alias@,$target_alias,;t t
17235s,@DEFS@,$DEFS,;t t
17236s,@ECHO_C@,$ECHO_C,;t t
17237s,@ECHO_N@,$ECHO_N,;t t
17238s,@ECHO_T@,$ECHO_T,;t t
17239s,@LIBS@,$LIBS,;t t
17240s,@VERSION@,$VERSION,;t t
17241s,@SOVERSION@,$SOVERSION,;t t
17242s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
17243s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
17244s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
17245s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
17246s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
17247s,@MACHDEP@,$MACHDEP,;t t
17248s,@SGI_ABI@,$SGI_ABI,;t t
17249s,@CXX@,$CXX,;t t
17250s,@MAINOBJ@,$MAINOBJ,;t t
17251s,@EXEEXT@,$EXEEXT,;t t
17252s,@CC@,$CC,;t t
17253s,@CFLAGS@,$CFLAGS,;t t
17254s,@LDFLAGS@,$LDFLAGS,;t t
17255s,@CPPFLAGS@,$CPPFLAGS,;t t
17256s,@ac_ct_CC@,$ac_ct_CC,;t t
17257s,@OBJEXT@,$OBJEXT,;t t
17258s,@CPP@,$CPP,;t t
17259s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
17260s,@LIBRARY@,$LIBRARY,;t t
17261s,@LDLIBRARY@,$LDLIBRARY,;t t
17262s,@DLLLIBRARY@,$DLLLIBRARY,;t t
17263s,@BLDLIBRARY@,$BLDLIBRARY,;t t
17264s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
17265s,@INSTSONAME@,$INSTSONAME,;t t
17266s,@RUNSHARED@,$RUNSHARED,;t t
17267s,@LINKCC@,$LINKCC,;t t
17268s,@RANLIB@,$RANLIB,;t t
17269s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17270s,@AR@,$AR,;t t
17271s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17272s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17273s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17274s,@LN@,$LN,;t t
17275s,@OPT@,$OPT,;t t
17276s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
17277s,@SO@,$SO,;t t
17278s,@LDSHARED@,$LDSHARED,;t t
17279s,@BLDSHARED@,$BLDSHARED,;t t
17280s,@CCSHARED@,$CCSHARED,;t t
17281s,@LINKFORSHARED@,$LINKFORSHARED,;t t
17282s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017283s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017284s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
17285s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
17286s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
17287s,@LDLAST@,$LDLAST,;t t
17288s,@THREADOBJ@,$THREADOBJ,;t t
17289s,@DLINCLDIR@,$DLINCLDIR,;t t
17290s,@DYNLOADFILE@,$DYNLOADFILE,;t t
17291s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
17292s,@LIBOBJS@,$LIBOBJS,;t t
17293s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
17294s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
17295s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
17296s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
17297s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
17298s,@LIBM@,$LIBM,;t t
17299s,@LIBC@,$LIBC,;t t
17300s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
17301s,@THREADHEADERS@,$THREADHEADERS,;t t
17302s,@SRCDIRS@,$SRCDIRS,;t t
17303CEOF
17304
17305_ACEOF
17306
17307 cat >>$CONFIG_STATUS <<\_ACEOF
17308 # Split the substitutions into bite-sized pieces for seds with
17309 # small command number limits, like on Digital OSF/1 and HP-UX.
17310 ac_max_sed_lines=48
17311 ac_sed_frag=1 # Number of current file.
17312 ac_beg=1 # First line for current file.
17313 ac_end=$ac_max_sed_lines # Line after last line for current file.
17314 ac_more_lines=:
17315 ac_sed_cmds=
17316 while $ac_more_lines; do
17317 if test $ac_beg -gt 1; then
17318 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17319 else
17320 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17321 fi
17322 if test ! -s $tmp/subs.frag; then
17323 ac_more_lines=false
17324 else
17325 # The purpose of the label and of the branching condition is to
17326 # speed up the sed processing (if there are no `@' at all, there
17327 # is no need to browse any of the substitutions).
17328 # These are the two extra sed commands mentioned above.
17329 (echo ':t
17330 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17331 if test -z "$ac_sed_cmds"; then
17332 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17333 else
17334 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17335 fi
17336 ac_sed_frag=`expr $ac_sed_frag + 1`
17337 ac_beg=$ac_end
17338 ac_end=`expr $ac_end + $ac_max_sed_lines`
17339 fi
17340 done
17341 if test -z "$ac_sed_cmds"; then
17342 ac_sed_cmds=cat
17343 fi
17344fi # test -n "$CONFIG_FILES"
17345
17346_ACEOF
17347cat >>$CONFIG_STATUS <<\_ACEOF
17348for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17349 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17350 case $ac_file in
17351 - | *:- | *:-:* ) # input from stdin
17352 cat >$tmp/stdin
17353 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17354 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17355 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17356 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17357 * ) ac_file_in=$ac_file.in ;;
17358 esac
17359
17360 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17361 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17362$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17363 X"$ac_file" : 'X\(//\)[^/]' \| \
17364 X"$ac_file" : 'X\(//\)$' \| \
17365 X"$ac_file" : 'X\(/\)' \| \
17366 . : '\(.\)' 2>/dev/null ||
17367echo X"$ac_file" |
17368 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17369 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17370 /^X\(\/\/\)$/{ s//\1/; q; }
17371 /^X\(\/\).*/{ s//\1/; q; }
17372 s/.*/./; q'`
17373 { case "$ac_dir" in
17374 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17375 *) as_incr_dir=.;;
17376esac
17377as_dummy="$ac_dir"
17378for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17379 case $as_mkdir_dir in
17380 # Skip DOS drivespec
17381 ?:) as_incr_dir=$as_mkdir_dir ;;
17382 *)
17383 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17384 test -d "$as_incr_dir" ||
17385 mkdir "$as_incr_dir" ||
17386 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17387echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17388 { (exit 1); exit 1; }; }
17389 ;;
17390 esac
17391done; }
17392
17393 ac_builddir=.
17394
17395if test "$ac_dir" != .; then
17396 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17397 # A "../" for each directory in $ac_dir_suffix.
17398 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17399else
17400 ac_dir_suffix= ac_top_builddir=
17401fi
17402
17403case $srcdir in
17404 .) # No --srcdir option. We are building in place.
17405 ac_srcdir=.
17406 if test -z "$ac_top_builddir"; then
17407 ac_top_srcdir=.
17408 else
17409 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17410 fi ;;
17411 [\\/]* | ?:[\\/]* ) # Absolute path.
17412 ac_srcdir=$srcdir$ac_dir_suffix;
17413 ac_top_srcdir=$srcdir ;;
17414 *) # Relative path.
17415 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17416 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17417esac
17418# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
17419# absolute.
17420ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise3271202002-11-07 07:42:30 +000017421ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000017422ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
17423ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
17424
17425
17426 case $INSTALL in
17427 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17428 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
17429 esac
17430
17431 if test x"$ac_file" != x-; then
17432 { echo "$as_me:$LINENO: creating $ac_file" >&5
17433echo "$as_me: creating $ac_file" >&6;}
17434 rm -f "$ac_file"
17435 fi
17436 # Let's still pretend it is `configure' which instantiates (i.e., don't
17437 # use $as_me), people would be surprised to read:
17438 # /* config.h. Generated by config.status. */
17439 if test x"$ac_file" = x-; then
17440 configure_input=
17441 else
17442 configure_input="$ac_file. "
17443 fi
17444 configure_input=$configure_input"Generated from `echo $ac_file_in |
17445 sed 's,.*/,,'` by configure."
17446
17447 # First look for the input files in the build tree, otherwise in the
17448 # src tree.
17449 ac_file_inputs=`IFS=:
17450 for f in $ac_file_in; do
17451 case $f in
17452 -) echo $tmp/stdin ;;
17453 [\\/$]*)
17454 # Absolute (can't be DOS-style, as IFS=:)
17455 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17456echo "$as_me: error: cannot find input file: $f" >&2;}
17457 { (exit 1); exit 1; }; }
17458 echo $f;;
17459 *) # Relative
17460 if test -f "$f"; then
17461 # Build tree
17462 echo $f
17463 elif test -f "$srcdir/$f"; then
17464 # Source tree
17465 echo $srcdir/$f
17466 else
17467 # /dev/null tree
17468 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17469echo "$as_me: error: cannot find input file: $f" >&2;}
17470 { (exit 1); exit 1; }; }
17471 fi;;
17472 esac
17473 done` || { (exit 1); exit 1; }
17474_ACEOF
17475cat >>$CONFIG_STATUS <<_ACEOF
17476 sed "$ac_vpsub
17477$extrasub
17478_ACEOF
17479cat >>$CONFIG_STATUS <<\_ACEOF
17480:t
17481/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17482s,@configure_input@,$configure_input,;t t
17483s,@srcdir@,$ac_srcdir,;t t
17484s,@abs_srcdir@,$ac_abs_srcdir,;t t
17485s,@top_srcdir@,$ac_top_srcdir,;t t
17486s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17487s,@builddir@,$ac_builddir,;t t
17488s,@abs_builddir@,$ac_abs_builddir,;t t
17489s,@top_builddir@,$ac_top_builddir,;t t
17490s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17491s,@INSTALL@,$ac_INSTALL,;t t
17492" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17493 rm -f $tmp/stdin
17494 if test x"$ac_file" != x-; then
17495 mv $tmp/out $ac_file
17496 else
17497 cat $tmp/out
17498 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017499 fi
17500
Martin v. Löwis11437992002-04-12 09:54:03 +000017501done
17502_ACEOF
17503cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017504
Martin v. Löwis11437992002-04-12 09:54:03 +000017505#
17506# CONFIG_HEADER section.
17507#
Guido van Rossum627b2d71993-12-24 10:39:16 +000017508
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017509# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17510# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017511#
17512# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000017513ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17514ac_dB='[ ].*$,\1#\2'
17515ac_dC=' '
17516ac_dD=',;t'
17517# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17518ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17519ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017520ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000017521ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017522
Martin v. Löwis11437992002-04-12 09:54:03 +000017523for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000017524 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000017525 case $ac_file in
17526 - | *:- | *:-:* ) # input from stdin
17527 cat >$tmp/stdin
17528 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17529 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17530 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17531 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17532 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017533 esac
17534
Martin v. Löwis11437992002-04-12 09:54:03 +000017535 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17536echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017537
Martin v. Löwis11437992002-04-12 09:54:03 +000017538 # First look for the input files in the build tree, otherwise in the
17539 # src tree.
17540 ac_file_inputs=`IFS=:
17541 for f in $ac_file_in; do
17542 case $f in
17543 -) echo $tmp/stdin ;;
17544 [\\/$]*)
17545 # Absolute (can't be DOS-style, as IFS=:)
17546 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17547echo "$as_me: error: cannot find input file: $f" >&2;}
17548 { (exit 1); exit 1; }; }
17549 echo $f;;
17550 *) # Relative
17551 if test -f "$f"; then
17552 # Build tree
17553 echo $f
17554 elif test -f "$srcdir/$f"; then
17555 # Source tree
17556 echo $srcdir/$f
17557 else
17558 # /dev/null tree
17559 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17560echo "$as_me: error: cannot find input file: $f" >&2;}
17561 { (exit 1); exit 1; }; }
17562 fi;;
17563 esac
17564 done` || { (exit 1); exit 1; }
17565 # Remove the trailing spaces.
17566 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017567
Martin v. Löwis11437992002-04-12 09:54:03 +000017568_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017569
Martin v. Löwis11437992002-04-12 09:54:03 +000017570# Transform confdefs.h into two sed scripts, `conftest.defines' and
17571# `conftest.undefs', that substitutes the proper values into
17572# config.h.in to produce config.h. The first handles `#define'
17573# templates, and the second `#undef' templates.
17574# And first: Protect against being on the right side of a sed subst in
17575# config.status. Protect against being in an unquoted here document
17576# in config.status.
17577rm -f conftest.defines conftest.undefs
17578# Using a here document instead of a string reduces the quoting nightmare.
17579# Putting comments in sed scripts is not portable.
17580#
17581# `end' is used to avoid that the second main sed command (meant for
17582# 0-ary CPP macros) applies to n-ary macro definitions.
17583# See the Autoconf documentation for `clear'.
17584cat >confdef2sed.sed <<\_ACEOF
17585s/[\\&,]/\\&/g
17586s,[\\$`],\\&,g
17587t clear
17588: clear
17589s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
17590t end
17591s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
17592: end
17593_ACEOF
17594# If some macros were called several times there might be several times
17595# the same #defines, which is useless. Nevertheless, we may not want to
17596# sort them, since we want the *last* AC-DEFINE to be honored.
17597uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17598sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17599rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017600
17601# This sed command replaces #undef with comments. This is necessary, for
17602# example, in the case of _POSIX_SOURCE, which is predefined and required
17603# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017604cat >>conftest.undefs <<\_ACEOF
17605s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
17606_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017607
Martin v. Löwis11437992002-04-12 09:54:03 +000017608# Break up conftest.defines because some shells have a limit on the size
17609# of here documents, and old seds have small limits too (100 cmds).
17610echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
17611echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
17612echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17613echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017614rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000017615while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000017616do
Martin v. Löwis11437992002-04-12 09:54:03 +000017617 # Write a limited-size here document to $tmp/defines.sed.
17618 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17619 # Speed up: don't consider the non `#define' lines.
17620 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
17621 # Work around the forget-to-reset-the-flag bug.
17622 echo 't clr' >>$CONFIG_STATUS
17623 echo ': clr' >>$CONFIG_STATUS
17624 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017625 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017626 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17627 rm -f $tmp/in
17628 mv $tmp/out $tmp/in
17629' >>$CONFIG_STATUS
17630 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17631 rm -f conftest.defines
17632 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000017633done
Martin v. Löwis11437992002-04-12 09:54:03 +000017634rm -f conftest.defines
17635echo ' fi # egrep' >>$CONFIG_STATUS
17636echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017637
Martin v. Löwis11437992002-04-12 09:54:03 +000017638# Break up conftest.undefs because some shells have a limit on the size
17639# of here documents, and old seds have small limits too (100 cmds).
17640echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
17641rm -f conftest.tail
17642while grep . conftest.undefs >/dev/null
17643do
17644 # Write a limited-size here document to $tmp/undefs.sed.
17645 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17646 # Speed up: don't consider the non `#undef'
17647 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
17648 # Work around the forget-to-reset-the-flag bug.
17649 echo 't clr' >>$CONFIG_STATUS
17650 echo ': clr' >>$CONFIG_STATUS
17651 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
17652 echo 'CEOF
17653 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17654 rm -f $tmp/in
17655 mv $tmp/out $tmp/in
17656' >>$CONFIG_STATUS
17657 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17658 rm -f conftest.undefs
17659 mv conftest.tail conftest.undefs
17660done
17661rm -f conftest.undefs
17662
17663cat >>$CONFIG_STATUS <<\_ACEOF
17664 # Let's still pretend it is `configure' which instantiates (i.e., don't
17665 # use $as_me), people would be surprised to read:
17666 # /* config.h. Generated by config.status. */
17667 if test x"$ac_file" = x-; then
17668 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000017669 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017670 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000017671 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017672 cat $tmp/in >>$tmp/config.h
17673 rm -f $tmp/in
17674 if test x"$ac_file" != x-; then
17675 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17676 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17677echo "$as_me: $ac_file is unchanged" >&6;}
17678 else
17679 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17680$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17681 X"$ac_file" : 'X\(//\)[^/]' \| \
17682 X"$ac_file" : 'X\(//\)$' \| \
17683 X"$ac_file" : 'X\(/\)' \| \
17684 . : '\(.\)' 2>/dev/null ||
17685echo X"$ac_file" |
17686 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17687 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17688 /^X\(\/\/\)$/{ s//\1/; q; }
17689 /^X\(\/\).*/{ s//\1/; q; }
17690 s/.*/./; q'`
17691 { case "$ac_dir" in
17692 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17693 *) as_incr_dir=.;;
17694esac
17695as_dummy="$ac_dir"
17696for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17697 case $as_mkdir_dir in
17698 # Skip DOS drivespec
17699 ?:) as_incr_dir=$as_mkdir_dir ;;
17700 *)
17701 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17702 test -d "$as_incr_dir" ||
17703 mkdir "$as_incr_dir" ||
17704 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17705echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17706 { (exit 1); exit 1; }; }
17707 ;;
17708 esac
17709done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017710
Martin v. Löwis11437992002-04-12 09:54:03 +000017711 rm -f $ac_file
17712 mv $tmp/config.h $ac_file
17713 fi
17714 else
17715 cat $tmp/config.h
17716 rm -f $tmp/config.h
17717 fi
17718done
17719_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017720
Martin v. Löwis11437992002-04-12 09:54:03 +000017721cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017722
Martin v. Löwis11437992002-04-12 09:54:03 +000017723{ (exit 0); exit 0; }
17724_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017725chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000017726ac_clean_files=$ac_clean_files_save
17727
17728
17729# configure is writing to config.log, and then calls config.status.
17730# config.status does its own redirection, appending to config.log.
17731# Unfortunately, on DOS this fails, as config.log is still kept open
17732# by configure, so config.status won't be able to write to it; its
17733# output is simply discarded. So we exec the FD to /dev/null,
17734# effectively closing config.log, so it can be properly (re)opened and
17735# appended to by config.status. When coming back to configure, we
17736# need to make the FD available again.
17737if test "$no_create" != yes; then
17738 ac_cs_success=:
17739 exec 5>/dev/null
17740 $SHELL $CONFIG_STATUS || ac_cs_success=false
17741 exec 5>>config.log
17742 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17743 # would make configure fail if this is the last instruction.
17744 $ac_cs_success || { (exit 1); exit 1; }
17745fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017746
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017747
17748echo "creating Setup"
17749if test ! -f Modules/Setup
17750then
17751 cp $srcdir/Modules/Setup.dist Modules/Setup
17752fi
17753
17754echo "creating Setup.local"
17755if test ! -f Modules/Setup.local
17756then
17757 echo "# Edit this file for local setup changes" >Modules/Setup.local
17758fi
17759
17760echo "creating Makefile"
17761$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17762 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017763 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017764mv config.c Modules