blob: f9121ece9aa2ce397bb23e4996c451216a5d2345 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis14e73b12003-01-01 09:51:12 +00002# From configure.in Revision: 1.382 .
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öwis24a880b2002-12-31 12:55:15 +0000911ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000912ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
913ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
914
915 cd $ac_dir
916 # Check for guested configure; otherwise get Cygnus style configure.
917 if test -f $ac_srcdir/configure.gnu; then
918 echo
919 $SHELL $ac_srcdir/configure.gnu --help=recursive
920 elif test -f $ac_srcdir/configure; then
921 echo
922 $SHELL $ac_srcdir/configure --help=recursive
923 elif test -f $ac_srcdir/configure.ac ||
924 test -f $ac_srcdir/configure.in; then
925 echo
926 $ac_configure --help
927 else
928 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
929 fi
930 cd $ac_popdir
931 done
932fi
933
934test -n "$ac_init_help" && exit 0
935if $ac_init_version; then
936 cat <<\_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000937python configure 2.3
938generated by GNU Autoconf 2.53
Martin v. Löwis11437992002-04-12 09:54:03 +0000939
940Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
941Free Software Foundation, Inc.
942This configure script is free software; the Free Software Foundation
943gives unlimited permission to copy, distribute and modify it.
944_ACEOF
945 exit 0
946fi
947exec 5>config.log
948cat >&5 <<_ACEOF
949This file contains any messages produced by compilers while
950running configure, to aid debugging if configure makes a mistake.
951
Martin v. Löwis88afe662002-10-26 13:47:44 +0000952It was created by python $as_me 2.3, which was
Martin v. Löwis11437992002-04-12 09:54:03 +0000953generated by GNU Autoconf 2.53. Invocation command line was
954
955 $ $0 $@
956
957_ACEOF
958{
959cat <<_ASUNAME
960## --------- ##
961## Platform. ##
962## --------- ##
963
964hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
965uname -m = `(uname -m) 2>/dev/null || echo unknown`
966uname -r = `(uname -r) 2>/dev/null || echo unknown`
967uname -s = `(uname -s) 2>/dev/null || echo unknown`
968uname -v = `(uname -v) 2>/dev/null || echo unknown`
969
970/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
971/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
972
973/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
974/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
975/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
976hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
977/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
978/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
979/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
980
981_ASUNAME
982
983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
984for as_dir in $PATH
985do
986 IFS=$as_save_IFS
987 test -z "$as_dir" && as_dir=.
988 echo "PATH: $as_dir"
989done
990
991} >&5
992
993cat >&5 <<_ACEOF
994
995
996## ----------- ##
997## Core tests. ##
998## ----------- ##
999
1000_ACEOF
1001
1002
1003# Keep a trace of the command line.
1004# Strip out --no-create and --no-recursion so they do not pile up.
1005# Also quote any args containing shell meta-characters.
1006ac_configure_args=
1007ac_sep=
1008for ac_arg
1009do
1010 case $ac_arg in
1011 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1012 | --no-cr | --no-c | -n ) continue ;;
1013 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1014 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1015 continue ;;
1016 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1017 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1018 esac
1019 case " $ac_configure_args " in
1020 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1021 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1022 ac_sep=" " ;;
1023 esac
1024 # Get rid of the leading space.
1025done
1026
1027# When interrupted or exit'd, cleanup temporary files, and complete
1028# config.log. We remove comments because anyway the quotes in there
1029# would cause problems or look ugly.
1030# WARNING: Be sure not to use single quotes in there, as some shells,
1031# such as our DU 5.0 friend, will then `close' the trap.
1032trap 'exit_status=$?
1033 # Save into config.log some information that might help in debugging.
1034 {
1035 echo
1036 cat <<\_ASBOX
1037## ---------------- ##
1038## Cache variables. ##
1039## ---------------- ##
1040_ASBOX
1041 echo
1042 # The following way of writing the cache mishandles newlines in values,
1043{
1044 (set) 2>&1 |
1045 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1046 *ac_space=\ *)
1047 sed -n \
1048 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1049 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1050 ;;
1051 *)
1052 sed -n \
1053 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1054 ;;
1055 esac;
1056}
1057 echo
1058 if test -s confdefs.h; then
1059 cat <<\_ASBOX
1060## ----------- ##
1061## confdefs.h. ##
1062## ----------- ##
1063_ASBOX
1064 echo
1065 sed "/^$/d" confdefs.h
1066 echo
1067 fi
1068 test "$ac_signal" != 0 &&
1069 echo "$as_me: caught signal $ac_signal"
1070 echo "$as_me: exit $exit_status"
1071 } >&5
1072 rm -f core core.* *.core &&
1073 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1074 exit $exit_status
1075 ' 0
1076for ac_signal in 1 2 13 15; do
1077 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1078done
1079ac_signal=0
1080
1081# confdefs.h avoids OS command line length limits that DEFS can exceed.
1082rm -rf conftest* confdefs.h
1083# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1084echo >confdefs.h
1085
1086# Predefined preprocessor variables.
1087
1088cat >>confdefs.h <<_ACEOF
1089#define PACKAGE_NAME "$PACKAGE_NAME"
1090_ACEOF
1091
1092
1093cat >>confdefs.h <<_ACEOF
1094#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1095_ACEOF
1096
1097
1098cat >>confdefs.h <<_ACEOF
1099#define PACKAGE_VERSION "$PACKAGE_VERSION"
1100_ACEOF
1101
1102
1103cat >>confdefs.h <<_ACEOF
1104#define PACKAGE_STRING "$PACKAGE_STRING"
1105_ACEOF
1106
1107
1108cat >>confdefs.h <<_ACEOF
1109#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1110_ACEOF
1111
1112
1113# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114# Prefer explicitly selected file to automatically selected ones.
1115if test -z "$CONFIG_SITE"; then
1116 if test "x$prefix" != xNONE; then
1117 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1118 else
1119 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1120 fi
1121fi
1122for ac_site_file in $CONFIG_SITE; do
1123 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1125echo "$as_me: loading site script $ac_site_file" >&6;}
1126 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 . "$ac_site_file"
1128 fi
1129done
1130
1131if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 # Some versions of bash will fail to source /dev/null (special
1133 # files actually), so we avoid doing that.
1134 if test -f "$cache_file"; then
1135 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1136echo "$as_me: loading cache $cache_file" >&6;}
1137 case $cache_file in
1138 [\\/]* | ?:[\\/]* ) . $cache_file;;
1139 *) . ./$cache_file;;
1140 esac
1141 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142else
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1144echo "$as_me: creating cache $cache_file" >&6;}
1145 >$cache_file
1146fi
1147
1148# Check that the precious variables saved in the cache have kept the same
1149# value.
1150ac_cache_corrupted=false
1151for ac_var in `(set) 2>&1 |
1152 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1153 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1154 eval ac_new_set=\$ac_env_${ac_var}_set
1155 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1156 eval ac_new_val="\$ac_env_${ac_var}_value"
1157 case $ac_old_set,$ac_new_set in
1158 set,)
1159 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1160echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1161 ac_cache_corrupted=: ;;
1162 ,set)
1163 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1164echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1165 ac_cache_corrupted=: ;;
1166 ,);;
1167 *)
1168 if test "x$ac_old_val" != "x$ac_new_val"; then
1169 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1170echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1171 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1172echo "$as_me: former value: $ac_old_val" >&2;}
1173 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1174echo "$as_me: current value: $ac_new_val" >&2;}
1175 ac_cache_corrupted=:
1176 fi;;
1177 esac
1178 # Pass precious variables to config.status.
1179 if test "$ac_new_set" = set; then
1180 case $ac_new_val in
1181 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1182 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1183 *) ac_arg=$ac_var=$ac_new_val ;;
1184 esac
1185 case " $ac_configure_args " in
1186 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1187 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1188 esac
1189 fi
1190done
1191if $ac_cache_corrupted; then
1192 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1193echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1194 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1195echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1196 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197fi
1198
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1203ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204
Guido van Rossum627b2d71993-12-24 10:39:16 +00001205
Michael W. Hudson54241132001-12-07 15:38:26 +00001206
1207
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208
Martin v. Löwis11437992002-04-12 09:54:03 +00001209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
Martin v. Löwis88afe662002-10-26 13:47:44 +00001222
1223
1224
1225
1226
1227
1228
1229
1230
Martin v. Löwis11437992002-04-12 09:54:03 +00001231ac_config_headers="$ac_config_headers pyconfig.h"
1232
1233
1234# This is for stuff that absolutely must end up in pyconfig.h.
1235# Please use pyport.h instead, if possible.
1236
1237
1238
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001239
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001240
1241
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001242VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001243
Martin v. Löwis1142de32002-03-29 16:28:31 +00001244
1245SOVERSION=1.0
1246
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001247# The later defininition of _XOPEN_SOURCE disables certain features
1248# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1249
1250cat >>confdefs.h <<\_ACEOF
1251#define _GNU_SOURCE 1
1252_ACEOF
1253
1254
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001255define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001256
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001257# Arguments passed to configure.
1258
1259CONFIG_ARGS="$ac_configure_args"
1260
Jack Jansene578a632001-08-15 01:27:14 +00001261# Check whether --enable-framework or --disable-framework was given.
1262if test "${enable_framework+set}" = set; then
1263 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001264
Jack Jansene578a632001-08-15 01:27:14 +00001265 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001267 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001268 esac
1269 case $enableval in
1270 no)
1271 PYTHONFRAMEWORK=
1272 PYTHONFRAMEWORKDIR=no-framework
1273 PYTHONFRAMEWORKPREFIX=
1274 PYTHONFRAMEWORKINSTALLDIR=
1275 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001276 ;;
1277 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001278 PYTHONFRAMEWORK=Python
1279 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001280 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001281 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1282 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001283 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001284
Guido van Rossum563e7081996-09-10 18:20:48 +00001285else
Martin v. Löwis11437992002-04-12 09:54:03 +00001286
Jack Jansene578a632001-08-15 01:27:14 +00001287 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001288 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001289 PYTHONFRAMEWORKPREFIX=
1290 PYTHONFRAMEWORKINSTALLDIR=
1291 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001292
Martin v. Löwis11437992002-04-12 09:54:03 +00001293fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001294
1295
1296
1297
Jack Jansene578a632001-08-15 01:27:14 +00001298
1299##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001300## AC_HELP_STRING(--with-dyld,
1301## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001302##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001303# Set name for machine-dependent library files
1304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305echo "$as_me:$LINENO: checking MACHDEP" >&5
1306echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001307if test -z "$MACHDEP"
1308then
Guido van Rossum563e7081996-09-10 18:20:48 +00001309 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001310 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1311 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001312 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001313 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001314 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001315 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001316 ac_md_system=`echo $ac_sys_system |
1317 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1318 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001319 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001320 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001321
Guido van Rossum07397971997-04-29 21:49:50 +00001322 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001323 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001324 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001325 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001326 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001327 esac
1328fi
Guido van Rossum91922671997-10-09 20:24:13 +00001329
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001330# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1331# disable features if it is defined, without any means to access these
1332# features as extensions. For these systems, we skip the definition of
1333# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1334# some feature, make sure there is no alternative way to access this
1335# feature. Also, when using wildcards, make sure you have verified the
1336# need for not defining _XOPEN_SOURCE on all systems matching the
1337# wildcard, and that the wildcard does not include future systems
1338# (which may remove their limitations).
1339case $ac_sys_system/$ac_sys_release in
1340 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1341 # even though select is a POSIX function. Reported by J. Ribbens.
1342 OpenBSD/2.* | OpenBSD/3.[012])
1343 define_xopen_source=no;;
1344esac
1345
1346if test $define_xopen_source = yes
1347then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001348
1349cat >>confdefs.h <<\_ACEOF
1350#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001351_ACEOF
1352
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001353
1354 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1355 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1356 # several APIs are not declared. Since this is also needed in some
1357 # cases for HP-UX, we define it globally.
1358
1359
1360cat >>confdefs.h <<\_ACEOF
1361#define _XOPEN_SOURCE_EXTENDED 1
1362_ACEOF
1363
1364
1365cat >>confdefs.h <<\_ACEOF
1366#define _POSIX_C_SOURCE 200112L
1367_ACEOF
1368
1369
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001370fi
1371
Guido van Rossum91922671997-10-09 20:24:13 +00001372#
1373# SGI compilers allow the specification of the both the ABI and the
1374# ISA on the command line. Depending on the values of these switches,
1375# different and often incompatable code will be generated.
1376#
1377# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1378# thus supply support for various ABI/ISA combinations. The MACHDEP
1379# variable is also adjusted.
1380#
1381
1382if test ! -z "$SGI_ABI"
1383then
1384 CC="cc $SGI_ABI"
1385 LDFLAGS="$SGI_ABI $LDFLAGS"
1386 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1387fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001388echo "$as_me:$LINENO: result: $MACHDEP" >&5
1389echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001390
Jack Jansen83f898c2002-12-30 22:23:40 +00001391# And add extra plat-mac for darwin
1392
1393echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1394echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1395if test -z "$EXTRAPLATDIR"
1396then
1397 case $MACHDEP in
1398 darwin) EXTRAPLATDIR="\$(PLATMACDIRS)";;
1399 *) EXTRAPLATDIR="";;
1400 esac
1401fi
1402echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1403echo "${ECHO_T}$EXTRAPLATDIR" >&6
1404
Guido van Rossum627b2d71993-12-24 10:39:16 +00001405# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001406echo "$as_me:$LINENO: checking for --without-gcc" >&5
1407echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1408
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001409# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001410if test "${with_gcc+set}" = set; then
1411 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001412
Guido van Rossum7f43da71994-08-01 12:15:30 +00001413 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001414 no) CC=cc
1415 without_gcc=yes;;
1416 yes) CC=gcc
1417 without_gcc=no;;
1418 *) CC=$withval
1419 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001420 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001421else
Martin v. Löwis11437992002-04-12 09:54:03 +00001422
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001423 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001424 AIX*) CC=cc_r
1425 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001426 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001427 case $BE_HOST_CPU in
1428 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001429 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001430 without_gcc=yes
Mark Hammond8235ea12002-07-19 06:55:41 +00001431 OPT="-O -export pragma"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001432 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001433 ;;
1434 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001435 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001436 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001437 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001438 ;;
1439 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1441echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1442 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001443 ;;
1444 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001445 AR="\$(srcdir)/Modules/ar_beos"
1446 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001447 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001448 Monterey*)
1449 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001450 without_gcc=;;
1451 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001452 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001453fi;
1454echo "$as_me:$LINENO: result: $without_gcc" >&5
1455echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001456
1457
Guido van Rossum95012191999-12-16 17:50:52 +00001458
Fred Drakea1a84e72001-03-06 05:52:16 +00001459MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001460echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1461echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1462
Guido van Rossum95012191999-12-16 17:50:52 +00001463# Check whether --with-cxx or --without-cxx was given.
1464if test "${with_cxx+set}" = set; then
1465 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001466
Martin v. Löwis22352952000-12-13 17:37:02 +00001467 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001468 case $withval in
1469 no) CXX=
1470 with_cxx=no;;
1471 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001472 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001473 with_cxx=$withval;;
1474 esac
1475else
Martin v. Löwis11437992002-04-12 09:54:03 +00001476
Guido van Rossum95012191999-12-16 17:50:52 +00001477 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001478 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001479
Martin v. Löwis11437992002-04-12 09:54:03 +00001480fi;
1481echo "$as_me:$LINENO: result: $with_cxx" >&5
1482echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001483
1484if test "$with_cxx" = "yes"
1485then
Martin v. Löwis11437992002-04-12 09:54:03 +00001486 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1487echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1488 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001489fi
1490
1491
1492
1493
Martin v. Löwis11437992002-04-12 09:54:03 +00001494if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001495then
1496 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1497do
Martin v. Löwis11437992002-04-12 09:54:03 +00001498 # Extract the first word of "$ac_prog", so it can be a program name with args.
Martin v. Löwis22352952000-12-13 17:37:02 +00001499set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001500echo "$as_me:$LINENO: checking for $ac_word" >&5
1501echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1502if test "${ac_cv_prog_CXX+set}" = set; then
1503 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001504else
1505 if test -n "$CXX"; then
1506 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1507else
Martin v. Löwis11437992002-04-12 09:54:03 +00001508as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1509for as_dir in $PATH
1510do
1511 IFS=$as_save_IFS
1512 test -z "$as_dir" && as_dir=.
1513 for ac_exec_ext in '' $ac_executable_extensions; do
1514 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1515 ac_cv_prog_CXX="$ac_prog"
1516 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1517 break 2
1518 fi
1519done
1520done
1521
Martin v. Löwis22352952000-12-13 17:37:02 +00001522fi
1523fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001524CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001525if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001526 echo "$as_me:$LINENO: result: $CXX" >&5
1527echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001528else
Martin v. Löwis11437992002-04-12 09:54:03 +00001529 echo "$as_me:$LINENO: result: no" >&5
1530echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001531fi
1532
Martin v. Löwis11437992002-04-12 09:54:03 +00001533 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001534done
1535test -n "$CXX" || CXX="notfound"
1536
1537 if test "$CXX" = "notfound"
1538 then
1539 CXX=
1540 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001541 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001542ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001543ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1544ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1545ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1546 cat >conftest.$ac_ext <<_ACEOF
1547#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001548#include "confdefs.h"
1549
Martin v. Löwis11437992002-04-12 09:54:03 +00001550#ifdef F77_DUMMY_MAIN
1551# ifdef __cplusplus
1552 extern "C"
1553# endif
1554 int F77_DUMMY_MAIN() { return 1; }
1555#endif
1556int
1557main ()
1558{
Michael W. Hudson54241132001-12-07 15:38:26 +00001559
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 ;
1561 return 0;
1562}
1563_ACEOF
1564ac_clean_files_save=$ac_clean_files
1565ac_clean_files="$ac_clean_files a.out a.exe"
1566# Try to create an executable without -o first, disregard a.out.
1567# It will help us diagnose broken compilers, and finding out an intuition
1568# of exeext.
1569echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1570echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1571ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1572if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1573 (eval $ac_link_default) 2>&5
1574 ac_status=$?
1575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1576 (exit $ac_status); }; then
1577 # Find the output, starting from the most likely. This scheme is
1578# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1579# resort.
1580
1581# Be careful to initialize this variable, since it used to be cached.
1582# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1583ac_cv_exeext=
1584for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1585 ls a.out conftest 2>/dev/null;
1586 ls a.* conftest.* 2>/dev/null`; do
1587 case $ac_file in
1588 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1589 a.out ) # We found the default executable, but exeext='' is most
1590 # certainly right.
1591 break;;
1592 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1593 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1594 export ac_cv_exeext
1595 break;;
1596 * ) break;;
1597 esac
1598done
1599else
1600 echo "$as_me: failed program was:" >&5
1601cat conftest.$ac_ext >&5
1602{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1603echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1604 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001605fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001606
1607ac_exeext=$ac_cv_exeext
1608echo "$as_me:$LINENO: result: $ac_file" >&5
1609echo "${ECHO_T}$ac_file" >&6
1610
1611# Check the compiler produces executables we can run. If not, either
1612# the compiler is broken, or we cross compile.
1613echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1614echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1615# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1616# If not cross compiling, check that we can run a simple program.
1617if test "$cross_compiling" != yes; then
1618 if { ac_try='./$ac_file'
1619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1620 (eval $ac_try) 2>&5
1621 ac_status=$?
1622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1623 (exit $ac_status); }; }; then
1624 cross_compiling=no
1625 else
1626 if test "$cross_compiling" = maybe; then
1627 cross_compiling=yes
1628 else
1629 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1630If you meant to cross compile, use \`--host'." >&5
1631echo "$as_me: error: cannot run C++ compiled programs.
1632If you meant to cross compile, use \`--host'." >&2;}
1633 { (exit 1); exit 1; }; }
1634 fi
1635 fi
1636fi
1637echo "$as_me:$LINENO: result: yes" >&5
1638echo "${ECHO_T}yes" >&6
1639
1640rm -f a.out a.exe conftest$ac_cv_exeext
1641ac_clean_files=$ac_clean_files_save
1642# Check the compiler produces executables we can run. If not, either
1643# the compiler is broken, or we cross compile.
1644echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1645echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1646echo "$as_me:$LINENO: result: $cross_compiling" >&5
1647echo "${ECHO_T}$cross_compiling" >&6
1648
1649echo "$as_me:$LINENO: checking for suffix of executables" >&5
1650echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1651if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1652 (eval $ac_link) 2>&5
1653 ac_status=$?
1654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1655 (exit $ac_status); }; then
1656 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1657# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1658# work properly (i.e., refer to `conftest.exe'), while it won't with
1659# `rm'.
1660for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1661 case $ac_file in
1662 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1663 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1664 export ac_cv_exeext
1665 break;;
1666 * ) break;;
1667 esac
1668done
1669else
1670 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1671echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1672 { (exit 1); exit 1; }; }
1673fi
1674
1675rm -f conftest$ac_cv_exeext
1676echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1677echo "${ECHO_T}$ac_cv_exeext" >&6
1678
1679rm -f conftest.$ac_ext
1680EXEEXT=$ac_cv_exeext
1681ac_exeext=$EXEEXT
1682
1683 ac_ext=c
1684ac_cpp='$CPP $CPPFLAGS'
1685ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1686ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1687ac_compiler_gnu=$ac_cv_c_compiler_gnu
1688
1689
Martin v. Löwis22352952000-12-13 17:37:02 +00001690
1691 fi
1692fi
1693
Guido van Rossum8b131c51995-03-09 14:10:13 +00001694# If the user switches compilers, we can't believe the cache
1695if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1696then
Martin v. Löwis11437992002-04-12 09:54:03 +00001697 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1698(it is also a good idea to do 'make clean' before compiling)" >&5
1699echo "$as_me: error: cached CC is different -- throw away $cache_file
1700(it is also a good idea to do 'make clean' before compiling)" >&2;}
1701 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001702fi
1703
Martin v. Löwis11437992002-04-12 09:54:03 +00001704ac_ext=c
1705ac_cpp='$CPP $CPPFLAGS'
1706ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1707ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1708ac_compiler_gnu=$ac_cv_c_compiler_gnu
1709if test -n "$ac_tool_prefix"; then
1710 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1711set dummy ${ac_tool_prefix}gcc; ac_word=$2
1712echo "$as_me:$LINENO: checking for $ac_word" >&5
1713echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1714if test "${ac_cv_prog_CC+set}" = set; then
1715 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001716else
1717 if test -n "$CC"; then
1718 ac_cv_prog_CC="$CC" # Let the user override the test.
1719else
Martin v. Löwis11437992002-04-12 09:54:03 +00001720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1721for as_dir in $PATH
1722do
1723 IFS=$as_save_IFS
1724 test -z "$as_dir" && as_dir=.
1725 for ac_exec_ext in '' $ac_executable_extensions; do
1726 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1727 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1728 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1729 break 2
1730 fi
1731done
1732done
1733
Jack Jansendd19cf82001-12-06 22:36:17 +00001734fi
1735fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001736CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001737if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001738 echo "$as_me:$LINENO: result: $CC" >&5
1739echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001740else
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 echo "$as_me:$LINENO: result: no" >&5
1742echo "${ECHO_T}no" >&6
1743fi
1744
1745fi
1746if test -z "$ac_cv_prog_CC"; then
1747 ac_ct_CC=$CC
1748 # Extract the first word of "gcc", so it can be a program name with args.
1749set dummy gcc; ac_word=$2
1750echo "$as_me:$LINENO: checking for $ac_word" >&5
1751echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1752if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1753 echo $ECHO_N "(cached) $ECHO_C" >&6
1754else
1755 if test -n "$ac_ct_CC"; then
1756 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1757else
1758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1759for as_dir in $PATH
1760do
1761 IFS=$as_save_IFS
1762 test -z "$as_dir" && as_dir=.
1763 for ac_exec_ext in '' $ac_executable_extensions; do
1764 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1765 ac_cv_prog_ac_ct_CC="gcc"
1766 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1767 break 2
1768 fi
1769done
1770done
1771
1772fi
1773fi
1774ac_ct_CC=$ac_cv_prog_ac_ct_CC
1775if test -n "$ac_ct_CC"; then
1776 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1777echo "${ECHO_T}$ac_ct_CC" >&6
1778else
1779 echo "$as_me:$LINENO: result: no" >&5
1780echo "${ECHO_T}no" >&6
1781fi
1782
1783 CC=$ac_ct_CC
1784else
1785 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001786fi
1787
Jack Jansendd19cf82001-12-06 22:36:17 +00001788if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001789 if test -n "$ac_tool_prefix"; then
1790 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1791set dummy ${ac_tool_prefix}cc; ac_word=$2
1792echo "$as_me:$LINENO: checking for $ac_word" >&5
1793echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1794if test "${ac_cv_prog_CC+set}" = set; then
1795 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001796else
1797 if test -n "$CC"; then
1798 ac_cv_prog_CC="$CC" # Let the user override the test.
1799else
Martin v. Löwis11437992002-04-12 09:54:03 +00001800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1801for as_dir in $PATH
1802do
1803 IFS=$as_save_IFS
1804 test -z "$as_dir" && as_dir=.
1805 for ac_exec_ext in '' $ac_executable_extensions; do
1806 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1807 ac_cv_prog_CC="${ac_tool_prefix}cc"
1808 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1809 break 2
1810 fi
1811done
1812done
1813
1814fi
1815fi
1816CC=$ac_cv_prog_CC
1817if test -n "$CC"; then
1818 echo "$as_me:$LINENO: result: $CC" >&5
1819echo "${ECHO_T}$CC" >&6
1820else
1821 echo "$as_me:$LINENO: result: no" >&5
1822echo "${ECHO_T}no" >&6
1823fi
1824
1825fi
1826if test -z "$ac_cv_prog_CC"; then
1827 ac_ct_CC=$CC
1828 # Extract the first word of "cc", so it can be a program name with args.
1829set dummy cc; ac_word=$2
1830echo "$as_me:$LINENO: checking for $ac_word" >&5
1831echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1832if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1833 echo $ECHO_N "(cached) $ECHO_C" >&6
1834else
1835 if test -n "$ac_ct_CC"; then
1836 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1837else
1838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1839for as_dir in $PATH
1840do
1841 IFS=$as_save_IFS
1842 test -z "$as_dir" && as_dir=.
1843 for ac_exec_ext in '' $ac_executable_extensions; do
1844 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1845 ac_cv_prog_ac_ct_CC="cc"
1846 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1847 break 2
1848 fi
1849done
1850done
1851
1852fi
1853fi
1854ac_ct_CC=$ac_cv_prog_ac_ct_CC
1855if test -n "$ac_ct_CC"; then
1856 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1857echo "${ECHO_T}$ac_ct_CC" >&6
1858else
1859 echo "$as_me:$LINENO: result: no" >&5
1860echo "${ECHO_T}no" >&6
1861fi
1862
1863 CC=$ac_ct_CC
1864else
1865 CC="$ac_cv_prog_CC"
1866fi
1867
1868fi
1869if test -z "$CC"; then
1870 # Extract the first word of "cc", so it can be a program name with args.
1871set dummy cc; ac_word=$2
1872echo "$as_me:$LINENO: checking for $ac_word" >&5
1873echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1874if test "${ac_cv_prog_CC+set}" = set; then
1875 echo $ECHO_N "(cached) $ECHO_C" >&6
1876else
1877 if test -n "$CC"; then
1878 ac_cv_prog_CC="$CC" # Let the user override the test.
1879else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001880 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001881as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1882for as_dir in $PATH
1883do
1884 IFS=$as_save_IFS
1885 test -z "$as_dir" && as_dir=.
1886 for ac_exec_ext in '' $ac_executable_extensions; do
1887 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1888 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1889 ac_prog_rejected=yes
1890 continue
1891 fi
1892 ac_cv_prog_CC="cc"
1893 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1894 break 2
1895 fi
1896done
1897done
1898
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001899if test $ac_prog_rejected = yes; then
1900 # We found a bogon in the path, so make sure we never use it.
1901 set dummy $ac_cv_prog_CC
1902 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001903 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001904 # We chose a different compiler from the bogus one.
1905 # However, it has the same basename, so the bogon will be chosen
1906 # first if we set CC to just the basename; use the full file name.
1907 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001908 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001909 shift
1910 ac_cv_prog_CC="$@"
1911 fi
1912fi
1913fi
1914fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001915CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001916if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001917 echo "$as_me:$LINENO: result: $CC" >&5
1918echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001919else
Martin v. Löwis11437992002-04-12 09:54:03 +00001920 echo "$as_me:$LINENO: result: no" >&5
1921echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001922fi
1923
Martin v. Löwis11437992002-04-12 09:54:03 +00001924fi
1925if test -z "$CC"; then
1926 if test -n "$ac_tool_prefix"; then
1927 for ac_prog in cl
1928 do
1929 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1930set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1931echo "$as_me:$LINENO: checking for $ac_word" >&5
1932echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1933if test "${ac_cv_prog_CC+set}" = set; then
1934 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001935else
1936 if test -n "$CC"; then
1937 ac_cv_prog_CC="$CC" # Let the user override the test.
1938else
Martin v. Löwis11437992002-04-12 09:54:03 +00001939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1940for as_dir in $PATH
1941do
1942 IFS=$as_save_IFS
1943 test -z "$as_dir" && as_dir=.
1944 for ac_exec_ext in '' $ac_executable_extensions; do
1945 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1946 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1947 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1948 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001949 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001950done
1951done
1952
1953fi
1954fi
1955CC=$ac_cv_prog_CC
1956if test -n "$CC"; then
1957 echo "$as_me:$LINENO: result: $CC" >&5
1958echo "${ECHO_T}$CC" >&6
1959else
1960 echo "$as_me:$LINENO: result: no" >&5
1961echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001962fi
1963
Martin v. Löwis11437992002-04-12 09:54:03 +00001964 test -n "$CC" && break
1965 done
1966fi
1967if test -z "$CC"; then
1968 ac_ct_CC=$CC
1969 for ac_prog in cl
1970do
1971 # Extract the first word of "$ac_prog", so it can be a program name with args.
1972set dummy $ac_prog; ac_word=$2
1973echo "$as_me:$LINENO: checking for $ac_word" >&5
1974echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1975if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1976 echo $ECHO_N "(cached) $ECHO_C" >&6
1977else
1978 if test -n "$ac_ct_CC"; then
1979 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1980else
1981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1982for as_dir in $PATH
1983do
1984 IFS=$as_save_IFS
1985 test -z "$as_dir" && as_dir=.
1986 for ac_exec_ext in '' $ac_executable_extensions; do
1987 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1988 ac_cv_prog_ac_ct_CC="$ac_prog"
1989 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1990 break 2
1991 fi
1992done
1993done
Jack Jansendd19cf82001-12-06 22:36:17 +00001994
Martin v. Löwis11437992002-04-12 09:54:03 +00001995fi
1996fi
1997ac_ct_CC=$ac_cv_prog_ac_ct_CC
1998if test -n "$ac_ct_CC"; then
1999 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2000echo "${ECHO_T}$ac_ct_CC" >&6
2001else
2002 echo "$as_me:$LINENO: result: no" >&5
2003echo "${ECHO_T}no" >&6
2004fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002005
Martin v. Löwis11437992002-04-12 09:54:03 +00002006 test -n "$ac_ct_CC" && break
2007done
Michael W. Hudson54241132001-12-07 15:38:26 +00002008
Martin v. Löwis11437992002-04-12 09:54:03 +00002009 CC=$ac_ct_CC
2010fi
2011
2012fi
2013
2014
2015test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2016echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2017 { (exit 1); exit 1; }; }
2018
2019# Provide some information about the compiler.
2020echo "$as_me:$LINENO:" \
2021 "checking for C compiler version" >&5
2022ac_compiler=`set X $ac_compile; echo $2`
2023{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2024 (eval $ac_compiler --version </dev/null >&5) 2>&5
2025 ac_status=$?
2026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2027 (exit $ac_status); }
2028{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2029 (eval $ac_compiler -v </dev/null >&5) 2>&5
2030 ac_status=$?
2031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2032 (exit $ac_status); }
2033{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2034 (eval $ac_compiler -V </dev/null >&5) 2>&5
2035 ac_status=$?
2036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2037 (exit $ac_status); }
2038
2039cat >conftest.$ac_ext <<_ACEOF
2040#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002041#include "confdefs.h"
2042
Martin v. Löwis11437992002-04-12 09:54:03 +00002043#ifdef F77_DUMMY_MAIN
2044# ifdef __cplusplus
2045 extern "C"
2046# endif
2047 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002048#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002049int
2050main ()
2051{
2052
2053 ;
2054 return 0;
2055}
2056_ACEOF
2057ac_clean_files_save=$ac_clean_files
2058ac_clean_files="$ac_clean_files a.out a.exe"
2059# Try to create an executable without -o first, disregard a.out.
2060# It will help us diagnose broken compilers, and finding out an intuition
2061# of exeext.
2062echo "$as_me:$LINENO: checking for C compiler default output" >&5
2063echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2064ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2065if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2066 (eval $ac_link_default) 2>&5
2067 ac_status=$?
2068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2069 (exit $ac_status); }; then
2070 # Find the output, starting from the most likely. This scheme is
2071# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2072# resort.
2073
2074# Be careful to initialize this variable, since it used to be cached.
2075# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2076ac_cv_exeext=
2077for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2078 ls a.out conftest 2>/dev/null;
2079 ls a.* conftest.* 2>/dev/null`; do
2080 case $ac_file in
2081 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2082 a.out ) # We found the default executable, but exeext='' is most
2083 # certainly right.
2084 break;;
2085 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2086 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2087 export ac_cv_exeext
2088 break;;
2089 * ) break;;
2090 esac
2091done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002092else
Martin v. Löwis11437992002-04-12 09:54:03 +00002093 echo "$as_me: failed program was:" >&5
2094cat conftest.$ac_ext >&5
2095{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2096echo "$as_me: error: C compiler cannot create executables" >&2;}
2097 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002098fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002099
Martin v. Löwis11437992002-04-12 09:54:03 +00002100ac_exeext=$ac_cv_exeext
2101echo "$as_me:$LINENO: result: $ac_file" >&5
2102echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002103
Martin v. Löwis11437992002-04-12 09:54:03 +00002104# Check the compiler produces executables we can run. If not, either
2105# the compiler is broken, or we cross compile.
2106echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2107echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2108# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2109# If not cross compiling, check that we can run a simple program.
2110if test "$cross_compiling" != yes; then
2111 if { ac_try='./$ac_file'
2112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2113 (eval $ac_try) 2>&5
2114 ac_status=$?
2115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2116 (exit $ac_status); }; }; then
2117 cross_compiling=no
2118 else
2119 if test "$cross_compiling" = maybe; then
2120 cross_compiling=yes
2121 else
2122 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2123If you meant to cross compile, use \`--host'." >&5
2124echo "$as_me: error: cannot run C compiled programs.
2125If you meant to cross compile, use \`--host'." >&2;}
2126 { (exit 1); exit 1; }; }
2127 fi
2128 fi
2129fi
2130echo "$as_me:$LINENO: result: yes" >&5
2131echo "${ECHO_T}yes" >&6
2132
2133rm -f a.out a.exe conftest$ac_cv_exeext
2134ac_clean_files=$ac_clean_files_save
2135# Check the compiler produces executables we can run. If not, either
2136# the compiler is broken, or we cross compile.
2137echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2138echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2139echo "$as_me:$LINENO: result: $cross_compiling" >&5
2140echo "${ECHO_T}$cross_compiling" >&6
2141
2142echo "$as_me:$LINENO: checking for suffix of executables" >&5
2143echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2144if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2145 (eval $ac_link) 2>&5
2146 ac_status=$?
2147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2148 (exit $ac_status); }; then
2149 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2150# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2151# work properly (i.e., refer to `conftest.exe'), while it won't with
2152# `rm'.
2153for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2154 case $ac_file in
2155 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2156 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2157 export ac_cv_exeext
2158 break;;
2159 * ) break;;
2160 esac
2161done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002162else
Martin v. Löwis11437992002-04-12 09:54:03 +00002163 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2164echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2165 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002166fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002167
Martin v. Löwis11437992002-04-12 09:54:03 +00002168rm -f conftest$ac_cv_exeext
2169echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2170echo "${ECHO_T}$ac_cv_exeext" >&6
2171
2172rm -f conftest.$ac_ext
2173EXEEXT=$ac_cv_exeext
2174ac_exeext=$EXEEXT
2175echo "$as_me:$LINENO: checking for suffix of object files" >&5
2176echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2177if test "${ac_cv_objext+set}" = set; then
2178 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002179else
Martin v. Löwis11437992002-04-12 09:54:03 +00002180 cat >conftest.$ac_ext <<_ACEOF
2181#line $LINENO "configure"
2182#include "confdefs.h"
2183
2184#ifdef F77_DUMMY_MAIN
2185# ifdef __cplusplus
2186 extern "C"
2187# endif
2188 int F77_DUMMY_MAIN() { return 1; }
2189#endif
2190int
2191main ()
2192{
2193
2194 ;
2195 return 0;
2196}
2197_ACEOF
2198rm -f conftest.o conftest.obj
2199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2200 (eval $ac_compile) 2>&5
2201 ac_status=$?
2202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2203 (exit $ac_status); }; then
2204 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2205 case $ac_file in
2206 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2207 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2208 break;;
2209 esac
2210done
2211else
2212 echo "$as_me: failed program was:" >&5
2213cat conftest.$ac_ext >&5
2214{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2215echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2216 { (exit 1); exit 1; }; }
2217fi
2218
2219rm -f conftest.$ac_cv_objext conftest.$ac_ext
2220fi
2221echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2222echo "${ECHO_T}$ac_cv_objext" >&6
2223OBJEXT=$ac_cv_objext
2224ac_objext=$OBJEXT
2225echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2226echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2227if test "${ac_cv_c_compiler_gnu+set}" = set; then
2228 echo $ECHO_N "(cached) $ECHO_C" >&6
2229else
2230 cat >conftest.$ac_ext <<_ACEOF
2231#line $LINENO "configure"
2232#include "confdefs.h"
2233
2234#ifdef F77_DUMMY_MAIN
2235# ifdef __cplusplus
2236 extern "C"
2237# endif
2238 int F77_DUMMY_MAIN() { return 1; }
2239#endif
2240int
2241main ()
2242{
2243#ifndef __GNUC__
2244 choke me
2245#endif
2246
2247 ;
2248 return 0;
2249}
2250_ACEOF
2251rm -f conftest.$ac_objext
2252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2253 (eval $ac_compile) 2>&5
2254 ac_status=$?
2255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2256 (exit $ac_status); } &&
2257 { ac_try='test -s conftest.$ac_objext'
2258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2259 (eval $ac_try) 2>&5
2260 ac_status=$?
2261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2262 (exit $ac_status); }; }; then
2263 ac_compiler_gnu=yes
2264else
2265 echo "$as_me: failed program was:" >&5
2266cat conftest.$ac_ext >&5
2267ac_compiler_gnu=no
2268fi
2269rm -f conftest.$ac_objext conftest.$ac_ext
2270ac_cv_c_compiler_gnu=$ac_compiler_gnu
2271
2272fi
2273echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2274echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2275GCC=`test $ac_compiler_gnu = yes && echo yes`
2276ac_test_CFLAGS=${CFLAGS+set}
2277ac_save_CFLAGS=$CFLAGS
2278CFLAGS="-g"
2279echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2280echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2281if test "${ac_cv_prog_cc_g+set}" = set; then
2282 echo $ECHO_N "(cached) $ECHO_C" >&6
2283else
2284 cat >conftest.$ac_ext <<_ACEOF
2285#line $LINENO "configure"
2286#include "confdefs.h"
2287
2288#ifdef F77_DUMMY_MAIN
2289# ifdef __cplusplus
2290 extern "C"
2291# endif
2292 int F77_DUMMY_MAIN() { return 1; }
2293#endif
2294int
2295main ()
2296{
2297
2298 ;
2299 return 0;
2300}
2301_ACEOF
2302rm -f conftest.$ac_objext
2303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2304 (eval $ac_compile) 2>&5
2305 ac_status=$?
2306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2307 (exit $ac_status); } &&
2308 { ac_try='test -s conftest.$ac_objext'
2309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2310 (eval $ac_try) 2>&5
2311 ac_status=$?
2312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2313 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002314 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002315else
Martin v. Löwis11437992002-04-12 09:54:03 +00002316 echo "$as_me: failed program was:" >&5
2317cat conftest.$ac_ext >&5
2318ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002319fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002320rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002321fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002322echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2323echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002324if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002325 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002326elif test $ac_cv_prog_cc_g = yes; then
2327 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002328 CFLAGS="-g -O2"
2329 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002330 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002331 fi
2332else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002333 if test "$GCC" = yes; then
2334 CFLAGS="-O2"
2335 else
2336 CFLAGS=
2337 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002338fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002339# Some people use a C++ compiler to compile C. Since we use `exit',
2340# in C++ we need to declare it. In case someone uses the same compiler
2341# for both compiling C and C++ we need to have the C++ compiler decide
2342# the declaration of exit, since it's the most demanding environment.
2343cat >conftest.$ac_ext <<_ACEOF
2344#ifndef __cplusplus
2345 choke me
2346#endif
2347_ACEOF
2348rm -f conftest.$ac_objext
2349if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2350 (eval $ac_compile) 2>&5
2351 ac_status=$?
2352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2353 (exit $ac_status); } &&
2354 { ac_try='test -s conftest.$ac_objext'
2355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2356 (eval $ac_try) 2>&5
2357 ac_status=$?
2358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2359 (exit $ac_status); }; }; then
2360 for ac_declaration in \
2361 ''\
2362 '#include <stdlib.h>' \
2363 'extern "C" void std::exit (int) throw (); using std::exit;' \
2364 'extern "C" void std::exit (int); using std::exit;' \
2365 'extern "C" void exit (int) throw ();' \
2366 'extern "C" void exit (int);' \
2367 'void exit (int);'
2368do
2369 cat >conftest.$ac_ext <<_ACEOF
2370#line $LINENO "configure"
2371#include "confdefs.h"
2372#include <stdlib.h>
2373$ac_declaration
2374#ifdef F77_DUMMY_MAIN
2375# ifdef __cplusplus
2376 extern "C"
2377# endif
2378 int F77_DUMMY_MAIN() { return 1; }
2379#endif
2380int
2381main ()
2382{
2383exit (42);
2384 ;
2385 return 0;
2386}
2387_ACEOF
2388rm -f conftest.$ac_objext
2389if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2390 (eval $ac_compile) 2>&5
2391 ac_status=$?
2392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2393 (exit $ac_status); } &&
2394 { ac_try='test -s conftest.$ac_objext'
2395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2396 (eval $ac_try) 2>&5
2397 ac_status=$?
2398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2399 (exit $ac_status); }; }; then
2400 :
2401else
2402 echo "$as_me: failed program was:" >&5
2403cat conftest.$ac_ext >&5
2404continue
2405fi
2406rm -f conftest.$ac_objext conftest.$ac_ext
2407 cat >conftest.$ac_ext <<_ACEOF
2408#line $LINENO "configure"
2409#include "confdefs.h"
2410$ac_declaration
2411#ifdef F77_DUMMY_MAIN
2412# ifdef __cplusplus
2413 extern "C"
2414# endif
2415 int F77_DUMMY_MAIN() { return 1; }
2416#endif
2417int
2418main ()
2419{
2420exit (42);
2421 ;
2422 return 0;
2423}
2424_ACEOF
2425rm -f conftest.$ac_objext
2426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2427 (eval $ac_compile) 2>&5
2428 ac_status=$?
2429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2430 (exit $ac_status); } &&
2431 { ac_try='test -s conftest.$ac_objext'
2432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2433 (eval $ac_try) 2>&5
2434 ac_status=$?
2435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2436 (exit $ac_status); }; }; then
2437 break
2438else
2439 echo "$as_me: failed program was:" >&5
2440cat conftest.$ac_ext >&5
2441fi
2442rm -f conftest.$ac_objext conftest.$ac_ext
2443done
2444rm -f conftest*
2445if test -n "$ac_declaration"; then
2446 echo '#ifdef __cplusplus' >>confdefs.h
2447 echo $ac_declaration >>confdefs.h
2448 echo '#endif' >>confdefs.h
2449fi
2450
2451else
2452 echo "$as_me: failed program was:" >&5
2453cat conftest.$ac_ext >&5
2454fi
2455rm -f conftest.$ac_objext conftest.$ac_ext
2456ac_ext=c
2457ac_cpp='$CPP $CPPFLAGS'
2458ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2459ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2460ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002461
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002462
2463# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002464
2465ac_ext=c
2466ac_cpp='$CPP $CPPFLAGS'
2467ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2468ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2469ac_compiler_gnu=$ac_cv_c_compiler_gnu
2470echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2471echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002472# On Suns, sometimes $CPP names a directory.
2473if test -n "$CPP" && test -d "$CPP"; then
2474 CPP=
2475fi
2476if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 if test "${ac_cv_prog_CPP+set}" = set; then
2478 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002479else
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 # Double quotes because CPP needs to be expanded
2481 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2482 do
2483 ac_preproc_ok=false
2484for ac_c_preproc_warn_flag in '' yes
2485do
2486 # Use a header file that comes with gcc, so configuring glibc
2487 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002488 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 # not just through cpp. "Syntax error" is here to catch this case.
2490 cat >conftest.$ac_ext <<_ACEOF
2491#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002492#include "confdefs.h"
2493#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002494 Syntax error
2495_ACEOF
2496if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2497 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2498 ac_status=$?
2499 egrep -v '^ *\+' conftest.er1 >conftest.err
2500 rm -f conftest.er1
2501 cat conftest.err >&5
2502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2503 (exit $ac_status); } >/dev/null; then
2504 if test -s conftest.err; then
2505 ac_cpp_err=$ac_c_preproc_warn_flag
2506 else
2507 ac_cpp_err=
2508 fi
2509else
2510 ac_cpp_err=yes
2511fi
2512if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002513 :
2514else
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002516 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 # Broken: fails on valid input.
2518continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002519fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002520rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002521
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 # OK, works on sane cases. Now check whether non-existent headers
2523 # can be detected and how.
2524 cat >conftest.$ac_ext <<_ACEOF
2525#line $LINENO "configure"
2526#include "confdefs.h"
2527#include <ac_nonexistent.h>
2528_ACEOF
2529if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2530 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2531 ac_status=$?
2532 egrep -v '^ *\+' conftest.er1 >conftest.err
2533 rm -f conftest.er1
2534 cat conftest.err >&5
2535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2536 (exit $ac_status); } >/dev/null; then
2537 if test -s conftest.err; then
2538 ac_cpp_err=$ac_c_preproc_warn_flag
2539 else
2540 ac_cpp_err=
2541 fi
2542else
2543 ac_cpp_err=yes
2544fi
2545if test -z "$ac_cpp_err"; then
2546 # Broken: success on invalid input.
2547continue
2548else
2549 echo "$as_me: failed program was:" >&5
2550 cat conftest.$ac_ext >&5
2551 # Passes both tests.
2552ac_preproc_ok=:
2553break
2554fi
2555rm -f conftest.err conftest.$ac_ext
2556
2557done
2558# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2559rm -f conftest.err conftest.$ac_ext
2560if $ac_preproc_ok; then
2561 break
2562fi
2563
2564 done
2565 ac_cv_prog_CPP=$CPP
2566
2567fi
2568 CPP=$ac_cv_prog_CPP
2569else
2570 ac_cv_prog_CPP=$CPP
2571fi
2572echo "$as_me:$LINENO: result: $CPP" >&5
2573echo "${ECHO_T}$CPP" >&6
2574ac_preproc_ok=false
2575for ac_c_preproc_warn_flag in '' yes
2576do
2577 # Use a header file that comes with gcc, so configuring glibc
2578 # with a fresh cross-compiler works.
2579 # On the NeXT, cc -E runs the code through the compiler's parser,
2580 # not just through cpp. "Syntax error" is here to catch this case.
2581 cat >conftest.$ac_ext <<_ACEOF
2582#line $LINENO "configure"
2583#include "confdefs.h"
2584#include <assert.h>
2585 Syntax error
2586_ACEOF
2587if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2588 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2589 ac_status=$?
2590 egrep -v '^ *\+' conftest.er1 >conftest.err
2591 rm -f conftest.er1
2592 cat conftest.err >&5
2593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2594 (exit $ac_status); } >/dev/null; then
2595 if test -s conftest.err; then
2596 ac_cpp_err=$ac_c_preproc_warn_flag
2597 else
2598 ac_cpp_err=
2599 fi
2600else
2601 ac_cpp_err=yes
2602fi
2603if test -z "$ac_cpp_err"; then
2604 :
2605else
2606 echo "$as_me: failed program was:" >&5
2607 cat conftest.$ac_ext >&5
2608 # Broken: fails on valid input.
2609continue
2610fi
2611rm -f conftest.err conftest.$ac_ext
2612
2613 # OK, works on sane cases. Now check whether non-existent headers
2614 # can be detected and how.
2615 cat >conftest.$ac_ext <<_ACEOF
2616#line $LINENO "configure"
2617#include "confdefs.h"
2618#include <ac_nonexistent.h>
2619_ACEOF
2620if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2621 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2622 ac_status=$?
2623 egrep -v '^ *\+' conftest.er1 >conftest.err
2624 rm -f conftest.er1
2625 cat conftest.err >&5
2626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2627 (exit $ac_status); } >/dev/null; then
2628 if test -s conftest.err; then
2629 ac_cpp_err=$ac_c_preproc_warn_flag
2630 else
2631 ac_cpp_err=
2632 fi
2633else
2634 ac_cpp_err=yes
2635fi
2636if test -z "$ac_cpp_err"; then
2637 # Broken: success on invalid input.
2638continue
2639else
2640 echo "$as_me: failed program was:" >&5
2641 cat conftest.$ac_ext >&5
2642 # Passes both tests.
2643ac_preproc_ok=:
2644break
2645fi
2646rm -f conftest.err conftest.$ac_ext
2647
2648done
2649# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2650rm -f conftest.err conftest.$ac_ext
2651if $ac_preproc_ok; then
2652 :
2653else
2654 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2655echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2656 { (exit 1); exit 1; }; }
2657fi
2658
2659ac_ext=c
2660ac_cpp='$CPP $CPPFLAGS'
2661ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2662ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2663ac_compiler_gnu=$ac_cv_c_compiler_gnu
2664
2665
2666
2667echo "$as_me:$LINENO: checking for AIX" >&5
2668echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2669cat >conftest.$ac_ext <<_ACEOF
2670#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002671#include "confdefs.h"
2672#ifdef _AIX
2673 yes
2674#endif
2675
Martin v. Löwis11437992002-04-12 09:54:03 +00002676_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002677if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2678 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002679 echo "$as_me:$LINENO: result: yes" >&5
2680echo "${ECHO_T}yes" >&6
2681cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002682#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002683_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002684
2685else
Martin v. Löwis11437992002-04-12 09:54:03 +00002686 echo "$as_me:$LINENO: result: no" >&5
2687echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002688fi
2689rm -f conftest*
2690
Michael W. Hudson54241132001-12-07 15:38:26 +00002691
Martin v. Löwis11437992002-04-12 09:54:03 +00002692echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2693echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2694if test "${ac_cv_header_stdc+set}" = set; then
2695 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002696else
Martin v. Löwis11437992002-04-12 09:54:03 +00002697 cat >conftest.$ac_ext <<_ACEOF
2698#line $LINENO "configure"
2699#include "confdefs.h"
2700#include <stdlib.h>
2701#include <stdarg.h>
2702#include <string.h>
2703#include <float.h>
2704
2705_ACEOF
2706if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2707 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2708 ac_status=$?
2709 egrep -v '^ *\+' conftest.er1 >conftest.err
2710 rm -f conftest.er1
2711 cat conftest.err >&5
2712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2713 (exit $ac_status); } >/dev/null; then
2714 if test -s conftest.err; then
2715 ac_cpp_err=$ac_c_preproc_warn_flag
2716 else
2717 ac_cpp_err=
2718 fi
2719else
2720 ac_cpp_err=yes
2721fi
2722if test -z "$ac_cpp_err"; then
2723 ac_cv_header_stdc=yes
2724else
2725 echo "$as_me: failed program was:" >&5
2726 cat conftest.$ac_ext >&5
2727 ac_cv_header_stdc=no
2728fi
2729rm -f conftest.err conftest.$ac_ext
2730
2731if test $ac_cv_header_stdc = yes; then
2732 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2733 cat >conftest.$ac_ext <<_ACEOF
2734#line $LINENO "configure"
2735#include "confdefs.h"
2736#include <string.h>
2737
2738_ACEOF
2739if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2740 egrep "memchr" >/dev/null 2>&1; then
2741 :
2742else
2743 ac_cv_header_stdc=no
2744fi
2745rm -f conftest*
2746
2747fi
2748
2749if test $ac_cv_header_stdc = yes; then
2750 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2751 cat >conftest.$ac_ext <<_ACEOF
2752#line $LINENO "configure"
2753#include "confdefs.h"
2754#include <stdlib.h>
2755
2756_ACEOF
2757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2758 egrep "free" >/dev/null 2>&1; then
2759 :
2760else
2761 ac_cv_header_stdc=no
2762fi
2763rm -f conftest*
2764
2765fi
2766
2767if test $ac_cv_header_stdc = yes; then
2768 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2769 if test "$cross_compiling" = yes; then
2770 :
2771else
2772 cat >conftest.$ac_ext <<_ACEOF
2773#line $LINENO "configure"
2774#include "confdefs.h"
2775#include <ctype.h>
2776#if ((' ' & 0x0FF) == 0x020)
2777# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2778# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2779#else
2780# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2781 || ('j' <= (c) && (c) <= 'r') \
2782 || ('s' <= (c) && (c) <= 'z'))
2783# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2784#endif
2785
2786#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2787int
2788main ()
2789{
2790 int i;
2791 for (i = 0; i < 256; i++)
2792 if (XOR (islower (i), ISLOWER (i))
2793 || toupper (i) != TOUPPER (i))
2794 exit(2);
2795 exit (0);
2796}
2797_ACEOF
2798rm -f conftest$ac_exeext
2799if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2800 (eval $ac_link) 2>&5
2801 ac_status=$?
2802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2803 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2805 (eval $ac_try) 2>&5
2806 ac_status=$?
2807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2808 (exit $ac_status); }; }; then
2809 :
2810else
2811 echo "$as_me: program exited with status $ac_status" >&5
2812echo "$as_me: failed program was:" >&5
2813cat conftest.$ac_ext >&5
2814( exit $ac_status )
2815ac_cv_header_stdc=no
2816fi
2817rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2818fi
2819fi
2820fi
2821echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2822echo "${ECHO_T}$ac_cv_header_stdc" >&6
2823if test $ac_cv_header_stdc = yes; then
2824
2825cat >>confdefs.h <<\_ACEOF
2826#define STDC_HEADERS 1
2827_ACEOF
2828
2829fi
2830
2831# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2842 inttypes.h stdint.h unistd.h
2843do
2844as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2845echo "$as_me:$LINENO: checking for $ac_header" >&5
2846echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2847if eval "test \"\${$as_ac_Header+set}\" = set"; then
2848 echo $ECHO_N "(cached) $ECHO_C" >&6
2849else
2850 cat >conftest.$ac_ext <<_ACEOF
2851#line $LINENO "configure"
2852#include "confdefs.h"
2853$ac_includes_default
2854
2855#include <$ac_header>
2856_ACEOF
2857rm -f conftest.$ac_objext
2858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2859 (eval $ac_compile) 2>&5
2860 ac_status=$?
2861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2862 (exit $ac_status); } &&
2863 { ac_try='test -s conftest.$ac_objext'
2864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2865 (eval $ac_try) 2>&5
2866 ac_status=$?
2867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2868 (exit $ac_status); }; }; then
2869 eval "$as_ac_Header=yes"
2870else
2871 echo "$as_me: failed program was:" >&5
2872cat conftest.$ac_ext >&5
2873eval "$as_ac_Header=no"
2874fi
2875rm -f conftest.$ac_objext conftest.$ac_ext
2876fi
2877echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2878echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2879if test `eval echo '${'$as_ac_Header'}'` = yes; then
2880 cat >>confdefs.h <<_ACEOF
2881#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2882_ACEOF
2883
2884fi
2885
2886done
2887
2888
2889if test "${ac_cv_header_minix_config_h+set}" = set; then
2890 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2891echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2892if test "${ac_cv_header_minix_config_h+set}" = set; then
2893 echo $ECHO_N "(cached) $ECHO_C" >&6
2894fi
2895echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2896echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2897else
2898 # Is the header compilable?
2899echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2900echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2901cat >conftest.$ac_ext <<_ACEOF
2902#line $LINENO "configure"
2903#include "confdefs.h"
2904$ac_includes_default
2905#include <minix/config.h>
2906_ACEOF
2907rm -f conftest.$ac_objext
2908if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2909 (eval $ac_compile) 2>&5
2910 ac_status=$?
2911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2912 (exit $ac_status); } &&
2913 { ac_try='test -s conftest.$ac_objext'
2914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2915 (eval $ac_try) 2>&5
2916 ac_status=$?
2917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2918 (exit $ac_status); }; }; then
2919 ac_header_compiler=yes
2920else
2921 echo "$as_me: failed program was:" >&5
2922cat conftest.$ac_ext >&5
2923ac_header_compiler=no
2924fi
2925rm -f conftest.$ac_objext conftest.$ac_ext
2926echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2927echo "${ECHO_T}$ac_header_compiler" >&6
2928
2929# Is the header present?
2930echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2931echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2932cat >conftest.$ac_ext <<_ACEOF
2933#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002934#include "confdefs.h"
2935#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002936_ACEOF
2937if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2938 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2939 ac_status=$?
2940 egrep -v '^ *\+' conftest.er1 >conftest.err
2941 rm -f conftest.er1
2942 cat conftest.err >&5
2943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2944 (exit $ac_status); } >/dev/null; then
2945 if test -s conftest.err; then
2946 ac_cpp_err=$ac_c_preproc_warn_flag
2947 else
2948 ac_cpp_err=
2949 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002950else
Martin v. Löwis11437992002-04-12 09:54:03 +00002951 ac_cpp_err=yes
2952fi
2953if test -z "$ac_cpp_err"; then
2954 ac_header_preproc=yes
2955else
2956 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002957 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002958 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002959fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002960rm -f conftest.err conftest.$ac_ext
2961echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2962echo "${ECHO_T}$ac_header_preproc" >&6
2963
2964# So? What about this header?
2965case $ac_header_compiler:$ac_header_preproc in
2966 yes:no )
2967 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2968echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2969 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2970echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2971 no:yes )
2972 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2973echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2974 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2975echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2976 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2977echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2978esac
2979echo "$as_me:$LINENO: checking for minix/config.h" >&5
2980echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2981if test "${ac_cv_header_minix_config_h+set}" = set; then
2982 echo $ECHO_N "(cached) $ECHO_C" >&6
2983else
2984 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002985fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002986echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2987echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2988
2989fi
2990if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002991 MINIX=yes
2992else
Martin v. Löwis11437992002-04-12 09:54:03 +00002993 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002994fi
2995
Martin v. Löwis11437992002-04-12 09:54:03 +00002996
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002997if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002998
2999cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003000#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003001_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003002
Martin v. Löwis11437992002-04-12 09:54:03 +00003003
3004cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003005#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00003006_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003007
Martin v. Löwis11437992002-04-12 09:54:03 +00003008
3009cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003010#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003011_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003012
3013fi
3014
3015
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003016# Check for unsupported systems
3017case $ac_sys_system/$ac_sys_release in
3018SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3019 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3020 echo See README for details.
3021 exit 1;;
3022esac
3023
3024if test "$MINIX" = yes; then
3025 echo This system \(MINIX\) is no longer supported.
3026 echo Read README for details.
3027 exit 1
3028fi
3029
Michael W. Hudson54241132001-12-07 15:38:26 +00003030
Martin v. Löwis11437992002-04-12 09:54:03 +00003031echo "$as_me:$LINENO: checking for --with-suffix" >&5
3032echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003033
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003034# Check whether --with-suffix or --without-suffix was given.
3035if test "${with_suffix+set}" = set; then
3036 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003037
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003038 case $withval in
3039 no) EXEEXT=;;
3040 yes) EXEEXT=.exe;;
3041 *) EXEEXT=$withval;;
3042 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003043fi;
3044echo "$as_me:$LINENO: result: $EXEEXT" >&5
3045echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003046
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003047# Test whether we're running on a non-case-sensitive system, in which
3048# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003049
Martin v. Löwis11437992002-04-12 09:54:03 +00003050echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3051echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003052if test ! -d CaseSensitiveTestDir; then
3053mkdir CaseSensitiveTestDir
3054fi
3055
3056if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003057then
Martin v. Löwis11437992002-04-12 09:54:03 +00003058 echo "$as_me:$LINENO: result: yes" >&5
3059echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003060 BUILDEXEEXT=.exe
3061else
Martin v. Löwis11437992002-04-12 09:54:03 +00003062 echo "$as_me:$LINENO: result: no" >&5
3063echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003064 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003065fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003066rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003067
Guido van Rossumdd997f71998-10-07 19:58:26 +00003068case $MACHDEP in
3069bsdos*)
3070 case $CC in
3071 gcc) CC="$CC -D_HAVE_BSDI";;
3072 esac;;
3073esac
3074
Guido van Rossum24b1e751997-08-21 02:29:16 +00003075case $ac_sys_system in
3076hp*|HP*)
3077 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003078 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003079 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003080Monterey*)
3081 case $CC in
3082 cc) CC="$CC -Wl,-Bexport";;
3083 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003084SunOS*)
3085 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003086
3087cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003088#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003089_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003090
3091 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003092esac
3093
Michael W. Hudson54241132001-12-07 15:38:26 +00003094
3095
Martin v. Löwis11437992002-04-12 09:54:03 +00003096echo "$as_me:$LINENO: checking LIBRARY" >&5
3097echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003098if test -z "$LIBRARY"
3099then
3100 LIBRARY='libpython$(VERSION).a'
3101fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003102echo "$as_me:$LINENO: result: $LIBRARY" >&5
3103echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003104
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003105# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003106# name of the library into which to insert object files). BLDLIBRARY is also
3107# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3108# is blank as the main program is not linked directly against LDLIBRARY.
3109# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3110# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3111# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3112# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003113#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003114# RUNSHARED is used to run shared python without installed libraries
3115#
3116# INSTSONAME is the name of the shared library that will be use to install
3117# on the system - some systems like version suffix, others don't
3118
3119
Michael W. Hudson54241132001-12-07 15:38:26 +00003120
3121
3122
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003123
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003124LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003125BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003126INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003127DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003128LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003129RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003130
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003131# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003132# If CXX is set, and if it is needed to link a main function that was
3133# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3134# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003135# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003136# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003137
Martin v. Löwis11437992002-04-12 09:54:03 +00003138echo "$as_me:$LINENO: checking LINKCC" >&5
3139echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003140if test -z "$LINKCC"
3141then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003142 if test -z "$CXX"; then
3143 LINKCC="\$(PURIFY) \$(CC)"
3144 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003145 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003146 $CXX -c conftest.$ac_ext 2>&5
3147 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3148 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3149 then
3150 LINKCC="\$(PURIFY) \$(CC)"
3151 else
3152 LINKCC="\$(PURIFY) \$(CXX)"
3153 fi
3154 rm -fr conftest*
3155 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003156 case $ac_sys_system in
3157 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003158 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003159 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003160 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003161 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003162 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003163 esac
3164fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003165echo "$as_me:$LINENO: result: $LINKCC" >&5
3166echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003167
Martin v. Löwis11437992002-04-12 09:54:03 +00003168echo "$as_me:$LINENO: checking for --enable-shared" >&5
3169echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003170# Check whether --enable-shared or --disable-shared was given.
3171if test "${enable_shared+set}" = set; then
3172 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003173
Martin v. Löwis11437992002-04-12 09:54:03 +00003174fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003175
3176if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003177then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003178 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003179 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003180 enable_shared="yes";;
3181 *)
3182 enable_shared="no";;
3183 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003184fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003185echo "$as_me:$LINENO: result: $enable_shared" >&5
3186echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003187
3188
Martin v. Löwis11437992002-04-12 09:54:03 +00003189echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3190echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003191
Guido van Rossumb8552162001-09-05 14:58:11 +00003192# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3193# library that we build, but we do not want to link against it (we
3194# will find it with a -framework option). For this reason there is an
3195# extra variable BLDLIBRARY against which Python and the extension
3196# modules are linked, BLDLIBRARY. This is normally the same as
3197# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003198if test "$enable_framework"
3199then
3200 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3201 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3202 BLDLIBRARY=''
3203else
3204 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003205fi
Jack Jansene578a632001-08-15 01:27:14 +00003206
Martin v. Löwis1142de32002-03-29 16:28:31 +00003207# Other platforms follow
3208if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003209
3210cat >>confdefs.h <<\_ACEOF
3211#define Py_ENABLE_SHARED 1
3212_ACEOF
3213
Martin v. Löwis1142de32002-03-29 16:28:31 +00003214 case $ac_sys_system in
3215 BeOS*)
3216 LDLIBRARY='libpython$(VERSION).so'
3217 ;;
3218 CYGWIN*)
3219 LDLIBRARY='libpython$(VERSION).dll.a'
3220 DLLLIBRARY='libpython$(VERSION).dll'
3221 ;;
3222 SunOS*)
3223 LDLIBRARY='libpython$(VERSION).so'
3224 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3225 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3226 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003227 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003228 LDLIBRARY='libpython$(VERSION).so'
3229 BLDLIBRARY='-L. -lpython$(VERSION)'
3230 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3231 INSTSONAME="$LDLIBRARY".$SOVERSION
3232 ;;
3233 hp*|HP*)
3234 LDLIBRARY='libpython$(VERSION).sl'
3235 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3236 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3237 ;;
3238 OSF*)
3239 LDLIBRARY='libpython$(VERSION).so'
3240 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3241 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3242 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003243 atheos*)
3244 LDLIBRARY='libpython$(VERSION).so'
3245 BLDLIBRARY='-L. -lpython$(VERSION)'
3246 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3247 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003248 esac
3249 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3250 case $MACHDEP in
3251 dguxR4)
3252 LDLIBRARY='libpython$(VERSION).so'
3253 OPT="$OPT -pic"
3254 ;;
3255 esac
3256fi
3257
Martin v. Löwis11437992002-04-12 09:54:03 +00003258echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3259echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003260
Martin v. Löwis11437992002-04-12 09:54:03 +00003261if test -n "$ac_tool_prefix"; then
3262 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3263set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3264echo "$as_me:$LINENO: checking for $ac_word" >&5
3265echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3266if test "${ac_cv_prog_RANLIB+set}" = set; then
3267 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003268else
3269 if test -n "$RANLIB"; then
3270 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3271else
Martin v. Löwis11437992002-04-12 09:54:03 +00003272as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3273for as_dir in $PATH
3274do
3275 IFS=$as_save_IFS
3276 test -z "$as_dir" && as_dir=.
3277 for ac_exec_ext in '' $ac_executable_extensions; do
3278 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3279 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3280 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3281 break 2
3282 fi
3283done
3284done
3285
Guido van Rossum627b2d71993-12-24 10:39:16 +00003286fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003287fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003288RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003289if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003290 echo "$as_me:$LINENO: result: $RANLIB" >&5
3291echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003292else
Martin v. Löwis11437992002-04-12 09:54:03 +00003293 echo "$as_me:$LINENO: result: no" >&5
3294echo "${ECHO_T}no" >&6
3295fi
3296
3297fi
3298if test -z "$ac_cv_prog_RANLIB"; then
3299 ac_ct_RANLIB=$RANLIB
3300 # Extract the first word of "ranlib", so it can be a program name with args.
3301set dummy ranlib; ac_word=$2
3302echo "$as_me:$LINENO: checking for $ac_word" >&5
3303echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3304if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3305 echo $ECHO_N "(cached) $ECHO_C" >&6
3306else
3307 if test -n "$ac_ct_RANLIB"; then
3308 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3309else
3310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3311for as_dir in $PATH
3312do
3313 IFS=$as_save_IFS
3314 test -z "$as_dir" && as_dir=.
3315 for ac_exec_ext in '' $ac_executable_extensions; do
3316 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3317 ac_cv_prog_ac_ct_RANLIB="ranlib"
3318 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3319 break 2
3320 fi
3321done
3322done
3323
3324 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3325fi
3326fi
3327ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3328if test -n "$ac_ct_RANLIB"; then
3329 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3330echo "${ECHO_T}$ac_ct_RANLIB" >&6
3331else
3332 echo "$as_me:$LINENO: result: no" >&5
3333echo "${ECHO_T}no" >&6
3334fi
3335
3336 RANLIB=$ac_ct_RANLIB
3337else
3338 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003339fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003340
3341
Guido van Rossum7f43da71994-08-01 12:15:30 +00003342for ac_prog in ar aal
3343do
Martin v. Löwis11437992002-04-12 09:54:03 +00003344 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003345set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003346echo "$as_me:$LINENO: checking for $ac_word" >&5
3347echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3348if test "${ac_cv_prog_AR+set}" = set; then
3349 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003350else
3351 if test -n "$AR"; then
3352 ac_cv_prog_AR="$AR" # Let the user override the test.
3353else
Martin v. Löwis11437992002-04-12 09:54:03 +00003354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3355for as_dir in $PATH
3356do
3357 IFS=$as_save_IFS
3358 test -z "$as_dir" && as_dir=.
3359 for ac_exec_ext in '' $ac_executable_extensions; do
3360 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3361 ac_cv_prog_AR="$ac_prog"
3362 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3363 break 2
3364 fi
3365done
3366done
3367
Guido van Rossum7f43da71994-08-01 12:15:30 +00003368fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003369fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003370AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003371if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003372 echo "$as_me:$LINENO: result: $AR" >&5
3373echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003374else
Martin v. Löwis11437992002-04-12 09:54:03 +00003375 echo "$as_me:$LINENO: result: no" >&5
3376echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003377fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003378
Martin v. Löwis11437992002-04-12 09:54:03 +00003379 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003380done
3381test -n "$AR" || AR="ar"
3382
Michael W. Hudson54241132001-12-07 15:38:26 +00003383
Neil Schemenauera42c8272001-03-31 00:01:55 +00003384case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003385bsdos*|hp*|HP*)
3386 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003387 if test -z "$INSTALL"
3388 then
3389 INSTALL="${srcdir}/install-sh -c"
3390 fi
3391esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003392ac_aux_dir=
3393for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3394 if test -f $ac_dir/install-sh; then
3395 ac_aux_dir=$ac_dir
3396 ac_install_sh="$ac_aux_dir/install-sh -c"
3397 break
3398 elif test -f $ac_dir/install.sh; then
3399 ac_aux_dir=$ac_dir
3400 ac_install_sh="$ac_aux_dir/install.sh -c"
3401 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003402 elif test -f $ac_dir/shtool; then
3403 ac_aux_dir=$ac_dir
3404 ac_install_sh="$ac_aux_dir/shtool install -c"
3405 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003406 fi
3407done
3408if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003409 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3410echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3411 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003412fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003413ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3414ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3415ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003416
3417# Find a good install program. We prefer a C program (faster),
3418# so one script is as good as another. But avoid the broken or
3419# incompatible versions:
3420# SysV /etc/install, /usr/sbin/install
3421# SunOS /usr/etc/install
3422# IRIX /sbin/install
3423# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003424# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003425# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3426# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3427# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3428# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003429echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3430echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003431if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003432if test "${ac_cv_path_install+set}" = set; then
3433 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003434else
Martin v. Löwis11437992002-04-12 09:54:03 +00003435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3436for as_dir in $PATH
3437do
3438 IFS=$as_save_IFS
3439 test -z "$as_dir" && as_dir=.
3440 # Account for people who put trailing slashes in PATH elements.
3441case $as_dir/ in
3442 ./ | .// | /cC/* | \
3443 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3444 /usr/ucb/* ) ;;
3445 *)
3446 # OSF1 and SCO ODT 3.0 have their own names for install.
3447 # Don't use installbsd from OSF since it installs stuff as root
3448 # by default.
3449 for ac_prog in ginstall scoinst install; do
3450 for ac_exec_ext in '' $ac_executable_extensions; do
3451 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3452 if test $ac_prog = install &&
3453 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3454 # AIX install. It has an incompatible calling convention.
3455 :
3456 elif test $ac_prog = install &&
3457 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3458 # program-specific install script used by HP pwplus--don't use.
3459 :
3460 else
3461 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3462 break 3
3463 fi
3464 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003465 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003466 done
3467 ;;
3468esac
3469done
3470
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003471
3472fi
3473 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003474 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003475 else
3476 # As a last resort, use the slow shell script. We don't cache a
3477 # path for INSTALL within a source directory, because that will
3478 # break other packages using the cache if that directory is
3479 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003480 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003481 fi
3482fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003483echo "$as_me:$LINENO: result: $INSTALL" >&5
3484echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003485
3486# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3487# It thinks the first close brace ends the variable substitution.
3488test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3489
Martin v. Löwis11437992002-04-12 09:54:03 +00003490test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003491
3492test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3493
Michael W. Hudson54241132001-12-07 15:38:26 +00003494
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003495# Not every filesystem supports hard links
3496
3497if test -z "$LN" ; then
3498 case $ac_sys_system in
3499 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003500 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003501 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003502 *) LN=ln;;
3503 esac
3504fi
3505
Fred Drake109d9862001-07-11 06:27:56 +00003506# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003507echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3508echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3509
Fred Drake109d9862001-07-11 06:27:56 +00003510# Check whether --with-pydebug or --without-pydebug was given.
3511if test "${with_pydebug+set}" = set; then
3512 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003513
Fred Drake109d9862001-07-11 06:27:56 +00003514if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003515then
3516
3517cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003518#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003519_ACEOF
3520
3521 echo "$as_me:$LINENO: result: yes" >&5
3522echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003523 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003524else echo "$as_me:$LINENO: result: no" >&5
3525echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003526fi
3527else
Martin v. Löwis11437992002-04-12 09:54:03 +00003528 echo "$as_me:$LINENO: result: no" >&5
3529echo "${ECHO_T}no" >&6
3530fi;
Fred Drake109d9862001-07-11 06:27:56 +00003531
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003532# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003533
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003534if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003535then
Neal Norwitzd957f392002-09-25 21:26:19 +00003536 case $GCC in
Guido van Rossumedca74a1997-07-18 23:29:40 +00003537 yes)
3538 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003539 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003540 if test "$Py_DEBUG" = 'true' ; then
3541 # Optimization messes up debuggers, so turn it off for
3542 # debug builds.
3543 OPT="-g -Wall -Wstrict-prototypes"
3544 else
3545 OPT="-g -O3 -Wall -Wstrict-prototypes"
3546 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003547 *)
Fred Drake109d9862001-07-11 06:27:56 +00003548 OPT="-O3 -Wall -Wstrict-prototypes";;
3549 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003550 case $ac_sys_system in
3551 SCO_SV*) OPT="$OPT -m486 -DSCO5";;
3552 esac
Fred Drake109d9862001-07-11 06:27:56 +00003553 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003554 *)
3555 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003556 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003557 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003558 SCO_SV*)
3559 CFLAGS="$CFLAGS -belf"
3560 OPT="-belf -O -Ki486 -DSCO5";;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003561 *)
3562 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003563 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003564 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003565 case $ac_sys_system in
3566 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003567 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003568 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003569fi
3570
Fred Drakee1ceaa02001-12-04 20:55:47 +00003571if test "$Py_DEBUG" = 'true'; then
3572 :
3573else
3574 OPT="-DNDEBUG $OPT"
3575fi
3576
Trent Mick635f6fb2000-08-23 21:33:05 +00003577# The current (beta) Monterey compiler dies with optimizations
3578case $ac_sys_system in
3579Monterey*) OPT="";;
3580esac
3581
Guido van Rossum563e7081996-09-10 18:20:48 +00003582if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003583then
3584 OPT="$OPT $ac_arch_flags"
3585fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003586
Martin v. Löwis11437992002-04-12 09:54:03 +00003587echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3588echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3589if test "${ac_cv_opt_olimit_ok+set}" = set; then
3590 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003591else
3592 ac_save_cc="$CC"
3593CC="$CC -OPT:Olimit=0"
3594if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003595 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003596else
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 cat >conftest.$ac_ext <<_ACEOF
3598#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003599#include "confdefs.h"
3600int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003601_ACEOF
3602rm -f conftest$ac_exeext
3603if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3604 (eval $ac_link) 2>&5
3605 ac_status=$?
3606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3607 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3609 (eval $ac_try) 2>&5
3610 ac_status=$?
3611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3612 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003613 ac_cv_opt_olimit_ok=yes
3614else
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 echo "$as_me: program exited with status $ac_status" >&5
3616echo "$as_me: failed program was:" >&5
3617cat conftest.$ac_ext >&5
3618( exit $ac_status )
3619ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003620fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003621rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003622fi
Guido van Rossum91922671997-10-09 20:24:13 +00003623CC="$ac_save_cc"
3624fi
3625
Martin v. Löwis11437992002-04-12 09:54:03 +00003626echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3627echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003628if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003629 case $ac_sys_system in
3630 Darwin*) OPT="$OPT" ;;
3631 *) OPT="$OPT -OPT:Olimit=0";;
3632 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003633else
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3635echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3636 if test "${ac_cv_olimit_ok+set}" = set; then
3637 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003638else
3639 ac_save_cc="$CC"
3640 CC="$CC -Olimit 1500"
3641 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003642 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003643else
Martin v. Löwis11437992002-04-12 09:54:03 +00003644 cat >conftest.$ac_ext <<_ACEOF
3645#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003646#include "confdefs.h"
3647int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003648_ACEOF
3649rm -f conftest$ac_exeext
3650if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3651 (eval $ac_link) 2>&5
3652 ac_status=$?
3653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3654 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3656 (eval $ac_try) 2>&5
3657 ac_status=$?
3658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3659 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003660 ac_cv_olimit_ok=yes
3661else
Martin v. Löwis11437992002-04-12 09:54:03 +00003662 echo "$as_me: program exited with status $ac_status" >&5
3663echo "$as_me: failed program was:" >&5
3664cat conftest.$ac_ext >&5
3665( exit $ac_status )
3666ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003667fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003668rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003669fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003670 CC="$ac_save_cc"
3671fi
3672
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3674echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003675 if test $ac_cv_olimit_ok = yes; then
3676 OPT="$OPT -Olimit 1500"
3677 fi
3678fi
3679
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003680# On some compilers, pthreads are available without further options
3681# (e.g. MacOS X). On some of these systems, the compiler will not
3682# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3683# So we have to see first whether pthreads are available without
3684# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003685echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3686echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3687if test "${ac_cv_pthread_is_default+set}" = set; then
3688 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003689else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003690 if test "$cross_compiling" = yes; then
3691 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003692else
Martin v. Löwis11437992002-04-12 09:54:03 +00003693 cat >conftest.$ac_ext <<_ACEOF
3694#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003695#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003696
Martin v. Löwis130fb172001-07-19 11:00:41 +00003697#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003698
3699void* routine(void* p){return NULL;}
3700
3701int main(){
3702 pthread_t p;
3703 if(pthread_create(&p,NULL,routine,NULL)!=0)
3704 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003705 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003706 return 0;
3707}
3708
Martin v. Löwis11437992002-04-12 09:54:03 +00003709_ACEOF
3710rm -f conftest$ac_exeext
3711if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3712 (eval $ac_link) 2>&5
3713 ac_status=$?
3714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3715 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3717 (eval $ac_try) 2>&5
3718 ac_status=$?
3719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3720 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003721 ac_cv_pthread_is_default=yes
3722else
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 echo "$as_me: program exited with status $ac_status" >&5
3724echo "$as_me: failed program was:" >&5
3725cat conftest.$ac_ext >&5
3726( exit $ac_status )
3727ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003728fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003729rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003730fi
3731
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003732fi
3733
Martin v. Löwis11437992002-04-12 09:54:03 +00003734echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3735echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003736
Michael W. Hudson54241132001-12-07 15:38:26 +00003737
Martin v. Löwis11437992002-04-12 09:54:03 +00003738if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003739then
3740 ac_cv_kpthread=no
3741else
3742# -Kpthread, if available, provides the right #defines
3743# and linker options to make pthread_create available
3744# Some compilers won't report that they do not support -Kpthread,
3745# so we need to run a program to see whether it really made the
3746# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003747echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3748echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3749if test "${ac_cv_kpthread+set}" = set; then
3750 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003751else
3752 ac_save_cc="$CC"
3753CC="$CC -Kpthread"
3754if test "$cross_compiling" = yes; then
3755 ac_cv_kpthread=no
3756else
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 cat >conftest.$ac_ext <<_ACEOF
3758#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003759#include "confdefs.h"
3760
3761#include <pthread.h>
3762
3763void* routine(void* p){return NULL;}
3764
3765int main(){
3766 pthread_t p;
3767 if(pthread_create(&p,NULL,routine,NULL)!=0)
3768 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003769 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003770 return 0;
3771}
3772
Martin v. Löwis11437992002-04-12 09:54:03 +00003773_ACEOF
3774rm -f conftest$ac_exeext
3775if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3776 (eval $ac_link) 2>&5
3777 ac_status=$?
3778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3779 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3781 (eval $ac_try) 2>&5
3782 ac_status=$?
3783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3784 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003785 ac_cv_kpthread=yes
3786else
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 echo "$as_me: program exited with status $ac_status" >&5
3788echo "$as_me: failed program was:" >&5
3789cat conftest.$ac_ext >&5
3790( exit $ac_status )
3791ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003792fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003793rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003794fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003795CC="$ac_save_cc"
3796fi
3797
Martin v. Löwis11437992002-04-12 09:54:03 +00003798echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3799echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003800fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003801
Michael W. Hudson54241132001-12-07 15:38:26 +00003802
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003803# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003804echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3805echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3806if test "${ac_cv_header_stdc+set}" = set; then
3807 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003808else
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 cat >conftest.$ac_ext <<_ACEOF
3810#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003811#include "confdefs.h"
3812#include <stdlib.h>
3813#include <stdarg.h>
3814#include <string.h>
3815#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003816
3817_ACEOF
3818if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3819 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3820 ac_status=$?
3821 egrep -v '^ *\+' conftest.er1 >conftest.err
3822 rm -f conftest.er1
3823 cat conftest.err >&5
3824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3825 (exit $ac_status); } >/dev/null; then
3826 if test -s conftest.err; then
3827 ac_cpp_err=$ac_c_preproc_warn_flag
3828 else
3829 ac_cpp_err=
3830 fi
3831else
3832 ac_cpp_err=yes
3833fi
3834if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003835 ac_cv_header_stdc=yes
3836else
Martin v. Löwis11437992002-04-12 09:54:03 +00003837 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003838 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003839 ac_cv_header_stdc=no
3840fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003841rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003842
3843if test $ac_cv_header_stdc = yes; then
3844 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003845 cat >conftest.$ac_ext <<_ACEOF
3846#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003847#include "confdefs.h"
3848#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003849
3850_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003851if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3852 egrep "memchr" >/dev/null 2>&1; then
3853 :
3854else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003855 ac_cv_header_stdc=no
3856fi
3857rm -f conftest*
3858
3859fi
3860
3861if test $ac_cv_header_stdc = yes; then
3862 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003863 cat >conftest.$ac_ext <<_ACEOF
3864#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003865#include "confdefs.h"
3866#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003867
3868_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3870 egrep "free" >/dev/null 2>&1; then
3871 :
3872else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003873 ac_cv_header_stdc=no
3874fi
3875rm -f conftest*
3876
3877fi
3878
3879if test $ac_cv_header_stdc = yes; then
3880 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003881 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003882 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003883else
Martin v. Löwis11437992002-04-12 09:54:03 +00003884 cat >conftest.$ac_ext <<_ACEOF
3885#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003886#include "confdefs.h"
3887#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003888#if ((' ' & 0x0FF) == 0x020)
3889# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3890# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3891#else
3892# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3893 || ('j' <= (c) && (c) <= 'r') \
3894 || ('s' <= (c) && (c) <= 'z'))
3895# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3896#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003897
Martin v. Löwis11437992002-04-12 09:54:03 +00003898#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3899int
3900main ()
3901{
3902 int i;
3903 for (i = 0; i < 256; i++)
3904 if (XOR (islower (i), ISLOWER (i))
3905 || toupper (i) != TOUPPER (i))
3906 exit(2);
3907 exit (0);
3908}
3909_ACEOF
3910rm -f conftest$ac_exeext
3911if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3912 (eval $ac_link) 2>&5
3913 ac_status=$?
3914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3915 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3917 (eval $ac_try) 2>&5
3918 ac_status=$?
3919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3920 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003921 :
3922else
Martin v. Löwis11437992002-04-12 09:54:03 +00003923 echo "$as_me: program exited with status $ac_status" >&5
3924echo "$as_me: failed program was:" >&5
3925cat conftest.$ac_ext >&5
3926( exit $ac_status )
3927ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003928fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003929rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003930fi
3931fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003932fi
3933echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3934echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003935if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003936
3937cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003938#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003939_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003940
3941fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003942
Martin v. Löwis11437992002-04-12 09:54:03 +00003943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
Martin v. Löwis14e73b12003-01-01 09:51:12 +00003980
Martin v. Löwis11437992002-04-12 09:54:03 +00003981for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003982libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00003983signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
3984unistd.h utime.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003985sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003986sys/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 +00003987sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003988sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003989do
Martin v. Löwis11437992002-04-12 09:54:03 +00003990as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3991if eval "test \"\${$as_ac_Header+set}\" = set"; then
3992 echo "$as_me:$LINENO: checking for $ac_header" >&5
3993echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3994if eval "test \"\${$as_ac_Header+set}\" = set"; then
3995 echo $ECHO_N "(cached) $ECHO_C" >&6
3996fi
3997echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3998echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003999else
Martin v. Löwis11437992002-04-12 09:54:03 +00004000 # Is the header compilable?
4001echo "$as_me:$LINENO: checking $ac_header usability" >&5
4002echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4003cat >conftest.$ac_ext <<_ACEOF
4004#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004005#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004006$ac_includes_default
4007#include <$ac_header>
4008_ACEOF
4009rm -f conftest.$ac_objext
4010if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4011 (eval $ac_compile) 2>&5
4012 ac_status=$?
4013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4014 (exit $ac_status); } &&
4015 { ac_try='test -s conftest.$ac_objext'
4016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4017 (eval $ac_try) 2>&5
4018 ac_status=$?
4019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4020 (exit $ac_status); }; }; then
4021 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004022else
Martin v. Löwis11437992002-04-12 09:54:03 +00004023 echo "$as_me: failed program was:" >&5
4024cat conftest.$ac_ext >&5
4025ac_header_compiler=no
4026fi
4027rm -f conftest.$ac_objext conftest.$ac_ext
4028echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4029echo "${ECHO_T}$ac_header_compiler" >&6
4030
4031# Is the header present?
4032echo "$as_me:$LINENO: checking $ac_header presence" >&5
4033echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4034cat >conftest.$ac_ext <<_ACEOF
4035#line $LINENO "configure"
4036#include "confdefs.h"
4037#include <$ac_header>
4038_ACEOF
4039if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4040 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4041 ac_status=$?
4042 egrep -v '^ *\+' conftest.er1 >conftest.err
4043 rm -f conftest.er1
4044 cat conftest.err >&5
4045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4046 (exit $ac_status); } >/dev/null; then
4047 if test -s conftest.err; then
4048 ac_cpp_err=$ac_c_preproc_warn_flag
4049 else
4050 ac_cpp_err=
4051 fi
4052else
4053 ac_cpp_err=yes
4054fi
4055if test -z "$ac_cpp_err"; then
4056 ac_header_preproc=yes
4057else
4058 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004059 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004060 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004061fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004062rm -f conftest.err conftest.$ac_ext
4063echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4064echo "${ECHO_T}$ac_header_preproc" >&6
4065
4066# So? What about this header?
4067case $ac_header_compiler:$ac_header_preproc in
4068 yes:no )
4069 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4070echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4071 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4072echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4073 no:yes )
4074 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4075echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4076 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4077echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4078 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4079echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4080esac
4081echo "$as_me:$LINENO: checking for $ac_header" >&5
4082echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4083if eval "test \"\${$as_ac_Header+set}\" = set"; then
4084 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004085else
Martin v. Löwis11437992002-04-12 09:54:03 +00004086 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004087fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004088echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4089echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4090
4091fi
4092if test `eval echo '${'$as_ac_Header'}'` = yes; then
4093 cat >>confdefs.h <<_ACEOF
4094#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4095_ACEOF
4096
4097fi
4098
Guido van Rossum627b2d71993-12-24 10:39:16 +00004099done
4100
Martin v. Löwis11437992002-04-12 09:54:03 +00004101
4102
4103
4104
4105
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004106ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004107for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4108 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4109echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4110echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4111if eval "test \"\${$as_ac_Header+set}\" = set"; then
4112 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004113else
Martin v. Löwis11437992002-04-12 09:54:03 +00004114 cat >conftest.$ac_ext <<_ACEOF
4115#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004116#include "confdefs.h"
4117#include <sys/types.h>
4118#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004119
4120#ifdef F77_DUMMY_MAIN
4121# ifdef __cplusplus
4122 extern "C"
4123# endif
4124 int F77_DUMMY_MAIN() { return 1; }
4125#endif
4126int
4127main ()
4128{
4129if ((DIR *) 0)
4130return 0;
4131 ;
4132 return 0;
4133}
4134_ACEOF
4135rm -f conftest.$ac_objext
4136if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4137 (eval $ac_compile) 2>&5
4138 ac_status=$?
4139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4140 (exit $ac_status); } &&
4141 { ac_try='test -s conftest.$ac_objext'
4142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4143 (eval $ac_try) 2>&5
4144 ac_status=$?
4145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4146 (exit $ac_status); }; }; then
4147 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004148else
Martin v. Löwis11437992002-04-12 09:54:03 +00004149 echo "$as_me: failed program was:" >&5
4150cat conftest.$ac_ext >&5
4151eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004152fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004153rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004154fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004155echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4156echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4157if test `eval echo '${'$as_ac_Header'}'` = yes; then
4158 cat >>confdefs.h <<_ACEOF
4159#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4160_ACEOF
4161
4162ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004163fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004164
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004165done
4166# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4167if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004168 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4169echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4170if test "${ac_cv_search_opendir+set}" = set; then
4171 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172else
Martin v. Löwis11437992002-04-12 09:54:03 +00004173 ac_func_search_save_LIBS=$LIBS
4174ac_cv_search_opendir=no
4175cat >conftest.$ac_ext <<_ACEOF
4176#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004177#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004178
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004179/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004180#ifdef __cplusplus
4181extern "C"
4182#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004183/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004184 builtin and then its argument prototype would still apply. */
4185char opendir ();
4186#ifdef F77_DUMMY_MAIN
4187# ifdef __cplusplus
4188 extern "C"
4189# endif
4190 int F77_DUMMY_MAIN() { return 1; }
4191#endif
4192int
4193main ()
4194{
4195opendir ();
4196 ;
4197 return 0;
4198}
4199_ACEOF
4200rm -f conftest.$ac_objext conftest$ac_exeext
4201if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4202 (eval $ac_link) 2>&5
4203 ac_status=$?
4204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4205 (exit $ac_status); } &&
4206 { ac_try='test -s conftest$ac_exeext'
4207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4208 (eval $ac_try) 2>&5
4209 ac_status=$?
4210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4211 (exit $ac_status); }; }; then
4212 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004213else
Martin v. Löwis11437992002-04-12 09:54:03 +00004214 echo "$as_me: failed program was:" >&5
4215cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004216fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004217rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4218if test "$ac_cv_search_opendir" = no; then
4219 for ac_lib in dir; do
4220 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4221 cat >conftest.$ac_ext <<_ACEOF
4222#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004223#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004224
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004225/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004226#ifdef __cplusplus
4227extern "C"
4228#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004229/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004230 builtin and then its argument prototype would still apply. */
4231char opendir ();
4232#ifdef F77_DUMMY_MAIN
4233# ifdef __cplusplus
4234 extern "C"
4235# endif
4236 int F77_DUMMY_MAIN() { return 1; }
4237#endif
4238int
4239main ()
4240{
4241opendir ();
4242 ;
4243 return 0;
4244}
4245_ACEOF
4246rm -f conftest.$ac_objext conftest$ac_exeext
4247if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4248 (eval $ac_link) 2>&5
4249 ac_status=$?
4250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4251 (exit $ac_status); } &&
4252 { ac_try='test -s conftest$ac_exeext'
4253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4254 (eval $ac_try) 2>&5
4255 ac_status=$?
4256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4257 (exit $ac_status); }; }; then
4258 ac_cv_search_opendir="-l$ac_lib"
4259break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004260else
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 echo "$as_me: failed program was:" >&5
4262cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004263fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004264rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4265 done
4266fi
4267LIBS=$ac_func_search_save_LIBS
4268fi
4269echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4270echo "${ECHO_T}$ac_cv_search_opendir" >&6
4271if test "$ac_cv_search_opendir" != no; then
4272 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004273
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004274fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004275
Michael W. Hudson54241132001-12-07 15:38:26 +00004276else
Martin v. Löwis11437992002-04-12 09:54:03 +00004277 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4278echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4279if test "${ac_cv_search_opendir+set}" = set; then
4280 echo $ECHO_N "(cached) $ECHO_C" >&6
4281else
4282 ac_func_search_save_LIBS=$LIBS
4283ac_cv_search_opendir=no
4284cat >conftest.$ac_ext <<_ACEOF
4285#line $LINENO "configure"
4286#include "confdefs.h"
4287
4288/* Override any gcc2 internal prototype to avoid an error. */
4289#ifdef __cplusplus
4290extern "C"
4291#endif
4292/* We use char because int might match the return type of a gcc2
4293 builtin and then its argument prototype would still apply. */
4294char opendir ();
4295#ifdef F77_DUMMY_MAIN
4296# ifdef __cplusplus
4297 extern "C"
4298# endif
4299 int F77_DUMMY_MAIN() { return 1; }
4300#endif
4301int
4302main ()
4303{
4304opendir ();
4305 ;
4306 return 0;
4307}
4308_ACEOF
4309rm -f conftest.$ac_objext conftest$ac_exeext
4310if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4311 (eval $ac_link) 2>&5
4312 ac_status=$?
4313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4314 (exit $ac_status); } &&
4315 { ac_try='test -s conftest$ac_exeext'
4316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4317 (eval $ac_try) 2>&5
4318 ac_status=$?
4319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4320 (exit $ac_status); }; }; then
4321 ac_cv_search_opendir="none required"
4322else
4323 echo "$as_me: failed program was:" >&5
4324cat conftest.$ac_ext >&5
4325fi
4326rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4327if test "$ac_cv_search_opendir" = no; then
4328 for ac_lib in x; do
4329 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4330 cat >conftest.$ac_ext <<_ACEOF
4331#line $LINENO "configure"
4332#include "confdefs.h"
4333
4334/* Override any gcc2 internal prototype to avoid an error. */
4335#ifdef __cplusplus
4336extern "C"
4337#endif
4338/* We use char because int might match the return type of a gcc2
4339 builtin and then its argument prototype would still apply. */
4340char opendir ();
4341#ifdef F77_DUMMY_MAIN
4342# ifdef __cplusplus
4343 extern "C"
4344# endif
4345 int F77_DUMMY_MAIN() { return 1; }
4346#endif
4347int
4348main ()
4349{
4350opendir ();
4351 ;
4352 return 0;
4353}
4354_ACEOF
4355rm -f conftest.$ac_objext conftest$ac_exeext
4356if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4357 (eval $ac_link) 2>&5
4358 ac_status=$?
4359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4360 (exit $ac_status); } &&
4361 { ac_try='test -s conftest$ac_exeext'
4362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4363 (eval $ac_try) 2>&5
4364 ac_status=$?
4365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4366 (exit $ac_status); }; }; then
4367 ac_cv_search_opendir="-l$ac_lib"
4368break
4369else
4370 echo "$as_me: failed program was:" >&5
4371cat conftest.$ac_ext >&5
4372fi
4373rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4374 done
4375fi
4376LIBS=$ac_func_search_save_LIBS
4377fi
4378echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4379echo "${ECHO_T}$ac_cv_search_opendir" >&6
4380if test "$ac_cv_search_opendir" != no; then
4381 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4382
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004383fi
4384
4385fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004386
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004387echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4388echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4389if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4390 echo $ECHO_N "(cached) $ECHO_C" >&6
4391else
4392 cat >conftest.$ac_ext <<_ACEOF
4393#line $LINENO "configure"
4394#include "confdefs.h"
4395#include <sys/types.h>
4396#ifdef F77_DUMMY_MAIN
4397# ifdef __cplusplus
4398 extern "C"
4399# endif
4400 int F77_DUMMY_MAIN() { return 1; }
4401#endif
4402int
4403main ()
4404{
4405return makedev(0, 0);
4406 ;
4407 return 0;
4408}
4409_ACEOF
4410rm -f conftest.$ac_objext conftest$ac_exeext
4411if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4412 (eval $ac_link) 2>&5
4413 ac_status=$?
4414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4415 (exit $ac_status); } &&
4416 { ac_try='test -s conftest$ac_exeext'
4417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4418 (eval $ac_try) 2>&5
4419 ac_status=$?
4420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4421 (exit $ac_status); }; }; then
4422 ac_cv_header_sys_types_h_makedev=yes
4423else
4424 echo "$as_me: failed program was:" >&5
4425cat conftest.$ac_ext >&5
4426ac_cv_header_sys_types_h_makedev=no
4427fi
4428rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4429
4430fi
4431echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4432echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4433
4434if test $ac_cv_header_sys_types_h_makedev = no; then
4435if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4436 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4437echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4438if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4439 echo $ECHO_N "(cached) $ECHO_C" >&6
4440fi
4441echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4442echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4443else
4444 # Is the header compilable?
4445echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4446echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4447cat >conftest.$ac_ext <<_ACEOF
4448#line $LINENO "configure"
4449#include "confdefs.h"
4450$ac_includes_default
4451#include <sys/mkdev.h>
4452_ACEOF
4453rm -f conftest.$ac_objext
4454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4455 (eval $ac_compile) 2>&5
4456 ac_status=$?
4457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4458 (exit $ac_status); } &&
4459 { ac_try='test -s conftest.$ac_objext'
4460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4461 (eval $ac_try) 2>&5
4462 ac_status=$?
4463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4464 (exit $ac_status); }; }; then
4465 ac_header_compiler=yes
4466else
4467 echo "$as_me: failed program was:" >&5
4468cat conftest.$ac_ext >&5
4469ac_header_compiler=no
4470fi
4471rm -f conftest.$ac_objext conftest.$ac_ext
4472echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4473echo "${ECHO_T}$ac_header_compiler" >&6
4474
4475# Is the header present?
4476echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4477echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4478cat >conftest.$ac_ext <<_ACEOF
4479#line $LINENO "configure"
4480#include "confdefs.h"
4481#include <sys/mkdev.h>
4482_ACEOF
4483if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4484 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4485 ac_status=$?
4486 egrep -v '^ *\+' conftest.er1 >conftest.err
4487 rm -f conftest.er1
4488 cat conftest.err >&5
4489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4490 (exit $ac_status); } >/dev/null; then
4491 if test -s conftest.err; then
4492 ac_cpp_err=$ac_c_preproc_warn_flag
4493 else
4494 ac_cpp_err=
4495 fi
4496else
4497 ac_cpp_err=yes
4498fi
4499if test -z "$ac_cpp_err"; then
4500 ac_header_preproc=yes
4501else
4502 echo "$as_me: failed program was:" >&5
4503 cat conftest.$ac_ext >&5
4504 ac_header_preproc=no
4505fi
4506rm -f conftest.err conftest.$ac_ext
4507echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4508echo "${ECHO_T}$ac_header_preproc" >&6
4509
4510# So? What about this header?
4511case $ac_header_compiler:$ac_header_preproc in
4512 yes:no )
4513 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4514echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4515 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4516echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4517 no:yes )
4518 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4519echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4520 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4521echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4522 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4523echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4524esac
4525echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4526echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4527if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4528 echo $ECHO_N "(cached) $ECHO_C" >&6
4529else
4530 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4531fi
4532echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4533echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4534
4535fi
4536if test $ac_cv_header_sys_mkdev_h = yes; then
4537
4538cat >>confdefs.h <<\_ACEOF
4539#define MAJOR_IN_MKDEV 1
4540_ACEOF
4541
4542fi
4543
4544
4545
4546 if test $ac_cv_header_sys_mkdev_h = no; then
4547 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4548 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4549echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4550if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4551 echo $ECHO_N "(cached) $ECHO_C" >&6
4552fi
4553echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4554echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4555else
4556 # Is the header compilable?
4557echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4558echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4559cat >conftest.$ac_ext <<_ACEOF
4560#line $LINENO "configure"
4561#include "confdefs.h"
4562$ac_includes_default
4563#include <sys/sysmacros.h>
4564_ACEOF
4565rm -f conftest.$ac_objext
4566if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4567 (eval $ac_compile) 2>&5
4568 ac_status=$?
4569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4570 (exit $ac_status); } &&
4571 { ac_try='test -s conftest.$ac_objext'
4572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4573 (eval $ac_try) 2>&5
4574 ac_status=$?
4575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4576 (exit $ac_status); }; }; then
4577 ac_header_compiler=yes
4578else
4579 echo "$as_me: failed program was:" >&5
4580cat conftest.$ac_ext >&5
4581ac_header_compiler=no
4582fi
4583rm -f conftest.$ac_objext conftest.$ac_ext
4584echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4585echo "${ECHO_T}$ac_header_compiler" >&6
4586
4587# Is the header present?
4588echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4589echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4590cat >conftest.$ac_ext <<_ACEOF
4591#line $LINENO "configure"
4592#include "confdefs.h"
4593#include <sys/sysmacros.h>
4594_ACEOF
4595if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4596 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4597 ac_status=$?
4598 egrep -v '^ *\+' conftest.er1 >conftest.err
4599 rm -f conftest.er1
4600 cat conftest.err >&5
4601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4602 (exit $ac_status); } >/dev/null; then
4603 if test -s conftest.err; then
4604 ac_cpp_err=$ac_c_preproc_warn_flag
4605 else
4606 ac_cpp_err=
4607 fi
4608else
4609 ac_cpp_err=yes
4610fi
4611if test -z "$ac_cpp_err"; then
4612 ac_header_preproc=yes
4613else
4614 echo "$as_me: failed program was:" >&5
4615 cat conftest.$ac_ext >&5
4616 ac_header_preproc=no
4617fi
4618rm -f conftest.err conftest.$ac_ext
4619echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4620echo "${ECHO_T}$ac_header_preproc" >&6
4621
4622# So? What about this header?
4623case $ac_header_compiler:$ac_header_preproc in
4624 yes:no )
4625 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4626echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4627 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4628echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4629 no:yes )
4630 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4631echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4632 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4633echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4634 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4635echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4636esac
4637echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4638echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4639if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4640 echo $ECHO_N "(cached) $ECHO_C" >&6
4641else
4642 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4643fi
4644echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4645echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4646
4647fi
4648if test $ac_cv_header_sys_sysmacros_h = yes; then
4649
4650cat >>confdefs.h <<\_ACEOF
4651#define MAJOR_IN_SYSMACROS 1
4652_ACEOF
4653
4654fi
4655
4656
4657 fi
4658fi
4659
Michael W. Hudson54241132001-12-07 15:38:26 +00004660
Guido van Rossum627b2d71993-12-24 10:39:16 +00004661# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004662was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004663echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4664echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4665cat >conftest.$ac_ext <<_ACEOF
4666#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004667#include "confdefs.h"
4668#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004669
4670_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004671if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4672 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004673 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004674else
Martin v. Löwis11437992002-04-12 09:54:03 +00004675
4676
4677cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004678#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004679_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004680
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004681
Guido van Rossum627b2d71993-12-24 10:39:16 +00004682fi
4683rm -f conftest*
4684
Martin v. Löwis11437992002-04-12 09:54:03 +00004685echo "$as_me:$LINENO: result: $was_it_defined" >&5
4686echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004687
Neal Norwitz11690112002-07-30 01:08:28 +00004688# Check whether using makedev requires defining _OSF_SOURCE
4689echo "$as_me:$LINENO: checking for makedev" >&5
4690echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4691cat >conftest.$ac_ext <<_ACEOF
4692#line $LINENO "configure"
4693#include "confdefs.h"
4694 #include <sys/types.h>
4695#ifdef F77_DUMMY_MAIN
4696# ifdef __cplusplus
4697 extern "C"
4698# endif
4699 int F77_DUMMY_MAIN() { return 1; }
4700#endif
4701int
4702main ()
4703{
4704 makedev(0, 0)
4705 ;
4706 return 0;
4707}
4708_ACEOF
4709rm -f conftest.$ac_objext conftest$ac_exeext
4710if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4711 (eval $ac_link) 2>&5
4712 ac_status=$?
4713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4714 (exit $ac_status); } &&
4715 { ac_try='test -s conftest$ac_exeext'
4716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4717 (eval $ac_try) 2>&5
4718 ac_status=$?
4719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4720 (exit $ac_status); }; }; then
4721 ac_cv_has_makedev=yes
4722else
4723 echo "$as_me: failed program was:" >&5
4724cat conftest.$ac_ext >&5
4725ac_cv_has_makedev=no
4726fi
4727rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4728if test "$ac_cv_has_makedev" = "no"; then
4729 # we didn't link, try if _OSF_SOURCE will allow us to link
4730 cat >conftest.$ac_ext <<_ACEOF
4731#line $LINENO "configure"
4732#include "confdefs.h"
4733
4734 #define _OSF_SOURCE 1
4735 #include <sys/types.h>
4736
4737#ifdef F77_DUMMY_MAIN
4738# ifdef __cplusplus
4739 extern "C"
4740# endif
4741 int F77_DUMMY_MAIN() { return 1; }
4742#endif
4743int
4744main ()
4745{
4746 makedev(0, 0)
4747 ;
4748 return 0;
4749}
4750_ACEOF
4751rm -f conftest.$ac_objext conftest$ac_exeext
4752if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4753 (eval $ac_link) 2>&5
4754 ac_status=$?
4755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4756 (exit $ac_status); } &&
4757 { ac_try='test -s conftest$ac_exeext'
4758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4759 (eval $ac_try) 2>&5
4760 ac_status=$?
4761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4762 (exit $ac_status); }; }; then
4763 ac_cv_has_makedev=yes
4764else
4765 echo "$as_me: failed program was:" >&5
4766cat conftest.$ac_ext >&5
4767ac_cv_has_makedev=no
4768fi
4769rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4770 if test "$ac_cv_has_makedev" = "yes"; then
4771
4772cat >>confdefs.h <<\_ACEOF
4773#define _OSF_SOURCE 1
4774_ACEOF
4775
4776 fi
4777fi
4778echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4779echo "${ECHO_T}$ac_cv_has_makedev" >&6
4780if test "$ac_cv_has_makedev" = "yes"; then
4781
4782cat >>confdefs.h <<\_ACEOF
4783#define HAVE_MAKEDEV 1
4784_ACEOF
4785
4786fi
4787
Martin v. Löwis399a6892002-10-04 10:22:02 +00004788# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4789# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4790# defined, but the compiler does not support pragma redefine_extname,
4791# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4792# structures (such as rlimit64) without declaring them. As a
4793# work-around, disable LFS on such configurations
4794
4795use_lfs=yes
4796echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4797echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4798cat >conftest.$ac_ext <<_ACEOF
4799#line $LINENO "configure"
4800#include "confdefs.h"
4801
4802#define _LARGEFILE_SOURCE 1
4803#define _FILE_OFFSET_BITS 64
4804#include <sys/resource.h>
4805
4806#ifdef F77_DUMMY_MAIN
4807# ifdef __cplusplus
4808 extern "C"
4809# endif
4810 int F77_DUMMY_MAIN() { return 1; }
4811#endif
4812int
4813main ()
4814{
4815struct rlimit foo;
4816 ;
4817 return 0;
4818}
4819_ACEOF
4820rm -f conftest.$ac_objext
4821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4822 (eval $ac_compile) 2>&5
4823 ac_status=$?
4824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4825 (exit $ac_status); } &&
4826 { ac_try='test -s conftest.$ac_objext'
4827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4828 (eval $ac_try) 2>&5
4829 ac_status=$?
4830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4831 (exit $ac_status); }; }; then
4832 sol_lfs_bug=no
4833else
4834 echo "$as_me: failed program was:" >&5
4835cat conftest.$ac_ext >&5
4836sol_lfs_bug=yes
4837fi
4838rm -f conftest.$ac_objext conftest.$ac_ext
4839echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4840echo "${ECHO_T}$sol_lfs_bug" >&6
4841if test "$sol_lfs_bug" = "yes"; then
4842 use_lfs=no
4843fi
4844
4845if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004846# Two defines needed to enable largefile support on various platforms
4847# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004848
Martin v. Löwis11437992002-04-12 09:54:03 +00004849cat >>confdefs.h <<\_ACEOF
4850#define _LARGEFILE_SOURCE 1
4851_ACEOF
4852
4853
4854cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004855#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004856_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004857
Martin v. Löwis399a6892002-10-04 10:22:02 +00004858fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004859
Guido van Rossum84e7b241996-08-19 21:59:00 +00004860# Add some code to confdefs.h so that the test for off_t works on SCO
4861cat >> confdefs.h <<\EOF
4862#if defined(SCO_DS)
4863#undef _OFF_T
4864#endif
4865EOF
4866
Guido van Rossumef2255b2000-03-10 22:30:29 +00004867# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004868echo "$as_me:$LINENO: checking for mode_t" >&5
4869echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4870if test "${ac_cv_type_mode_t+set}" = set; then
4871 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004872else
Martin v. Löwis11437992002-04-12 09:54:03 +00004873 cat >conftest.$ac_ext <<_ACEOF
4874#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004875#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004876$ac_includes_default
4877#ifdef F77_DUMMY_MAIN
4878# ifdef __cplusplus
4879 extern "C"
4880# endif
4881 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004883int
4884main ()
4885{
4886if ((mode_t *) 0)
4887 return 0;
4888if (sizeof (mode_t))
4889 return 0;
4890 ;
4891 return 0;
4892}
4893_ACEOF
4894rm -f conftest.$ac_objext
4895if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4896 (eval $ac_compile) 2>&5
4897 ac_status=$?
4898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4899 (exit $ac_status); } &&
4900 { ac_try='test -s conftest.$ac_objext'
4901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4902 (eval $ac_try) 2>&5
4903 ac_status=$?
4904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4905 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004906 ac_cv_type_mode_t=yes
4907else
Martin v. Löwis11437992002-04-12 09:54:03 +00004908 echo "$as_me: failed program was:" >&5
4909cat conftest.$ac_ext >&5
4910ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004911fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004912rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004913fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004914echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4915echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4916if test $ac_cv_type_mode_t = yes; then
4917 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004918else
Martin v. Löwis11437992002-04-12 09:54:03 +00004919
4920cat >>confdefs.h <<_ACEOF
4921#define mode_t int
4922_ACEOF
4923
4924fi
4925
4926echo "$as_me:$LINENO: checking for off_t" >&5
4927echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4928if test "${ac_cv_type_off_t+set}" = set; then
4929 echo $ECHO_N "(cached) $ECHO_C" >&6
4930else
4931 cat >conftest.$ac_ext <<_ACEOF
4932#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004933#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004934$ac_includes_default
4935#ifdef F77_DUMMY_MAIN
4936# ifdef __cplusplus
4937 extern "C"
4938# endif
4939 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004940#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004941int
4942main ()
4943{
4944if ((off_t *) 0)
4945 return 0;
4946if (sizeof (off_t))
4947 return 0;
4948 ;
4949 return 0;
4950}
4951_ACEOF
4952rm -f conftest.$ac_objext
4953if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4954 (eval $ac_compile) 2>&5
4955 ac_status=$?
4956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4957 (exit $ac_status); } &&
4958 { ac_try='test -s conftest.$ac_objext'
4959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4960 (eval $ac_try) 2>&5
4961 ac_status=$?
4962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4963 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004964 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004965else
Martin v. Löwis11437992002-04-12 09:54:03 +00004966 echo "$as_me: failed program was:" >&5
4967cat conftest.$ac_ext >&5
4968ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004969fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004970rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004971fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004972echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4973echo "${ECHO_T}$ac_cv_type_off_t" >&6
4974if test $ac_cv_type_off_t = yes; then
4975 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004976else
Martin v. Löwis11437992002-04-12 09:54:03 +00004977
4978cat >>confdefs.h <<_ACEOF
4979#define off_t long
4980_ACEOF
4981
4982fi
4983
4984echo "$as_me:$LINENO: checking for pid_t" >&5
4985echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4986if test "${ac_cv_type_pid_t+set}" = set; then
4987 echo $ECHO_N "(cached) $ECHO_C" >&6
4988else
4989 cat >conftest.$ac_ext <<_ACEOF
4990#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004991#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004992$ac_includes_default
4993#ifdef F77_DUMMY_MAIN
4994# ifdef __cplusplus
4995 extern "C"
4996# endif
4997 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004998#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004999int
5000main ()
5001{
5002if ((pid_t *) 0)
5003 return 0;
5004if (sizeof (pid_t))
5005 return 0;
5006 ;
5007 return 0;
5008}
5009_ACEOF
5010rm -f conftest.$ac_objext
5011if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5012 (eval $ac_compile) 2>&5
5013 ac_status=$?
5014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5015 (exit $ac_status); } &&
5016 { ac_try='test -s conftest.$ac_objext'
5017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5018 (eval $ac_try) 2>&5
5019 ac_status=$?
5020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5021 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005022 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005023else
Martin v. Löwis11437992002-04-12 09:54:03 +00005024 echo "$as_me: failed program was:" >&5
5025cat conftest.$ac_ext >&5
5026ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005027fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005028rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005029fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005030echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5031echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5032if test $ac_cv_type_pid_t = yes; then
5033 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005034else
Martin v. Löwis11437992002-04-12 09:54:03 +00005035
5036cat >>confdefs.h <<_ACEOF
5037#define pid_t int
5038_ACEOF
5039
5040fi
5041
5042echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5043echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5044if test "${ac_cv_type_signal+set}" = set; then
5045 echo $ECHO_N "(cached) $ECHO_C" >&6
5046else
5047 cat >conftest.$ac_ext <<_ACEOF
5048#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005049#include "confdefs.h"
5050#include <sys/types.h>
5051#include <signal.h>
5052#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005053# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005054#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005055#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005056extern "C" void (*signal (int, void (*)(int)))(int);
5057#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005058void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005059#endif
5060
Martin v. Löwis11437992002-04-12 09:54:03 +00005061#ifdef F77_DUMMY_MAIN
5062# ifdef __cplusplus
5063 extern "C"
5064# endif
5065 int F77_DUMMY_MAIN() { return 1; }
5066#endif
5067int
5068main ()
5069{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005070int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005071 ;
5072 return 0;
5073}
5074_ACEOF
5075rm -f conftest.$ac_objext
5076if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5077 (eval $ac_compile) 2>&5
5078 ac_status=$?
5079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5080 (exit $ac_status); } &&
5081 { ac_try='test -s conftest.$ac_objext'
5082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5083 (eval $ac_try) 2>&5
5084 ac_status=$?
5085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5086 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005087 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005088else
Martin v. Löwis11437992002-04-12 09:54:03 +00005089 echo "$as_me: failed program was:" >&5
5090cat conftest.$ac_ext >&5
5091ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005092fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005093rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005094fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005095echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5096echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005097
Martin v. Löwis11437992002-04-12 09:54:03 +00005098cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005099#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005100_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005101
Michael W. Hudson54241132001-12-07 15:38:26 +00005102
Martin v. Löwis11437992002-04-12 09:54:03 +00005103echo "$as_me:$LINENO: checking for size_t" >&5
5104echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5105if test "${ac_cv_type_size_t+set}" = set; then
5106 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005107else
Martin v. Löwis11437992002-04-12 09:54:03 +00005108 cat >conftest.$ac_ext <<_ACEOF
5109#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005110#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005111$ac_includes_default
5112#ifdef F77_DUMMY_MAIN
5113# ifdef __cplusplus
5114 extern "C"
5115# endif
5116 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005117#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005118int
5119main ()
5120{
5121if ((size_t *) 0)
5122 return 0;
5123if (sizeof (size_t))
5124 return 0;
5125 ;
5126 return 0;
5127}
5128_ACEOF
5129rm -f conftest.$ac_objext
5130if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5131 (eval $ac_compile) 2>&5
5132 ac_status=$?
5133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5134 (exit $ac_status); } &&
5135 { ac_try='test -s conftest.$ac_objext'
5136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5137 (eval $ac_try) 2>&5
5138 ac_status=$?
5139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5140 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005141 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005142else
Martin v. Löwis11437992002-04-12 09:54:03 +00005143 echo "$as_me: failed program was:" >&5
5144cat conftest.$ac_ext >&5
5145ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005146fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005147rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005148fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005149echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5150echo "${ECHO_T}$ac_cv_type_size_t" >&6
5151if test $ac_cv_type_size_t = yes; then
5152 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005153else
Martin v. Löwis11437992002-04-12 09:54:03 +00005154
5155cat >>confdefs.h <<_ACEOF
5156#define size_t unsigned
5157_ACEOF
5158
5159fi
5160
5161echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5162echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5163if test "${ac_cv_type_uid_t+set}" = set; then
5164 echo $ECHO_N "(cached) $ECHO_C" >&6
5165else
5166 cat >conftest.$ac_ext <<_ACEOF
5167#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005168#include "confdefs.h"
5169#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005170
5171_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005172if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5173 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005174 ac_cv_type_uid_t=yes
5175else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005176 ac_cv_type_uid_t=no
5177fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005178rm -f conftest*
5179
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005180fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005181echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5182echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005183if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005184
Martin v. Löwis11437992002-04-12 09:54:03 +00005185cat >>confdefs.h <<\_ACEOF
5186#define uid_t int
5187_ACEOF
5188
5189
5190cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005191#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005192_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005193
5194fi
5195
Jack Jansendd19cf82001-12-06 22:36:17 +00005196
Michael W. Hudson54241132001-12-07 15:38:26 +00005197# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005198echo "$as_me:$LINENO: checking for int" >&5
5199echo $ECHO_N "checking for int... $ECHO_C" >&6
5200if test "${ac_cv_type_int+set}" = set; then
5201 echo $ECHO_N "(cached) $ECHO_C" >&6
5202else
5203 cat >conftest.$ac_ext <<_ACEOF
5204#line $LINENO "configure"
5205#include "confdefs.h"
5206$ac_includes_default
5207#ifdef F77_DUMMY_MAIN
5208# ifdef __cplusplus
5209 extern "C"
5210# endif
5211 int F77_DUMMY_MAIN() { return 1; }
5212#endif
5213int
5214main ()
5215{
5216if ((int *) 0)
5217 return 0;
5218if (sizeof (int))
5219 return 0;
5220 ;
5221 return 0;
5222}
5223_ACEOF
5224rm -f conftest.$ac_objext
5225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5226 (eval $ac_compile) 2>&5
5227 ac_status=$?
5228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5229 (exit $ac_status); } &&
5230 { ac_try='test -s conftest.$ac_objext'
5231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5232 (eval $ac_try) 2>&5
5233 ac_status=$?
5234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5235 (exit $ac_status); }; }; then
5236 ac_cv_type_int=yes
5237else
5238 echo "$as_me: failed program was:" >&5
5239cat conftest.$ac_ext >&5
5240ac_cv_type_int=no
5241fi
5242rm -f conftest.$ac_objext conftest.$ac_ext
5243fi
5244echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5245echo "${ECHO_T}$ac_cv_type_int" >&6
5246
5247echo "$as_me:$LINENO: checking size of int" >&5
5248echo $ECHO_N "checking size of int... $ECHO_C" >&6
5249if test "${ac_cv_sizeof_int+set}" = set; then
5250 echo $ECHO_N "(cached) $ECHO_C" >&6
5251else
5252 if test "$ac_cv_type_int" = yes; then
5253 # The cast to unsigned long works around a bug in the HP C Compiler
5254 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5255 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5256 # This bug is HP SR number 8606223364.
5257 if test "$cross_compiling" = yes; then
5258 # Depending upon the size, compute the lo and hi bounds.
5259cat >conftest.$ac_ext <<_ACEOF
5260#line $LINENO "configure"
5261#include "confdefs.h"
5262$ac_includes_default
5263#ifdef F77_DUMMY_MAIN
5264# ifdef __cplusplus
5265 extern "C"
5266# endif
5267 int F77_DUMMY_MAIN() { return 1; }
5268#endif
5269int
5270main ()
5271{
5272static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5273test_array [0] = 0
5274
5275 ;
5276 return 0;
5277}
5278_ACEOF
5279rm -f conftest.$ac_objext
5280if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5281 (eval $ac_compile) 2>&5
5282 ac_status=$?
5283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5284 (exit $ac_status); } &&
5285 { ac_try='test -s conftest.$ac_objext'
5286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5287 (eval $ac_try) 2>&5
5288 ac_status=$?
5289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5290 (exit $ac_status); }; }; then
5291 ac_lo=0 ac_mid=0
5292 while :; do
5293 cat >conftest.$ac_ext <<_ACEOF
5294#line $LINENO "configure"
5295#include "confdefs.h"
5296$ac_includes_default
5297#ifdef F77_DUMMY_MAIN
5298# ifdef __cplusplus
5299 extern "C"
5300# endif
5301 int F77_DUMMY_MAIN() { return 1; }
5302#endif
5303int
5304main ()
5305{
5306static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5307test_array [0] = 0
5308
5309 ;
5310 return 0;
5311}
5312_ACEOF
5313rm -f conftest.$ac_objext
5314if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5315 (eval $ac_compile) 2>&5
5316 ac_status=$?
5317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5318 (exit $ac_status); } &&
5319 { ac_try='test -s conftest.$ac_objext'
5320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5321 (eval $ac_try) 2>&5
5322 ac_status=$?
5323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5324 (exit $ac_status); }; }; then
5325 ac_hi=$ac_mid; break
5326else
5327 echo "$as_me: failed program was:" >&5
5328cat conftest.$ac_ext >&5
5329ac_lo=`expr $ac_mid + 1`
5330 if test $ac_lo -le $ac_mid; then
5331 ac_lo= ac_hi=
5332 break
5333 fi
5334 ac_mid=`expr 2 '*' $ac_mid + 1`
5335fi
5336rm -f conftest.$ac_objext conftest.$ac_ext
5337 done
5338else
5339 echo "$as_me: failed program was:" >&5
5340cat conftest.$ac_ext >&5
5341cat >conftest.$ac_ext <<_ACEOF
5342#line $LINENO "configure"
5343#include "confdefs.h"
5344$ac_includes_default
5345#ifdef F77_DUMMY_MAIN
5346# ifdef __cplusplus
5347 extern "C"
5348# endif
5349 int F77_DUMMY_MAIN() { return 1; }
5350#endif
5351int
5352main ()
5353{
5354static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5355test_array [0] = 0
5356
5357 ;
5358 return 0;
5359}
5360_ACEOF
5361rm -f conftest.$ac_objext
5362if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5363 (eval $ac_compile) 2>&5
5364 ac_status=$?
5365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5366 (exit $ac_status); } &&
5367 { ac_try='test -s conftest.$ac_objext'
5368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5369 (eval $ac_try) 2>&5
5370 ac_status=$?
5371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5372 (exit $ac_status); }; }; then
5373 ac_hi=-1 ac_mid=-1
5374 while :; do
5375 cat >conftest.$ac_ext <<_ACEOF
5376#line $LINENO "configure"
5377#include "confdefs.h"
5378$ac_includes_default
5379#ifdef F77_DUMMY_MAIN
5380# ifdef __cplusplus
5381 extern "C"
5382# endif
5383 int F77_DUMMY_MAIN() { return 1; }
5384#endif
5385int
5386main ()
5387{
5388static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5389test_array [0] = 0
5390
5391 ;
5392 return 0;
5393}
5394_ACEOF
5395rm -f conftest.$ac_objext
5396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5397 (eval $ac_compile) 2>&5
5398 ac_status=$?
5399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5400 (exit $ac_status); } &&
5401 { ac_try='test -s conftest.$ac_objext'
5402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5403 (eval $ac_try) 2>&5
5404 ac_status=$?
5405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5406 (exit $ac_status); }; }; then
5407 ac_lo=$ac_mid; break
5408else
5409 echo "$as_me: failed program was:" >&5
5410cat conftest.$ac_ext >&5
5411ac_hi=`expr '(' $ac_mid ')' - 1`
5412 if test $ac_mid -le $ac_hi; then
5413 ac_lo= ac_hi=
5414 break
5415 fi
5416 ac_mid=`expr 2 '*' $ac_mid`
5417fi
5418rm -f conftest.$ac_objext conftest.$ac_ext
5419 done
5420else
5421 echo "$as_me: failed program was:" >&5
5422cat conftest.$ac_ext >&5
5423ac_lo= ac_hi=
5424fi
5425rm -f conftest.$ac_objext conftest.$ac_ext
5426fi
5427rm -f conftest.$ac_objext conftest.$ac_ext
5428# Binary search between lo and hi bounds.
5429while test "x$ac_lo" != "x$ac_hi"; do
5430 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5431 cat >conftest.$ac_ext <<_ACEOF
5432#line $LINENO "configure"
5433#include "confdefs.h"
5434$ac_includes_default
5435#ifdef F77_DUMMY_MAIN
5436# ifdef __cplusplus
5437 extern "C"
5438# endif
5439 int F77_DUMMY_MAIN() { return 1; }
5440#endif
5441int
5442main ()
5443{
5444static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5445test_array [0] = 0
5446
5447 ;
5448 return 0;
5449}
5450_ACEOF
5451rm -f conftest.$ac_objext
5452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5453 (eval $ac_compile) 2>&5
5454 ac_status=$?
5455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5456 (exit $ac_status); } &&
5457 { ac_try='test -s conftest.$ac_objext'
5458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5459 (eval $ac_try) 2>&5
5460 ac_status=$?
5461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5462 (exit $ac_status); }; }; then
5463 ac_hi=$ac_mid
5464else
5465 echo "$as_me: failed program was:" >&5
5466cat conftest.$ac_ext >&5
5467ac_lo=`expr '(' $ac_mid ')' + 1`
5468fi
5469rm -f conftest.$ac_objext conftest.$ac_ext
5470done
5471case $ac_lo in
5472?*) ac_cv_sizeof_int=$ac_lo;;
5473'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5474echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5475 { (exit 1); exit 1; }; } ;;
5476esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005477else
5478 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005479 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5480echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5481 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005482else
Martin v. Löwis11437992002-04-12 09:54:03 +00005483 cat >conftest.$ac_ext <<_ACEOF
5484#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005485#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005486$ac_includes_default
5487long longval () { return (long) (sizeof (int)); }
5488unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005489#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005490#include <stdlib.h>
5491#ifdef F77_DUMMY_MAIN
5492# ifdef __cplusplus
5493 extern "C"
5494# endif
5495 int F77_DUMMY_MAIN() { return 1; }
5496#endif
5497int
5498main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005499{
Martin v. Löwis11437992002-04-12 09:54:03 +00005500
5501 FILE *f = fopen ("conftest.val", "w");
5502 if (! f)
5503 exit (1);
5504 if (((long) (sizeof (int))) < 0)
5505 {
5506 long i = longval ();
5507 if (i != ((long) (sizeof (int))))
5508 exit (1);
5509 fprintf (f, "%ld\n", i);
5510 }
5511 else
5512 {
5513 unsigned long i = ulongval ();
5514 if (i != ((long) (sizeof (int))))
5515 exit (1);
5516 fprintf (f, "%lu\n", i);
5517 }
5518 exit (ferror (f) || fclose (f) != 0);
5519
5520 ;
5521 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005522}
Martin v. Löwis11437992002-04-12 09:54:03 +00005523_ACEOF
5524rm -f conftest$ac_exeext
5525if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5526 (eval $ac_link) 2>&5
5527 ac_status=$?
5528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5529 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5531 (eval $ac_try) 2>&5
5532 ac_status=$?
5533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5534 (exit $ac_status); }; }; then
5535 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005536else
Martin v. Löwis11437992002-04-12 09:54:03 +00005537 echo "$as_me: program exited with status $ac_status" >&5
5538echo "$as_me: failed program was:" >&5
5539cat conftest.$ac_ext >&5
5540( exit $ac_status )
5541{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5542echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5543 { (exit 1); exit 1; }; }
5544fi
5545rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5546fi
5547fi
5548rm -f conftest.val
5549else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005550 ac_cv_sizeof_int=0
5551fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005552fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005553echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5554echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5555cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005556#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005557_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005558
5559
Martin v. Löwis11437992002-04-12 09:54:03 +00005560echo "$as_me:$LINENO: checking for long" >&5
5561echo $ECHO_N "checking for long... $ECHO_C" >&6
5562if test "${ac_cv_type_long+set}" = set; then
5563 echo $ECHO_N "(cached) $ECHO_C" >&6
5564else
5565 cat >conftest.$ac_ext <<_ACEOF
5566#line $LINENO "configure"
5567#include "confdefs.h"
5568$ac_includes_default
5569#ifdef F77_DUMMY_MAIN
5570# ifdef __cplusplus
5571 extern "C"
5572# endif
5573 int F77_DUMMY_MAIN() { return 1; }
5574#endif
5575int
5576main ()
5577{
5578if ((long *) 0)
5579 return 0;
5580if (sizeof (long))
5581 return 0;
5582 ;
5583 return 0;
5584}
5585_ACEOF
5586rm -f conftest.$ac_objext
5587if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5588 (eval $ac_compile) 2>&5
5589 ac_status=$?
5590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5591 (exit $ac_status); } &&
5592 { ac_try='test -s conftest.$ac_objext'
5593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5594 (eval $ac_try) 2>&5
5595 ac_status=$?
5596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5597 (exit $ac_status); }; }; then
5598 ac_cv_type_long=yes
5599else
5600 echo "$as_me: failed program was:" >&5
5601cat conftest.$ac_ext >&5
5602ac_cv_type_long=no
5603fi
5604rm -f conftest.$ac_objext conftest.$ac_ext
5605fi
5606echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5607echo "${ECHO_T}$ac_cv_type_long" >&6
5608
5609echo "$as_me:$LINENO: checking size of long" >&5
5610echo $ECHO_N "checking size of long... $ECHO_C" >&6
5611if test "${ac_cv_sizeof_long+set}" = set; then
5612 echo $ECHO_N "(cached) $ECHO_C" >&6
5613else
5614 if test "$ac_cv_type_long" = yes; then
5615 # The cast to unsigned long works around a bug in the HP C Compiler
5616 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5617 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5618 # This bug is HP SR number 8606223364.
5619 if test "$cross_compiling" = yes; then
5620 # Depending upon the size, compute the lo and hi bounds.
5621cat >conftest.$ac_ext <<_ACEOF
5622#line $LINENO "configure"
5623#include "confdefs.h"
5624$ac_includes_default
5625#ifdef F77_DUMMY_MAIN
5626# ifdef __cplusplus
5627 extern "C"
5628# endif
5629 int F77_DUMMY_MAIN() { return 1; }
5630#endif
5631int
5632main ()
5633{
5634static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5635test_array [0] = 0
5636
5637 ;
5638 return 0;
5639}
5640_ACEOF
5641rm -f conftest.$ac_objext
5642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5643 (eval $ac_compile) 2>&5
5644 ac_status=$?
5645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5646 (exit $ac_status); } &&
5647 { ac_try='test -s conftest.$ac_objext'
5648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5649 (eval $ac_try) 2>&5
5650 ac_status=$?
5651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5652 (exit $ac_status); }; }; then
5653 ac_lo=0 ac_mid=0
5654 while :; do
5655 cat >conftest.$ac_ext <<_ACEOF
5656#line $LINENO "configure"
5657#include "confdefs.h"
5658$ac_includes_default
5659#ifdef F77_DUMMY_MAIN
5660# ifdef __cplusplus
5661 extern "C"
5662# endif
5663 int F77_DUMMY_MAIN() { return 1; }
5664#endif
5665int
5666main ()
5667{
5668static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5669test_array [0] = 0
5670
5671 ;
5672 return 0;
5673}
5674_ACEOF
5675rm -f conftest.$ac_objext
5676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5677 (eval $ac_compile) 2>&5
5678 ac_status=$?
5679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5680 (exit $ac_status); } &&
5681 { ac_try='test -s conftest.$ac_objext'
5682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5683 (eval $ac_try) 2>&5
5684 ac_status=$?
5685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5686 (exit $ac_status); }; }; then
5687 ac_hi=$ac_mid; break
5688else
5689 echo "$as_me: failed program was:" >&5
5690cat conftest.$ac_ext >&5
5691ac_lo=`expr $ac_mid + 1`
5692 if test $ac_lo -le $ac_mid; then
5693 ac_lo= ac_hi=
5694 break
5695 fi
5696 ac_mid=`expr 2 '*' $ac_mid + 1`
5697fi
5698rm -f conftest.$ac_objext conftest.$ac_ext
5699 done
5700else
5701 echo "$as_me: failed program was:" >&5
5702cat conftest.$ac_ext >&5
5703cat >conftest.$ac_ext <<_ACEOF
5704#line $LINENO "configure"
5705#include "confdefs.h"
5706$ac_includes_default
5707#ifdef F77_DUMMY_MAIN
5708# ifdef __cplusplus
5709 extern "C"
5710# endif
5711 int F77_DUMMY_MAIN() { return 1; }
5712#endif
5713int
5714main ()
5715{
5716static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5717test_array [0] = 0
5718
5719 ;
5720 return 0;
5721}
5722_ACEOF
5723rm -f conftest.$ac_objext
5724if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5725 (eval $ac_compile) 2>&5
5726 ac_status=$?
5727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5728 (exit $ac_status); } &&
5729 { ac_try='test -s conftest.$ac_objext'
5730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5731 (eval $ac_try) 2>&5
5732 ac_status=$?
5733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5734 (exit $ac_status); }; }; then
5735 ac_hi=-1 ac_mid=-1
5736 while :; do
5737 cat >conftest.$ac_ext <<_ACEOF
5738#line $LINENO "configure"
5739#include "confdefs.h"
5740$ac_includes_default
5741#ifdef F77_DUMMY_MAIN
5742# ifdef __cplusplus
5743 extern "C"
5744# endif
5745 int F77_DUMMY_MAIN() { return 1; }
5746#endif
5747int
5748main ()
5749{
5750static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5751test_array [0] = 0
5752
5753 ;
5754 return 0;
5755}
5756_ACEOF
5757rm -f conftest.$ac_objext
5758if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5759 (eval $ac_compile) 2>&5
5760 ac_status=$?
5761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5762 (exit $ac_status); } &&
5763 { ac_try='test -s conftest.$ac_objext'
5764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5765 (eval $ac_try) 2>&5
5766 ac_status=$?
5767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5768 (exit $ac_status); }; }; then
5769 ac_lo=$ac_mid; break
5770else
5771 echo "$as_me: failed program was:" >&5
5772cat conftest.$ac_ext >&5
5773ac_hi=`expr '(' $ac_mid ')' - 1`
5774 if test $ac_mid -le $ac_hi; then
5775 ac_lo= ac_hi=
5776 break
5777 fi
5778 ac_mid=`expr 2 '*' $ac_mid`
5779fi
5780rm -f conftest.$ac_objext conftest.$ac_ext
5781 done
5782else
5783 echo "$as_me: failed program was:" >&5
5784cat conftest.$ac_ext >&5
5785ac_lo= ac_hi=
5786fi
5787rm -f conftest.$ac_objext conftest.$ac_ext
5788fi
5789rm -f conftest.$ac_objext conftest.$ac_ext
5790# Binary search between lo and hi bounds.
5791while test "x$ac_lo" != "x$ac_hi"; do
5792 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5793 cat >conftest.$ac_ext <<_ACEOF
5794#line $LINENO "configure"
5795#include "confdefs.h"
5796$ac_includes_default
5797#ifdef F77_DUMMY_MAIN
5798# ifdef __cplusplus
5799 extern "C"
5800# endif
5801 int F77_DUMMY_MAIN() { return 1; }
5802#endif
5803int
5804main ()
5805{
5806static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5807test_array [0] = 0
5808
5809 ;
5810 return 0;
5811}
5812_ACEOF
5813rm -f conftest.$ac_objext
5814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5815 (eval $ac_compile) 2>&5
5816 ac_status=$?
5817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5818 (exit $ac_status); } &&
5819 { ac_try='test -s conftest.$ac_objext'
5820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5821 (eval $ac_try) 2>&5
5822 ac_status=$?
5823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5824 (exit $ac_status); }; }; then
5825 ac_hi=$ac_mid
5826else
5827 echo "$as_me: failed program was:" >&5
5828cat conftest.$ac_ext >&5
5829ac_lo=`expr '(' $ac_mid ')' + 1`
5830fi
5831rm -f conftest.$ac_objext conftest.$ac_ext
5832done
5833case $ac_lo in
5834?*) ac_cv_sizeof_long=$ac_lo;;
5835'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5836echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5837 { (exit 1); exit 1; }; } ;;
5838esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005839else
5840 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005841 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5842echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5843 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005844else
Martin v. Löwis11437992002-04-12 09:54:03 +00005845 cat >conftest.$ac_ext <<_ACEOF
5846#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005847#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005848$ac_includes_default
5849long longval () { return (long) (sizeof (long)); }
5850unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005851#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005852#include <stdlib.h>
5853#ifdef F77_DUMMY_MAIN
5854# ifdef __cplusplus
5855 extern "C"
5856# endif
5857 int F77_DUMMY_MAIN() { return 1; }
5858#endif
5859int
5860main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005861{
Martin v. Löwis11437992002-04-12 09:54:03 +00005862
5863 FILE *f = fopen ("conftest.val", "w");
5864 if (! f)
5865 exit (1);
5866 if (((long) (sizeof (long))) < 0)
5867 {
5868 long i = longval ();
5869 if (i != ((long) (sizeof (long))))
5870 exit (1);
5871 fprintf (f, "%ld\n", i);
5872 }
5873 else
5874 {
5875 unsigned long i = ulongval ();
5876 if (i != ((long) (sizeof (long))))
5877 exit (1);
5878 fprintf (f, "%lu\n", i);
5879 }
5880 exit (ferror (f) || fclose (f) != 0);
5881
5882 ;
5883 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005884}
Martin v. Löwis11437992002-04-12 09:54:03 +00005885_ACEOF
5886rm -f conftest$ac_exeext
5887if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5888 (eval $ac_link) 2>&5
5889 ac_status=$?
5890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5891 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5893 (eval $ac_try) 2>&5
5894 ac_status=$?
5895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5896 (exit $ac_status); }; }; then
5897 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005898else
Martin v. Löwis11437992002-04-12 09:54:03 +00005899 echo "$as_me: program exited with status $ac_status" >&5
5900echo "$as_me: failed program was:" >&5
5901cat conftest.$ac_ext >&5
5902( exit $ac_status )
5903{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5904echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5905 { (exit 1); exit 1; }; }
5906fi
5907rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5908fi
5909fi
5910rm -f conftest.val
5911else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005912 ac_cv_sizeof_long=0
5913fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005914fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005915echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5916echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5917cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005918#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005919_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005920
5921
Martin v. Löwis11437992002-04-12 09:54:03 +00005922echo "$as_me:$LINENO: checking for void *" >&5
5923echo $ECHO_N "checking for void *... $ECHO_C" >&6
5924if test "${ac_cv_type_void_p+set}" = set; then
5925 echo $ECHO_N "(cached) $ECHO_C" >&6
5926else
5927 cat >conftest.$ac_ext <<_ACEOF
5928#line $LINENO "configure"
5929#include "confdefs.h"
5930$ac_includes_default
5931#ifdef F77_DUMMY_MAIN
5932# ifdef __cplusplus
5933 extern "C"
5934# endif
5935 int F77_DUMMY_MAIN() { return 1; }
5936#endif
5937int
5938main ()
5939{
5940if ((void * *) 0)
5941 return 0;
5942if (sizeof (void *))
5943 return 0;
5944 ;
5945 return 0;
5946}
5947_ACEOF
5948rm -f conftest.$ac_objext
5949if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5950 (eval $ac_compile) 2>&5
5951 ac_status=$?
5952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5953 (exit $ac_status); } &&
5954 { ac_try='test -s conftest.$ac_objext'
5955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5956 (eval $ac_try) 2>&5
5957 ac_status=$?
5958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5959 (exit $ac_status); }; }; then
5960 ac_cv_type_void_p=yes
5961else
5962 echo "$as_me: failed program was:" >&5
5963cat conftest.$ac_ext >&5
5964ac_cv_type_void_p=no
5965fi
5966rm -f conftest.$ac_objext conftest.$ac_ext
5967fi
5968echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5969echo "${ECHO_T}$ac_cv_type_void_p" >&6
5970
5971echo "$as_me:$LINENO: checking size of void *" >&5
5972echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5973if test "${ac_cv_sizeof_void_p+set}" = set; then
5974 echo $ECHO_N "(cached) $ECHO_C" >&6
5975else
5976 if test "$ac_cv_type_void_p" = yes; then
5977 # The cast to unsigned long works around a bug in the HP C Compiler
5978 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5979 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5980 # This bug is HP SR number 8606223364.
5981 if test "$cross_compiling" = yes; then
5982 # Depending upon the size, compute the lo and hi bounds.
5983cat >conftest.$ac_ext <<_ACEOF
5984#line $LINENO "configure"
5985#include "confdefs.h"
5986$ac_includes_default
5987#ifdef F77_DUMMY_MAIN
5988# ifdef __cplusplus
5989 extern "C"
5990# endif
5991 int F77_DUMMY_MAIN() { return 1; }
5992#endif
5993int
5994main ()
5995{
5996static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5997test_array [0] = 0
5998
5999 ;
6000 return 0;
6001}
6002_ACEOF
6003rm -f conftest.$ac_objext
6004if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6005 (eval $ac_compile) 2>&5
6006 ac_status=$?
6007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6008 (exit $ac_status); } &&
6009 { ac_try='test -s conftest.$ac_objext'
6010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6011 (eval $ac_try) 2>&5
6012 ac_status=$?
6013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6014 (exit $ac_status); }; }; then
6015 ac_lo=0 ac_mid=0
6016 while :; do
6017 cat >conftest.$ac_ext <<_ACEOF
6018#line $LINENO "configure"
6019#include "confdefs.h"
6020$ac_includes_default
6021#ifdef F77_DUMMY_MAIN
6022# ifdef __cplusplus
6023 extern "C"
6024# endif
6025 int F77_DUMMY_MAIN() { return 1; }
6026#endif
6027int
6028main ()
6029{
6030static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6031test_array [0] = 0
6032
6033 ;
6034 return 0;
6035}
6036_ACEOF
6037rm -f conftest.$ac_objext
6038if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6039 (eval $ac_compile) 2>&5
6040 ac_status=$?
6041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6042 (exit $ac_status); } &&
6043 { ac_try='test -s conftest.$ac_objext'
6044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6045 (eval $ac_try) 2>&5
6046 ac_status=$?
6047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6048 (exit $ac_status); }; }; then
6049 ac_hi=$ac_mid; break
6050else
6051 echo "$as_me: failed program was:" >&5
6052cat conftest.$ac_ext >&5
6053ac_lo=`expr $ac_mid + 1`
6054 if test $ac_lo -le $ac_mid; then
6055 ac_lo= ac_hi=
6056 break
6057 fi
6058 ac_mid=`expr 2 '*' $ac_mid + 1`
6059fi
6060rm -f conftest.$ac_objext conftest.$ac_ext
6061 done
6062else
6063 echo "$as_me: failed program was:" >&5
6064cat conftest.$ac_ext >&5
6065cat >conftest.$ac_ext <<_ACEOF
6066#line $LINENO "configure"
6067#include "confdefs.h"
6068$ac_includes_default
6069#ifdef F77_DUMMY_MAIN
6070# ifdef __cplusplus
6071 extern "C"
6072# endif
6073 int F77_DUMMY_MAIN() { return 1; }
6074#endif
6075int
6076main ()
6077{
6078static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6079test_array [0] = 0
6080
6081 ;
6082 return 0;
6083}
6084_ACEOF
6085rm -f conftest.$ac_objext
6086if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6087 (eval $ac_compile) 2>&5
6088 ac_status=$?
6089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6090 (exit $ac_status); } &&
6091 { ac_try='test -s conftest.$ac_objext'
6092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6093 (eval $ac_try) 2>&5
6094 ac_status=$?
6095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6096 (exit $ac_status); }; }; then
6097 ac_hi=-1 ac_mid=-1
6098 while :; do
6099 cat >conftest.$ac_ext <<_ACEOF
6100#line $LINENO "configure"
6101#include "confdefs.h"
6102$ac_includes_default
6103#ifdef F77_DUMMY_MAIN
6104# ifdef __cplusplus
6105 extern "C"
6106# endif
6107 int F77_DUMMY_MAIN() { return 1; }
6108#endif
6109int
6110main ()
6111{
6112static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6113test_array [0] = 0
6114
6115 ;
6116 return 0;
6117}
6118_ACEOF
6119rm -f conftest.$ac_objext
6120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6121 (eval $ac_compile) 2>&5
6122 ac_status=$?
6123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6124 (exit $ac_status); } &&
6125 { ac_try='test -s conftest.$ac_objext'
6126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6127 (eval $ac_try) 2>&5
6128 ac_status=$?
6129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6130 (exit $ac_status); }; }; then
6131 ac_lo=$ac_mid; break
6132else
6133 echo "$as_me: failed program was:" >&5
6134cat conftest.$ac_ext >&5
6135ac_hi=`expr '(' $ac_mid ')' - 1`
6136 if test $ac_mid -le $ac_hi; then
6137 ac_lo= ac_hi=
6138 break
6139 fi
6140 ac_mid=`expr 2 '*' $ac_mid`
6141fi
6142rm -f conftest.$ac_objext conftest.$ac_ext
6143 done
6144else
6145 echo "$as_me: failed program was:" >&5
6146cat conftest.$ac_ext >&5
6147ac_lo= ac_hi=
6148fi
6149rm -f conftest.$ac_objext conftest.$ac_ext
6150fi
6151rm -f conftest.$ac_objext conftest.$ac_ext
6152# Binary search between lo and hi bounds.
6153while test "x$ac_lo" != "x$ac_hi"; do
6154 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6155 cat >conftest.$ac_ext <<_ACEOF
6156#line $LINENO "configure"
6157#include "confdefs.h"
6158$ac_includes_default
6159#ifdef F77_DUMMY_MAIN
6160# ifdef __cplusplus
6161 extern "C"
6162# endif
6163 int F77_DUMMY_MAIN() { return 1; }
6164#endif
6165int
6166main ()
6167{
6168static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6169test_array [0] = 0
6170
6171 ;
6172 return 0;
6173}
6174_ACEOF
6175rm -f conftest.$ac_objext
6176if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6177 (eval $ac_compile) 2>&5
6178 ac_status=$?
6179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6180 (exit $ac_status); } &&
6181 { ac_try='test -s conftest.$ac_objext'
6182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6183 (eval $ac_try) 2>&5
6184 ac_status=$?
6185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6186 (exit $ac_status); }; }; then
6187 ac_hi=$ac_mid
6188else
6189 echo "$as_me: failed program was:" >&5
6190cat conftest.$ac_ext >&5
6191ac_lo=`expr '(' $ac_mid ')' + 1`
6192fi
6193rm -f conftest.$ac_objext conftest.$ac_ext
6194done
6195case $ac_lo in
6196?*) ac_cv_sizeof_void_p=$ac_lo;;
6197'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6198echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6199 { (exit 1); exit 1; }; } ;;
6200esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006201else
6202 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006203 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6204echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6205 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006206else
Martin v. Löwis11437992002-04-12 09:54:03 +00006207 cat >conftest.$ac_ext <<_ACEOF
6208#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006209#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006210$ac_includes_default
6211long longval () { return (long) (sizeof (void *)); }
6212unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006213#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006214#include <stdlib.h>
6215#ifdef F77_DUMMY_MAIN
6216# ifdef __cplusplus
6217 extern "C"
6218# endif
6219 int F77_DUMMY_MAIN() { return 1; }
6220#endif
6221int
6222main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006223{
Martin v. Löwis11437992002-04-12 09:54:03 +00006224
6225 FILE *f = fopen ("conftest.val", "w");
6226 if (! f)
6227 exit (1);
6228 if (((long) (sizeof (void *))) < 0)
6229 {
6230 long i = longval ();
6231 if (i != ((long) (sizeof (void *))))
6232 exit (1);
6233 fprintf (f, "%ld\n", i);
6234 }
6235 else
6236 {
6237 unsigned long i = ulongval ();
6238 if (i != ((long) (sizeof (void *))))
6239 exit (1);
6240 fprintf (f, "%lu\n", i);
6241 }
6242 exit (ferror (f) || fclose (f) != 0);
6243
6244 ;
6245 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006246}
Martin v. Löwis11437992002-04-12 09:54:03 +00006247_ACEOF
6248rm -f conftest$ac_exeext
6249if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6250 (eval $ac_link) 2>&5
6251 ac_status=$?
6252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6253 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6255 (eval $ac_try) 2>&5
6256 ac_status=$?
6257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6258 (exit $ac_status); }; }; then
6259 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006260else
Martin v. Löwis11437992002-04-12 09:54:03 +00006261 echo "$as_me: program exited with status $ac_status" >&5
6262echo "$as_me: failed program was:" >&5
6263cat conftest.$ac_ext >&5
6264( exit $ac_status )
6265{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6266echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6267 { (exit 1); exit 1; }; }
6268fi
6269rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6270fi
6271fi
6272rm -f conftest.val
6273else
Guido van Rossumad678af1998-10-02 14:42:15 +00006274 ac_cv_sizeof_void_p=0
6275fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006276fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006277echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6278echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6279cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006280#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006281_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006282
6283
Martin v. Löwis11437992002-04-12 09:54:03 +00006284echo "$as_me:$LINENO: checking for char" >&5
6285echo $ECHO_N "checking for char... $ECHO_C" >&6
6286if test "${ac_cv_type_char+set}" = set; then
6287 echo $ECHO_N "(cached) $ECHO_C" >&6
6288else
6289 cat >conftest.$ac_ext <<_ACEOF
6290#line $LINENO "configure"
6291#include "confdefs.h"
6292$ac_includes_default
6293#ifdef F77_DUMMY_MAIN
6294# ifdef __cplusplus
6295 extern "C"
6296# endif
6297 int F77_DUMMY_MAIN() { return 1; }
6298#endif
6299int
6300main ()
6301{
6302if ((char *) 0)
6303 return 0;
6304if (sizeof (char))
6305 return 0;
6306 ;
6307 return 0;
6308}
6309_ACEOF
6310rm -f conftest.$ac_objext
6311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6312 (eval $ac_compile) 2>&5
6313 ac_status=$?
6314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6315 (exit $ac_status); } &&
6316 { ac_try='test -s conftest.$ac_objext'
6317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6318 (eval $ac_try) 2>&5
6319 ac_status=$?
6320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6321 (exit $ac_status); }; }; then
6322 ac_cv_type_char=yes
6323else
6324 echo "$as_me: failed program was:" >&5
6325cat conftest.$ac_ext >&5
6326ac_cv_type_char=no
6327fi
6328rm -f conftest.$ac_objext conftest.$ac_ext
6329fi
6330echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6331echo "${ECHO_T}$ac_cv_type_char" >&6
6332
6333echo "$as_me:$LINENO: checking size of char" >&5
6334echo $ECHO_N "checking size of char... $ECHO_C" >&6
6335if test "${ac_cv_sizeof_char+set}" = set; then
6336 echo $ECHO_N "(cached) $ECHO_C" >&6
6337else
6338 if test "$ac_cv_type_char" = yes; then
6339 # The cast to unsigned long works around a bug in the HP C Compiler
6340 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6341 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6342 # This bug is HP SR number 8606223364.
6343 if test "$cross_compiling" = yes; then
6344 # Depending upon the size, compute the lo and hi bounds.
6345cat >conftest.$ac_ext <<_ACEOF
6346#line $LINENO "configure"
6347#include "confdefs.h"
6348$ac_includes_default
6349#ifdef F77_DUMMY_MAIN
6350# ifdef __cplusplus
6351 extern "C"
6352# endif
6353 int F77_DUMMY_MAIN() { return 1; }
6354#endif
6355int
6356main ()
6357{
6358static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6359test_array [0] = 0
6360
6361 ;
6362 return 0;
6363}
6364_ACEOF
6365rm -f conftest.$ac_objext
6366if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6367 (eval $ac_compile) 2>&5
6368 ac_status=$?
6369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6370 (exit $ac_status); } &&
6371 { ac_try='test -s conftest.$ac_objext'
6372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6373 (eval $ac_try) 2>&5
6374 ac_status=$?
6375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6376 (exit $ac_status); }; }; then
6377 ac_lo=0 ac_mid=0
6378 while :; do
6379 cat >conftest.$ac_ext <<_ACEOF
6380#line $LINENO "configure"
6381#include "confdefs.h"
6382$ac_includes_default
6383#ifdef F77_DUMMY_MAIN
6384# ifdef __cplusplus
6385 extern "C"
6386# endif
6387 int F77_DUMMY_MAIN() { return 1; }
6388#endif
6389int
6390main ()
6391{
6392static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6393test_array [0] = 0
6394
6395 ;
6396 return 0;
6397}
6398_ACEOF
6399rm -f conftest.$ac_objext
6400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6401 (eval $ac_compile) 2>&5
6402 ac_status=$?
6403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6404 (exit $ac_status); } &&
6405 { ac_try='test -s conftest.$ac_objext'
6406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6407 (eval $ac_try) 2>&5
6408 ac_status=$?
6409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6410 (exit $ac_status); }; }; then
6411 ac_hi=$ac_mid; break
6412else
6413 echo "$as_me: failed program was:" >&5
6414cat conftest.$ac_ext >&5
6415ac_lo=`expr $ac_mid + 1`
6416 if test $ac_lo -le $ac_mid; then
6417 ac_lo= ac_hi=
6418 break
6419 fi
6420 ac_mid=`expr 2 '*' $ac_mid + 1`
6421fi
6422rm -f conftest.$ac_objext conftest.$ac_ext
6423 done
6424else
6425 echo "$as_me: failed program was:" >&5
6426cat conftest.$ac_ext >&5
6427cat >conftest.$ac_ext <<_ACEOF
6428#line $LINENO "configure"
6429#include "confdefs.h"
6430$ac_includes_default
6431#ifdef F77_DUMMY_MAIN
6432# ifdef __cplusplus
6433 extern "C"
6434# endif
6435 int F77_DUMMY_MAIN() { return 1; }
6436#endif
6437int
6438main ()
6439{
6440static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6441test_array [0] = 0
6442
6443 ;
6444 return 0;
6445}
6446_ACEOF
6447rm -f conftest.$ac_objext
6448if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6449 (eval $ac_compile) 2>&5
6450 ac_status=$?
6451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6452 (exit $ac_status); } &&
6453 { ac_try='test -s conftest.$ac_objext'
6454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6455 (eval $ac_try) 2>&5
6456 ac_status=$?
6457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6458 (exit $ac_status); }; }; then
6459 ac_hi=-1 ac_mid=-1
6460 while :; do
6461 cat >conftest.$ac_ext <<_ACEOF
6462#line $LINENO "configure"
6463#include "confdefs.h"
6464$ac_includes_default
6465#ifdef F77_DUMMY_MAIN
6466# ifdef __cplusplus
6467 extern "C"
6468# endif
6469 int F77_DUMMY_MAIN() { return 1; }
6470#endif
6471int
6472main ()
6473{
6474static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6475test_array [0] = 0
6476
6477 ;
6478 return 0;
6479}
6480_ACEOF
6481rm -f conftest.$ac_objext
6482if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6483 (eval $ac_compile) 2>&5
6484 ac_status=$?
6485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6486 (exit $ac_status); } &&
6487 { ac_try='test -s conftest.$ac_objext'
6488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6489 (eval $ac_try) 2>&5
6490 ac_status=$?
6491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6492 (exit $ac_status); }; }; then
6493 ac_lo=$ac_mid; break
6494else
6495 echo "$as_me: failed program was:" >&5
6496cat conftest.$ac_ext >&5
6497ac_hi=`expr '(' $ac_mid ')' - 1`
6498 if test $ac_mid -le $ac_hi; then
6499 ac_lo= ac_hi=
6500 break
6501 fi
6502 ac_mid=`expr 2 '*' $ac_mid`
6503fi
6504rm -f conftest.$ac_objext conftest.$ac_ext
6505 done
6506else
6507 echo "$as_me: failed program was:" >&5
6508cat conftest.$ac_ext >&5
6509ac_lo= ac_hi=
6510fi
6511rm -f conftest.$ac_objext conftest.$ac_ext
6512fi
6513rm -f conftest.$ac_objext conftest.$ac_ext
6514# Binary search between lo and hi bounds.
6515while test "x$ac_lo" != "x$ac_hi"; do
6516 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6517 cat >conftest.$ac_ext <<_ACEOF
6518#line $LINENO "configure"
6519#include "confdefs.h"
6520$ac_includes_default
6521#ifdef F77_DUMMY_MAIN
6522# ifdef __cplusplus
6523 extern "C"
6524# endif
6525 int F77_DUMMY_MAIN() { return 1; }
6526#endif
6527int
6528main ()
6529{
6530static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6531test_array [0] = 0
6532
6533 ;
6534 return 0;
6535}
6536_ACEOF
6537rm -f conftest.$ac_objext
6538if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6539 (eval $ac_compile) 2>&5
6540 ac_status=$?
6541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6542 (exit $ac_status); } &&
6543 { ac_try='test -s conftest.$ac_objext'
6544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6545 (eval $ac_try) 2>&5
6546 ac_status=$?
6547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6548 (exit $ac_status); }; }; then
6549 ac_hi=$ac_mid
6550else
6551 echo "$as_me: failed program was:" >&5
6552cat conftest.$ac_ext >&5
6553ac_lo=`expr '(' $ac_mid ')' + 1`
6554fi
6555rm -f conftest.$ac_objext conftest.$ac_ext
6556done
6557case $ac_lo in
6558?*) ac_cv_sizeof_char=$ac_lo;;
6559'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6560echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6561 { (exit 1); exit 1; }; } ;;
6562esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006563else
6564 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006565 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6566echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6567 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006568else
Martin v. Löwis11437992002-04-12 09:54:03 +00006569 cat >conftest.$ac_ext <<_ACEOF
6570#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006571#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006572$ac_includes_default
6573long longval () { return (long) (sizeof (char)); }
6574unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006575#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006576#include <stdlib.h>
6577#ifdef F77_DUMMY_MAIN
6578# ifdef __cplusplus
6579 extern "C"
6580# endif
6581 int F77_DUMMY_MAIN() { return 1; }
6582#endif
6583int
6584main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006585{
Martin v. Löwis11437992002-04-12 09:54:03 +00006586
6587 FILE *f = fopen ("conftest.val", "w");
6588 if (! f)
6589 exit (1);
6590 if (((long) (sizeof (char))) < 0)
6591 {
6592 long i = longval ();
6593 if (i != ((long) (sizeof (char))))
6594 exit (1);
6595 fprintf (f, "%ld\n", i);
6596 }
6597 else
6598 {
6599 unsigned long i = ulongval ();
6600 if (i != ((long) (sizeof (char))))
6601 exit (1);
6602 fprintf (f, "%lu\n", i);
6603 }
6604 exit (ferror (f) || fclose (f) != 0);
6605
6606 ;
6607 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006608}
Martin v. Löwis11437992002-04-12 09:54:03 +00006609_ACEOF
6610rm -f conftest$ac_exeext
6611if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6612 (eval $ac_link) 2>&5
6613 ac_status=$?
6614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6615 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6617 (eval $ac_try) 2>&5
6618 ac_status=$?
6619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6620 (exit $ac_status); }; }; then
6621 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006622else
Martin v. Löwis11437992002-04-12 09:54:03 +00006623 echo "$as_me: program exited with status $ac_status" >&5
6624echo "$as_me: failed program was:" >&5
6625cat conftest.$ac_ext >&5
6626( exit $ac_status )
6627{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6628echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6629 { (exit 1); exit 1; }; }
6630fi
6631rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6632fi
6633fi
6634rm -f conftest.val
6635else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006636 ac_cv_sizeof_char=0
6637fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006638fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006639echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6640echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6641cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006642#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006643_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006644
6645
Martin v. Löwis11437992002-04-12 09:54:03 +00006646echo "$as_me:$LINENO: checking for short" >&5
6647echo $ECHO_N "checking for short... $ECHO_C" >&6
6648if test "${ac_cv_type_short+set}" = set; then
6649 echo $ECHO_N "(cached) $ECHO_C" >&6
6650else
6651 cat >conftest.$ac_ext <<_ACEOF
6652#line $LINENO "configure"
6653#include "confdefs.h"
6654$ac_includes_default
6655#ifdef F77_DUMMY_MAIN
6656# ifdef __cplusplus
6657 extern "C"
6658# endif
6659 int F77_DUMMY_MAIN() { return 1; }
6660#endif
6661int
6662main ()
6663{
6664if ((short *) 0)
6665 return 0;
6666if (sizeof (short))
6667 return 0;
6668 ;
6669 return 0;
6670}
6671_ACEOF
6672rm -f conftest.$ac_objext
6673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6674 (eval $ac_compile) 2>&5
6675 ac_status=$?
6676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6677 (exit $ac_status); } &&
6678 { ac_try='test -s conftest.$ac_objext'
6679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6680 (eval $ac_try) 2>&5
6681 ac_status=$?
6682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6683 (exit $ac_status); }; }; then
6684 ac_cv_type_short=yes
6685else
6686 echo "$as_me: failed program was:" >&5
6687cat conftest.$ac_ext >&5
6688ac_cv_type_short=no
6689fi
6690rm -f conftest.$ac_objext conftest.$ac_ext
6691fi
6692echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6693echo "${ECHO_T}$ac_cv_type_short" >&6
6694
6695echo "$as_me:$LINENO: checking size of short" >&5
6696echo $ECHO_N "checking size of short... $ECHO_C" >&6
6697if test "${ac_cv_sizeof_short+set}" = set; then
6698 echo $ECHO_N "(cached) $ECHO_C" >&6
6699else
6700 if test "$ac_cv_type_short" = yes; then
6701 # The cast to unsigned long works around a bug in the HP C Compiler
6702 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6703 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6704 # This bug is HP SR number 8606223364.
6705 if test "$cross_compiling" = yes; then
6706 # Depending upon the size, compute the lo and hi bounds.
6707cat >conftest.$ac_ext <<_ACEOF
6708#line $LINENO "configure"
6709#include "confdefs.h"
6710$ac_includes_default
6711#ifdef F77_DUMMY_MAIN
6712# ifdef __cplusplus
6713 extern "C"
6714# endif
6715 int F77_DUMMY_MAIN() { return 1; }
6716#endif
6717int
6718main ()
6719{
6720static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6721test_array [0] = 0
6722
6723 ;
6724 return 0;
6725}
6726_ACEOF
6727rm -f conftest.$ac_objext
6728if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6729 (eval $ac_compile) 2>&5
6730 ac_status=$?
6731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6732 (exit $ac_status); } &&
6733 { ac_try='test -s conftest.$ac_objext'
6734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6735 (eval $ac_try) 2>&5
6736 ac_status=$?
6737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6738 (exit $ac_status); }; }; then
6739 ac_lo=0 ac_mid=0
6740 while :; do
6741 cat >conftest.$ac_ext <<_ACEOF
6742#line $LINENO "configure"
6743#include "confdefs.h"
6744$ac_includes_default
6745#ifdef F77_DUMMY_MAIN
6746# ifdef __cplusplus
6747 extern "C"
6748# endif
6749 int F77_DUMMY_MAIN() { return 1; }
6750#endif
6751int
6752main ()
6753{
6754static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6755test_array [0] = 0
6756
6757 ;
6758 return 0;
6759}
6760_ACEOF
6761rm -f conftest.$ac_objext
6762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6763 (eval $ac_compile) 2>&5
6764 ac_status=$?
6765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6766 (exit $ac_status); } &&
6767 { ac_try='test -s conftest.$ac_objext'
6768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6769 (eval $ac_try) 2>&5
6770 ac_status=$?
6771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6772 (exit $ac_status); }; }; then
6773 ac_hi=$ac_mid; break
6774else
6775 echo "$as_me: failed program was:" >&5
6776cat conftest.$ac_ext >&5
6777ac_lo=`expr $ac_mid + 1`
6778 if test $ac_lo -le $ac_mid; then
6779 ac_lo= ac_hi=
6780 break
6781 fi
6782 ac_mid=`expr 2 '*' $ac_mid + 1`
6783fi
6784rm -f conftest.$ac_objext conftest.$ac_ext
6785 done
6786else
6787 echo "$as_me: failed program was:" >&5
6788cat conftest.$ac_ext >&5
6789cat >conftest.$ac_ext <<_ACEOF
6790#line $LINENO "configure"
6791#include "confdefs.h"
6792$ac_includes_default
6793#ifdef F77_DUMMY_MAIN
6794# ifdef __cplusplus
6795 extern "C"
6796# endif
6797 int F77_DUMMY_MAIN() { return 1; }
6798#endif
6799int
6800main ()
6801{
6802static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6803test_array [0] = 0
6804
6805 ;
6806 return 0;
6807}
6808_ACEOF
6809rm -f conftest.$ac_objext
6810if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6811 (eval $ac_compile) 2>&5
6812 ac_status=$?
6813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6814 (exit $ac_status); } &&
6815 { ac_try='test -s conftest.$ac_objext'
6816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6817 (eval $ac_try) 2>&5
6818 ac_status=$?
6819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6820 (exit $ac_status); }; }; then
6821 ac_hi=-1 ac_mid=-1
6822 while :; do
6823 cat >conftest.$ac_ext <<_ACEOF
6824#line $LINENO "configure"
6825#include "confdefs.h"
6826$ac_includes_default
6827#ifdef F77_DUMMY_MAIN
6828# ifdef __cplusplus
6829 extern "C"
6830# endif
6831 int F77_DUMMY_MAIN() { return 1; }
6832#endif
6833int
6834main ()
6835{
6836static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6837test_array [0] = 0
6838
6839 ;
6840 return 0;
6841}
6842_ACEOF
6843rm -f conftest.$ac_objext
6844if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6845 (eval $ac_compile) 2>&5
6846 ac_status=$?
6847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6848 (exit $ac_status); } &&
6849 { ac_try='test -s conftest.$ac_objext'
6850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6851 (eval $ac_try) 2>&5
6852 ac_status=$?
6853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6854 (exit $ac_status); }; }; then
6855 ac_lo=$ac_mid; break
6856else
6857 echo "$as_me: failed program was:" >&5
6858cat conftest.$ac_ext >&5
6859ac_hi=`expr '(' $ac_mid ')' - 1`
6860 if test $ac_mid -le $ac_hi; then
6861 ac_lo= ac_hi=
6862 break
6863 fi
6864 ac_mid=`expr 2 '*' $ac_mid`
6865fi
6866rm -f conftest.$ac_objext conftest.$ac_ext
6867 done
6868else
6869 echo "$as_me: failed program was:" >&5
6870cat conftest.$ac_ext >&5
6871ac_lo= ac_hi=
6872fi
6873rm -f conftest.$ac_objext conftest.$ac_ext
6874fi
6875rm -f conftest.$ac_objext conftest.$ac_ext
6876# Binary search between lo and hi bounds.
6877while test "x$ac_lo" != "x$ac_hi"; do
6878 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6879 cat >conftest.$ac_ext <<_ACEOF
6880#line $LINENO "configure"
6881#include "confdefs.h"
6882$ac_includes_default
6883#ifdef F77_DUMMY_MAIN
6884# ifdef __cplusplus
6885 extern "C"
6886# endif
6887 int F77_DUMMY_MAIN() { return 1; }
6888#endif
6889int
6890main ()
6891{
6892static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6893test_array [0] = 0
6894
6895 ;
6896 return 0;
6897}
6898_ACEOF
6899rm -f conftest.$ac_objext
6900if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6901 (eval $ac_compile) 2>&5
6902 ac_status=$?
6903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6904 (exit $ac_status); } &&
6905 { ac_try='test -s conftest.$ac_objext'
6906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6907 (eval $ac_try) 2>&5
6908 ac_status=$?
6909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6910 (exit $ac_status); }; }; then
6911 ac_hi=$ac_mid
6912else
6913 echo "$as_me: failed program was:" >&5
6914cat conftest.$ac_ext >&5
6915ac_lo=`expr '(' $ac_mid ')' + 1`
6916fi
6917rm -f conftest.$ac_objext conftest.$ac_ext
6918done
6919case $ac_lo in
6920?*) ac_cv_sizeof_short=$ac_lo;;
6921'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6922echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6923 { (exit 1); exit 1; }; } ;;
6924esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006925else
6926 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006927 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6928echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6929 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006930else
Martin v. Löwis11437992002-04-12 09:54:03 +00006931 cat >conftest.$ac_ext <<_ACEOF
6932#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006933#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006934$ac_includes_default
6935long longval () { return (long) (sizeof (short)); }
6936unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006937#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006938#include <stdlib.h>
6939#ifdef F77_DUMMY_MAIN
6940# ifdef __cplusplus
6941 extern "C"
6942# endif
6943 int F77_DUMMY_MAIN() { return 1; }
6944#endif
6945int
6946main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006947{
Martin v. Löwis11437992002-04-12 09:54:03 +00006948
6949 FILE *f = fopen ("conftest.val", "w");
6950 if (! f)
6951 exit (1);
6952 if (((long) (sizeof (short))) < 0)
6953 {
6954 long i = longval ();
6955 if (i != ((long) (sizeof (short))))
6956 exit (1);
6957 fprintf (f, "%ld\n", i);
6958 }
6959 else
6960 {
6961 unsigned long i = ulongval ();
6962 if (i != ((long) (sizeof (short))))
6963 exit (1);
6964 fprintf (f, "%lu\n", i);
6965 }
6966 exit (ferror (f) || fclose (f) != 0);
6967
6968 ;
6969 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006970}
Martin v. Löwis11437992002-04-12 09:54:03 +00006971_ACEOF
6972rm -f conftest$ac_exeext
6973if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6974 (eval $ac_link) 2>&5
6975 ac_status=$?
6976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6977 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6979 (eval $ac_try) 2>&5
6980 ac_status=$?
6981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6982 (exit $ac_status); }; }; then
6983 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006984else
Martin v. Löwis11437992002-04-12 09:54:03 +00006985 echo "$as_me: program exited with status $ac_status" >&5
6986echo "$as_me: failed program was:" >&5
6987cat conftest.$ac_ext >&5
6988( exit $ac_status )
6989{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6990echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6991 { (exit 1); exit 1; }; }
6992fi
6993rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6994fi
6995fi
6996rm -f conftest.val
6997else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006998 ac_cv_sizeof_short=0
6999fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007000fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007001echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7002echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7003cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007004#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007005_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007006
7007
Martin v. Löwis11437992002-04-12 09:54:03 +00007008echo "$as_me:$LINENO: checking for float" >&5
7009echo $ECHO_N "checking for float... $ECHO_C" >&6
7010if test "${ac_cv_type_float+set}" = set; then
7011 echo $ECHO_N "(cached) $ECHO_C" >&6
7012else
7013 cat >conftest.$ac_ext <<_ACEOF
7014#line $LINENO "configure"
7015#include "confdefs.h"
7016$ac_includes_default
7017#ifdef F77_DUMMY_MAIN
7018# ifdef __cplusplus
7019 extern "C"
7020# endif
7021 int F77_DUMMY_MAIN() { return 1; }
7022#endif
7023int
7024main ()
7025{
7026if ((float *) 0)
7027 return 0;
7028if (sizeof (float))
7029 return 0;
7030 ;
7031 return 0;
7032}
7033_ACEOF
7034rm -f conftest.$ac_objext
7035if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7036 (eval $ac_compile) 2>&5
7037 ac_status=$?
7038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7039 (exit $ac_status); } &&
7040 { ac_try='test -s conftest.$ac_objext'
7041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7042 (eval $ac_try) 2>&5
7043 ac_status=$?
7044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7045 (exit $ac_status); }; }; then
7046 ac_cv_type_float=yes
7047else
7048 echo "$as_me: failed program was:" >&5
7049cat conftest.$ac_ext >&5
7050ac_cv_type_float=no
7051fi
7052rm -f conftest.$ac_objext conftest.$ac_ext
7053fi
7054echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7055echo "${ECHO_T}$ac_cv_type_float" >&6
7056
7057echo "$as_me:$LINENO: checking size of float" >&5
7058echo $ECHO_N "checking size of float... $ECHO_C" >&6
7059if test "${ac_cv_sizeof_float+set}" = set; then
7060 echo $ECHO_N "(cached) $ECHO_C" >&6
7061else
7062 if test "$ac_cv_type_float" = yes; then
7063 # The cast to unsigned long works around a bug in the HP C Compiler
7064 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7065 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7066 # This bug is HP SR number 8606223364.
7067 if test "$cross_compiling" = yes; then
7068 # Depending upon the size, compute the lo and hi bounds.
7069cat >conftest.$ac_ext <<_ACEOF
7070#line $LINENO "configure"
7071#include "confdefs.h"
7072$ac_includes_default
7073#ifdef F77_DUMMY_MAIN
7074# ifdef __cplusplus
7075 extern "C"
7076# endif
7077 int F77_DUMMY_MAIN() { return 1; }
7078#endif
7079int
7080main ()
7081{
7082static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7083test_array [0] = 0
7084
7085 ;
7086 return 0;
7087}
7088_ACEOF
7089rm -f conftest.$ac_objext
7090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7091 (eval $ac_compile) 2>&5
7092 ac_status=$?
7093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7094 (exit $ac_status); } &&
7095 { ac_try='test -s conftest.$ac_objext'
7096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7097 (eval $ac_try) 2>&5
7098 ac_status=$?
7099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7100 (exit $ac_status); }; }; then
7101 ac_lo=0 ac_mid=0
7102 while :; do
7103 cat >conftest.$ac_ext <<_ACEOF
7104#line $LINENO "configure"
7105#include "confdefs.h"
7106$ac_includes_default
7107#ifdef F77_DUMMY_MAIN
7108# ifdef __cplusplus
7109 extern "C"
7110# endif
7111 int F77_DUMMY_MAIN() { return 1; }
7112#endif
7113int
7114main ()
7115{
7116static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7117test_array [0] = 0
7118
7119 ;
7120 return 0;
7121}
7122_ACEOF
7123rm -f conftest.$ac_objext
7124if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7125 (eval $ac_compile) 2>&5
7126 ac_status=$?
7127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7128 (exit $ac_status); } &&
7129 { ac_try='test -s conftest.$ac_objext'
7130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7131 (eval $ac_try) 2>&5
7132 ac_status=$?
7133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7134 (exit $ac_status); }; }; then
7135 ac_hi=$ac_mid; break
7136else
7137 echo "$as_me: failed program was:" >&5
7138cat conftest.$ac_ext >&5
7139ac_lo=`expr $ac_mid + 1`
7140 if test $ac_lo -le $ac_mid; then
7141 ac_lo= ac_hi=
7142 break
7143 fi
7144 ac_mid=`expr 2 '*' $ac_mid + 1`
7145fi
7146rm -f conftest.$ac_objext conftest.$ac_ext
7147 done
7148else
7149 echo "$as_me: failed program was:" >&5
7150cat conftest.$ac_ext >&5
7151cat >conftest.$ac_ext <<_ACEOF
7152#line $LINENO "configure"
7153#include "confdefs.h"
7154$ac_includes_default
7155#ifdef F77_DUMMY_MAIN
7156# ifdef __cplusplus
7157 extern "C"
7158# endif
7159 int F77_DUMMY_MAIN() { return 1; }
7160#endif
7161int
7162main ()
7163{
7164static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7165test_array [0] = 0
7166
7167 ;
7168 return 0;
7169}
7170_ACEOF
7171rm -f conftest.$ac_objext
7172if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7173 (eval $ac_compile) 2>&5
7174 ac_status=$?
7175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7176 (exit $ac_status); } &&
7177 { ac_try='test -s conftest.$ac_objext'
7178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7179 (eval $ac_try) 2>&5
7180 ac_status=$?
7181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7182 (exit $ac_status); }; }; then
7183 ac_hi=-1 ac_mid=-1
7184 while :; do
7185 cat >conftest.$ac_ext <<_ACEOF
7186#line $LINENO "configure"
7187#include "confdefs.h"
7188$ac_includes_default
7189#ifdef F77_DUMMY_MAIN
7190# ifdef __cplusplus
7191 extern "C"
7192# endif
7193 int F77_DUMMY_MAIN() { return 1; }
7194#endif
7195int
7196main ()
7197{
7198static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7199test_array [0] = 0
7200
7201 ;
7202 return 0;
7203}
7204_ACEOF
7205rm -f conftest.$ac_objext
7206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7207 (eval $ac_compile) 2>&5
7208 ac_status=$?
7209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7210 (exit $ac_status); } &&
7211 { ac_try='test -s conftest.$ac_objext'
7212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7213 (eval $ac_try) 2>&5
7214 ac_status=$?
7215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7216 (exit $ac_status); }; }; then
7217 ac_lo=$ac_mid; break
7218else
7219 echo "$as_me: failed program was:" >&5
7220cat conftest.$ac_ext >&5
7221ac_hi=`expr '(' $ac_mid ')' - 1`
7222 if test $ac_mid -le $ac_hi; then
7223 ac_lo= ac_hi=
7224 break
7225 fi
7226 ac_mid=`expr 2 '*' $ac_mid`
7227fi
7228rm -f conftest.$ac_objext conftest.$ac_ext
7229 done
7230else
7231 echo "$as_me: failed program was:" >&5
7232cat conftest.$ac_ext >&5
7233ac_lo= ac_hi=
7234fi
7235rm -f conftest.$ac_objext conftest.$ac_ext
7236fi
7237rm -f conftest.$ac_objext conftest.$ac_ext
7238# Binary search between lo and hi bounds.
7239while test "x$ac_lo" != "x$ac_hi"; do
7240 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7241 cat >conftest.$ac_ext <<_ACEOF
7242#line $LINENO "configure"
7243#include "confdefs.h"
7244$ac_includes_default
7245#ifdef F77_DUMMY_MAIN
7246# ifdef __cplusplus
7247 extern "C"
7248# endif
7249 int F77_DUMMY_MAIN() { return 1; }
7250#endif
7251int
7252main ()
7253{
7254static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7255test_array [0] = 0
7256
7257 ;
7258 return 0;
7259}
7260_ACEOF
7261rm -f conftest.$ac_objext
7262if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7263 (eval $ac_compile) 2>&5
7264 ac_status=$?
7265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7266 (exit $ac_status); } &&
7267 { ac_try='test -s conftest.$ac_objext'
7268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7269 (eval $ac_try) 2>&5
7270 ac_status=$?
7271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7272 (exit $ac_status); }; }; then
7273 ac_hi=$ac_mid
7274else
7275 echo "$as_me: failed program was:" >&5
7276cat conftest.$ac_ext >&5
7277ac_lo=`expr '(' $ac_mid ')' + 1`
7278fi
7279rm -f conftest.$ac_objext conftest.$ac_ext
7280done
7281case $ac_lo in
7282?*) ac_cv_sizeof_float=$ac_lo;;
7283'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7284echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7285 { (exit 1); exit 1; }; } ;;
7286esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007287else
7288 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007289 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7290echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7291 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007292else
Martin v. Löwis11437992002-04-12 09:54:03 +00007293 cat >conftest.$ac_ext <<_ACEOF
7294#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007295#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007296$ac_includes_default
7297long longval () { return (long) (sizeof (float)); }
7298unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007299#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007300#include <stdlib.h>
7301#ifdef F77_DUMMY_MAIN
7302# ifdef __cplusplus
7303 extern "C"
7304# endif
7305 int F77_DUMMY_MAIN() { return 1; }
7306#endif
7307int
7308main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007309{
Martin v. Löwis11437992002-04-12 09:54:03 +00007310
7311 FILE *f = fopen ("conftest.val", "w");
7312 if (! f)
7313 exit (1);
7314 if (((long) (sizeof (float))) < 0)
7315 {
7316 long i = longval ();
7317 if (i != ((long) (sizeof (float))))
7318 exit (1);
7319 fprintf (f, "%ld\n", i);
7320 }
7321 else
7322 {
7323 unsigned long i = ulongval ();
7324 if (i != ((long) (sizeof (float))))
7325 exit (1);
7326 fprintf (f, "%lu\n", i);
7327 }
7328 exit (ferror (f) || fclose (f) != 0);
7329
7330 ;
7331 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007332}
Martin v. Löwis11437992002-04-12 09:54:03 +00007333_ACEOF
7334rm -f conftest$ac_exeext
7335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7336 (eval $ac_link) 2>&5
7337 ac_status=$?
7338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7339 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7341 (eval $ac_try) 2>&5
7342 ac_status=$?
7343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7344 (exit $ac_status); }; }; then
7345 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007346else
Martin v. Löwis11437992002-04-12 09:54:03 +00007347 echo "$as_me: program exited with status $ac_status" >&5
7348echo "$as_me: failed program was:" >&5
7349cat conftest.$ac_ext >&5
7350( exit $ac_status )
7351{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7352echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7353 { (exit 1); exit 1; }; }
7354fi
7355rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7356fi
7357fi
7358rm -f conftest.val
7359else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007360 ac_cv_sizeof_float=0
7361fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007363echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7364echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7365cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007366#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007367_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007368
7369
Martin v. Löwis11437992002-04-12 09:54:03 +00007370echo "$as_me:$LINENO: checking for double" >&5
7371echo $ECHO_N "checking for double... $ECHO_C" >&6
7372if test "${ac_cv_type_double+set}" = set; then
7373 echo $ECHO_N "(cached) $ECHO_C" >&6
7374else
7375 cat >conftest.$ac_ext <<_ACEOF
7376#line $LINENO "configure"
7377#include "confdefs.h"
7378$ac_includes_default
7379#ifdef F77_DUMMY_MAIN
7380# ifdef __cplusplus
7381 extern "C"
7382# endif
7383 int F77_DUMMY_MAIN() { return 1; }
7384#endif
7385int
7386main ()
7387{
7388if ((double *) 0)
7389 return 0;
7390if (sizeof (double))
7391 return 0;
7392 ;
7393 return 0;
7394}
7395_ACEOF
7396rm -f conftest.$ac_objext
7397if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7398 (eval $ac_compile) 2>&5
7399 ac_status=$?
7400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7401 (exit $ac_status); } &&
7402 { ac_try='test -s conftest.$ac_objext'
7403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7404 (eval $ac_try) 2>&5
7405 ac_status=$?
7406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7407 (exit $ac_status); }; }; then
7408 ac_cv_type_double=yes
7409else
7410 echo "$as_me: failed program was:" >&5
7411cat conftest.$ac_ext >&5
7412ac_cv_type_double=no
7413fi
7414rm -f conftest.$ac_objext conftest.$ac_ext
7415fi
7416echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7417echo "${ECHO_T}$ac_cv_type_double" >&6
7418
7419echo "$as_me:$LINENO: checking size of double" >&5
7420echo $ECHO_N "checking size of double... $ECHO_C" >&6
7421if test "${ac_cv_sizeof_double+set}" = set; then
7422 echo $ECHO_N "(cached) $ECHO_C" >&6
7423else
7424 if test "$ac_cv_type_double" = yes; then
7425 # The cast to unsigned long works around a bug in the HP C Compiler
7426 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7427 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7428 # This bug is HP SR number 8606223364.
7429 if test "$cross_compiling" = yes; then
7430 # Depending upon the size, compute the lo and hi bounds.
7431cat >conftest.$ac_ext <<_ACEOF
7432#line $LINENO "configure"
7433#include "confdefs.h"
7434$ac_includes_default
7435#ifdef F77_DUMMY_MAIN
7436# ifdef __cplusplus
7437 extern "C"
7438# endif
7439 int F77_DUMMY_MAIN() { return 1; }
7440#endif
7441int
7442main ()
7443{
7444static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7445test_array [0] = 0
7446
7447 ;
7448 return 0;
7449}
7450_ACEOF
7451rm -f conftest.$ac_objext
7452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7453 (eval $ac_compile) 2>&5
7454 ac_status=$?
7455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7456 (exit $ac_status); } &&
7457 { ac_try='test -s conftest.$ac_objext'
7458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7459 (eval $ac_try) 2>&5
7460 ac_status=$?
7461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7462 (exit $ac_status); }; }; then
7463 ac_lo=0 ac_mid=0
7464 while :; do
7465 cat >conftest.$ac_ext <<_ACEOF
7466#line $LINENO "configure"
7467#include "confdefs.h"
7468$ac_includes_default
7469#ifdef F77_DUMMY_MAIN
7470# ifdef __cplusplus
7471 extern "C"
7472# endif
7473 int F77_DUMMY_MAIN() { return 1; }
7474#endif
7475int
7476main ()
7477{
7478static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7479test_array [0] = 0
7480
7481 ;
7482 return 0;
7483}
7484_ACEOF
7485rm -f conftest.$ac_objext
7486if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7487 (eval $ac_compile) 2>&5
7488 ac_status=$?
7489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7490 (exit $ac_status); } &&
7491 { ac_try='test -s conftest.$ac_objext'
7492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7493 (eval $ac_try) 2>&5
7494 ac_status=$?
7495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7496 (exit $ac_status); }; }; then
7497 ac_hi=$ac_mid; break
7498else
7499 echo "$as_me: failed program was:" >&5
7500cat conftest.$ac_ext >&5
7501ac_lo=`expr $ac_mid + 1`
7502 if test $ac_lo -le $ac_mid; then
7503 ac_lo= ac_hi=
7504 break
7505 fi
7506 ac_mid=`expr 2 '*' $ac_mid + 1`
7507fi
7508rm -f conftest.$ac_objext conftest.$ac_ext
7509 done
7510else
7511 echo "$as_me: failed program was:" >&5
7512cat conftest.$ac_ext >&5
7513cat >conftest.$ac_ext <<_ACEOF
7514#line $LINENO "configure"
7515#include "confdefs.h"
7516$ac_includes_default
7517#ifdef F77_DUMMY_MAIN
7518# ifdef __cplusplus
7519 extern "C"
7520# endif
7521 int F77_DUMMY_MAIN() { return 1; }
7522#endif
7523int
7524main ()
7525{
7526static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7527test_array [0] = 0
7528
7529 ;
7530 return 0;
7531}
7532_ACEOF
7533rm -f conftest.$ac_objext
7534if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7535 (eval $ac_compile) 2>&5
7536 ac_status=$?
7537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7538 (exit $ac_status); } &&
7539 { ac_try='test -s conftest.$ac_objext'
7540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7541 (eval $ac_try) 2>&5
7542 ac_status=$?
7543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7544 (exit $ac_status); }; }; then
7545 ac_hi=-1 ac_mid=-1
7546 while :; do
7547 cat >conftest.$ac_ext <<_ACEOF
7548#line $LINENO "configure"
7549#include "confdefs.h"
7550$ac_includes_default
7551#ifdef F77_DUMMY_MAIN
7552# ifdef __cplusplus
7553 extern "C"
7554# endif
7555 int F77_DUMMY_MAIN() { return 1; }
7556#endif
7557int
7558main ()
7559{
7560static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7561test_array [0] = 0
7562
7563 ;
7564 return 0;
7565}
7566_ACEOF
7567rm -f conftest.$ac_objext
7568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7569 (eval $ac_compile) 2>&5
7570 ac_status=$?
7571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7572 (exit $ac_status); } &&
7573 { ac_try='test -s conftest.$ac_objext'
7574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7575 (eval $ac_try) 2>&5
7576 ac_status=$?
7577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7578 (exit $ac_status); }; }; then
7579 ac_lo=$ac_mid; break
7580else
7581 echo "$as_me: failed program was:" >&5
7582cat conftest.$ac_ext >&5
7583ac_hi=`expr '(' $ac_mid ')' - 1`
7584 if test $ac_mid -le $ac_hi; then
7585 ac_lo= ac_hi=
7586 break
7587 fi
7588 ac_mid=`expr 2 '*' $ac_mid`
7589fi
7590rm -f conftest.$ac_objext conftest.$ac_ext
7591 done
7592else
7593 echo "$as_me: failed program was:" >&5
7594cat conftest.$ac_ext >&5
7595ac_lo= ac_hi=
7596fi
7597rm -f conftest.$ac_objext conftest.$ac_ext
7598fi
7599rm -f conftest.$ac_objext conftest.$ac_ext
7600# Binary search between lo and hi bounds.
7601while test "x$ac_lo" != "x$ac_hi"; do
7602 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7603 cat >conftest.$ac_ext <<_ACEOF
7604#line $LINENO "configure"
7605#include "confdefs.h"
7606$ac_includes_default
7607#ifdef F77_DUMMY_MAIN
7608# ifdef __cplusplus
7609 extern "C"
7610# endif
7611 int F77_DUMMY_MAIN() { return 1; }
7612#endif
7613int
7614main ()
7615{
7616static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7617test_array [0] = 0
7618
7619 ;
7620 return 0;
7621}
7622_ACEOF
7623rm -f conftest.$ac_objext
7624if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7625 (eval $ac_compile) 2>&5
7626 ac_status=$?
7627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7628 (exit $ac_status); } &&
7629 { ac_try='test -s conftest.$ac_objext'
7630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7631 (eval $ac_try) 2>&5
7632 ac_status=$?
7633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7634 (exit $ac_status); }; }; then
7635 ac_hi=$ac_mid
7636else
7637 echo "$as_me: failed program was:" >&5
7638cat conftest.$ac_ext >&5
7639ac_lo=`expr '(' $ac_mid ')' + 1`
7640fi
7641rm -f conftest.$ac_objext conftest.$ac_ext
7642done
7643case $ac_lo in
7644?*) ac_cv_sizeof_double=$ac_lo;;
7645'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7646echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7647 { (exit 1); exit 1; }; } ;;
7648esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007649else
7650 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007651 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7652echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7653 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007654else
Martin v. Löwis11437992002-04-12 09:54:03 +00007655 cat >conftest.$ac_ext <<_ACEOF
7656#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007657#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007658$ac_includes_default
7659long longval () { return (long) (sizeof (double)); }
7660unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007661#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007662#include <stdlib.h>
7663#ifdef F77_DUMMY_MAIN
7664# ifdef __cplusplus
7665 extern "C"
7666# endif
7667 int F77_DUMMY_MAIN() { return 1; }
7668#endif
7669int
7670main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007671{
Martin v. Löwis11437992002-04-12 09:54:03 +00007672
7673 FILE *f = fopen ("conftest.val", "w");
7674 if (! f)
7675 exit (1);
7676 if (((long) (sizeof (double))) < 0)
7677 {
7678 long i = longval ();
7679 if (i != ((long) (sizeof (double))))
7680 exit (1);
7681 fprintf (f, "%ld\n", i);
7682 }
7683 else
7684 {
7685 unsigned long i = ulongval ();
7686 if (i != ((long) (sizeof (double))))
7687 exit (1);
7688 fprintf (f, "%lu\n", i);
7689 }
7690 exit (ferror (f) || fclose (f) != 0);
7691
7692 ;
7693 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007694}
Martin v. Löwis11437992002-04-12 09:54:03 +00007695_ACEOF
7696rm -f conftest$ac_exeext
7697if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7698 (eval $ac_link) 2>&5
7699 ac_status=$?
7700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7701 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7703 (eval $ac_try) 2>&5
7704 ac_status=$?
7705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7706 (exit $ac_status); }; }; then
7707 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007708else
Martin v. Löwis11437992002-04-12 09:54:03 +00007709 echo "$as_me: program exited with status $ac_status" >&5
7710echo "$as_me: failed program was:" >&5
7711cat conftest.$ac_ext >&5
7712( exit $ac_status )
7713{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7714echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7715 { (exit 1); exit 1; }; }
7716fi
7717rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7718fi
7719fi
7720rm -f conftest.val
7721else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007722 ac_cv_sizeof_double=0
7723fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007724fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007725echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7726echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7727cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007728#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007729_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007730
7731
Martin v. Löwis11437992002-04-12 09:54:03 +00007732echo "$as_me:$LINENO: checking for fpos_t" >&5
7733echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7734if test "${ac_cv_type_fpos_t+set}" = set; then
7735 echo $ECHO_N "(cached) $ECHO_C" >&6
7736else
7737 cat >conftest.$ac_ext <<_ACEOF
7738#line $LINENO "configure"
7739#include "confdefs.h"
7740$ac_includes_default
7741#ifdef F77_DUMMY_MAIN
7742# ifdef __cplusplus
7743 extern "C"
7744# endif
7745 int F77_DUMMY_MAIN() { return 1; }
7746#endif
7747int
7748main ()
7749{
7750if ((fpos_t *) 0)
7751 return 0;
7752if (sizeof (fpos_t))
7753 return 0;
7754 ;
7755 return 0;
7756}
7757_ACEOF
7758rm -f conftest.$ac_objext
7759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7760 (eval $ac_compile) 2>&5
7761 ac_status=$?
7762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7763 (exit $ac_status); } &&
7764 { ac_try='test -s conftest.$ac_objext'
7765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7766 (eval $ac_try) 2>&5
7767 ac_status=$?
7768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7769 (exit $ac_status); }; }; then
7770 ac_cv_type_fpos_t=yes
7771else
7772 echo "$as_me: failed program was:" >&5
7773cat conftest.$ac_ext >&5
7774ac_cv_type_fpos_t=no
7775fi
7776rm -f conftest.$ac_objext conftest.$ac_ext
7777fi
7778echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7779echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7780
7781echo "$as_me:$LINENO: checking size of fpos_t" >&5
7782echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7783if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7784 echo $ECHO_N "(cached) $ECHO_C" >&6
7785else
7786 if test "$ac_cv_type_fpos_t" = yes; then
7787 # The cast to unsigned long works around a bug in the HP C Compiler
7788 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7789 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7790 # This bug is HP SR number 8606223364.
7791 if test "$cross_compiling" = yes; then
7792 # Depending upon the size, compute the lo and hi bounds.
7793cat >conftest.$ac_ext <<_ACEOF
7794#line $LINENO "configure"
7795#include "confdefs.h"
7796$ac_includes_default
7797#ifdef F77_DUMMY_MAIN
7798# ifdef __cplusplus
7799 extern "C"
7800# endif
7801 int F77_DUMMY_MAIN() { return 1; }
7802#endif
7803int
7804main ()
7805{
7806static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7807test_array [0] = 0
7808
7809 ;
7810 return 0;
7811}
7812_ACEOF
7813rm -f conftest.$ac_objext
7814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7815 (eval $ac_compile) 2>&5
7816 ac_status=$?
7817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7818 (exit $ac_status); } &&
7819 { ac_try='test -s conftest.$ac_objext'
7820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7821 (eval $ac_try) 2>&5
7822 ac_status=$?
7823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7824 (exit $ac_status); }; }; then
7825 ac_lo=0 ac_mid=0
7826 while :; do
7827 cat >conftest.$ac_ext <<_ACEOF
7828#line $LINENO "configure"
7829#include "confdefs.h"
7830$ac_includes_default
7831#ifdef F77_DUMMY_MAIN
7832# ifdef __cplusplus
7833 extern "C"
7834# endif
7835 int F77_DUMMY_MAIN() { return 1; }
7836#endif
7837int
7838main ()
7839{
7840static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7841test_array [0] = 0
7842
7843 ;
7844 return 0;
7845}
7846_ACEOF
7847rm -f conftest.$ac_objext
7848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7849 (eval $ac_compile) 2>&5
7850 ac_status=$?
7851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7852 (exit $ac_status); } &&
7853 { ac_try='test -s conftest.$ac_objext'
7854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7855 (eval $ac_try) 2>&5
7856 ac_status=$?
7857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7858 (exit $ac_status); }; }; then
7859 ac_hi=$ac_mid; break
7860else
7861 echo "$as_me: failed program was:" >&5
7862cat conftest.$ac_ext >&5
7863ac_lo=`expr $ac_mid + 1`
7864 if test $ac_lo -le $ac_mid; then
7865 ac_lo= ac_hi=
7866 break
7867 fi
7868 ac_mid=`expr 2 '*' $ac_mid + 1`
7869fi
7870rm -f conftest.$ac_objext conftest.$ac_ext
7871 done
7872else
7873 echo "$as_me: failed program was:" >&5
7874cat conftest.$ac_ext >&5
7875cat >conftest.$ac_ext <<_ACEOF
7876#line $LINENO "configure"
7877#include "confdefs.h"
7878$ac_includes_default
7879#ifdef F77_DUMMY_MAIN
7880# ifdef __cplusplus
7881 extern "C"
7882# endif
7883 int F77_DUMMY_MAIN() { return 1; }
7884#endif
7885int
7886main ()
7887{
7888static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7889test_array [0] = 0
7890
7891 ;
7892 return 0;
7893}
7894_ACEOF
7895rm -f conftest.$ac_objext
7896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7897 (eval $ac_compile) 2>&5
7898 ac_status=$?
7899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7900 (exit $ac_status); } &&
7901 { ac_try='test -s conftest.$ac_objext'
7902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7903 (eval $ac_try) 2>&5
7904 ac_status=$?
7905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7906 (exit $ac_status); }; }; then
7907 ac_hi=-1 ac_mid=-1
7908 while :; do
7909 cat >conftest.$ac_ext <<_ACEOF
7910#line $LINENO "configure"
7911#include "confdefs.h"
7912$ac_includes_default
7913#ifdef F77_DUMMY_MAIN
7914# ifdef __cplusplus
7915 extern "C"
7916# endif
7917 int F77_DUMMY_MAIN() { return 1; }
7918#endif
7919int
7920main ()
7921{
7922static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7923test_array [0] = 0
7924
7925 ;
7926 return 0;
7927}
7928_ACEOF
7929rm -f conftest.$ac_objext
7930if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7931 (eval $ac_compile) 2>&5
7932 ac_status=$?
7933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7934 (exit $ac_status); } &&
7935 { ac_try='test -s conftest.$ac_objext'
7936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7937 (eval $ac_try) 2>&5
7938 ac_status=$?
7939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7940 (exit $ac_status); }; }; then
7941 ac_lo=$ac_mid; break
7942else
7943 echo "$as_me: failed program was:" >&5
7944cat conftest.$ac_ext >&5
7945ac_hi=`expr '(' $ac_mid ')' - 1`
7946 if test $ac_mid -le $ac_hi; then
7947 ac_lo= ac_hi=
7948 break
7949 fi
7950 ac_mid=`expr 2 '*' $ac_mid`
7951fi
7952rm -f conftest.$ac_objext conftest.$ac_ext
7953 done
7954else
7955 echo "$as_me: failed program was:" >&5
7956cat conftest.$ac_ext >&5
7957ac_lo= ac_hi=
7958fi
7959rm -f conftest.$ac_objext conftest.$ac_ext
7960fi
7961rm -f conftest.$ac_objext conftest.$ac_ext
7962# Binary search between lo and hi bounds.
7963while test "x$ac_lo" != "x$ac_hi"; do
7964 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7965 cat >conftest.$ac_ext <<_ACEOF
7966#line $LINENO "configure"
7967#include "confdefs.h"
7968$ac_includes_default
7969#ifdef F77_DUMMY_MAIN
7970# ifdef __cplusplus
7971 extern "C"
7972# endif
7973 int F77_DUMMY_MAIN() { return 1; }
7974#endif
7975int
7976main ()
7977{
7978static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7979test_array [0] = 0
7980
7981 ;
7982 return 0;
7983}
7984_ACEOF
7985rm -f conftest.$ac_objext
7986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7987 (eval $ac_compile) 2>&5
7988 ac_status=$?
7989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7990 (exit $ac_status); } &&
7991 { ac_try='test -s conftest.$ac_objext'
7992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7993 (eval $ac_try) 2>&5
7994 ac_status=$?
7995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7996 (exit $ac_status); }; }; then
7997 ac_hi=$ac_mid
7998else
7999 echo "$as_me: failed program was:" >&5
8000cat conftest.$ac_ext >&5
8001ac_lo=`expr '(' $ac_mid ')' + 1`
8002fi
8003rm -f conftest.$ac_objext conftest.$ac_ext
8004done
8005case $ac_lo in
8006?*) ac_cv_sizeof_fpos_t=$ac_lo;;
8007'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8008echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8009 { (exit 1); exit 1; }; } ;;
8010esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008011else
8012 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008013 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8014echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8015 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008016else
Martin v. Löwis11437992002-04-12 09:54:03 +00008017 cat >conftest.$ac_ext <<_ACEOF
8018#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008019#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008020$ac_includes_default
8021long longval () { return (long) (sizeof (fpos_t)); }
8022unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008023#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008024#include <stdlib.h>
8025#ifdef F77_DUMMY_MAIN
8026# ifdef __cplusplus
8027 extern "C"
8028# endif
8029 int F77_DUMMY_MAIN() { return 1; }
8030#endif
8031int
8032main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008033{
Martin v. Löwis11437992002-04-12 09:54:03 +00008034
8035 FILE *f = fopen ("conftest.val", "w");
8036 if (! f)
8037 exit (1);
8038 if (((long) (sizeof (fpos_t))) < 0)
8039 {
8040 long i = longval ();
8041 if (i != ((long) (sizeof (fpos_t))))
8042 exit (1);
8043 fprintf (f, "%ld\n", i);
8044 }
8045 else
8046 {
8047 unsigned long i = ulongval ();
8048 if (i != ((long) (sizeof (fpos_t))))
8049 exit (1);
8050 fprintf (f, "%lu\n", i);
8051 }
8052 exit (ferror (f) || fclose (f) != 0);
8053
8054 ;
8055 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008056}
Martin v. Löwis11437992002-04-12 09:54:03 +00008057_ACEOF
8058rm -f conftest$ac_exeext
8059if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8060 (eval $ac_link) 2>&5
8061 ac_status=$?
8062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8063 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8065 (eval $ac_try) 2>&5
8066 ac_status=$?
8067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8068 (exit $ac_status); }; }; then
8069 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008070else
Martin v. Löwis11437992002-04-12 09:54:03 +00008071 echo "$as_me: program exited with status $ac_status" >&5
8072echo "$as_me: failed program was:" >&5
8073cat conftest.$ac_ext >&5
8074( exit $ac_status )
8075{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8076echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8077 { (exit 1); exit 1; }; }
8078fi
8079rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8080fi
8081fi
8082rm -f conftest.val
8083else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008084 ac_cv_sizeof_fpos_t=0
8085fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008086fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008087echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8088echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8089cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008090#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008091_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008092
Michael W. Hudson54241132001-12-07 15:38:26 +00008093
8094
Martin v. Löwis11437992002-04-12 09:54:03 +00008095echo "$as_me:$LINENO: checking for long long support" >&5
8096echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008097have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008098cat >conftest.$ac_ext <<_ACEOF
8099#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008100#include "confdefs.h"
8101
Martin v. Löwis11437992002-04-12 09:54:03 +00008102#ifdef F77_DUMMY_MAIN
8103# ifdef __cplusplus
8104 extern "C"
8105# endif
8106 int F77_DUMMY_MAIN() { return 1; }
8107#endif
8108int
8109main ()
8110{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008111long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008112 ;
8113 return 0;
8114}
8115_ACEOF
8116rm -f conftest.$ac_objext
8117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8118 (eval $ac_compile) 2>&5
8119 ac_status=$?
8120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8121 (exit $ac_status); } &&
8122 { ac_try='test -s conftest.$ac_objext'
8123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8124 (eval $ac_try) 2>&5
8125 ac_status=$?
8126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8127 (exit $ac_status); }; }; then
8128
8129
8130cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008131#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008132_ACEOF
8133
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008134 have_long_long=yes
8135
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008136else
Martin v. Löwis11437992002-04-12 09:54:03 +00008137 echo "$as_me: failed program was:" >&5
8138cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008139fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008140rm -f conftest.$ac_objext conftest.$ac_ext
8141echo "$as_me:$LINENO: result: $have_long_long" >&5
8142echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008143if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008144echo "$as_me:$LINENO: checking for long long" >&5
8145echo $ECHO_N "checking for long long... $ECHO_C" >&6
8146if test "${ac_cv_type_long_long+set}" = set; then
8147 echo $ECHO_N "(cached) $ECHO_C" >&6
8148else
8149 cat >conftest.$ac_ext <<_ACEOF
8150#line $LINENO "configure"
8151#include "confdefs.h"
8152$ac_includes_default
8153#ifdef F77_DUMMY_MAIN
8154# ifdef __cplusplus
8155 extern "C"
8156# endif
8157 int F77_DUMMY_MAIN() { return 1; }
8158#endif
8159int
8160main ()
8161{
8162if ((long long *) 0)
8163 return 0;
8164if (sizeof (long long))
8165 return 0;
8166 ;
8167 return 0;
8168}
8169_ACEOF
8170rm -f conftest.$ac_objext
8171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8172 (eval $ac_compile) 2>&5
8173 ac_status=$?
8174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8175 (exit $ac_status); } &&
8176 { ac_try='test -s conftest.$ac_objext'
8177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8178 (eval $ac_try) 2>&5
8179 ac_status=$?
8180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8181 (exit $ac_status); }; }; then
8182 ac_cv_type_long_long=yes
8183else
8184 echo "$as_me: failed program was:" >&5
8185cat conftest.$ac_ext >&5
8186ac_cv_type_long_long=no
8187fi
8188rm -f conftest.$ac_objext conftest.$ac_ext
8189fi
8190echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8191echo "${ECHO_T}$ac_cv_type_long_long" >&6
8192
8193echo "$as_me:$LINENO: checking size of long long" >&5
8194echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8195if test "${ac_cv_sizeof_long_long+set}" = set; then
8196 echo $ECHO_N "(cached) $ECHO_C" >&6
8197else
8198 if test "$ac_cv_type_long_long" = yes; then
8199 # The cast to unsigned long works around a bug in the HP C Compiler
8200 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8201 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8202 # This bug is HP SR number 8606223364.
8203 if test "$cross_compiling" = yes; then
8204 # Depending upon the size, compute the lo and hi bounds.
8205cat >conftest.$ac_ext <<_ACEOF
8206#line $LINENO "configure"
8207#include "confdefs.h"
8208$ac_includes_default
8209#ifdef F77_DUMMY_MAIN
8210# ifdef __cplusplus
8211 extern "C"
8212# endif
8213 int F77_DUMMY_MAIN() { return 1; }
8214#endif
8215int
8216main ()
8217{
8218static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8219test_array [0] = 0
8220
8221 ;
8222 return 0;
8223}
8224_ACEOF
8225rm -f conftest.$ac_objext
8226if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8227 (eval $ac_compile) 2>&5
8228 ac_status=$?
8229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8230 (exit $ac_status); } &&
8231 { ac_try='test -s conftest.$ac_objext'
8232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8233 (eval $ac_try) 2>&5
8234 ac_status=$?
8235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8236 (exit $ac_status); }; }; then
8237 ac_lo=0 ac_mid=0
8238 while :; do
8239 cat >conftest.$ac_ext <<_ACEOF
8240#line $LINENO "configure"
8241#include "confdefs.h"
8242$ac_includes_default
8243#ifdef F77_DUMMY_MAIN
8244# ifdef __cplusplus
8245 extern "C"
8246# endif
8247 int F77_DUMMY_MAIN() { return 1; }
8248#endif
8249int
8250main ()
8251{
8252static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8253test_array [0] = 0
8254
8255 ;
8256 return 0;
8257}
8258_ACEOF
8259rm -f conftest.$ac_objext
8260if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8261 (eval $ac_compile) 2>&5
8262 ac_status=$?
8263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8264 (exit $ac_status); } &&
8265 { ac_try='test -s conftest.$ac_objext'
8266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8267 (eval $ac_try) 2>&5
8268 ac_status=$?
8269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8270 (exit $ac_status); }; }; then
8271 ac_hi=$ac_mid; break
8272else
8273 echo "$as_me: failed program was:" >&5
8274cat conftest.$ac_ext >&5
8275ac_lo=`expr $ac_mid + 1`
8276 if test $ac_lo -le $ac_mid; then
8277 ac_lo= ac_hi=
8278 break
8279 fi
8280 ac_mid=`expr 2 '*' $ac_mid + 1`
8281fi
8282rm -f conftest.$ac_objext conftest.$ac_ext
8283 done
8284else
8285 echo "$as_me: failed program was:" >&5
8286cat conftest.$ac_ext >&5
8287cat >conftest.$ac_ext <<_ACEOF
8288#line $LINENO "configure"
8289#include "confdefs.h"
8290$ac_includes_default
8291#ifdef F77_DUMMY_MAIN
8292# ifdef __cplusplus
8293 extern "C"
8294# endif
8295 int F77_DUMMY_MAIN() { return 1; }
8296#endif
8297int
8298main ()
8299{
8300static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8301test_array [0] = 0
8302
8303 ;
8304 return 0;
8305}
8306_ACEOF
8307rm -f conftest.$ac_objext
8308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8309 (eval $ac_compile) 2>&5
8310 ac_status=$?
8311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8312 (exit $ac_status); } &&
8313 { ac_try='test -s conftest.$ac_objext'
8314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8315 (eval $ac_try) 2>&5
8316 ac_status=$?
8317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8318 (exit $ac_status); }; }; then
8319 ac_hi=-1 ac_mid=-1
8320 while :; do
8321 cat >conftest.$ac_ext <<_ACEOF
8322#line $LINENO "configure"
8323#include "confdefs.h"
8324$ac_includes_default
8325#ifdef F77_DUMMY_MAIN
8326# ifdef __cplusplus
8327 extern "C"
8328# endif
8329 int F77_DUMMY_MAIN() { return 1; }
8330#endif
8331int
8332main ()
8333{
8334static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8335test_array [0] = 0
8336
8337 ;
8338 return 0;
8339}
8340_ACEOF
8341rm -f conftest.$ac_objext
8342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8343 (eval $ac_compile) 2>&5
8344 ac_status=$?
8345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8346 (exit $ac_status); } &&
8347 { ac_try='test -s conftest.$ac_objext'
8348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8349 (eval $ac_try) 2>&5
8350 ac_status=$?
8351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8352 (exit $ac_status); }; }; then
8353 ac_lo=$ac_mid; break
8354else
8355 echo "$as_me: failed program was:" >&5
8356cat conftest.$ac_ext >&5
8357ac_hi=`expr '(' $ac_mid ')' - 1`
8358 if test $ac_mid -le $ac_hi; then
8359 ac_lo= ac_hi=
8360 break
8361 fi
8362 ac_mid=`expr 2 '*' $ac_mid`
8363fi
8364rm -f conftest.$ac_objext conftest.$ac_ext
8365 done
8366else
8367 echo "$as_me: failed program was:" >&5
8368cat conftest.$ac_ext >&5
8369ac_lo= ac_hi=
8370fi
8371rm -f conftest.$ac_objext conftest.$ac_ext
8372fi
8373rm -f conftest.$ac_objext conftest.$ac_ext
8374# Binary search between lo and hi bounds.
8375while test "x$ac_lo" != "x$ac_hi"; do
8376 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8377 cat >conftest.$ac_ext <<_ACEOF
8378#line $LINENO "configure"
8379#include "confdefs.h"
8380$ac_includes_default
8381#ifdef F77_DUMMY_MAIN
8382# ifdef __cplusplus
8383 extern "C"
8384# endif
8385 int F77_DUMMY_MAIN() { return 1; }
8386#endif
8387int
8388main ()
8389{
8390static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8391test_array [0] = 0
8392
8393 ;
8394 return 0;
8395}
8396_ACEOF
8397rm -f conftest.$ac_objext
8398if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8399 (eval $ac_compile) 2>&5
8400 ac_status=$?
8401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8402 (exit $ac_status); } &&
8403 { ac_try='test -s conftest.$ac_objext'
8404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8405 (eval $ac_try) 2>&5
8406 ac_status=$?
8407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8408 (exit $ac_status); }; }; then
8409 ac_hi=$ac_mid
8410else
8411 echo "$as_me: failed program was:" >&5
8412cat conftest.$ac_ext >&5
8413ac_lo=`expr '(' $ac_mid ')' + 1`
8414fi
8415rm -f conftest.$ac_objext conftest.$ac_ext
8416done
8417case $ac_lo in
8418?*) ac_cv_sizeof_long_long=$ac_lo;;
8419'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8420echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8421 { (exit 1); exit 1; }; } ;;
8422esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008423else
8424 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008425 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8426echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8427 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008428else
Martin v. Löwis11437992002-04-12 09:54:03 +00008429 cat >conftest.$ac_ext <<_ACEOF
8430#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008431#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008432$ac_includes_default
8433long longval () { return (long) (sizeof (long long)); }
8434unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008435#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008436#include <stdlib.h>
8437#ifdef F77_DUMMY_MAIN
8438# ifdef __cplusplus
8439 extern "C"
8440# endif
8441 int F77_DUMMY_MAIN() { return 1; }
8442#endif
8443int
8444main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008445{
Martin v. Löwis11437992002-04-12 09:54:03 +00008446
8447 FILE *f = fopen ("conftest.val", "w");
8448 if (! f)
8449 exit (1);
8450 if (((long) (sizeof (long long))) < 0)
8451 {
8452 long i = longval ();
8453 if (i != ((long) (sizeof (long long))))
8454 exit (1);
8455 fprintf (f, "%ld\n", i);
8456 }
8457 else
8458 {
8459 unsigned long i = ulongval ();
8460 if (i != ((long) (sizeof (long long))))
8461 exit (1);
8462 fprintf (f, "%lu\n", i);
8463 }
8464 exit (ferror (f) || fclose (f) != 0);
8465
8466 ;
8467 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008468}
Martin v. Löwis11437992002-04-12 09:54:03 +00008469_ACEOF
8470rm -f conftest$ac_exeext
8471if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8472 (eval $ac_link) 2>&5
8473 ac_status=$?
8474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8475 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8477 (eval $ac_try) 2>&5
8478 ac_status=$?
8479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8480 (exit $ac_status); }; }; then
8481 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008482else
Martin v. Löwis11437992002-04-12 09:54:03 +00008483 echo "$as_me: program exited with status $ac_status" >&5
8484echo "$as_me: failed program was:" >&5
8485cat conftest.$ac_ext >&5
8486( exit $ac_status )
8487{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8488echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8489 { (exit 1); exit 1; }; }
8490fi
8491rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8492fi
8493fi
8494rm -f conftest.val
8495else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008496 ac_cv_sizeof_long_long=0
8497fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008498fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008499echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8500echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8501cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008502#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008503_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008504
Michael W. Hudson54241132001-12-07 15:38:26 +00008505
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008506fi
8507
Martin v. Löwis11437992002-04-12 09:54:03 +00008508echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8509echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008510have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008511cat >conftest.$ac_ext <<_ACEOF
8512#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008513#include "confdefs.h"
8514
Martin v. Löwis11437992002-04-12 09:54:03 +00008515#ifdef F77_DUMMY_MAIN
8516# ifdef __cplusplus
8517 extern "C"
8518# endif
8519 int F77_DUMMY_MAIN() { return 1; }
8520#endif
8521int
8522main ()
8523{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008524uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008525 ;
8526 return 0;
8527}
8528_ACEOF
8529rm -f conftest.$ac_objext
8530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8531 (eval $ac_compile) 2>&5
8532 ac_status=$?
8533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8534 (exit $ac_status); } &&
8535 { ac_try='test -s conftest.$ac_objext'
8536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8537 (eval $ac_try) 2>&5
8538 ac_status=$?
8539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8540 (exit $ac_status); }; }; then
8541
8542
8543cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008544#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008545_ACEOF
8546
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008547 have_uintptr_t=yes
8548
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008549else
Martin v. Löwis11437992002-04-12 09:54:03 +00008550 echo "$as_me: failed program was:" >&5
8551cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008552fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008553rm -f conftest.$ac_objext conftest.$ac_ext
8554echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8555echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008556if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008557echo "$as_me:$LINENO: checking for uintptr_t" >&5
8558echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8559if test "${ac_cv_type_uintptr_t+set}" = set; then
8560 echo $ECHO_N "(cached) $ECHO_C" >&6
8561else
8562 cat >conftest.$ac_ext <<_ACEOF
8563#line $LINENO "configure"
8564#include "confdefs.h"
8565$ac_includes_default
8566#ifdef F77_DUMMY_MAIN
8567# ifdef __cplusplus
8568 extern "C"
8569# endif
8570 int F77_DUMMY_MAIN() { return 1; }
8571#endif
8572int
8573main ()
8574{
8575if ((uintptr_t *) 0)
8576 return 0;
8577if (sizeof (uintptr_t))
8578 return 0;
8579 ;
8580 return 0;
8581}
8582_ACEOF
8583rm -f conftest.$ac_objext
8584if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8585 (eval $ac_compile) 2>&5
8586 ac_status=$?
8587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8588 (exit $ac_status); } &&
8589 { ac_try='test -s conftest.$ac_objext'
8590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8591 (eval $ac_try) 2>&5
8592 ac_status=$?
8593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8594 (exit $ac_status); }; }; then
8595 ac_cv_type_uintptr_t=yes
8596else
8597 echo "$as_me: failed program was:" >&5
8598cat conftest.$ac_ext >&5
8599ac_cv_type_uintptr_t=no
8600fi
8601rm -f conftest.$ac_objext conftest.$ac_ext
8602fi
8603echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8604echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8605
8606echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8607echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8608if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8609 echo $ECHO_N "(cached) $ECHO_C" >&6
8610else
8611 if test "$ac_cv_type_uintptr_t" = yes; then
8612 # The cast to unsigned long works around a bug in the HP C Compiler
8613 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8614 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8615 # This bug is HP SR number 8606223364.
8616 if test "$cross_compiling" = yes; then
8617 # Depending upon the size, compute the lo and hi bounds.
8618cat >conftest.$ac_ext <<_ACEOF
8619#line $LINENO "configure"
8620#include "confdefs.h"
8621$ac_includes_default
8622#ifdef F77_DUMMY_MAIN
8623# ifdef __cplusplus
8624 extern "C"
8625# endif
8626 int F77_DUMMY_MAIN() { return 1; }
8627#endif
8628int
8629main ()
8630{
8631static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8632test_array [0] = 0
8633
8634 ;
8635 return 0;
8636}
8637_ACEOF
8638rm -f conftest.$ac_objext
8639if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8640 (eval $ac_compile) 2>&5
8641 ac_status=$?
8642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8643 (exit $ac_status); } &&
8644 { ac_try='test -s conftest.$ac_objext'
8645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8646 (eval $ac_try) 2>&5
8647 ac_status=$?
8648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8649 (exit $ac_status); }; }; then
8650 ac_lo=0 ac_mid=0
8651 while :; do
8652 cat >conftest.$ac_ext <<_ACEOF
8653#line $LINENO "configure"
8654#include "confdefs.h"
8655$ac_includes_default
8656#ifdef F77_DUMMY_MAIN
8657# ifdef __cplusplus
8658 extern "C"
8659# endif
8660 int F77_DUMMY_MAIN() { return 1; }
8661#endif
8662int
8663main ()
8664{
8665static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8666test_array [0] = 0
8667
8668 ;
8669 return 0;
8670}
8671_ACEOF
8672rm -f conftest.$ac_objext
8673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8674 (eval $ac_compile) 2>&5
8675 ac_status=$?
8676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8677 (exit $ac_status); } &&
8678 { ac_try='test -s conftest.$ac_objext'
8679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8680 (eval $ac_try) 2>&5
8681 ac_status=$?
8682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8683 (exit $ac_status); }; }; then
8684 ac_hi=$ac_mid; break
8685else
8686 echo "$as_me: failed program was:" >&5
8687cat conftest.$ac_ext >&5
8688ac_lo=`expr $ac_mid + 1`
8689 if test $ac_lo -le $ac_mid; then
8690 ac_lo= ac_hi=
8691 break
8692 fi
8693 ac_mid=`expr 2 '*' $ac_mid + 1`
8694fi
8695rm -f conftest.$ac_objext conftest.$ac_ext
8696 done
8697else
8698 echo "$as_me: failed program was:" >&5
8699cat conftest.$ac_ext >&5
8700cat >conftest.$ac_ext <<_ACEOF
8701#line $LINENO "configure"
8702#include "confdefs.h"
8703$ac_includes_default
8704#ifdef F77_DUMMY_MAIN
8705# ifdef __cplusplus
8706 extern "C"
8707# endif
8708 int F77_DUMMY_MAIN() { return 1; }
8709#endif
8710int
8711main ()
8712{
8713static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8714test_array [0] = 0
8715
8716 ;
8717 return 0;
8718}
8719_ACEOF
8720rm -f conftest.$ac_objext
8721if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8722 (eval $ac_compile) 2>&5
8723 ac_status=$?
8724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8725 (exit $ac_status); } &&
8726 { ac_try='test -s conftest.$ac_objext'
8727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8728 (eval $ac_try) 2>&5
8729 ac_status=$?
8730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8731 (exit $ac_status); }; }; then
8732 ac_hi=-1 ac_mid=-1
8733 while :; do
8734 cat >conftest.$ac_ext <<_ACEOF
8735#line $LINENO "configure"
8736#include "confdefs.h"
8737$ac_includes_default
8738#ifdef F77_DUMMY_MAIN
8739# ifdef __cplusplus
8740 extern "C"
8741# endif
8742 int F77_DUMMY_MAIN() { return 1; }
8743#endif
8744int
8745main ()
8746{
8747static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8748test_array [0] = 0
8749
8750 ;
8751 return 0;
8752}
8753_ACEOF
8754rm -f conftest.$ac_objext
8755if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8756 (eval $ac_compile) 2>&5
8757 ac_status=$?
8758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8759 (exit $ac_status); } &&
8760 { ac_try='test -s conftest.$ac_objext'
8761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8762 (eval $ac_try) 2>&5
8763 ac_status=$?
8764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8765 (exit $ac_status); }; }; then
8766 ac_lo=$ac_mid; break
8767else
8768 echo "$as_me: failed program was:" >&5
8769cat conftest.$ac_ext >&5
8770ac_hi=`expr '(' $ac_mid ')' - 1`
8771 if test $ac_mid -le $ac_hi; then
8772 ac_lo= ac_hi=
8773 break
8774 fi
8775 ac_mid=`expr 2 '*' $ac_mid`
8776fi
8777rm -f conftest.$ac_objext conftest.$ac_ext
8778 done
8779else
8780 echo "$as_me: failed program was:" >&5
8781cat conftest.$ac_ext >&5
8782ac_lo= ac_hi=
8783fi
8784rm -f conftest.$ac_objext conftest.$ac_ext
8785fi
8786rm -f conftest.$ac_objext conftest.$ac_ext
8787# Binary search between lo and hi bounds.
8788while test "x$ac_lo" != "x$ac_hi"; do
8789 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8790 cat >conftest.$ac_ext <<_ACEOF
8791#line $LINENO "configure"
8792#include "confdefs.h"
8793$ac_includes_default
8794#ifdef F77_DUMMY_MAIN
8795# ifdef __cplusplus
8796 extern "C"
8797# endif
8798 int F77_DUMMY_MAIN() { return 1; }
8799#endif
8800int
8801main ()
8802{
8803static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8804test_array [0] = 0
8805
8806 ;
8807 return 0;
8808}
8809_ACEOF
8810rm -f conftest.$ac_objext
8811if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8812 (eval $ac_compile) 2>&5
8813 ac_status=$?
8814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8815 (exit $ac_status); } &&
8816 { ac_try='test -s conftest.$ac_objext'
8817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8818 (eval $ac_try) 2>&5
8819 ac_status=$?
8820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8821 (exit $ac_status); }; }; then
8822 ac_hi=$ac_mid
8823else
8824 echo "$as_me: failed program was:" >&5
8825cat conftest.$ac_ext >&5
8826ac_lo=`expr '(' $ac_mid ')' + 1`
8827fi
8828rm -f conftest.$ac_objext conftest.$ac_ext
8829done
8830case $ac_lo in
8831?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8832'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8833echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8834 { (exit 1); exit 1; }; } ;;
8835esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008836else
8837 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008838 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8839echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8840 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008841else
Martin v. Löwis11437992002-04-12 09:54:03 +00008842 cat >conftest.$ac_ext <<_ACEOF
8843#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008844#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008845$ac_includes_default
8846long longval () { return (long) (sizeof (uintptr_t)); }
8847unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008848#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008849#include <stdlib.h>
8850#ifdef F77_DUMMY_MAIN
8851# ifdef __cplusplus
8852 extern "C"
8853# endif
8854 int F77_DUMMY_MAIN() { return 1; }
8855#endif
8856int
8857main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008858{
Martin v. Löwis11437992002-04-12 09:54:03 +00008859
8860 FILE *f = fopen ("conftest.val", "w");
8861 if (! f)
8862 exit (1);
8863 if (((long) (sizeof (uintptr_t))) < 0)
8864 {
8865 long i = longval ();
8866 if (i != ((long) (sizeof (uintptr_t))))
8867 exit (1);
8868 fprintf (f, "%ld\n", i);
8869 }
8870 else
8871 {
8872 unsigned long i = ulongval ();
8873 if (i != ((long) (sizeof (uintptr_t))))
8874 exit (1);
8875 fprintf (f, "%lu\n", i);
8876 }
8877 exit (ferror (f) || fclose (f) != 0);
8878
8879 ;
8880 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008881}
Martin v. Löwis11437992002-04-12 09:54:03 +00008882_ACEOF
8883rm -f conftest$ac_exeext
8884if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8885 (eval $ac_link) 2>&5
8886 ac_status=$?
8887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8888 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8890 (eval $ac_try) 2>&5
8891 ac_status=$?
8892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8893 (exit $ac_status); }; }; then
8894 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008895else
Martin v. Löwis11437992002-04-12 09:54:03 +00008896 echo "$as_me: program exited with status $ac_status" >&5
8897echo "$as_me: failed program was:" >&5
8898cat conftest.$ac_ext >&5
8899( exit $ac_status )
8900{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8901echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8902 { (exit 1); exit 1; }; }
8903fi
8904rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8905fi
8906fi
8907rm -f conftest.val
8908else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008909 ac_cv_sizeof_uintptr_t=0
8910fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008911fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008912echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8913echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8914cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008915#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008916_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008917
Michael W. Hudson54241132001-12-07 15:38:26 +00008918
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008919fi
8920
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008921# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008922echo "$as_me:$LINENO: checking size of off_t" >&5
8923echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8924if test "${ac_cv_sizeof_off_t+set}" = set; then
8925 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008926else
8927 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008928 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008929else
Martin v. Löwis11437992002-04-12 09:54:03 +00008930 cat >conftest.$ac_ext <<_ACEOF
8931#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008932#include "confdefs.h"
8933#include <stdio.h>
8934#include <sys/types.h>
8935main()
8936{
8937 FILE *f=fopen("conftestval", "w");
8938 if (!f) exit(1);
8939 fprintf(f, "%d\n", sizeof(off_t));
8940 exit(0);
8941}
Martin v. Löwis11437992002-04-12 09:54:03 +00008942_ACEOF
8943rm -f conftest$ac_exeext
8944if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8945 (eval $ac_link) 2>&5
8946 ac_status=$?
8947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8948 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8950 (eval $ac_try) 2>&5
8951 ac_status=$?
8952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8953 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008954 ac_cv_sizeof_off_t=`cat conftestval`
8955else
Martin v. Löwis11437992002-04-12 09:54:03 +00008956 echo "$as_me: program exited with status $ac_status" >&5
8957echo "$as_me: failed program was:" >&5
8958cat conftest.$ac_ext >&5
8959( exit $ac_status )
8960ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008961fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008962rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008963fi
8964
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008965fi
8966
Martin v. Löwis11437992002-04-12 09:54:03 +00008967echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8968echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8969
8970cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008971#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008972_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008973
Michael W. Hudson54241132001-12-07 15:38:26 +00008974
Martin v. Löwis11437992002-04-12 09:54:03 +00008975echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8976echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008977if test "$have_long_long" = yes -a \
8978 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8979 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008980
Martin v. Löwis11437992002-04-12 09:54:03 +00008981cat >>confdefs.h <<\_ACEOF
8982#define HAVE_LARGEFILE_SUPPORT 1
8983_ACEOF
8984
8985 echo "$as_me:$LINENO: result: yes" >&5
8986echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008987else
Martin v. Löwis11437992002-04-12 09:54:03 +00008988 echo "$as_me:$LINENO: result: no" >&5
8989echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008990fi
8991
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008992# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008993echo "$as_me:$LINENO: checking size of time_t" >&5
8994echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8995if test "${ac_cv_sizeof_time_t+set}" = set; then
8996 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008997else
8998 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008999 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009000else
Martin v. Löwis11437992002-04-12 09:54:03 +00009001 cat >conftest.$ac_ext <<_ACEOF
9002#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009003#include "confdefs.h"
9004#include <stdio.h>
9005#include <time.h>
9006main()
9007{
9008 FILE *f=fopen("conftestval", "w");
9009 if (!f) exit(1);
9010 fprintf(f, "%d\n", sizeof(time_t));
9011 exit(0);
9012}
Martin v. Löwis11437992002-04-12 09:54:03 +00009013_ACEOF
9014rm -f conftest$ac_exeext
9015if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9016 (eval $ac_link) 2>&5
9017 ac_status=$?
9018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9019 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9021 (eval $ac_try) 2>&5
9022 ac_status=$?
9023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9024 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009025 ac_cv_sizeof_time_t=`cat conftestval`
9026else
Martin v. Löwis11437992002-04-12 09:54:03 +00009027 echo "$as_me: program exited with status $ac_status" >&5
9028echo "$as_me: failed program was:" >&5
9029cat conftest.$ac_ext >&5
9030( exit $ac_status )
9031ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009032fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009033rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009034fi
9035
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009036fi
9037
Martin v. Löwis11437992002-04-12 09:54:03 +00009038echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9039echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9040
9041cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009042#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009043_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009044
Michael W. Hudson54241132001-12-07 15:38:26 +00009045
9046
Trent Mick635f6fb2000-08-23 21:33:05 +00009047# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009048ac_save_cc="$CC"
9049if test "$ac_cv_kpthread" = "yes"
9050then CC="$CC -Kpthread"
9051fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009052echo "$as_me:$LINENO: checking for pthread_t" >&5
9053echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009054have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009055cat >conftest.$ac_ext <<_ACEOF
9056#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009057#include "confdefs.h"
9058#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009059#ifdef F77_DUMMY_MAIN
9060# ifdef __cplusplus
9061 extern "C"
9062# endif
9063 int F77_DUMMY_MAIN() { return 1; }
9064#endif
9065int
9066main ()
9067{
Guido van Rossum12580492000-09-24 16:47:19 +00009068pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009069 ;
9070 return 0;
9071}
9072_ACEOF
9073rm -f conftest.$ac_objext
9074if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9075 (eval $ac_compile) 2>&5
9076 ac_status=$?
9077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9078 (exit $ac_status); } &&
9079 { ac_try='test -s conftest.$ac_objext'
9080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9081 (eval $ac_try) 2>&5
9082 ac_status=$?
9083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9084 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009085 have_pthread_t=yes
9086else
Martin v. Löwis11437992002-04-12 09:54:03 +00009087 echo "$as_me: failed program was:" >&5
9088cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009089fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009090rm -f conftest.$ac_objext conftest.$ac_ext
9091echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9092echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009093if test "$have_pthread_t" = yes ; then
9094 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009095 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9096echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9097 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9098 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009099else
9100 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009101 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009102else
Martin v. Löwis11437992002-04-12 09:54:03 +00009103 cat >conftest.$ac_ext <<_ACEOF
9104#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009105#include "confdefs.h"
9106#include <stdio.h>
9107 #include <pthread.h>
9108 main()
9109 {
9110 FILE *f=fopen("conftestval", "w");
9111 if (!f) exit(1);
9112 fprintf(f, "%d\n", sizeof(pthread_t));
9113 exit(0);
9114 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009115_ACEOF
9116rm -f conftest$ac_exeext
9117if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9118 (eval $ac_link) 2>&5
9119 ac_status=$?
9120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9121 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9123 (eval $ac_try) 2>&5
9124 ac_status=$?
9125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9126 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009127 ac_cv_sizeof_pthread_t=`cat conftestval`
9128else
Martin v. Löwis11437992002-04-12 09:54:03 +00009129 echo "$as_me: program exited with status $ac_status" >&5
9130echo "$as_me: failed program was:" >&5
9131cat conftest.$ac_ext >&5
9132( exit $ac_status )
9133ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009134fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009135rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009136fi
9137
Trent Mick635f6fb2000-08-23 21:33:05 +00009138fi
9139
Martin v. Löwis11437992002-04-12 09:54:03 +00009140 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9141echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9142
9143cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009144#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009145_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009146
9147fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009148CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009149
Martin v. Löwis11437992002-04-12 09:54:03 +00009150echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9151echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009152# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9153if test "${enable_toolbox_glue+set}" = set; then
9154 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009155
Martin v. Löwis11437992002-04-12 09:54:03 +00009156fi;
Jack Jansene578a632001-08-15 01:27:14 +00009157
9158if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009159then
Jack Jansene578a632001-08-15 01:27:14 +00009160 case $ac_sys_system/$ac_sys_release in
9161 Darwin/*)
9162 enable_toolbox_glue="yes";;
9163 *)
9164 enable_toolbox_glue="no";;
9165 esac
9166fi
9167case "$enable_toolbox_glue" in
9168yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009169 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009170 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009171 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009172
9173cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009174#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009175_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009176
9177 ;;
9178*)
9179 extra_frameworks=""
9180 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009181 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009182 ;;
9183esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009184echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9185echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009186
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009187
9188case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009189 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009190 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009191 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009192 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9193 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009194 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009195 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009196 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009197 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9198 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009199esac
9200
Martin v. Löwis11437992002-04-12 09:54:03 +00009201echo "$as_me:$LINENO: checking for --enable-framework" >&5
9202echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009203if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009204then
Jack Jansenca06bc62001-08-03 15:32:23 +00009205 OPT="$OPT -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009206 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009207 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009208 LDFLAGS="$LDFLAGS -Wl,-F."
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_NEXT_FRAMEWORK 1
9212_ACEOF
9213
9214 echo "$as_me:$LINENO: result: yes" >&5
9215echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009216else
Martin v. Löwis11437992002-04-12 09:54:03 +00009217 echo "$as_me:$LINENO: result: no" >&5
9218echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009219fi
9220
Martin v. Löwis11437992002-04-12 09:54:03 +00009221echo "$as_me:$LINENO: checking for dyld" >&5
9222echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009223case $ac_sys_system/$ac_sys_release in
9224 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009225
Martin v. Löwis11437992002-04-12 09:54:03 +00009226cat >>confdefs.h <<\_ACEOF
9227#define WITH_DYLD 1
9228_ACEOF
9229
9230 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9231echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009232 ;;
9233 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009234 echo "$as_me:$LINENO: result: no" >&5
9235echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009236 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009237esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009238
Guido van Rossum0a516c91994-09-12 10:58:40 +00009239# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009240
Michael W. Hudson54241132001-12-07 15:38:26 +00009241
9242
9243
9244
Guido van Rossum0a516c91994-09-12 10:58:40 +00009245# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009246# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009247echo "$as_me:$LINENO: checking SO" >&5
9248echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009249if test -z "$SO"
9250then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009251 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009252 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009253 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009254 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009255 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009256fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009257echo "$as_me:$LINENO: result: $SO" >&5
9258echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009259# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009260# -- "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 +00009261# (Shared libraries in this instance are shared modules to be loaded into
9262# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009263echo "$as_me:$LINENO: checking LDSHARED" >&5
9264echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009265if test -z "$LDSHARED"
9266then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009267 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009268 AIX*)
9269 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009270 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009271 ;;
9272 BeOS*)
9273 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009274 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009275 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009276 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009277 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009278 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009279 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009280 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009281 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009282 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009283 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009284 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009285 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9286 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009287 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009288 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9289 if test "$enable_framework" ; then
9290 # Link against the framework. All externals should be defined.
9291 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9292 else
9293 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009294 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009295 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009296 Darwin/*)
9297 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9298 if test "$enable_framework" ; then
9299 # Link against the framework. All externals should be defined.
9300 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9301 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009302 # No framework, use the Python app as bundle-loader
9303 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9304 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009305 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009306 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009307 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009308 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009309 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009310 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009311 then
9312 LDSHARED="cc -shared ${LDFLAGS}"
9313 else
9314 LDSHARED="ld -Bshareable ${LDFLAGS}"
9315 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009316 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009317 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009318 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009319 then LDSHARED='$(CC) -shared'
9320 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009321 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009322 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009323 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009324 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009325 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009326 *) LDSHARED="ld";;
9327 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009328fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009329echo "$as_me:$LINENO: result: $LDSHARED" >&5
9330echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009331BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009332# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009333# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009334echo "$as_me:$LINENO: checking CCSHARED" >&5
9335echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009336if test -z "$CCSHARED"
9337then
Guido van Rossum07397971997-04-29 21:49:50 +00009338 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009339 SunOS*) if test "$GCC" = yes;
9340 then CCSHARED="-fPIC";
9341 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009342 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009343 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009344 else CCSHARED="+z";
9345 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009346 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009347 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009348 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009349 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009350 if test "$GCC" = "yes"
9351 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009352 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009353 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009354 SCO_SV*)
9355 if test "$GCC" = "yes"
9356 then CCSHARED="-fPIC"
9357 else CCSHARED="-Kpic -belf"
9358 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009359 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009360 IRIX*/6*) case $CC in
9361 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009362 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009363 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009364 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009365 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009366fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009367echo "$as_me:$LINENO: result: $CCSHARED" >&5
9368echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009369# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009370# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009371echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9372echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009373if test -z "$LINKFORSHARED"
9374then
Guido van Rossum07397971997-04-29 21:49:50 +00009375 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009376 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009377 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009378 LINKFORSHARED="-Wl,-E -Wl,+s";;
9379# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009380 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009381 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009382 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009383 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009384 # -u __dummy makes the linker aware of the objc runtime
9385 # in System.framework; otherwise, __objcInit (referenced in
9386 # crt1.o) gets erroneously defined as common, which breaks dynamic
9387 # loading of any modules which reference it in System.framework.
9388 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9389 # not used by the core itself but which needs to be in the core so
9390 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00009391 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009392 if test "$enable_framework"
9393 then
9394 LINKFORSHARED="$LINKFORSHARED -framework Python"
9395 fi
9396 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009397 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009398 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009399 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009400 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009401 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9402 then
9403 LINKFORSHARED="-Wl,--export-dynamic"
9404 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009405 SunOS/5*) case $CC in
9406 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009407 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009408 then
9409 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009410 fi;;
9411 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009412 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009413fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009414echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9415echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009416
Michael W. Hudson54241132001-12-07 15:38:26 +00009417
Martin v. Löwis11437992002-04-12 09:54:03 +00009418echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9419echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009420if test ! "$LIBRARY" = "$LDLIBRARY"
9421then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009422 case $ac_sys_system in
9423 CYGWIN*)
9424 # Cygwin needs CCSHARED when building extension DLLs
9425 # but not when building the interpreter DLL.
9426 CFLAGSFORSHARED='';;
9427 *)
9428 CFLAGSFORSHARED='$(CCSHARED)'
9429 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009430fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009431echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9432echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009433
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009434# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9435# library (with --enable-shared).
9436# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009437# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9438# if it is not required, since it creates a dependency of the shared library
9439# to LIBS. This, in turn, means that applications linking the shared libpython
9440# don't need to link LIBS explicitly. The default should be only changed
9441# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009442
9443echo "$as_me:$LINENO: checking SHLIBS" >&5
9444echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9445case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009446 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009447 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009448esac
9449echo "$as_me:$LINENO: result: $SHLIBS" >&5
9450echo "${ECHO_T}$SHLIBS" >&6
9451
9452
Guido van Rossum627b2d71993-12-24 10:39:16 +00009453# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009454
9455echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9456echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9457if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9458 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009459else
Martin v. Löwis11437992002-04-12 09:54:03 +00009460 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009461LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009462cat >conftest.$ac_ext <<_ACEOF
9463#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009464#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009465
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009466/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009467#ifdef __cplusplus
9468extern "C"
9469#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009470/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009471 builtin and then its argument prototype would still apply. */
9472char dlopen ();
9473#ifdef F77_DUMMY_MAIN
9474# ifdef __cplusplus
9475 extern "C"
9476# endif
9477 int F77_DUMMY_MAIN() { return 1; }
9478#endif
9479int
9480main ()
9481{
9482dlopen ();
9483 ;
9484 return 0;
9485}
9486_ACEOF
9487rm -f conftest.$ac_objext conftest$ac_exeext
9488if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9489 (eval $ac_link) 2>&5
9490 ac_status=$?
9491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9492 (exit $ac_status); } &&
9493 { ac_try='test -s conftest$ac_exeext'
9494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9495 (eval $ac_try) 2>&5
9496 ac_status=$?
9497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9498 (exit $ac_status); }; }; then
9499 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009500else
Martin v. Löwis11437992002-04-12 09:54:03 +00009501 echo "$as_me: failed program was:" >&5
9502cat conftest.$ac_ext >&5
9503ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009504fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009505rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9506LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009507fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009508echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9509echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9510if test $ac_cv_lib_dl_dlopen = yes; then
9511 cat >>confdefs.h <<_ACEOF
9512#define HAVE_LIBDL 1
9513_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009514
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009515 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009516
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009517fi
9518 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009519
9520echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9521echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9522if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9523 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009524else
Martin v. Löwis11437992002-04-12 09:54:03 +00009525 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009526LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009527cat >conftest.$ac_ext <<_ACEOF
9528#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009529#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009530
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009531/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009532#ifdef __cplusplus
9533extern "C"
9534#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009535/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009536 builtin and then its argument prototype would still apply. */
9537char shl_load ();
9538#ifdef F77_DUMMY_MAIN
9539# ifdef __cplusplus
9540 extern "C"
9541# endif
9542 int F77_DUMMY_MAIN() { return 1; }
9543#endif
9544int
9545main ()
9546{
9547shl_load ();
9548 ;
9549 return 0;
9550}
9551_ACEOF
9552rm -f conftest.$ac_objext conftest$ac_exeext
9553if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9554 (eval $ac_link) 2>&5
9555 ac_status=$?
9556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9557 (exit $ac_status); } &&
9558 { ac_try='test -s conftest$ac_exeext'
9559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9560 (eval $ac_try) 2>&5
9561 ac_status=$?
9562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9563 (exit $ac_status); }; }; then
9564 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009565else
Martin v. Löwis11437992002-04-12 09:54:03 +00009566 echo "$as_me: failed program was:" >&5
9567cat conftest.$ac_ext >&5
9568ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009569fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009570rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9571LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009572fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009573echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9574echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9575if test $ac_cv_lib_dld_shl_load = yes; then
9576 cat >>confdefs.h <<_ACEOF
9577#define HAVE_LIBDLD 1
9578_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009579
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009580 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009581
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009582fi
9583 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009584echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9585echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9586if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009587 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009588else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009589 ac_func_search_save_LIBS=$LIBS
9590ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009591cat >conftest.$ac_ext <<_ACEOF
9592#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009593#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009594
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009595/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009596#ifdef __cplusplus
9597extern "C"
9598#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009599/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009600 builtin and then its argument prototype would still apply. */
9601char sem_init ();
9602#ifdef F77_DUMMY_MAIN
9603# ifdef __cplusplus
9604 extern "C"
9605# endif
9606 int F77_DUMMY_MAIN() { return 1; }
9607#endif
9608int
9609main ()
9610{
9611sem_init ();
9612 ;
9613 return 0;
9614}
9615_ACEOF
9616rm -f conftest.$ac_objext conftest$ac_exeext
9617if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9618 (eval $ac_link) 2>&5
9619 ac_status=$?
9620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9621 (exit $ac_status); } &&
9622 { ac_try='test -s conftest$ac_exeext'
9623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9624 (eval $ac_try) 2>&5
9625 ac_status=$?
9626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9627 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009628 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009629else
Martin v. Löwis11437992002-04-12 09:54:03 +00009630 echo "$as_me: failed program was:" >&5
9631cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009632fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009633rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009634if test "$ac_cv_search_sem_init" = no; then
9635 for ac_lib in rt posix4; do
9636 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9637 cat >conftest.$ac_ext <<_ACEOF
9638#line $LINENO "configure"
9639#include "confdefs.h"
9640
9641/* Override any gcc2 internal prototype to avoid an error. */
9642#ifdef __cplusplus
9643extern "C"
9644#endif
9645/* We use char because int might match the return type of a gcc2
9646 builtin and then its argument prototype would still apply. */
9647char sem_init ();
9648#ifdef F77_DUMMY_MAIN
9649# ifdef __cplusplus
9650 extern "C"
9651# endif
9652 int F77_DUMMY_MAIN() { return 1; }
9653#endif
9654int
9655main ()
9656{
9657sem_init ();
9658 ;
9659 return 0;
9660}
Martin v. Löwis11437992002-04-12 09:54:03 +00009661_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009662rm -f conftest.$ac_objext conftest$ac_exeext
9663if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9664 (eval $ac_link) 2>&5
9665 ac_status=$?
9666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9667 (exit $ac_status); } &&
9668 { ac_try='test -s conftest$ac_exeext'
9669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9670 (eval $ac_try) 2>&5
9671 ac_status=$?
9672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9673 (exit $ac_status); }; }; then
9674 ac_cv_search_sem_init="-l$ac_lib"
9675break
9676else
9677 echo "$as_me: failed program was:" >&5
9678cat conftest.$ac_ext >&5
9679fi
9680rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9681 done
9682fi
9683LIBS=$ac_func_search_save_LIBS
9684fi
9685echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9686echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9687if test "$ac_cv_search_sem_init" != no; then
9688 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009689
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009690fi
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009691 # 'Real Time' functions on Solaris,
9692 # posix4 on Solaris 2.6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009693
9694# checks for system dependent C++ extensions support
9695case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009696 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9697echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9698 cat >conftest.$ac_ext <<_ACEOF
9699#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009700#include "confdefs.h"
9701#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009702#ifdef F77_DUMMY_MAIN
9703# ifdef __cplusplus
9704 extern "C"
9705# endif
9706 int F77_DUMMY_MAIN() { return 1; }
9707#endif
9708int
9709main ()
9710{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009711loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009712 ;
9713 return 0;
9714}
9715_ACEOF
9716rm -f conftest.$ac_objext conftest$ac_exeext
9717if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9718 (eval $ac_link) 2>&5
9719 ac_status=$?
9720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9721 (exit $ac_status); } &&
9722 { ac_try='test -s conftest$ac_exeext'
9723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9724 (eval $ac_try) 2>&5
9725 ac_status=$?
9726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9727 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009728
Martin v. Löwis11437992002-04-12 09:54:03 +00009729cat >>confdefs.h <<\_ACEOF
9730#define AIX_GENUINE_CPLUSPLUS 1
9731_ACEOF
9732
9733 echo "$as_me:$LINENO: result: yes" >&5
9734echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009735else
Martin v. Löwis11437992002-04-12 09:54:03 +00009736 echo "$as_me: failed program was:" >&5
9737cat conftest.$ac_ext >&5
9738echo "$as_me:$LINENO: result: no" >&5
9739echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009740fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009741rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009742 *) ;;
9743esac
9744
Guido van Rossum70c7f481998-03-26 18:44:10 +00009745# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009746# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009747# BeOS' sockets are stashed in libnet.
9748case "$ac_sys_system" in
9749IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009750*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009751echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9752echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9753if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9754 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009755else
Martin v. Löwis11437992002-04-12 09:54:03 +00009756 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009757LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009758cat >conftest.$ac_ext <<_ACEOF
9759#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009760#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009761
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009762/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009763#ifdef __cplusplus
9764extern "C"
9765#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009766/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009767 builtin and then its argument prototype would still apply. */
9768char t_open ();
9769#ifdef F77_DUMMY_MAIN
9770# ifdef __cplusplus
9771 extern "C"
9772# endif
9773 int F77_DUMMY_MAIN() { return 1; }
9774#endif
9775int
9776main ()
9777{
9778t_open ();
9779 ;
9780 return 0;
9781}
9782_ACEOF
9783rm -f conftest.$ac_objext conftest$ac_exeext
9784if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9785 (eval $ac_link) 2>&5
9786 ac_status=$?
9787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9788 (exit $ac_status); } &&
9789 { ac_try='test -s conftest$ac_exeext'
9790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9791 (eval $ac_try) 2>&5
9792 ac_status=$?
9793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9794 (exit $ac_status); }; }; then
9795 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009796else
Martin v. Löwis11437992002-04-12 09:54:03 +00009797 echo "$as_me: failed program was:" >&5
9798cat conftest.$ac_ext >&5
9799ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009800fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009801rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9802LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009803fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009804echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9805echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9806if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009807 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009808fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009809 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009810echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9811echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9812if test "${ac_cv_lib_socket_socket+set}" = set; then
9813 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009814else
Martin v. Löwis11437992002-04-12 09:54:03 +00009815 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009816LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009817cat >conftest.$ac_ext <<_ACEOF
9818#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009819#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009820
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009821/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009822#ifdef __cplusplus
9823extern "C"
9824#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009825/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 builtin and then its argument prototype would still apply. */
9827char socket ();
9828#ifdef F77_DUMMY_MAIN
9829# ifdef __cplusplus
9830 extern "C"
9831# endif
9832 int F77_DUMMY_MAIN() { return 1; }
9833#endif
9834int
9835main ()
9836{
9837socket ();
9838 ;
9839 return 0;
9840}
9841_ACEOF
9842rm -f conftest.$ac_objext conftest$ac_exeext
9843if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9844 (eval $ac_link) 2>&5
9845 ac_status=$?
9846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9847 (exit $ac_status); } &&
9848 { ac_try='test -s conftest$ac_exeext'
9849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9850 (eval $ac_try) 2>&5
9851 ac_status=$?
9852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9853 (exit $ac_status); }; }; then
9854 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009855else
Martin v. Löwis11437992002-04-12 09:54:03 +00009856 echo "$as_me: failed program was:" >&5
9857cat conftest.$ac_ext >&5
9858ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009859fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009860rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9861LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009862fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009863echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9864echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9865if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009866 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009867fi
9868 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009869;;
9870esac
9871case "$ac_sys_system" in
9872BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009873echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9874echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9875if test "${ac_cv_lib_net_socket+set}" = set; then
9876 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009877else
Martin v. Löwis11437992002-04-12 09:54:03 +00009878 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009879LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009880cat >conftest.$ac_ext <<_ACEOF
9881#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009882#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009883
Guido van Rossumad678af1998-10-02 14:42:15 +00009884/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009885#ifdef __cplusplus
9886extern "C"
9887#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009888/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009889 builtin and then its argument prototype would still apply. */
9890char socket ();
9891#ifdef F77_DUMMY_MAIN
9892# ifdef __cplusplus
9893 extern "C"
9894# endif
9895 int F77_DUMMY_MAIN() { return 1; }
9896#endif
9897int
9898main ()
9899{
9900socket ();
9901 ;
9902 return 0;
9903}
9904_ACEOF
9905rm -f conftest.$ac_objext conftest$ac_exeext
9906if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9907 (eval $ac_link) 2>&5
9908 ac_status=$?
9909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9910 (exit $ac_status); } &&
9911 { ac_try='test -s conftest$ac_exeext'
9912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9913 (eval $ac_try) 2>&5
9914 ac_status=$?
9915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9916 (exit $ac_status); }; }; then
9917 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009918else
Martin v. Löwis11437992002-04-12 09:54:03 +00009919 echo "$as_me: failed program was:" >&5
9920cat conftest.$ac_ext >&5
9921ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009922fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009923rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9924LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009925fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009926echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9927echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9928if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009929 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009930fi
9931 # BeOS
9932;;
9933esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009934
Martin v. Löwis11437992002-04-12 09:54:03 +00009935echo "$as_me:$LINENO: checking for --with-libs" >&5
9936echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9937
Guido van Rossuma68acba1996-07-31 17:36:39 +00009938# Check whether --with-libs or --without-libs was given.
9939if test "${with_libs+set}" = set; then
9940 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009941
9942echo "$as_me:$LINENO: result: $withval" >&5
9943echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009944LIBS="$withval $LIBS"
9945
9946else
Martin v. Löwis11437992002-04-12 09:54:03 +00009947 echo "$as_me:$LINENO: result: no" >&5
9948echo "${ECHO_T}no" >&6
9949fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009950
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009951# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009952
9953
Martin v. Löwis11437992002-04-12 09:54:03 +00009954echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9955echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9956
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009957# Check whether --with-signal-module or --without-signal-module was given.
9958if test "${with_signal_module+set}" = set; then
9959 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009960
Martin v. Löwis11437992002-04-12 09:54:03 +00009961fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009962
9963if test -z "$with_signal_module"
9964then with_signal_module="yes"
9965fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009966echo "$as_me:$LINENO: result: $with_signal_module" >&5
9967echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009968
9969if test "${with_signal_module}" = "yes"; then
9970 USE_SIGNAL_MODULE=""
9971 SIGNAL_OBJS=""
9972else
9973 USE_SIGNAL_MODULE="#"
9974 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9975fi
9976
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009977# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009978
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009979USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009980
Martin v. Löwis11437992002-04-12 09:54:03 +00009981echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9982echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9983
Guido van Rossumec2f0731997-01-22 20:54:01 +00009984
9985# Check whether --with-dec-threads or --without-dec-threads was given.
9986if test "${with_dec_threads+set}" = set; then
9987 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009988
9989echo "$as_me:$LINENO: result: $withval" >&5
9990echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009991LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009992if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009993 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009994fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009995else
Martin v. Löwis11437992002-04-12 09:54:03 +00009996 echo "$as_me:$LINENO: result: no" >&5
9997echo "${ECHO_T}no" >&6
9998fi;
9999
10000# Templates for things AC_DEFINEd more than once.
10001# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010002
10003
Martin v. Löwis11437992002-04-12 09:54:03 +000010004
10005
10006
10007
10008
10009echo "$as_me:$LINENO: checking for --with-threads" >&5
10010echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10011
Guido van Rossumec2f0731997-01-22 20:54:01 +000010012# Check whether --with-threads or --without-threads was given.
10013if test "${with_threads+set}" = set; then
10014 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010015
Martin v. Löwis11437992002-04-12 09:54:03 +000010016fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010017
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010018# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010019
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010020# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010021if test "${with_thread+set}" = set; then
10022 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010023 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010024fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010025
10026if test -z "$with_threads"
10027then with_threads="yes"
10028fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010029echo "$as_me:$LINENO: result: $with_threads" >&5
10030echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010031
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010032
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010033if test "$with_threads" = "no"
10034then
10035 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010036elif test "$ac_cv_pthread_is_default" = yes
10037then
Martin v. Löwis11437992002-04-12 09:54:03 +000010038 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010039#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010040_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010041
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010042 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010043 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010044#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010045_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010046
10047 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010049elif test "$ac_cv_kpthread" = "yes"
10050then
10051 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010052 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010053#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010054_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010055
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010056 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010057 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010058else
10059 if test ! -z "$with_threads" -a -d "$with_threads"
10060 then LDFLAGS="$LDFLAGS -L$with_threads"
10061 fi
10062 if test ! -z "$withval" -a -d "$withval"
10063 then LDFLAGS="$LDFLAGS -L$withval"
10064 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010065
10066 # According to the POSIX spec, a pthreads implementation must
10067 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010068 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10069echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10070 cat >conftest.$ac_ext <<_ACEOF
10071#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010072#include "confdefs.h"
10073#include <unistd.h>
10074 #ifdef _POSIX_THREADS
10075 yes
10076 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010077
10078_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010079if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10080 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010081 unistd_defines_pthreads=yes
10082else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010083 unistd_defines_pthreads=no
10084fi
10085rm -f conftest*
10086
Martin v. Löwis11437992002-04-12 09:54:03 +000010087 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10088echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010089
Martin v. Löwis11437992002-04-12 09:54:03 +000010090 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010091#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010092_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010093
Martin v. Löwis11437992002-04-12 09:54:03 +000010094 if test "${ac_cv_header_cthreads_h+set}" = set; then
10095 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10096echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10097if test "${ac_cv_header_cthreads_h+set}" = set; then
10098 echo $ECHO_N "(cached) $ECHO_C" >&6
10099fi
10100echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10101echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010102else
Martin v. Löwis11437992002-04-12 09:54:03 +000010103 # Is the header compilable?
10104echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10105echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10106cat >conftest.$ac_ext <<_ACEOF
10107#line $LINENO "configure"
10108#include "confdefs.h"
10109$ac_includes_default
10110#include <cthreads.h>
10111_ACEOF
10112rm -f conftest.$ac_objext
10113if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10114 (eval $ac_compile) 2>&5
10115 ac_status=$?
10116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10117 (exit $ac_status); } &&
10118 { ac_try='test -s conftest.$ac_objext'
10119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10120 (eval $ac_try) 2>&5
10121 ac_status=$?
10122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10123 (exit $ac_status); }; }; then
10124 ac_header_compiler=yes
10125else
10126 echo "$as_me: failed program was:" >&5
10127cat conftest.$ac_ext >&5
10128ac_header_compiler=no
10129fi
10130rm -f conftest.$ac_objext conftest.$ac_ext
10131echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10132echo "${ECHO_T}$ac_header_compiler" >&6
10133
10134# Is the header present?
10135echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10136echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10137cat >conftest.$ac_ext <<_ACEOF
10138#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010139#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010140#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010141_ACEOF
10142if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10143 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10144 ac_status=$?
10145 egrep -v '^ *\+' conftest.er1 >conftest.err
10146 rm -f conftest.er1
10147 cat conftest.err >&5
10148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10149 (exit $ac_status); } >/dev/null; then
10150 if test -s conftest.err; then
10151 ac_cpp_err=$ac_c_preproc_warn_flag
10152 else
10153 ac_cpp_err=
10154 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010155else
Martin v. Löwis11437992002-04-12 09:54:03 +000010156 ac_cpp_err=yes
10157fi
10158if test -z "$ac_cpp_err"; then
10159 ac_header_preproc=yes
10160else
10161 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010162 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010163 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010164fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010165rm -f conftest.err conftest.$ac_ext
10166echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10167echo "${ECHO_T}$ac_header_preproc" >&6
10168
10169# So? What about this header?
10170case $ac_header_compiler:$ac_header_preproc in
10171 yes:no )
10172 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10173echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10174 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10175echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10176 no:yes )
10177 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10178echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10179 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10180echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10181 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10182echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10183esac
10184echo "$as_me:$LINENO: checking for cthreads.h" >&5
10185echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10186if test "${ac_cv_header_cthreads_h+set}" = set; then
10187 echo $ECHO_N "(cached) $ECHO_C" >&6
10188else
10189 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010190fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010191echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10192echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10193
10194fi
10195if test $ac_cv_header_cthreads_h = yes; then
10196 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010197#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010198_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010199
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010201#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010202_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010203
Martin v. Löwis11437992002-04-12 09:54:03 +000010204
10205cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010206#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010207_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010208
10209 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010210 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010211else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010212
Martin v. Löwis11437992002-04-12 09:54:03 +000010213 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10214 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10215echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10216if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10217 echo $ECHO_N "(cached) $ECHO_C" >&6
10218fi
10219echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10220echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010221else
Martin v. Löwis11437992002-04-12 09:54:03 +000010222 # Is the header compilable?
10223echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10224echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10225cat >conftest.$ac_ext <<_ACEOF
10226#line $LINENO "configure"
10227#include "confdefs.h"
10228$ac_includes_default
10229#include <mach/cthreads.h>
10230_ACEOF
10231rm -f conftest.$ac_objext
10232if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10233 (eval $ac_compile) 2>&5
10234 ac_status=$?
10235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10236 (exit $ac_status); } &&
10237 { ac_try='test -s conftest.$ac_objext'
10238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10239 (eval $ac_try) 2>&5
10240 ac_status=$?
10241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10242 (exit $ac_status); }; }; then
10243 ac_header_compiler=yes
10244else
10245 echo "$as_me: failed program was:" >&5
10246cat conftest.$ac_ext >&5
10247ac_header_compiler=no
10248fi
10249rm -f conftest.$ac_objext conftest.$ac_ext
10250echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10251echo "${ECHO_T}$ac_header_compiler" >&6
10252
10253# Is the header present?
10254echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10255echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10256cat >conftest.$ac_ext <<_ACEOF
10257#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010258#include "confdefs.h"
10259#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010260_ACEOF
10261if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10262 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10263 ac_status=$?
10264 egrep -v '^ *\+' conftest.er1 >conftest.err
10265 rm -f conftest.er1
10266 cat conftest.err >&5
10267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10268 (exit $ac_status); } >/dev/null; then
10269 if test -s conftest.err; then
10270 ac_cpp_err=$ac_c_preproc_warn_flag
10271 else
10272 ac_cpp_err=
10273 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010274else
Martin v. Löwis11437992002-04-12 09:54:03 +000010275 ac_cpp_err=yes
10276fi
10277if test -z "$ac_cpp_err"; then
10278 ac_header_preproc=yes
10279else
10280 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010281 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010282 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010283fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010284rm -f conftest.err conftest.$ac_ext
10285echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10286echo "${ECHO_T}$ac_header_preproc" >&6
10287
10288# So? What about this header?
10289case $ac_header_compiler:$ac_header_preproc in
10290 yes:no )
10291 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10292echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10293 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10294echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10295 no:yes )
10296 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10297echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10298 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10299echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10300 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10301echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10302esac
10303echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10304echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10305if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10306 echo $ECHO_N "(cached) $ECHO_C" >&6
10307else
10308 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010309fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010310echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10311echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10312
10313fi
10314if test $ac_cv_header_mach_cthreads_h = yes; then
10315 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010316#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010317_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010318
Martin v. Löwis11437992002-04-12 09:54:03 +000010319 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010320#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010321_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010322
Martin v. Löwis11437992002-04-12 09:54:03 +000010323
10324cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010325#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010326_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010327
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010328 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010329else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010330
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 echo "$as_me:$LINENO: checking for --with-pth" >&5
10332echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10333
10334# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010335if test "${with_pth+set}" = set; then
10336 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010337 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010338echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010339 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010340#define WITH_THREAD 1
10341_ACEOF
10342
10343
10344cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010345#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010346_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010347
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010348 LIBS="-lpth $LIBS"
10349 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010350else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010351 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010352echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010353
10354 # Just looking for pthread_create in libpthread is not enough:
10355 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10356 # So we really have to include pthread.h, and then link.
10357 _libs=$LIBS
10358 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010359 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10360echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10361 cat >conftest.$ac_ext <<_ACEOF
10362#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010363#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010364#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010365
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010366void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010367#ifdef F77_DUMMY_MAIN
10368# ifdef __cplusplus
10369 extern "C"
10370# endif
10371 int F77_DUMMY_MAIN() { return 1; }
10372#endif
10373int
10374main ()
10375{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010376
10377pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010378 ;
10379 return 0;
10380}
10381_ACEOF
10382rm -f conftest.$ac_objext conftest$ac_exeext
10383if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10384 (eval $ac_link) 2>&5
10385 ac_status=$?
10386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10387 (exit $ac_status); } &&
10388 { ac_try='test -s conftest$ac_exeext'
10389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10390 (eval $ac_try) 2>&5
10391 ac_status=$?
10392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10393 (exit $ac_status); }; }; then
10394
10395 echo "$as_me:$LINENO: result: yes" >&5
10396echo "${ECHO_T}yes" >&6
10397 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010398#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010399_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010400
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010401 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010402 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010403else
Martin v. Löwis11437992002-04-12 09:54:03 +000010404 echo "$as_me: failed program was:" >&5
10405cat conftest.$ac_ext >&5
10406
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010407 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010408 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10409echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10410if test "${ac_cv_func_pthread_detach+set}" = set; then
10411 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010412else
Martin v. Löwis11437992002-04-12 09:54:03 +000010413 cat >conftest.$ac_ext <<_ACEOF
10414#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010415#include "confdefs.h"
10416/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010418#include <assert.h>
10419/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010420#ifdef __cplusplus
10421extern "C"
10422#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010423/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010424 builtin and then its argument prototype would still apply. */
10425char pthread_detach ();
10426char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010427
Martin v. Löwis11437992002-04-12 09:54:03 +000010428#ifdef F77_DUMMY_MAIN
10429# ifdef __cplusplus
10430 extern "C"
10431# endif
10432 int F77_DUMMY_MAIN() { return 1; }
10433#endif
10434int
10435main ()
10436{
Guido van Rossumad678af1998-10-02 14:42:15 +000010437/* The GNU C library defines this for functions which it implements
10438 to always fail with ENOSYS. Some functions are actually named
10439 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010440#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010441choke me
10442#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010443f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010444#endif
10445
Martin v. Löwis11437992002-04-12 09:54:03 +000010446 ;
10447 return 0;
10448}
10449_ACEOF
10450rm -f conftest.$ac_objext conftest$ac_exeext
10451if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10452 (eval $ac_link) 2>&5
10453 ac_status=$?
10454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10455 (exit $ac_status); } &&
10456 { ac_try='test -s conftest$ac_exeext'
10457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10458 (eval $ac_try) 2>&5
10459 ac_status=$?
10460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10461 (exit $ac_status); }; }; then
10462 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010463else
Martin v. Löwis11437992002-04-12 09:54:03 +000010464 echo "$as_me: failed program was:" >&5
10465cat conftest.$ac_ext >&5
10466ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010467fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010468rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010469fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010470echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10471echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10472if test $ac_cv_func_pthread_detach = yes; then
10473 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010474#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010475_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010476
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010477 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010478 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010479else
Guido van Rossumad678af1998-10-02 14:42:15 +000010480
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010481 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10482 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10483echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10484if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10485 echo $ECHO_N "(cached) $ECHO_C" >&6
10486fi
10487echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10488echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10489else
10490 # Is the header compilable?
10491echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10492echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10493cat >conftest.$ac_ext <<_ACEOF
10494#line $LINENO "configure"
10495#include "confdefs.h"
10496$ac_includes_default
10497#include <atheos/threads.h>
10498_ACEOF
10499rm -f conftest.$ac_objext
10500if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10501 (eval $ac_compile) 2>&5
10502 ac_status=$?
10503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10504 (exit $ac_status); } &&
10505 { ac_try='test -s conftest.$ac_objext'
10506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10507 (eval $ac_try) 2>&5
10508 ac_status=$?
10509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10510 (exit $ac_status); }; }; then
10511 ac_header_compiler=yes
10512else
10513 echo "$as_me: failed program was:" >&5
10514cat conftest.$ac_ext >&5
10515ac_header_compiler=no
10516fi
10517rm -f conftest.$ac_objext conftest.$ac_ext
10518echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10519echo "${ECHO_T}$ac_header_compiler" >&6
10520
10521# Is the header present?
10522echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10523echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10524cat >conftest.$ac_ext <<_ACEOF
10525#line $LINENO "configure"
10526#include "confdefs.h"
10527#include <atheos/threads.h>
10528_ACEOF
10529if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10530 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10531 ac_status=$?
10532 egrep -v '^ *\+' conftest.er1 >conftest.err
10533 rm -f conftest.er1
10534 cat conftest.err >&5
10535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10536 (exit $ac_status); } >/dev/null; then
10537 if test -s conftest.err; then
10538 ac_cpp_err=$ac_c_preproc_warn_flag
10539 else
10540 ac_cpp_err=
10541 fi
10542else
10543 ac_cpp_err=yes
10544fi
10545if test -z "$ac_cpp_err"; then
10546 ac_header_preproc=yes
10547else
10548 echo "$as_me: failed program was:" >&5
10549 cat conftest.$ac_ext >&5
10550 ac_header_preproc=no
10551fi
10552rm -f conftest.err conftest.$ac_ext
10553echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10554echo "${ECHO_T}$ac_header_preproc" >&6
10555
10556# So? What about this header?
10557case $ac_header_compiler:$ac_header_preproc in
10558 yes:no )
10559 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10560echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10561 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10562echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10563 no:yes )
10564 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10565echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10566 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10567echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10568 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10569echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10570esac
10571echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10572echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10573if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10574 echo $ECHO_N "(cached) $ECHO_C" >&6
10575else
10576 ac_cv_header_atheos_threads_h=$ac_header_preproc
10577fi
10578echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10579echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10580
10581fi
10582if test $ac_cv_header_atheos_threads_h = yes; then
10583 cat >>confdefs.h <<\_ACEOF
10584#define WITH_THREAD 1
10585_ACEOF
10586
10587
10588cat >>confdefs.h <<\_ACEOF
10589#define ATHEOS_THREADS 1
10590_ACEOF
10591
10592 THREADOBJ="Python/thread.o"
10593else
10594
Martin v. Löwis11437992002-04-12 09:54:03 +000010595 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10596 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10597echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10598if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10599 echo $ECHO_N "(cached) $ECHO_C" >&6
10600fi
10601echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10602echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010603else
Martin v. Löwis11437992002-04-12 09:54:03 +000010604 # Is the header compilable?
10605echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10606echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10607cat >conftest.$ac_ext <<_ACEOF
10608#line $LINENO "configure"
10609#include "confdefs.h"
10610$ac_includes_default
10611#include <kernel/OS.h>
10612_ACEOF
10613rm -f conftest.$ac_objext
10614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10615 (eval $ac_compile) 2>&5
10616 ac_status=$?
10617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10618 (exit $ac_status); } &&
10619 { ac_try='test -s conftest.$ac_objext'
10620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10621 (eval $ac_try) 2>&5
10622 ac_status=$?
10623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10624 (exit $ac_status); }; }; then
10625 ac_header_compiler=yes
10626else
10627 echo "$as_me: failed program was:" >&5
10628cat conftest.$ac_ext >&5
10629ac_header_compiler=no
10630fi
10631rm -f conftest.$ac_objext conftest.$ac_ext
10632echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10633echo "${ECHO_T}$ac_header_compiler" >&6
10634
10635# Is the header present?
10636echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10637echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10638cat >conftest.$ac_ext <<_ACEOF
10639#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010640#include "confdefs.h"
10641#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010642_ACEOF
10643if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10644 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10645 ac_status=$?
10646 egrep -v '^ *\+' conftest.er1 >conftest.err
10647 rm -f conftest.er1
10648 cat conftest.err >&5
10649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10650 (exit $ac_status); } >/dev/null; then
10651 if test -s conftest.err; then
10652 ac_cpp_err=$ac_c_preproc_warn_flag
10653 else
10654 ac_cpp_err=
10655 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010656else
Martin v. Löwis11437992002-04-12 09:54:03 +000010657 ac_cpp_err=yes
10658fi
10659if test -z "$ac_cpp_err"; then
10660 ac_header_preproc=yes
10661else
10662 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010663 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010664 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010665fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010666rm -f conftest.err conftest.$ac_ext
10667echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10668echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010669
Martin v. Löwis11437992002-04-12 09:54:03 +000010670# So? What about this header?
10671case $ac_header_compiler:$ac_header_preproc in
10672 yes:no )
10673 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10674echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10675 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10676echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10677 no:yes )
10678 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10679echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10680 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10681echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10682 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10683echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10684esac
10685echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10686echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10687if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10688 echo $ECHO_N "(cached) $ECHO_C" >&6
10689else
10690 ac_cv_header_kernel_OS_h=$ac_header_preproc
10691fi
10692echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10693echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10694
10695fi
10696if test $ac_cv_header_kernel_OS_h = yes; then
10697 cat >>confdefs.h <<\_ACEOF
10698#define WITH_THREAD 1
10699_ACEOF
10700
10701
10702cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010703#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010704_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010705
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010706 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010707else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010708
Martin v. Löwis11437992002-04-12 09:54:03 +000010709 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10710echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10711if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10712 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010713else
Martin v. Löwis11437992002-04-12 09:54:03 +000010714 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010715LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010716cat >conftest.$ac_ext <<_ACEOF
10717#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010718#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010719
Greg Steinadf63d62000-07-05 10:38:09 +000010720/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010721#ifdef __cplusplus
10722extern "C"
10723#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010724/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010725 builtin and then its argument prototype would still apply. */
10726char pthread_create ();
10727#ifdef F77_DUMMY_MAIN
10728# ifdef __cplusplus
10729 extern "C"
10730# endif
10731 int F77_DUMMY_MAIN() { return 1; }
10732#endif
10733int
10734main ()
10735{
10736pthread_create ();
10737 ;
10738 return 0;
10739}
10740_ACEOF
10741rm -f conftest.$ac_objext conftest$ac_exeext
10742if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10743 (eval $ac_link) 2>&5
10744 ac_status=$?
10745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10746 (exit $ac_status); } &&
10747 { ac_try='test -s conftest$ac_exeext'
10748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10749 (eval $ac_try) 2>&5
10750 ac_status=$?
10751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10752 (exit $ac_status); }; }; then
10753 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010754else
Martin v. Löwis11437992002-04-12 09:54:03 +000010755 echo "$as_me: failed program was:" >&5
10756cat conftest.$ac_ext >&5
10757ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010758fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010759rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10760LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010761fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010762echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10763echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10764if test $ac_cv_lib_pthreads_pthread_create = yes; then
10765 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010766#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010767_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010768
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010769 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010770 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010771 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010772else
Greg Steinadf63d62000-07-05 10:38:09 +000010773
Martin v. Löwis11437992002-04-12 09:54:03 +000010774 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10775echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10776if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10777 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010778else
Martin v. Löwis11437992002-04-12 09:54:03 +000010779 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010780LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010781cat >conftest.$ac_ext <<_ACEOF
10782#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010783#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010784
Guido van Rossum49545951997-12-02 19:28:29 +000010785/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010786#ifdef __cplusplus
10787extern "C"
10788#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010789/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010790 builtin and then its argument prototype would still apply. */
10791char pthread_create ();
10792#ifdef F77_DUMMY_MAIN
10793# ifdef __cplusplus
10794 extern "C"
10795# endif
10796 int F77_DUMMY_MAIN() { return 1; }
10797#endif
10798int
10799main ()
10800{
10801pthread_create ();
10802 ;
10803 return 0;
10804}
10805_ACEOF
10806rm -f conftest.$ac_objext conftest$ac_exeext
10807if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10808 (eval $ac_link) 2>&5
10809 ac_status=$?
10810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10811 (exit $ac_status); } &&
10812 { ac_try='test -s conftest$ac_exeext'
10813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10814 (eval $ac_try) 2>&5
10815 ac_status=$?
10816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10817 (exit $ac_status); }; }; then
10818 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010819else
Martin v. Löwis11437992002-04-12 09:54:03 +000010820 echo "$as_me: failed program was:" >&5
10821cat conftest.$ac_ext >&5
10822ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010823fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010824rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10825LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010826fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010827echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10828echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10829if test $ac_cv_lib_c_r_pthread_create = yes; then
10830 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010831#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010832_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010833
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010834 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010835 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010836 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010837else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010838
Martin v. Löwis11437992002-04-12 09:54:03 +000010839 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10840echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10841if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10842 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010843else
Martin v. Löwis11437992002-04-12 09:54:03 +000010844 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010845LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010846cat >conftest.$ac_ext <<_ACEOF
10847#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010848#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010849
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010850/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010851#ifdef __cplusplus
10852extern "C"
10853#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010854/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010855 builtin and then its argument prototype would still apply. */
10856char __d6_pthread_create ();
10857#ifdef F77_DUMMY_MAIN
10858# ifdef __cplusplus
10859 extern "C"
10860# endif
10861 int F77_DUMMY_MAIN() { return 1; }
10862#endif
10863int
10864main ()
10865{
10866__d6_pthread_create ();
10867 ;
10868 return 0;
10869}
10870_ACEOF
10871rm -f conftest.$ac_objext conftest$ac_exeext
10872if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10873 (eval $ac_link) 2>&5
10874 ac_status=$?
10875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10876 (exit $ac_status); } &&
10877 { ac_try='test -s conftest$ac_exeext'
10878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10879 (eval $ac_try) 2>&5
10880 ac_status=$?
10881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10882 (exit $ac_status); }; }; then
10883 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010884else
Martin v. Löwis11437992002-04-12 09:54:03 +000010885 echo "$as_me: failed program was:" >&5
10886cat conftest.$ac_ext >&5
10887ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010888fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010889rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10890LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010891fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010892echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10893echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10894if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10895 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010896#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010897_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010898
Martin v. Löwis779ffc02002-12-02 22:17:01 +000010899 echo Systems with __d6_pthread_create are not supported anymore.
10900 echo See README
10901 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010902 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010903 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010904 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010905else
Guido van Rossum49545951997-12-02 19:28:29 +000010906
Martin v. Löwis11437992002-04-12 09:54:03 +000010907 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10908echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10909if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10910 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010911else
Martin v. Löwis11437992002-04-12 09:54:03 +000010912 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010913LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010914cat >conftest.$ac_ext <<_ACEOF
10915#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010916#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010917
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010918/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010919#ifdef __cplusplus
10920extern "C"
10921#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010922/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010923 builtin and then its argument prototype would still apply. */
10924char __pthread_create_system ();
10925#ifdef F77_DUMMY_MAIN
10926# ifdef __cplusplus
10927 extern "C"
10928# endif
10929 int F77_DUMMY_MAIN() { return 1; }
10930#endif
10931int
10932main ()
10933{
10934__pthread_create_system ();
10935 ;
10936 return 0;
10937}
10938_ACEOF
10939rm -f conftest.$ac_objext conftest$ac_exeext
10940if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10941 (eval $ac_link) 2>&5
10942 ac_status=$?
10943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10944 (exit $ac_status); } &&
10945 { ac_try='test -s conftest$ac_exeext'
10946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10947 (eval $ac_try) 2>&5
10948 ac_status=$?
10949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10950 (exit $ac_status); }; }; then
10951 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010952else
Martin v. Löwis11437992002-04-12 09:54:03 +000010953 echo "$as_me: failed program was:" >&5
10954cat conftest.$ac_ext >&5
10955ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010956fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010957rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10958LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010959fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010960echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10961echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10962if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10963 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010964#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010965_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010966
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010967 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010968 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010969 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010970else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010971
Martin v. Löwis11437992002-04-12 09:54:03 +000010972 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10973echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10974if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10975 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010976else
Martin v. Löwis11437992002-04-12 09:54:03 +000010977 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010978LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010979cat >conftest.$ac_ext <<_ACEOF
10980#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010981#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010982
Guido van Rossumb93a8621998-05-07 13:27:32 +000010983/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010984#ifdef __cplusplus
10985extern "C"
10986#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010987/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010988 builtin and then its argument prototype would still apply. */
10989char pthread_create ();
10990#ifdef F77_DUMMY_MAIN
10991# ifdef __cplusplus
10992 extern "C"
10993# endif
10994 int F77_DUMMY_MAIN() { return 1; }
10995#endif
10996int
10997main ()
10998{
10999pthread_create ();
11000 ;
11001 return 0;
11002}
11003_ACEOF
11004rm -f conftest.$ac_objext conftest$ac_exeext
11005if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11006 (eval $ac_link) 2>&5
11007 ac_status=$?
11008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11009 (exit $ac_status); } &&
11010 { ac_try='test -s conftest$ac_exeext'
11011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11012 (eval $ac_try) 2>&5
11013 ac_status=$?
11014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11015 (exit $ac_status); }; }; then
11016 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011017else
Martin v. Löwis11437992002-04-12 09:54:03 +000011018 echo "$as_me: failed program was:" >&5
11019cat conftest.$ac_ext >&5
11020ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011021fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011022rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11023LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011024fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011025echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11026echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11027if test $ac_cv_lib_cma_pthread_create = yes; then
11028 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011029#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011030_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011031
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011032 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011033 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011034 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011035else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011036
Martin v. Löwis130fb172001-07-19 11:00:41 +000011037 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011038fi
11039
Guido van Rossum627b2d71993-12-24 10:39:16 +000011040
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011041fi
11042
Guido van Rossum0be3e491997-05-22 20:33:33 +000011043fi
11044
Guido van Rossum49545951997-12-02 19:28:29 +000011045fi
11046
Guido van Rossumb93a8621998-05-07 13:27:32 +000011047fi
11048
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011049fi
11050
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011051
Michael W. Hudson54241132001-12-07 15:38:26 +000011052fi
11053
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011054
11055fi
11056
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011057fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011058rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11059fi;
11060fi
11061
11062
11063fi
11064
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011065
Michael W. Hudson54241132001-12-07 15:38:26 +000011066
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011067 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011068 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011069
11070cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011071#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011072_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011073
11074 fi
11075
Martin v. Löwis11437992002-04-12 09:54:03 +000011076 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11077echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11078 if test "${ac_cv_pthread_system_supported+set}" = set; then
11079 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011080else
11081 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011082 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011083else
Martin v. Löwis11437992002-04-12 09:54:03 +000011084 cat >conftest.$ac_ext <<_ACEOF
11085#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011086#include "confdefs.h"
11087#include <pthread.h>
11088 void *foo(void *parm) {
11089 return NULL;
11090 }
11091 main() {
11092 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011093 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011094 if (pthread_attr_init(&attr)) exit(-1);
11095 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011096 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011097 exit(0);
11098 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011099_ACEOF
11100rm -f conftest$ac_exeext
11101if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11102 (eval $ac_link) 2>&5
11103 ac_status=$?
11104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11105 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11107 (eval $ac_try) 2>&5
11108 ac_status=$?
11109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11110 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011111 ac_cv_pthread_system_supported=yes
11112else
Martin v. Löwis11437992002-04-12 09:54:03 +000011113 echo "$as_me: program exited with status $ac_status" >&5
11114echo "$as_me: failed program was:" >&5
11115cat conftest.$ac_ext >&5
11116( exit $ac_status )
11117ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011118fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011119rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011120fi
11121
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011122fi
11123
Martin v. Löwis11437992002-04-12 09:54:03 +000011124 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11125echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011126 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011127
11128cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011129#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011130_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011131
11132 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011133
11134for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011135do
Martin v. Löwis11437992002-04-12 09:54:03 +000011136as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11137echo "$as_me:$LINENO: checking for $ac_func" >&5
11138echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11139if eval "test \"\${$as_ac_var+set}\" = set"; then
11140 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011141else
Martin v. Löwis11437992002-04-12 09:54:03 +000011142 cat >conftest.$ac_ext <<_ACEOF
11143#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011144#include "confdefs.h"
11145/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011146 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011147#include <assert.h>
11148/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011149#ifdef __cplusplus
11150extern "C"
11151#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011152/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011153 builtin and then its argument prototype would still apply. */
11154char $ac_func ();
11155char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011156
Martin v. Löwis11437992002-04-12 09:54:03 +000011157#ifdef F77_DUMMY_MAIN
11158# ifdef __cplusplus
11159 extern "C"
11160# endif
11161 int F77_DUMMY_MAIN() { return 1; }
11162#endif
11163int
11164main ()
11165{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011166/* The GNU C library defines this for functions which it implements
11167 to always fail with ENOSYS. Some functions are actually named
11168 something starting with __ and the normal name is an alias. */
11169#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11170choke me
11171#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011172f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011173#endif
11174
Martin v. Löwis11437992002-04-12 09:54:03 +000011175 ;
11176 return 0;
11177}
11178_ACEOF
11179rm -f conftest.$ac_objext conftest$ac_exeext
11180if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11181 (eval $ac_link) 2>&5
11182 ac_status=$?
11183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11184 (exit $ac_status); } &&
11185 { ac_try='test -s conftest$ac_exeext'
11186 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11187 (eval $ac_try) 2>&5
11188 ac_status=$?
11189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11190 (exit $ac_status); }; }; then
11191 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011192else
Martin v. Löwis11437992002-04-12 09:54:03 +000011193 echo "$as_me: failed program was:" >&5
11194cat conftest.$ac_ext >&5
11195eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011196fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011197rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011198fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011199echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11200echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11201if test `eval echo '${'$as_ac_var'}'` = yes; then
11202 cat >>confdefs.h <<_ACEOF
11203#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11204_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011205
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011206fi
11207done
11208
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011209 fi
11210
Martin v. Löwis11437992002-04-12 09:54:03 +000011211 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11212echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11213if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11214 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011215else
Martin v. Löwis11437992002-04-12 09:54:03 +000011216 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011217LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011218cat >conftest.$ac_ext <<_ACEOF
11219#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011220#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011221
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011222/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011223#ifdef __cplusplus
11224extern "C"
11225#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011226/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011227 builtin and then its argument prototype would still apply. */
11228char usconfig ();
11229#ifdef F77_DUMMY_MAIN
11230# ifdef __cplusplus
11231 extern "C"
11232# endif
11233 int F77_DUMMY_MAIN() { return 1; }
11234#endif
11235int
11236main ()
11237{
11238usconfig ();
11239 ;
11240 return 0;
11241}
11242_ACEOF
11243rm -f conftest.$ac_objext conftest$ac_exeext
11244if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11245 (eval $ac_link) 2>&5
11246 ac_status=$?
11247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11248 (exit $ac_status); } &&
11249 { ac_try='test -s conftest$ac_exeext'
11250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11251 (eval $ac_try) 2>&5
11252 ac_status=$?
11253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11254 (exit $ac_status); }; }; then
11255 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011256else
Martin v. Löwis11437992002-04-12 09:54:03 +000011257 echo "$as_me: failed program was:" >&5
11258cat conftest.$ac_ext >&5
11259ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011260fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011261rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11262LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011263fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011264echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11265echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11266if test $ac_cv_lib_mpc_usconfig = yes; then
11267 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011268#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011269_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011270
Martin v. Löwis130fb172001-07-19 11:00:41 +000011271 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011272 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011273 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011274fi
11275
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011276
Neal Norwitza978ab02002-11-02 16:58:05 +000011277 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011278 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11279echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11280if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11281 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011282else
Martin v. Löwis11437992002-04-12 09:54:03 +000011283 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011284LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011285cat >conftest.$ac_ext <<_ACEOF
11286#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011287#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011288
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011289/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011290#ifdef __cplusplus
11291extern "C"
11292#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011293/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011294 builtin and then its argument prototype would still apply. */
11295char thr_create ();
11296#ifdef F77_DUMMY_MAIN
11297# ifdef __cplusplus
11298 extern "C"
11299# endif
11300 int F77_DUMMY_MAIN() { return 1; }
11301#endif
11302int
11303main ()
11304{
11305thr_create ();
11306 ;
11307 return 0;
11308}
11309_ACEOF
11310rm -f conftest.$ac_objext conftest$ac_exeext
11311if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11312 (eval $ac_link) 2>&5
11313 ac_status=$?
11314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11315 (exit $ac_status); } &&
11316 { ac_try='test -s conftest$ac_exeext'
11317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11318 (eval $ac_try) 2>&5
11319 ac_status=$?
11320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11321 (exit $ac_status); }; }; then
11322 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011323else
Martin v. Löwis11437992002-04-12 09:54:03 +000011324 echo "$as_me: failed program was:" >&5
11325cat conftest.$ac_ext >&5
11326ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011327fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011328rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11329LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011330fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011331echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11332echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11333if test $ac_cv_lib_thread_thr_create = yes; then
11334 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011335#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011336_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011337
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011338 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011339 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011340 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011341fi
11342
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011343 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011344
Martin v. Löwis130fb172001-07-19 11:00:41 +000011345 if test "$USE_THREAD_MODULE" != "#"
11346 then
11347 # If the above checks didn't disable threads, (at least) OSF1
11348 # needs this '-threads' argument during linking.
11349 case $ac_sys_system in
11350 OSF1) LDLAST=-threads;;
11351 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011352 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011353
11354 if test "$posix_threads" = yes -a \
11355 "$ac_sys_system" = "SunOS" -a \
11356 "$ac_sys_release" = "5.6"; then
11357
11358cat >>confdefs.h <<\_ACEOF
11359#define HAVE_PTHREAD_DESTRUCTOR 1
11360_ACEOF
11361
11362 fi
11363
Guido van Rossum627b2d71993-12-24 10:39:16 +000011364fi
11365
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011366# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011367
11368
11369echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11370echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011371# Check whether --enable-ipv6 or --disable-ipv6 was given.
11372if test "${enable_ipv6+set}" = set; then
11373 enableval="$enable_ipv6"
11374 case "$enableval" in
11375 no)
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 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011380 *) echo "$as_me:$LINENO: result: yes" >&5
11381echo "${ECHO_T}yes" >&6
11382 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011383#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011384_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011385
11386 ipv6=yes
11387 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011388 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011389else
Martin v. Löwis11437992002-04-12 09:54:03 +000011390
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011391 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011392 echo "$as_me:$LINENO: result: no" >&5
11393echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011394 ipv6=no
11395
11396else
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 cat >conftest.$ac_ext <<_ACEOF
11398#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011399#include "confdefs.h"
11400 /* AF_INET6 available check */
11401#include <sys/types.h>
11402#include <sys/socket.h>
11403main()
11404{
11405 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11406 exit(1);
11407 else
11408 exit(0);
11409}
11410
Martin v. Löwis11437992002-04-12 09:54:03 +000011411_ACEOF
11412rm -f conftest$ac_exeext
11413if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11414 (eval $ac_link) 2>&5
11415 ac_status=$?
11416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11417 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11419 (eval $ac_try) 2>&5
11420 ac_status=$?
11421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11422 (exit $ac_status); }; }; then
11423 echo "$as_me:$LINENO: result: yes" >&5
11424echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011425 ipv6=yes
11426else
Martin v. Löwis11437992002-04-12 09:54:03 +000011427 echo "$as_me: program exited with status $ac_status" >&5
11428echo "$as_me: failed program was:" >&5
11429cat conftest.$ac_ext >&5
11430( exit $ac_status )
11431echo "$as_me:$LINENO: result: no" >&5
11432echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011433 ipv6=no
11434fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011435rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011436fi
11437
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011438if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011439 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11440echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11441 cat >conftest.$ac_ext <<_ACEOF
11442#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011443#include "confdefs.h"
11444#include <sys/types.h>
11445#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011446#ifdef F77_DUMMY_MAIN
11447# ifdef __cplusplus
11448 extern "C"
11449# endif
11450 int F77_DUMMY_MAIN() { return 1; }
11451#endif
11452int
11453main ()
11454{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011455struct sockaddr_in6 x;
11456x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011457 ;
11458 return 0;
11459}
11460_ACEOF
11461rm -f conftest.$ac_objext
11462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11463 (eval $ac_compile) 2>&5
11464 ac_status=$?
11465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11466 (exit $ac_status); } &&
11467 { ac_try='test -s conftest.$ac_objext'
11468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11469 (eval $ac_try) 2>&5
11470 ac_status=$?
11471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11472 (exit $ac_status); }; }; then
11473 echo "$as_me:$LINENO: result: yes" >&5
11474echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011475 ipv6=yes
11476else
Martin v. Löwis11437992002-04-12 09:54:03 +000011477 echo "$as_me: failed program was:" >&5
11478cat conftest.$ac_ext >&5
11479echo "$as_me:$LINENO: result: no" >&5
11480echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011481 ipv6=no
11482fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011483rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011484fi
11485
11486if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011487 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011488#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011489_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011490
11491fi
11492
Martin v. Löwis11437992002-04-12 09:54:03 +000011493fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011494
11495ipv6type=unknown
11496ipv6lib=none
11497ipv6trylibc=no
11498
11499if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011500 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11501echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011502 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11503 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011504 case $i in
11505 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011506 cat >conftest.$ac_ext <<_ACEOF
11507#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011508#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011509
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011510#include <netinet/in.h>
11511#ifdef IPV6_INRIA_VERSION
11512yes
11513#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011514_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011515if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11516 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011517 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011518fi
11519rm -f conftest*
11520
11521 ;;
11522 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011523 cat >conftest.$ac_ext <<_ACEOF
11524#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011525#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011526
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011527#include <netinet/in.h>
11528#ifdef __KAME__
11529yes
11530#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011531_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011532if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11533 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011534 ipv6type=$i;
11535 ipv6lib=inet6
11536 ipv6libdir=/usr/local/v6/lib
11537 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011538fi
11539rm -f conftest*
11540
11541 ;;
11542 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011543 cat >conftest.$ac_ext <<_ACEOF
11544#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011545#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011546
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011547#include <features.h>
11548#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11549yes
11550#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011551_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011552if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11553 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011554 ipv6type=$i;
11555 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011556fi
11557rm -f conftest*
11558
11559 ;;
11560 linux-inet6)
11561 if test -d /usr/inet6; then
11562 ipv6type=$i
11563 ipv6lib=inet6
11564 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011565 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011566 fi
11567 ;;
11568 solaris)
11569 if test -f /etc/netconfig; then
11570 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11571 ipv6type=$i
11572 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011573 fi
11574 fi
11575 ;;
11576 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011577 cat >conftest.$ac_ext <<_ACEOF
11578#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011579#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011580
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011581#include <sys/param.h>
11582#ifdef _TOSHIBA_INET6
11583yes
11584#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011585_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011586if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11587 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011588 ipv6type=$i;
11589 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011590 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011591fi
11592rm -f conftest*
11593
11594 ;;
11595 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011596 cat >conftest.$ac_ext <<_ACEOF
11597#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011598#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011599
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011600#include </usr/local/v6/include/sys/v6config.h>
11601#ifdef __V6D__
11602yes
11603#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011604_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011605if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11606 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011607 ipv6type=$i;
11608 ipv6lib=v6;
11609 ipv6libdir=/usr/local/v6/lib;
11610 OPT="-I/usr/local/v6/include $OPT"
11611fi
11612rm -f conftest*
11613
11614 ;;
11615 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011616 cat >conftest.$ac_ext <<_ACEOF
11617#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011618#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011619
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011620#include <sys/param.h>
11621#ifdef _ZETA_MINAMI_INET6
11622yes
11623#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011624_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011625if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11626 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011627 ipv6type=$i;
11628 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011629 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011630fi
11631rm -f conftest*
11632
11633 ;;
11634 esac
11635 if test "$ipv6type" != "unknown"; then
11636 break
11637 fi
11638 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011639 echo "$as_me:$LINENO: result: $ipv6type" >&5
11640echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011641fi
11642
11643if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11644 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11645 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11646 echo "using lib$ipv6lib"
11647 else
11648 if test $ipv6trylibc = "yes"; then
11649 echo "using libc"
11650 else
11651 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11652 echo "You need to fetch lib$ipv6lib.a from appropriate"
11653 echo 'ipv6 kit and compile beforehand.'
11654 exit 1
11655 fi
11656 fi
11657fi
11658
Jack Jansen7b8c7542002-04-14 20:12:41 +000011659# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011660echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11661echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011662
11663# Check whether --with-universal-newlines or --without-universal-newlines was given.
11664if test "${with_universal_newlines+set}" = set; then
11665 withval="$with_universal_newlines"
11666
11667fi;
11668
11669if test -z "$with_universal_newlines"
11670then with_universal_newlines="yes"
11671fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011672if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011673then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011674 echo --without-universal-newlines is unsupported, see README
11675 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011676else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011677
11678cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011679#define WITH_UNIVERSAL_NEWLINES 1
11680_ACEOF
11681
11682fi
11683echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11684echo "${ECHO_T}$with_universal_newlines" >&6
11685
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011686# Check for --with-doc-strings
11687echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11688echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11689
11690# Check whether --with-doc-strings or --without-doc-strings was given.
11691if test "${with_doc_strings+set}" = set; then
11692 withval="$with_doc_strings"
11693
11694fi;
11695
11696if test -z "$with_doc_strings"
11697then with_doc_strings="yes"
11698fi
11699if test "$with_doc_strings" != "no"
11700then
11701
11702cat >>confdefs.h <<\_ACEOF
11703#define WITH_DOC_STRINGS 1
11704_ACEOF
11705
11706fi
11707echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11708echo "${ECHO_T}$with_doc_strings" >&6
11709
Neil Schemenauera35c6882001-02-27 04:45:05 +000011710# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011711echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11712echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11713
Neil Schemenauera35c6882001-02-27 04:45:05 +000011714# Check whether --with-pymalloc or --without-pymalloc was given.
11715if test "${with_pymalloc+set}" = set; then
11716 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011717
Martin v. Löwis11437992002-04-12 09:54:03 +000011718fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011719
Neil Schemenauer16c22972002-03-22 15:34:49 +000011720if test -z "$with_pymalloc"
11721then with_pymalloc="yes"
11722fi
11723if test "$with_pymalloc" != "no"
11724then
Martin v. Löwis11437992002-04-12 09:54:03 +000011725
11726cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011727#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011728_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011729
11730fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011731echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11732echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011733
Barry Warsawef82cd72000-06-30 16:21:01 +000011734# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011735echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11736echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11737
Barry Warsawef82cd72000-06-30 16:21:01 +000011738# Check whether --with-wctype-functions or --without-wctype-functions was given.
11739if test "${with_wctype_functions+set}" = set; then
11740 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011741
Barry Warsawef82cd72000-06-30 16:21:01 +000011742if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011743then
11744
11745cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011746#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011747_ACEOF
11748
11749 echo "$as_me:$LINENO: result: yes" >&5
11750echo "${ECHO_T}yes" >&6
11751else echo "$as_me:$LINENO: result: no" >&5
11752echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011753fi
11754else
Martin v. Löwis11437992002-04-12 09:54:03 +000011755 echo "$as_me:$LINENO: result: no" >&5
11756echo "${ECHO_T}no" >&6
11757fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011758
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011759# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011760
Guido van Rossum98935bf2001-09-05 19:13:16 +000011761DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011762
Martin v. Löwis11437992002-04-12 09:54:03 +000011763echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11764echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11765
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011766# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011767if test "${with_sgi_dl+set}" = set; then
11768 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011769
11770echo "$as_me:$LINENO: result: $withval" >&5
11771echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011772echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011773exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011774
11775cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011776#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011777_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011778
Guido van Rossume97ee181999-12-20 21:27:22 +000011779DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011780dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011781if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011782then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011783else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11784echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11785 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011786fi
11787DLINCLDIR=${dldir}
11788LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011789else
Martin v. Löwis11437992002-04-12 09:54:03 +000011790 echo "$as_me:$LINENO: result: no" >&5
11791echo "${ECHO_T}no" >&6
11792fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011793
Martin v. Löwis11437992002-04-12 09:54:03 +000011794echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11795echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011796
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011797# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011798if test "${with_dl_dld+set}" = set; then
11799 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011800
11801echo "$as_me:$LINENO: result: $withval" >&5
11802echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011803echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011804exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011805
11806cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011807#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011808_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011809
Guido van Rossume97ee181999-12-20 21:27:22 +000011810DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011811dldir=`echo "$withval" | sed 's/,.*//'`
11812dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011813if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011814then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011815else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
11816echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
11817 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011818fi
11819DLINCLDIR=${dldir}
11820LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011821else
Martin v. Löwis11437992002-04-12 09:54:03 +000011822 echo "$as_me:$LINENO: result: no" >&5
11823echo "${ECHO_T}no" >&6
11824fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011825
Guido van Rossume97ee181999-12-20 21:27:22 +000011826# the dlopen() function means we might want to use dynload_shlib.o. some
11827# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011828
Thomas Wouters3a584202000-08-05 23:28:51 +000011829for ac_func in dlopen
11830do
Martin v. Löwis11437992002-04-12 09:54:03 +000011831as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11832echo "$as_me:$LINENO: checking for $ac_func" >&5
11833echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11834if eval "test \"\${$as_ac_var+set}\" = set"; then
11835 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011836else
Martin v. Löwis11437992002-04-12 09:54:03 +000011837 cat >conftest.$ac_ext <<_ACEOF
11838#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011839#include "confdefs.h"
11840/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011841 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011842#include <assert.h>
11843/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011844#ifdef __cplusplus
11845extern "C"
11846#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011847/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011848 builtin and then its argument prototype would still apply. */
11849char $ac_func ();
11850char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011851
Martin v. Löwis11437992002-04-12 09:54:03 +000011852#ifdef F77_DUMMY_MAIN
11853# ifdef __cplusplus
11854 extern "C"
11855# endif
11856 int F77_DUMMY_MAIN() { return 1; }
11857#endif
11858int
11859main ()
11860{
Guido van Rossume97ee181999-12-20 21:27:22 +000011861/* The GNU C library defines this for functions which it implements
11862 to always fail with ENOSYS. Some functions are actually named
11863 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011864#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011865choke me
11866#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011867f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011868#endif
11869
Martin v. Löwis11437992002-04-12 09:54:03 +000011870 ;
11871 return 0;
11872}
11873_ACEOF
11874rm -f conftest.$ac_objext conftest$ac_exeext
11875if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11876 (eval $ac_link) 2>&5
11877 ac_status=$?
11878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11879 (exit $ac_status); } &&
11880 { ac_try='test -s conftest$ac_exeext'
11881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11882 (eval $ac_try) 2>&5
11883 ac_status=$?
11884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11885 (exit $ac_status); }; }; then
11886 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011887else
Martin v. Löwis11437992002-04-12 09:54:03 +000011888 echo "$as_me: failed program was:" >&5
11889cat conftest.$ac_ext >&5
11890eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011891fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011892rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011893fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011894echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11895echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11896if test `eval echo '${'$as_ac_var'}'` = yes; then
11897 cat >>confdefs.h <<_ACEOF
11898#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11899_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011900
Guido van Rossume97ee181999-12-20 21:27:22 +000011901fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011902done
Guido van Rossume97ee181999-12-20 21:27:22 +000011903
Michael W. Hudson54241132001-12-07 15:38:26 +000011904
Guido van Rossume97ee181999-12-20 21:27:22 +000011905# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11906# loading of modules.
11907
Martin v. Löwis11437992002-04-12 09:54:03 +000011908echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11909echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011910if test -z "$DYNLOADFILE"
11911then
11912 case $ac_sys_system/$ac_sys_release in
11913 AIX*) DYNLOADFILE="dynload_aix.o";;
11914 BeOS*) DYNLOADFILE="dynload_beos.o";;
11915 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011916 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011917 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011918 *)
11919 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11920 # out any dynamic loading
11921 if test "$ac_cv_func_dlopen" = yes
11922 then DYNLOADFILE="dynload_shlib.o"
11923 else DYNLOADFILE="dynload_stub.o"
11924 fi
11925 ;;
11926 esac
11927fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011928echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11929echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011930if test "$DYNLOADFILE" != "dynload_stub.o"
11931then
Martin v. Löwis11437992002-04-12 09:54:03 +000011932
11933cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011934#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011935_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011936
11937fi
11938
Neil Schemenauer4e425612001-06-19 15:44:15 +000011939# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11940
Michael W. Hudson54241132001-12-07 15:38:26 +000011941
Martin v. Löwis11437992002-04-12 09:54:03 +000011942echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11943echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011944if test -z "$MACHDEP_OBJS"
11945then
Jack Jansene578a632001-08-15 01:27:14 +000011946 MACHDEP_OBJS=$extra_machdep_objs
11947else
11948 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011949fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011950echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11951echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011952
Guido van Rossum627b2d71993-12-24 10:39:16 +000011953# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
Martin v. Löwis9c36c292002-12-21 18:34:06 +000012027
Martin v. Löwis438b5342002-12-27 10:16:42 +000012028
Martin v. Löwisd5843682002-11-21 20:41:28 +000012029for ac_func in alarm chown clock confstr ctermid execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000012030 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012031 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
12032 getpriority getpwent getwd \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012033 hstrerror inet_pton kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012034 mremap nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000012035 putenv readlink \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012036 select setegid seteuid setgid \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000012037 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012038 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012039 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012040 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012041do
Martin v. Löwis11437992002-04-12 09:54:03 +000012042as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12043echo "$as_me:$LINENO: checking for $ac_func" >&5
12044echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12045if eval "test \"\${$as_ac_var+set}\" = set"; then
12046 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012047else
Martin v. Löwis11437992002-04-12 09:54:03 +000012048 cat >conftest.$ac_ext <<_ACEOF
12049#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012050#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012051/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012052 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012053#include <assert.h>
12054/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012055#ifdef __cplusplus
12056extern "C"
12057#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012058/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012059 builtin and then its argument prototype would still apply. */
12060char $ac_func ();
12061char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012062
Martin v. Löwis11437992002-04-12 09:54:03 +000012063#ifdef F77_DUMMY_MAIN
12064# ifdef __cplusplus
12065 extern "C"
12066# endif
12067 int F77_DUMMY_MAIN() { return 1; }
12068#endif
12069int
12070main ()
12071{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012072/* The GNU C library defines this for functions which it implements
12073 to always fail with ENOSYS. Some functions are actually named
12074 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012075#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012076choke me
12077#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012078f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012079#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012080
Martin v. Löwis11437992002-04-12 09:54:03 +000012081 ;
12082 return 0;
12083}
12084_ACEOF
12085rm -f conftest.$ac_objext conftest$ac_exeext
12086if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12087 (eval $ac_link) 2>&5
12088 ac_status=$?
12089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12090 (exit $ac_status); } &&
12091 { ac_try='test -s conftest$ac_exeext'
12092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12093 (eval $ac_try) 2>&5
12094 ac_status=$?
12095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12096 (exit $ac_status); }; }; then
12097 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012098else
Martin v. Löwis11437992002-04-12 09:54:03 +000012099 echo "$as_me: failed program was:" >&5
12100cat conftest.$ac_ext >&5
12101eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012103rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012104fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012105echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12106echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12107if test `eval echo '${'$as_ac_var'}'` = yes; then
12108 cat >>confdefs.h <<_ACEOF
12109#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12110_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012111
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012112fi
12113done
12114
Michael W. Hudson54241132001-12-07 15:38:26 +000012115
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012116# For some functions, having a definition is not sufficient, since
12117# we want to take their address.
12118echo "$as_me:$LINENO: checking for chroot" >&5
12119echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12120cat >conftest.$ac_ext <<_ACEOF
12121#line $LINENO "configure"
12122#include "confdefs.h"
12123#include <unistd.h>
12124#ifdef F77_DUMMY_MAIN
12125# ifdef __cplusplus
12126 extern "C"
12127# endif
12128 int F77_DUMMY_MAIN() { return 1; }
12129#endif
12130int
12131main ()
12132{
12133void *x=chroot
12134 ;
12135 return 0;
12136}
12137_ACEOF
12138rm -f conftest.$ac_objext
12139if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12140 (eval $ac_compile) 2>&5
12141 ac_status=$?
12142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12143 (exit $ac_status); } &&
12144 { ac_try='test -s conftest.$ac_objext'
12145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12146 (eval $ac_try) 2>&5
12147 ac_status=$?
12148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12149 (exit $ac_status); }; }; then
12150
12151cat >>confdefs.h <<\_ACEOF
12152#define HAVE_CHROOT 1
12153_ACEOF
12154
12155 echo "$as_me:$LINENO: result: yes" >&5
12156echo "${ECHO_T}yes" >&6
12157else
12158 echo "$as_me: failed program was:" >&5
12159cat conftest.$ac_ext >&5
12160echo "$as_me:$LINENO: result: no" >&5
12161echo "${ECHO_T}no" >&6
12162
12163fi
12164rm -f conftest.$ac_objext conftest.$ac_ext
12165echo "$as_me:$LINENO: checking for link" >&5
12166echo $ECHO_N "checking for link... $ECHO_C" >&6
12167cat >conftest.$ac_ext <<_ACEOF
12168#line $LINENO "configure"
12169#include "confdefs.h"
12170#include <unistd.h>
12171#ifdef F77_DUMMY_MAIN
12172# ifdef __cplusplus
12173 extern "C"
12174# endif
12175 int F77_DUMMY_MAIN() { return 1; }
12176#endif
12177int
12178main ()
12179{
12180void *x=link
12181 ;
12182 return 0;
12183}
12184_ACEOF
12185rm -f conftest.$ac_objext
12186if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12187 (eval $ac_compile) 2>&5
12188 ac_status=$?
12189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12190 (exit $ac_status); } &&
12191 { ac_try='test -s conftest.$ac_objext'
12192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12193 (eval $ac_try) 2>&5
12194 ac_status=$?
12195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12196 (exit $ac_status); }; }; then
12197
12198cat >>confdefs.h <<\_ACEOF
12199#define HAVE_LINK 1
12200_ACEOF
12201
12202 echo "$as_me:$LINENO: result: yes" >&5
12203echo "${ECHO_T}yes" >&6
12204else
12205 echo "$as_me: failed program was:" >&5
12206cat conftest.$ac_ext >&5
12207echo "$as_me:$LINENO: result: no" >&5
12208echo "${ECHO_T}no" >&6
12209
12210fi
12211rm -f conftest.$ac_objext conftest.$ac_ext
12212echo "$as_me:$LINENO: checking for symlink" >&5
12213echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12214cat >conftest.$ac_ext <<_ACEOF
12215#line $LINENO "configure"
12216#include "confdefs.h"
12217#include <unistd.h>
12218#ifdef F77_DUMMY_MAIN
12219# ifdef __cplusplus
12220 extern "C"
12221# endif
12222 int F77_DUMMY_MAIN() { return 1; }
12223#endif
12224int
12225main ()
12226{
12227void *x=symlink
12228 ;
12229 return 0;
12230}
12231_ACEOF
12232rm -f conftest.$ac_objext
12233if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12234 (eval $ac_compile) 2>&5
12235 ac_status=$?
12236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12237 (exit $ac_status); } &&
12238 { ac_try='test -s conftest.$ac_objext'
12239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12240 (eval $ac_try) 2>&5
12241 ac_status=$?
12242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12243 (exit $ac_status); }; }; then
12244
12245cat >>confdefs.h <<\_ACEOF
12246#define HAVE_SYMLINK 1
12247_ACEOF
12248
12249 echo "$as_me:$LINENO: result: yes" >&5
12250echo "${ECHO_T}yes" >&6
12251else
12252 echo "$as_me: failed program was:" >&5
12253cat conftest.$ac_ext >&5
12254echo "$as_me:$LINENO: result: no" >&5
12255echo "${ECHO_T}no" >&6
12256
12257fi
12258rm -f conftest.$ac_objext conftest.$ac_ext
12259
Martin v. Löwisd5843682002-11-21 20:41:28 +000012260# On some systems (eg. FreeBSD 5), we would find a definition of the
12261# functions ctermid_r, setgroups in the library, but no prototype
12262# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12263# address to avoid compiler warnings and potential miscompilations
12264# because of the missing prototypes.
12265
12266echo "$as_me:$LINENO: checking for ctermid_r" >&5
12267echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12268cat >conftest.$ac_ext <<_ACEOF
12269#line $LINENO "configure"
12270#include "confdefs.h"
12271
12272#include "confdefs.h"
12273#include <stdio.h>
12274
12275#ifdef F77_DUMMY_MAIN
12276# ifdef __cplusplus
12277 extern "C"
12278# endif
12279 int F77_DUMMY_MAIN() { return 1; }
12280#endif
12281int
12282main ()
12283{
12284void* p = ctermid_r
12285 ;
12286 return 0;
12287}
12288_ACEOF
12289rm -f conftest.$ac_objext
12290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12291 (eval $ac_compile) 2>&5
12292 ac_status=$?
12293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12294 (exit $ac_status); } &&
12295 { ac_try='test -s conftest.$ac_objext'
12296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12297 (eval $ac_try) 2>&5
12298 ac_status=$?
12299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12300 (exit $ac_status); }; }; then
12301
12302cat >>confdefs.h <<\_ACEOF
12303#define HAVE_CTERMID_R 1
12304_ACEOF
12305
12306 echo "$as_me:$LINENO: result: yes" >&5
12307echo "${ECHO_T}yes" >&6
12308else
12309 echo "$as_me: failed program was:" >&5
12310cat conftest.$ac_ext >&5
12311echo "$as_me:$LINENO: result: no" >&5
12312echo "${ECHO_T}no" >&6
12313
12314fi
12315rm -f conftest.$ac_objext conftest.$ac_ext
12316
12317echo "$as_me:$LINENO: checking for setgroups" >&5
12318echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
12319cat >conftest.$ac_ext <<_ACEOF
12320#line $LINENO "configure"
12321#include "confdefs.h"
12322
12323#include "confdefs.h"
12324#include <unistd.h.h>
12325
12326#ifdef F77_DUMMY_MAIN
12327# ifdef __cplusplus
12328 extern "C"
12329# endif
12330 int F77_DUMMY_MAIN() { return 1; }
12331#endif
12332int
12333main ()
12334{
12335void* p = setgroups
12336 ;
12337 return 0;
12338}
12339_ACEOF
12340rm -f conftest.$ac_objext
12341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12342 (eval $ac_compile) 2>&5
12343 ac_status=$?
12344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12345 (exit $ac_status); } &&
12346 { ac_try='test -s conftest.$ac_objext'
12347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12348 (eval $ac_try) 2>&5
12349 ac_status=$?
12350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12351 (exit $ac_status); }; }; then
12352
12353cat >>confdefs.h <<\_ACEOF
12354#define HAVE_SETGROUPS 1
12355_ACEOF
12356
12357 echo "$as_me:$LINENO: result: yes" >&5
12358echo "${ECHO_T}yes" >&6
12359else
12360 echo "$as_me: failed program was:" >&5
12361cat conftest.$ac_ext >&5
12362echo "$as_me:$LINENO: result: no" >&5
12363echo "${ECHO_T}no" >&6
12364
12365fi
12366rm -f conftest.$ac_objext conftest.$ac_ext
12367
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012368# check for openpty and forkpty
12369
Martin v. Löwis11437992002-04-12 09:54:03 +000012370
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012371for ac_func in openpty
12372do
Martin v. Löwis11437992002-04-12 09:54:03 +000012373as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12374echo "$as_me:$LINENO: checking for $ac_func" >&5
12375echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12376if eval "test \"\${$as_ac_var+set}\" = set"; then
12377 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012378else
Martin v. Löwis11437992002-04-12 09:54:03 +000012379 cat >conftest.$ac_ext <<_ACEOF
12380#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012381#include "confdefs.h"
12382/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012383 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012384#include <assert.h>
12385/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012386#ifdef __cplusplus
12387extern "C"
12388#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012389/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012390 builtin and then its argument prototype would still apply. */
12391char $ac_func ();
12392char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012393
Martin v. Löwis11437992002-04-12 09:54:03 +000012394#ifdef F77_DUMMY_MAIN
12395# ifdef __cplusplus
12396 extern "C"
12397# endif
12398 int F77_DUMMY_MAIN() { return 1; }
12399#endif
12400int
12401main ()
12402{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012403/* The GNU C library defines this for functions which it implements
12404 to always fail with ENOSYS. Some functions are actually named
12405 something starting with __ and the normal name is an alias. */
12406#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12407choke me
12408#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012409f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012410#endif
12411
Martin v. Löwis11437992002-04-12 09:54:03 +000012412 ;
12413 return 0;
12414}
12415_ACEOF
12416rm -f conftest.$ac_objext conftest$ac_exeext
12417if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12418 (eval $ac_link) 2>&5
12419 ac_status=$?
12420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12421 (exit $ac_status); } &&
12422 { ac_try='test -s conftest$ac_exeext'
12423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12424 (eval $ac_try) 2>&5
12425 ac_status=$?
12426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12427 (exit $ac_status); }; }; then
12428 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012429else
Martin v. Löwis11437992002-04-12 09:54:03 +000012430 echo "$as_me: failed program was:" >&5
12431cat conftest.$ac_ext >&5
12432eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012433fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012434rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012435fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012436echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12437echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12438if test `eval echo '${'$as_ac_var'}'` = yes; then
12439 cat >>confdefs.h <<_ACEOF
12440#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12441_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012442
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012443else
Martin v. Löwis11437992002-04-12 09:54:03 +000012444 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
12445echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
12446if test "${ac_cv_lib_util_openpty+set}" = set; then
12447 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012448else
Martin v. Löwis11437992002-04-12 09:54:03 +000012449 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012450LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012451cat >conftest.$ac_ext <<_ACEOF
12452#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012453#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012454
Fred Drake8cef4cf2000-06-28 16:40:38 +000012455/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012456#ifdef __cplusplus
12457extern "C"
12458#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012459/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012460 builtin and then its argument prototype would still apply. */
12461char openpty ();
12462#ifdef F77_DUMMY_MAIN
12463# ifdef __cplusplus
12464 extern "C"
12465# endif
12466 int F77_DUMMY_MAIN() { return 1; }
12467#endif
12468int
12469main ()
12470{
12471openpty ();
12472 ;
12473 return 0;
12474}
12475_ACEOF
12476rm -f conftest.$ac_objext conftest$ac_exeext
12477if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12478 (eval $ac_link) 2>&5
12479 ac_status=$?
12480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12481 (exit $ac_status); } &&
12482 { ac_try='test -s conftest$ac_exeext'
12483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12484 (eval $ac_try) 2>&5
12485 ac_status=$?
12486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12487 (exit $ac_status); }; }; then
12488 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012489else
Martin v. Löwis11437992002-04-12 09:54:03 +000012490 echo "$as_me: failed program was:" >&5
12491cat conftest.$ac_ext >&5
12492ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012493fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012494rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12495LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012496fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012497echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
12498echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
12499if test $ac_cv_lib_util_openpty = yes; then
12500 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012501#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012502_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012503 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012504fi
12505
12506fi
12507done
12508
Martin v. Löwis11437992002-04-12 09:54:03 +000012509
Fred Drake8cef4cf2000-06-28 16:40:38 +000012510for ac_func in forkpty
12511do
Martin v. Löwis11437992002-04-12 09:54:03 +000012512as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12513echo "$as_me:$LINENO: checking for $ac_func" >&5
12514echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12515if eval "test \"\${$as_ac_var+set}\" = set"; then
12516 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012517else
Martin v. Löwis11437992002-04-12 09:54:03 +000012518 cat >conftest.$ac_ext <<_ACEOF
12519#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012520#include "confdefs.h"
12521/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012522 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000012523#include <assert.h>
12524/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012525#ifdef __cplusplus
12526extern "C"
12527#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012528/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012529 builtin and then its argument prototype would still apply. */
12530char $ac_func ();
12531char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000012532
Martin v. Löwis11437992002-04-12 09:54:03 +000012533#ifdef F77_DUMMY_MAIN
12534# ifdef __cplusplus
12535 extern "C"
12536# endif
12537 int F77_DUMMY_MAIN() { return 1; }
12538#endif
12539int
12540main ()
12541{
Fred Drake8cef4cf2000-06-28 16:40:38 +000012542/* The GNU C library defines this for functions which it implements
12543 to always fail with ENOSYS. Some functions are actually named
12544 something starting with __ and the normal name is an alias. */
12545#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12546choke me
12547#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012548f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000012549#endif
12550
Martin v. Löwis11437992002-04-12 09:54:03 +000012551 ;
12552 return 0;
12553}
12554_ACEOF
12555rm -f conftest.$ac_objext conftest$ac_exeext
12556if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12557 (eval $ac_link) 2>&5
12558 ac_status=$?
12559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12560 (exit $ac_status); } &&
12561 { ac_try='test -s conftest$ac_exeext'
12562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12563 (eval $ac_try) 2>&5
12564 ac_status=$?
12565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12566 (exit $ac_status); }; }; then
12567 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012568else
Martin v. Löwis11437992002-04-12 09:54:03 +000012569 echo "$as_me: failed program was:" >&5
12570cat conftest.$ac_ext >&5
12571eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012572fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012573rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012574fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012575echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12576echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12577if test `eval echo '${'$as_ac_var'}'` = yes; then
12578 cat >>confdefs.h <<_ACEOF
12579#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12580_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012581
Fred Drake8cef4cf2000-06-28 16:40:38 +000012582else
Martin v. Löwis11437992002-04-12 09:54:03 +000012583 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
12584echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
12585if test "${ac_cv_lib_util_forkpty+set}" = set; then
12586 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012587else
Martin v. Löwis11437992002-04-12 09:54:03 +000012588 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012589LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012590cat >conftest.$ac_ext <<_ACEOF
12591#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012592#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012593
Fred Drake8cef4cf2000-06-28 16:40:38 +000012594/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012595#ifdef __cplusplus
12596extern "C"
12597#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012598/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012599 builtin and then its argument prototype would still apply. */
12600char forkpty ();
12601#ifdef F77_DUMMY_MAIN
12602# ifdef __cplusplus
12603 extern "C"
12604# endif
12605 int F77_DUMMY_MAIN() { return 1; }
12606#endif
12607int
12608main ()
12609{
12610forkpty ();
12611 ;
12612 return 0;
12613}
12614_ACEOF
12615rm -f conftest.$ac_objext conftest$ac_exeext
12616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12617 (eval $ac_link) 2>&5
12618 ac_status=$?
12619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12620 (exit $ac_status); } &&
12621 { ac_try='test -s conftest$ac_exeext'
12622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12623 (eval $ac_try) 2>&5
12624 ac_status=$?
12625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12626 (exit $ac_status); }; }; then
12627 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012628else
Martin v. Löwis11437992002-04-12 09:54:03 +000012629 echo "$as_me: failed program was:" >&5
12630cat conftest.$ac_ext >&5
12631ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012632fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012633rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12634LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012635fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012636echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
12637echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
12638if test $ac_cv_lib_util_forkpty = yes; then
12639 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012640#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012641_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012642 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012643fi
12644
12645fi
12646done
12647
Jack Jansendd19cf82001-12-06 22:36:17 +000012648
Michael W. Hudson54241132001-12-07 15:38:26 +000012649# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012650
12651
12652
12653
12654
12655
Fred Drake8cef4cf2000-06-28 16:40:38 +000012656for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
12657do
Martin v. Löwis11437992002-04-12 09:54:03 +000012658as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12659echo "$as_me:$LINENO: checking for $ac_func" >&5
12660echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12661if eval "test \"\${$as_ac_var+set}\" = set"; then
12662 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012663else
Martin v. Löwis11437992002-04-12 09:54:03 +000012664 cat >conftest.$ac_ext <<_ACEOF
12665#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012666#include "confdefs.h"
12667/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012668 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012669#include <assert.h>
12670/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012671#ifdef __cplusplus
12672extern "C"
12673#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012674/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012675 builtin and then its argument prototype would still apply. */
12676char $ac_func ();
12677char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012678
Martin v. Löwis11437992002-04-12 09:54:03 +000012679#ifdef F77_DUMMY_MAIN
12680# ifdef __cplusplus
12681 extern "C"
12682# endif
12683 int F77_DUMMY_MAIN() { return 1; }
12684#endif
12685int
12686main ()
12687{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012688/* The GNU C library defines this for functions which it implements
12689 to always fail with ENOSYS. Some functions are actually named
12690 something starting with __ and the normal name is an alias. */
12691#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12692choke me
12693#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012694f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012695#endif
12696
Martin v. Löwis11437992002-04-12 09:54:03 +000012697 ;
12698 return 0;
12699}
12700_ACEOF
12701rm -f conftest.$ac_objext conftest$ac_exeext
12702if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12703 (eval $ac_link) 2>&5
12704 ac_status=$?
12705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12706 (exit $ac_status); } &&
12707 { ac_try='test -s conftest$ac_exeext'
12708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12709 (eval $ac_try) 2>&5
12710 ac_status=$?
12711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12712 (exit $ac_status); }; }; then
12713 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012714else
Martin v. Löwis11437992002-04-12 09:54:03 +000012715 echo "$as_me: failed program was:" >&5
12716cat conftest.$ac_ext >&5
12717eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012718fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012719rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012720fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012721echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12722echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12723if test `eval echo '${'$as_ac_var'}'` = yes; then
12724 cat >>confdefs.h <<_ACEOF
12725#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12726_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012727
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012728fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012729done
12730
Michael W. Hudson54241132001-12-07 15:38:26 +000012731
Martin v. Löwis11437992002-04-12 09:54:03 +000012732
12733
12734
12735
12736
Martin v. Löwis1142de32002-03-29 16:28:31 +000012737for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000012738do
Martin v. Löwis11437992002-04-12 09:54:03 +000012739as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12740echo "$as_me:$LINENO: checking for $ac_func" >&5
12741echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12742if eval "test \"\${$as_ac_var+set}\" = set"; then
12743 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012744else
Martin v. Löwis11437992002-04-12 09:54:03 +000012745 cat >conftest.$ac_ext <<_ACEOF
12746#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012747#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012748/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012749 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012750#include <assert.h>
12751/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012752#ifdef __cplusplus
12753extern "C"
12754#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012755/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012756 builtin and then its argument prototype would still apply. */
12757char $ac_func ();
12758char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012759
Martin v. Löwis11437992002-04-12 09:54:03 +000012760#ifdef F77_DUMMY_MAIN
12761# ifdef __cplusplus
12762 extern "C"
12763# endif
12764 int F77_DUMMY_MAIN() { return 1; }
12765#endif
12766int
12767main ()
12768{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012769/* The GNU C library defines this for functions which it implements
12770 to always fail with ENOSYS. Some functions are actually named
12771 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012772#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012773choke me
12774#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012775f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012776#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012777
Martin v. Löwis11437992002-04-12 09:54:03 +000012778 ;
12779 return 0;
12780}
12781_ACEOF
12782rm -f conftest.$ac_objext conftest$ac_exeext
12783if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12784 (eval $ac_link) 2>&5
12785 ac_status=$?
12786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12787 (exit $ac_status); } &&
12788 { ac_try='test -s conftest$ac_exeext'
12789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12790 (eval $ac_try) 2>&5
12791 ac_status=$?
12792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12793 (exit $ac_status); }; }; then
12794 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012795else
Martin v. Löwis11437992002-04-12 09:54:03 +000012796 echo "$as_me: failed program was:" >&5
12797cat conftest.$ac_ext >&5
12798eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012799fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012800rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000012801fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012802echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12803echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12804if test `eval echo '${'$as_ac_var'}'` = yes; then
12805 cat >>confdefs.h <<_ACEOF
12806#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12807_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000012808
Martin v. Löwis1142de32002-03-29 16:28:31 +000012809else
Martin v. Löwis11437992002-04-12 09:54:03 +000012810 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012811fi
12812done
12813
12814
Martin v. Löwis11437992002-04-12 09:54:03 +000012815
Martin v. Löwis1142de32002-03-29 16:28:31 +000012816for ac_func in getpgrp
12817do
Martin v. Löwis11437992002-04-12 09:54:03 +000012818as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12819echo "$as_me:$LINENO: checking for $ac_func" >&5
12820echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12821if eval "test \"\${$as_ac_var+set}\" = set"; then
12822 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000012823else
Martin v. Löwis11437992002-04-12 09:54:03 +000012824 cat >conftest.$ac_ext <<_ACEOF
12825#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012826#include "confdefs.h"
12827/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012828 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000012829#include <assert.h>
12830/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012831#ifdef __cplusplus
12832extern "C"
12833#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012834/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012835 builtin and then its argument prototype would still apply. */
12836char $ac_func ();
12837char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012838
Martin v. Löwis11437992002-04-12 09:54:03 +000012839#ifdef F77_DUMMY_MAIN
12840# ifdef __cplusplus
12841 extern "C"
12842# endif
12843 int F77_DUMMY_MAIN() { return 1; }
12844#endif
12845int
12846main ()
12847{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012848/* The GNU C library defines this for functions which it implements
12849 to always fail with ENOSYS. Some functions are actually named
12850 something starting with __ and the normal name is an alias. */
12851#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12852choke me
12853#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012854f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012855#endif
12856
Martin v. Löwis11437992002-04-12 09:54:03 +000012857 ;
12858 return 0;
12859}
12860_ACEOF
12861rm -f conftest.$ac_objext conftest$ac_exeext
12862if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12863 (eval $ac_link) 2>&5
12864 ac_status=$?
12865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12866 (exit $ac_status); } &&
12867 { ac_try='test -s conftest$ac_exeext'
12868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12869 (eval $ac_try) 2>&5
12870 ac_status=$?
12871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12872 (exit $ac_status); }; }; then
12873 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012874else
Martin v. Löwis11437992002-04-12 09:54:03 +000012875 echo "$as_me: failed program was:" >&5
12876cat conftest.$ac_ext >&5
12877eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012878fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012879rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012880fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012881echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12882echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12883if test `eval echo '${'$as_ac_var'}'` = yes; then
12884 cat >>confdefs.h <<_ACEOF
12885#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12886_ACEOF
12887 cat >conftest.$ac_ext <<_ACEOF
12888#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012889#include "confdefs.h"
12890#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012891#ifdef F77_DUMMY_MAIN
12892# ifdef __cplusplus
12893 extern "C"
12894# endif
12895 int F77_DUMMY_MAIN() { return 1; }
12896#endif
12897int
12898main ()
12899{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012900getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012901 ;
12902 return 0;
12903}
12904_ACEOF
12905rm -f conftest.$ac_objext
12906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12907 (eval $ac_compile) 2>&5
12908 ac_status=$?
12909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12910 (exit $ac_status); } &&
12911 { ac_try='test -s conftest.$ac_objext'
12912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12913 (eval $ac_try) 2>&5
12914 ac_status=$?
12915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12916 (exit $ac_status); }; }; then
12917
12918cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012919#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012920_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012921
Martin v. Löwis11437992002-04-12 09:54:03 +000012922
Guido van Rossumf78abae1997-01-21 22:02:36 +000012923else
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 echo "$as_me: failed program was:" >&5
12925cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012926fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012927rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012928
Guido van Rossum627b2d71993-12-24 10:39:16 +000012929fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012930done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012931
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012932echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12933echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12934if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012935 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012936else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012937 if test "$cross_compiling" = yes; then
12938 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12939echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12940 { (exit 1); exit 1; }; }
12941else
Martin v. Löwis11437992002-04-12 09:54:03 +000012942 cat >conftest.$ac_ext <<_ACEOF
12943#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012944#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012945#if HAVE_UNISTD_H
12946# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012947#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012948
Martin v. Löwis11437992002-04-12 09:54:03 +000012949#ifdef F77_DUMMY_MAIN
12950# ifdef __cplusplus
12951 extern "C"
12952# endif
12953 int F77_DUMMY_MAIN() { return 1; }
12954#endif
12955int
12956main ()
12957{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012958/* If this system has a BSD-style setpgrp which takes arguments,
12959 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12960 exit successfully. */
12961 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012962 ;
12963 return 0;
12964}
12965_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012966rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012967if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12968 (eval $ac_link) 2>&5
12969 ac_status=$?
12970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012971 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12973 (eval $ac_try) 2>&5
12974 ac_status=$?
12975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12976 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012977 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012978else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012979 echo "$as_me: program exited with status $ac_status" >&5
12980echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012981cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012982( exit $ac_status )
12983ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012984fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012985rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012986fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012987fi
12988echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12989echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12990if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012991
12992cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012993#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012994_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012995
12996fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012997
Martin v. Löwis11437992002-04-12 09:54:03 +000012998
Thomas Wouters3a584202000-08-05 23:28:51 +000012999for ac_func in gettimeofday
13000do
Martin v. Löwis11437992002-04-12 09:54:03 +000013001as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13002echo "$as_me:$LINENO: checking for $ac_func" >&5
13003echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13004if eval "test \"\${$as_ac_var+set}\" = set"; then
13005 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013006else
Martin v. Löwis11437992002-04-12 09:54:03 +000013007 cat >conftest.$ac_ext <<_ACEOF
13008#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013009#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013010/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013011 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013012#include <assert.h>
13013/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013014#ifdef __cplusplus
13015extern "C"
13016#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013017/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013018 builtin and then its argument prototype would still apply. */
13019char $ac_func ();
13020char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013021
Martin v. Löwis11437992002-04-12 09:54:03 +000013022#ifdef F77_DUMMY_MAIN
13023# ifdef __cplusplus
13024 extern "C"
13025# endif
13026 int F77_DUMMY_MAIN() { return 1; }
13027#endif
13028int
13029main ()
13030{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013031/* The GNU C library defines this for functions which it implements
13032 to always fail with ENOSYS. Some functions are actually named
13033 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013034#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013035choke me
13036#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013037f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013038#endif
13039
Martin v. Löwis11437992002-04-12 09:54:03 +000013040 ;
13041 return 0;
13042}
13043_ACEOF
13044rm -f conftest.$ac_objext conftest$ac_exeext
13045if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13046 (eval $ac_link) 2>&5
13047 ac_status=$?
13048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13049 (exit $ac_status); } &&
13050 { ac_try='test -s conftest$ac_exeext'
13051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13052 (eval $ac_try) 2>&5
13053 ac_status=$?
13054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13055 (exit $ac_status); }; }; then
13056 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013057else
Martin v. Löwis11437992002-04-12 09:54:03 +000013058 echo "$as_me: failed program was:" >&5
13059cat conftest.$ac_ext >&5
13060eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013061fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013062rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013063fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013064echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13065echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13066if test `eval echo '${'$as_ac_var'}'` = yes; then
13067 cat >>confdefs.h <<_ACEOF
13068#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13069_ACEOF
13070 cat >conftest.$ac_ext <<_ACEOF
13071#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013072#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013073#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013074#ifdef F77_DUMMY_MAIN
13075# ifdef __cplusplus
13076 extern "C"
13077# endif
13078 int F77_DUMMY_MAIN() { return 1; }
13079#endif
13080int
13081main ()
13082{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013083gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013084 ;
13085 return 0;
13086}
13087_ACEOF
13088rm -f conftest.$ac_objext
13089if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13090 (eval $ac_compile) 2>&5
13091 ac_status=$?
13092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13093 (exit $ac_status); } &&
13094 { ac_try='test -s conftest.$ac_objext'
13095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13096 (eval $ac_try) 2>&5
13097 ac_status=$?
13098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13099 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013100 :
13101else
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 echo "$as_me: failed program was:" >&5
13103cat conftest.$ac_ext >&5
13104
13105cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013106#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013107_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013108
Martin v. Löwis11437992002-04-12 09:54:03 +000013109
Guido van Rossum627b2d71993-12-24 10:39:16 +000013110fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013111rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013112
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013113fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013114done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013115
Michael W. Hudson54241132001-12-07 15:38:26 +000013116
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013117echo "$as_me:$LINENO: checking for major" >&5
13118echo $ECHO_N "checking for major... $ECHO_C" >&6
13119cat >conftest.$ac_ext <<_ACEOF
13120#line $LINENO "configure"
13121#include "confdefs.h"
13122
13123 #if defined(MAJOR_IN_MKDEV)
13124 #include <sys/mkdev.h>
13125 #elif defined(MAJOR_IN_SYSMACROS)
13126 #include <sys/sysmacros.h>
13127 #else
13128 #include <sys/types.h>
13129 #endif
13130
13131#ifdef F77_DUMMY_MAIN
13132# ifdef __cplusplus
13133 extern "C"
13134# endif
13135 int F77_DUMMY_MAIN() { return 1; }
13136#endif
13137int
13138main ()
13139{
13140
13141 makedev(major(0),minor(0));
13142
13143 ;
13144 return 0;
13145}
13146_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013147rm -f conftest.$ac_objext conftest$ac_exeext
13148if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13149 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013150 ac_status=$?
13151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13152 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013153 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13155 (eval $ac_try) 2>&5
13156 ac_status=$?
13157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13158 (exit $ac_status); }; }; then
13159
13160
13161cat >>confdefs.h <<\_ACEOF
13162#define HAVE_DEVICE_MACROS 1
13163_ACEOF
13164
13165 echo "$as_me:$LINENO: result: yes" >&5
13166echo "${ECHO_T}yes" >&6
13167
13168else
13169 echo "$as_me: failed program was:" >&5
13170cat conftest.$ac_ext >&5
13171
13172 echo "$as_me:$LINENO: result: no" >&5
13173echo "${ECHO_T}no" >&6
13174
13175fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013176rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013177
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013178# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013179# for [no]getaddrinfo in netdb.h.
13180echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13181echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13182cat >conftest.$ac_ext <<_ACEOF
13183#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013184#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013185
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013186#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013187#include <sys/socket.h>
13188#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013189#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013190
Martin v. Löwis11437992002-04-12 09:54:03 +000013191#ifdef F77_DUMMY_MAIN
13192# ifdef __cplusplus
13193 extern "C"
13194# endif
13195 int F77_DUMMY_MAIN() { return 1; }
13196#endif
13197int
13198main ()
13199{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013200
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013201getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013202
Martin v. Löwis11437992002-04-12 09:54:03 +000013203 ;
13204 return 0;
13205}
13206_ACEOF
13207rm -f conftest.$ac_objext conftest$ac_exeext
13208if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13209 (eval $ac_link) 2>&5
13210 ac_status=$?
13211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13212 (exit $ac_status); } &&
13213 { ac_try='test -s conftest$ac_exeext'
13214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13215 (eval $ac_try) 2>&5
13216 ac_status=$?
13217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13218 (exit $ac_status); }; }; then
13219
13220echo "$as_me:$LINENO: result: yes" >&5
13221echo "${ECHO_T}yes" >&6
13222echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13223echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013224if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013225 echo "$as_me:$LINENO: result: buggy" >&5
13226echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013227buggygetaddrinfo=yes
13228else
Martin v. Löwis11437992002-04-12 09:54:03 +000013229 cat >conftest.$ac_ext <<_ACEOF
13230#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013231#include "confdefs.h"
13232
13233#include <sys/types.h>
13234#include <netdb.h>
13235#include <string.h>
13236#include <sys/socket.h>
13237#include <netinet/in.h>
13238
13239main()
13240{
13241 int passive, gaierr, inet4 = 0, inet6 = 0;
13242 struct addrinfo hints, *ai, *aitop;
13243 char straddr[INET6_ADDRSTRLEN], strport[16];
13244
13245 for (passive = 0; passive <= 1; passive++) {
13246 memset(&hints, 0, sizeof(hints));
13247 hints.ai_family = AF_UNSPEC;
13248 hints.ai_flags = passive ? AI_PASSIVE : 0;
13249 hints.ai_socktype = SOCK_STREAM;
13250 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13251 (void)gai_strerror(gaierr);
13252 goto bad;
13253 }
13254 for (ai = aitop; ai; ai = ai->ai_next) {
13255 if (ai->ai_addr == NULL ||
13256 ai->ai_addrlen == 0 ||
13257 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13258 straddr, sizeof(straddr), strport, sizeof(strport),
13259 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13260 goto bad;
13261 }
13262 switch (ai->ai_family) {
13263 case AF_INET:
13264 if (strcmp(strport, "54321") != 0) {
13265 goto bad;
13266 }
13267 if (passive) {
13268 if (strcmp(straddr, "0.0.0.0") != 0) {
13269 goto bad;
13270 }
13271 } else {
13272 if (strcmp(straddr, "127.0.0.1") != 0) {
13273 goto bad;
13274 }
13275 }
13276 inet4++;
13277 break;
13278 case AF_INET6:
13279 if (strcmp(strport, "54321") != 0) {
13280 goto bad;
13281 }
13282 if (passive) {
13283 if (strcmp(straddr, "::") != 0) {
13284 goto bad;
13285 }
13286 } else {
13287 if (strcmp(straddr, "::1") != 0) {
13288 goto bad;
13289 }
13290 }
13291 inet6++;
13292 break;
13293 case AF_UNSPEC:
13294 goto bad;
13295 break;
13296 default:
13297 /* another family support? */
13298 break;
13299 }
13300 }
13301 }
13302
13303 if (!(inet4 == 0 || inet4 == 2))
13304 goto bad;
13305 if (!(inet6 == 0 || inet6 == 2))
13306 goto bad;
13307
13308 if (aitop)
13309 freeaddrinfo(aitop);
13310 exit(0);
13311
13312 bad:
13313 if (aitop)
13314 freeaddrinfo(aitop);
13315 exit(1);
13316}
13317
Martin v. Löwis11437992002-04-12 09:54:03 +000013318_ACEOF
13319rm -f conftest$ac_exeext
13320if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13321 (eval $ac_link) 2>&5
13322 ac_status=$?
13323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13324 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13326 (eval $ac_try) 2>&5
13327 ac_status=$?
13328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13329 (exit $ac_status); }; }; then
13330 echo "$as_me:$LINENO: result: good" >&5
13331echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013332buggygetaddrinfo=no
13333else
Martin v. Löwis11437992002-04-12 09:54:03 +000013334 echo "$as_me: program exited with status $ac_status" >&5
13335echo "$as_me: failed program was:" >&5
13336cat conftest.$ac_ext >&5
13337( exit $ac_status )
13338echo "$as_me:$LINENO: result: buggy" >&5
13339echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013340buggygetaddrinfo=yes
13341fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013342rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013343fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013344else
Martin v. Löwis11437992002-04-12 09:54:03 +000013345 echo "$as_me: failed program was:" >&5
13346cat conftest.$ac_ext >&5
13347
13348echo "$as_me:$LINENO: result: no" >&5
13349echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013350buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013351
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013352fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013353rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013354
13355if test "$buggygetaddrinfo" = "yes"; then
13356 if test "$ipv6" = "yes"; then
13357 echo 'Fatal: You must get working getaddrinfo() function.'
13358 echo ' or you can specify "--disable-ipv6"'.
13359 exit 1
13360 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013361else
Martin v. Löwis11437992002-04-12 09:54:03 +000013362
13363cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013364#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013365_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013366
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013367fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013368
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013369for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013370do
Martin v. Löwis11437992002-04-12 09:54:03 +000013371as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13372echo "$as_me:$LINENO: checking for $ac_func" >&5
13373echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13374if eval "test \"\${$as_ac_var+set}\" = set"; then
13375 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013376else
Martin v. Löwis11437992002-04-12 09:54:03 +000013377 cat >conftest.$ac_ext <<_ACEOF
13378#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013379#include "confdefs.h"
13380/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013381 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013382#include <assert.h>
13383/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013384#ifdef __cplusplus
13385extern "C"
13386#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013387/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013388 builtin and then its argument prototype would still apply. */
13389char $ac_func ();
13390char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013391
Martin v. Löwis11437992002-04-12 09:54:03 +000013392#ifdef F77_DUMMY_MAIN
13393# ifdef __cplusplus
13394 extern "C"
13395# endif
13396 int F77_DUMMY_MAIN() { return 1; }
13397#endif
13398int
13399main ()
13400{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013401/* The GNU C library defines this for functions which it implements
13402 to always fail with ENOSYS. Some functions are actually named
13403 something starting with __ and the normal name is an alias. */
13404#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13405choke me
13406#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013407f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013408#endif
13409
Martin v. Löwis11437992002-04-12 09:54:03 +000013410 ;
13411 return 0;
13412}
13413_ACEOF
13414rm -f conftest.$ac_objext conftest$ac_exeext
13415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13416 (eval $ac_link) 2>&5
13417 ac_status=$?
13418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13419 (exit $ac_status); } &&
13420 { ac_try='test -s conftest$ac_exeext'
13421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13422 (eval $ac_try) 2>&5
13423 ac_status=$?
13424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13425 (exit $ac_status); }; }; then
13426 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013427else
Martin v. Löwis11437992002-04-12 09:54:03 +000013428 echo "$as_me: failed program was:" >&5
13429cat conftest.$ac_ext >&5
13430eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013431fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013432rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013433fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013434echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13435echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13436if test `eval echo '${'$as_ac_var'}'` = yes; then
13437 cat >>confdefs.h <<_ACEOF
13438#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13439_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013440
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013441fi
13442done
13443
Michael W. Hudson54241132001-12-07 15:38:26 +000013444
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013445# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000013446echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13447echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13448if test "${ac_cv_header_time+set}" = set; then
13449 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013450else
Martin v. Löwis11437992002-04-12 09:54:03 +000013451 cat >conftest.$ac_ext <<_ACEOF
13452#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013453#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013454#include <sys/types.h>
13455#include <sys/time.h>
13456#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013457
13458#ifdef F77_DUMMY_MAIN
13459# ifdef __cplusplus
13460 extern "C"
13461# endif
13462 int F77_DUMMY_MAIN() { return 1; }
13463#endif
13464int
13465main ()
13466{
13467if ((struct tm *) 0)
13468return 0;
13469 ;
13470 return 0;
13471}
13472_ACEOF
13473rm -f conftest.$ac_objext
13474if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13475 (eval $ac_compile) 2>&5
13476 ac_status=$?
13477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13478 (exit $ac_status); } &&
13479 { ac_try='test -s conftest.$ac_objext'
13480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13481 (eval $ac_try) 2>&5
13482 ac_status=$?
13483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13484 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013485 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013486else
Martin v. Löwis11437992002-04-12 09:54:03 +000013487 echo "$as_me: failed program was:" >&5
13488cat conftest.$ac_ext >&5
13489ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013490fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013491rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013492fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013493echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
13494echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013495if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013496
13497cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013498#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013499_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013500
13501fi
13502
Martin v. Löwis11437992002-04-12 09:54:03 +000013503echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
13504echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
13505if test "${ac_cv_struct_tm+set}" = set; then
13506 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013507else
Martin v. Löwis11437992002-04-12 09:54:03 +000013508 cat >conftest.$ac_ext <<_ACEOF
13509#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013510#include "confdefs.h"
13511#include <sys/types.h>
13512#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013513
13514#ifdef F77_DUMMY_MAIN
13515# ifdef __cplusplus
13516 extern "C"
13517# endif
13518 int F77_DUMMY_MAIN() { return 1; }
13519#endif
13520int
13521main ()
13522{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013523struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000013524 ;
13525 return 0;
13526}
13527_ACEOF
13528rm -f conftest.$ac_objext
13529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13530 (eval $ac_compile) 2>&5
13531 ac_status=$?
13532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13533 (exit $ac_status); } &&
13534 { ac_try='test -s conftest.$ac_objext'
13535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13536 (eval $ac_try) 2>&5
13537 ac_status=$?
13538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13539 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013540 ac_cv_struct_tm=time.h
13541else
Martin v. Löwis11437992002-04-12 09:54:03 +000013542 echo "$as_me: failed program was:" >&5
13543cat conftest.$ac_ext >&5
13544ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013545fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013546rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013547fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013548echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
13549echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013550if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013551
13552cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013553#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013554_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013555
13556fi
13557
Martin v. Löwis11437992002-04-12 09:54:03 +000013558echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13559echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
13560if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13561 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013562else
Martin v. Löwis11437992002-04-12 09:54:03 +000013563 cat >conftest.$ac_ext <<_ACEOF
13564#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013565#include "confdefs.h"
13566#include <sys/types.h>
13567#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013568
13569
13570#ifdef F77_DUMMY_MAIN
13571# ifdef __cplusplus
13572 extern "C"
13573# endif
13574 int F77_DUMMY_MAIN() { return 1; }
13575#endif
13576int
13577main ()
13578{
13579static struct tm ac_aggr;
13580if (ac_aggr.tm_zone)
13581return 0;
13582 ;
13583 return 0;
13584}
13585_ACEOF
13586rm -f conftest.$ac_objext
13587if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13588 (eval $ac_compile) 2>&5
13589 ac_status=$?
13590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13591 (exit $ac_status); } &&
13592 { ac_try='test -s conftest.$ac_objext'
13593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13594 (eval $ac_try) 2>&5
13595 ac_status=$?
13596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13597 (exit $ac_status); }; }; then
13598 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013599else
Martin v. Löwis11437992002-04-12 09:54:03 +000013600 echo "$as_me: failed program was:" >&5
13601cat conftest.$ac_ext >&5
13602ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013603fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013604rm -f conftest.$ac_objext conftest.$ac_ext
13605fi
13606echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13607echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
13608if test $ac_cv_member_struct_tm_tm_zone = yes; then
13609
13610cat >>confdefs.h <<_ACEOF
13611#define HAVE_STRUCT_TM_TM_ZONE 1
13612_ACEOF
13613
13614
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013615fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013616
Martin v. Löwis11437992002-04-12 09:54:03 +000013617if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13618
13619cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013620#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013621_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013622
13623else
Martin v. Löwis11437992002-04-12 09:54:03 +000013624 echo "$as_me:$LINENO: checking for tzname" >&5
13625echo $ECHO_N "checking for tzname... $ECHO_C" >&6
13626if test "${ac_cv_var_tzname+set}" = set; then
13627 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013628else
Martin v. Löwis11437992002-04-12 09:54:03 +000013629 cat >conftest.$ac_ext <<_ACEOF
13630#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013631#include "confdefs.h"
13632#include <time.h>
13633#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013634extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013635#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013636
13637#ifdef F77_DUMMY_MAIN
13638# ifdef __cplusplus
13639 extern "C"
13640# endif
13641 int F77_DUMMY_MAIN() { return 1; }
13642#endif
13643int
13644main ()
13645{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013646atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000013647 ;
13648 return 0;
13649}
13650_ACEOF
13651rm -f conftest.$ac_objext conftest$ac_exeext
13652if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13653 (eval $ac_link) 2>&5
13654 ac_status=$?
13655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13656 (exit $ac_status); } &&
13657 { ac_try='test -s conftest$ac_exeext'
13658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13659 (eval $ac_try) 2>&5
13660 ac_status=$?
13661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13662 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013663 ac_cv_var_tzname=yes
13664else
Martin v. Löwis11437992002-04-12 09:54:03 +000013665 echo "$as_me: failed program was:" >&5
13666cat conftest.$ac_ext >&5
13667ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013668fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013669rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013670fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013671echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13672echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013673 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013674
13675cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013676#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013677_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013678
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013679 fi
13680fi
13681
Martin v. Löwis11437992002-04-12 09:54:03 +000013682echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
13683echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
13684if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
13685 echo $ECHO_N "(cached) $ECHO_C" >&6
13686else
13687 cat >conftest.$ac_ext <<_ACEOF
13688#line $LINENO "configure"
13689#include "confdefs.h"
13690$ac_includes_default
13691#ifdef F77_DUMMY_MAIN
13692# ifdef __cplusplus
13693 extern "C"
13694# endif
13695 int F77_DUMMY_MAIN() { return 1; }
13696#endif
13697int
13698main ()
13699{
13700static struct stat ac_aggr;
13701if (ac_aggr.st_rdev)
13702return 0;
13703 ;
13704 return 0;
13705}
13706_ACEOF
13707rm -f conftest.$ac_objext
13708if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13709 (eval $ac_compile) 2>&5
13710 ac_status=$?
13711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13712 (exit $ac_status); } &&
13713 { ac_try='test -s conftest.$ac_objext'
13714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13715 (eval $ac_try) 2>&5
13716 ac_status=$?
13717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13718 (exit $ac_status); }; }; then
13719 ac_cv_member_struct_stat_st_rdev=yes
13720else
13721 echo "$as_me: failed program was:" >&5
13722cat conftest.$ac_ext >&5
13723ac_cv_member_struct_stat_st_rdev=no
13724fi
13725rm -f conftest.$ac_objext conftest.$ac_ext
13726fi
13727echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
13728echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
13729if test $ac_cv_member_struct_stat_st_rdev = yes; then
13730
13731cat >>confdefs.h <<_ACEOF
13732#define HAVE_STRUCT_STAT_ST_RDEV 1
13733_ACEOF
13734
13735
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013736fi
13737
Martin v. Löwis11437992002-04-12 09:54:03 +000013738echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13739echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13740if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13741 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013742else
Martin v. Löwis11437992002-04-12 09:54:03 +000013743 cat >conftest.$ac_ext <<_ACEOF
13744#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013745#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013746$ac_includes_default
13747#ifdef F77_DUMMY_MAIN
13748# ifdef __cplusplus
13749 extern "C"
13750# endif
13751 int F77_DUMMY_MAIN() { return 1; }
13752#endif
13753int
13754main ()
13755{
13756static struct stat ac_aggr;
13757if (ac_aggr.st_blksize)
13758return 0;
13759 ;
13760 return 0;
13761}
13762_ACEOF
13763rm -f conftest.$ac_objext
13764if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13765 (eval $ac_compile) 2>&5
13766 ac_status=$?
13767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13768 (exit $ac_status); } &&
13769 { ac_try='test -s conftest.$ac_objext'
13770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13771 (eval $ac_try) 2>&5
13772 ac_status=$?
13773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13774 (exit $ac_status); }; }; then
13775 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013776else
Martin v. Löwis11437992002-04-12 09:54:03 +000013777 echo "$as_me: failed program was:" >&5
13778cat conftest.$ac_ext >&5
13779ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013780fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013781rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013782fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013783echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13784echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13785if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013786
Martin v. Löwis11437992002-04-12 09:54:03 +000013787cat >>confdefs.h <<_ACEOF
13788#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13789_ACEOF
13790
13791
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013792fi
13793
Martin v. Löwis11437992002-04-12 09:54:03 +000013794echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13795echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13796if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13797 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013798else
Martin v. Löwis11437992002-04-12 09:54:03 +000013799 cat >conftest.$ac_ext <<_ACEOF
13800#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013801#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013802$ac_includes_default
13803#ifdef F77_DUMMY_MAIN
13804# ifdef __cplusplus
13805 extern "C"
13806# endif
13807 int F77_DUMMY_MAIN() { return 1; }
13808#endif
13809int
13810main ()
13811{
13812static struct stat ac_aggr;
13813if (ac_aggr.st_blocks)
13814return 0;
13815 ;
13816 return 0;
13817}
13818_ACEOF
13819rm -f conftest.$ac_objext
13820if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13821 (eval $ac_compile) 2>&5
13822 ac_status=$?
13823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13824 (exit $ac_status); } &&
13825 { ac_try='test -s conftest.$ac_objext'
13826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13827 (eval $ac_try) 2>&5
13828 ac_status=$?
13829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13830 (exit $ac_status); }; }; then
13831 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013832else
Martin v. Löwis11437992002-04-12 09:54:03 +000013833 echo "$as_me: failed program was:" >&5
13834cat conftest.$ac_ext >&5
13835ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013836fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013837rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013838fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013839echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13840echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13841if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013842
Martin v. Löwis11437992002-04-12 09:54:03 +000013843cat >>confdefs.h <<_ACEOF
13844#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13845_ACEOF
13846
13847
13848cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013849#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013850_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013851
13852else
Martin v. Löwis11437992002-04-12 09:54:03 +000013853 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013854fi
13855
Michael W. Hudson54241132001-12-07 15:38:26 +000013856
Martin v. Löwis11437992002-04-12 09:54:03 +000013857
13858echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13859echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13860if test "${ac_cv_header_time_altzone+set}" = set; then
13861 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013862else
Martin v. Löwis11437992002-04-12 09:54:03 +000013863 cat >conftest.$ac_ext <<_ACEOF
13864#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013865#include "confdefs.h"
13866#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013867#ifdef F77_DUMMY_MAIN
13868# ifdef __cplusplus
13869 extern "C"
13870# endif
13871 int F77_DUMMY_MAIN() { return 1; }
13872#endif
13873int
13874main ()
13875{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013876return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013877 ;
13878 return 0;
13879}
13880_ACEOF
13881rm -f conftest.$ac_objext
13882if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13883 (eval $ac_compile) 2>&5
13884 ac_status=$?
13885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13886 (exit $ac_status); } &&
13887 { ac_try='test -s conftest.$ac_objext'
13888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13889 (eval $ac_try) 2>&5
13890 ac_status=$?
13891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13892 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013893 ac_cv_header_time_altzone=yes
13894else
Martin v. Löwis11437992002-04-12 09:54:03 +000013895 echo "$as_me: failed program was:" >&5
13896cat conftest.$ac_ext >&5
13897ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013898fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013899rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013900fi
13901
Martin v. Löwis11437992002-04-12 09:54:03 +000013902echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13903echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013904if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013905
13906cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013907#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013908_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013909
13910fi
13911
Guido van Rossumda88dad1995-01-26 00:46:29 +000013912was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013913echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13914echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13915cat >conftest.$ac_ext <<_ACEOF
13916#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013917#include "confdefs.h"
13918
13919#include <sys/types.h>
13920#include <sys/select.h>
13921#include <sys/time.h>
13922
Martin v. Löwis11437992002-04-12 09:54:03 +000013923#ifdef F77_DUMMY_MAIN
13924# ifdef __cplusplus
13925 extern "C"
13926# endif
13927 int F77_DUMMY_MAIN() { return 1; }
13928#endif
13929int
13930main ()
13931{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013932;
Martin v. Löwis11437992002-04-12 09:54:03 +000013933 ;
13934 return 0;
13935}
13936_ACEOF
13937rm -f conftest.$ac_objext
13938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13939 (eval $ac_compile) 2>&5
13940 ac_status=$?
13941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13942 (exit $ac_status); } &&
13943 { ac_try='test -s conftest.$ac_objext'
13944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13945 (eval $ac_try) 2>&5
13946 ac_status=$?
13947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13948 (exit $ac_status); }; }; then
13949
13950
13951cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013952#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013953_ACEOF
13954
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013955 was_it_defined=yes
13956
Guido van Rossumf78abae1997-01-21 22:02:36 +000013957else
Martin v. Löwis11437992002-04-12 09:54:03 +000013958 echo "$as_me: failed program was:" >&5
13959cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013960fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013961rm -f conftest.$ac_objext conftest.$ac_ext
13962echo "$as_me:$LINENO: result: $was_it_defined" >&5
13963echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013964
Martin v. Löwis11437992002-04-12 09:54:03 +000013965echo "$as_me:$LINENO: checking for addrinfo" >&5
13966echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13967if test "${ac_cv_struct_addrinfo+set}" = set; then
13968 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013969else
Martin v. Löwis11437992002-04-12 09:54:03 +000013970 cat >conftest.$ac_ext <<_ACEOF
13971#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013972#include "confdefs.h"
13973
13974# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013975#ifdef F77_DUMMY_MAIN
13976# ifdef __cplusplus
13977 extern "C"
13978# endif
13979 int F77_DUMMY_MAIN() { return 1; }
13980#endif
13981int
13982main ()
13983{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013984struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013985 ;
13986 return 0;
13987}
13988_ACEOF
13989rm -f conftest.$ac_objext
13990if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13991 (eval $ac_compile) 2>&5
13992 ac_status=$?
13993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13994 (exit $ac_status); } &&
13995 { ac_try='test -s conftest.$ac_objext'
13996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13997 (eval $ac_try) 2>&5
13998 ac_status=$?
13999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14000 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014001 ac_cv_struct_addrinfo=yes
14002else
Martin v. Löwis11437992002-04-12 09:54:03 +000014003 echo "$as_me: failed program was:" >&5
14004cat conftest.$ac_ext >&5
14005ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014006fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014007rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014008fi
14009
Martin v. Löwis11437992002-04-12 09:54:03 +000014010echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
14011echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014012if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014013
14014cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014015#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014016_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014017
14018fi
14019
Martin v. Löwis11437992002-04-12 09:54:03 +000014020echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
14021echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
14022if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
14023 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014024else
Martin v. Löwis11437992002-04-12 09:54:03 +000014025 cat >conftest.$ac_ext <<_ACEOF
14026#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014027#include "confdefs.h"
14028
14029# include <sys/types.h>
14030# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014031#ifdef F77_DUMMY_MAIN
14032# ifdef __cplusplus
14033 extern "C"
14034# endif
14035 int F77_DUMMY_MAIN() { return 1; }
14036#endif
14037int
14038main ()
14039{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014040struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014041 ;
14042 return 0;
14043}
14044_ACEOF
14045rm -f conftest.$ac_objext
14046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14047 (eval $ac_compile) 2>&5
14048 ac_status=$?
14049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14050 (exit $ac_status); } &&
14051 { ac_try='test -s conftest.$ac_objext'
14052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14053 (eval $ac_try) 2>&5
14054 ac_status=$?
14055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14056 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014057 ac_cv_struct_sockaddr_storage=yes
14058else
Martin v. Löwis11437992002-04-12 09:54:03 +000014059 echo "$as_me: failed program was:" >&5
14060cat conftest.$ac_ext >&5
14061ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014062fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014063rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014064fi
14065
Martin v. Löwis11437992002-04-12 09:54:03 +000014066echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14067echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014068if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014069
14070cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014071#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014072_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014073
14074fi
14075
Guido van Rossum627b2d71993-12-24 10:39:16 +000014076# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014077
Michael W. Hudson54241132001-12-07 15:38:26 +000014078
Martin v. Löwis11437992002-04-12 09:54:03 +000014079echo "$as_me:$LINENO: checking whether char is unsigned" >&5
14080echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
14081if test "${ac_cv_c_char_unsigned+set}" = set; then
14082 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000014083else
Martin v. Löwis11437992002-04-12 09:54:03 +000014084 cat >conftest.$ac_ext <<_ACEOF
14085#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000014086#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014087$ac_includes_default
14088#ifdef F77_DUMMY_MAIN
14089# ifdef __cplusplus
14090 extern "C"
14091# endif
14092 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014093#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014094int
14095main ()
14096{
14097static int test_array [1 - 2 * !(((char) -1) < 0)];
14098test_array [0] = 0
14099
14100 ;
14101 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014102}
Martin v. Löwis11437992002-04-12 09:54:03 +000014103_ACEOF
14104rm -f conftest.$ac_objext
14105if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14106 (eval $ac_compile) 2>&5
14107 ac_status=$?
14108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14109 (exit $ac_status); } &&
14110 { ac_try='test -s conftest.$ac_objext'
14111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14112 (eval $ac_try) 2>&5
14113 ac_status=$?
14114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14115 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000014116 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014117else
14118 echo "$as_me: failed program was:" >&5
14119cat conftest.$ac_ext >&5
14120ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014121fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014122rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014123fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014124echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
14125echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014126if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014127 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014128#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014129_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014130
14131fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014132
Martin v. Löwis11437992002-04-12 09:54:03 +000014133echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
14134echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14135if test "${ac_cv_prog_cc_stdc+set}" = set; then
14136 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014137else
Martin v. Löwis11437992002-04-12 09:54:03 +000014138 ac_cv_prog_cc_stdc=no
14139ac_save_CC=$CC
14140cat >conftest.$ac_ext <<_ACEOF
14141#line $LINENO "configure"
14142#include "confdefs.h"
14143#include <stdarg.h>
14144#include <stdio.h>
14145#include <sys/types.h>
14146#include <sys/stat.h>
14147/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14148struct buf { int x; };
14149FILE * (*rcsopen) (struct buf *, struct stat *, int);
14150static char *e (p, i)
14151 char **p;
14152 int i;
14153{
14154 return p[i];
14155}
14156static char *f (char * (*g) (char **, int), char **p, ...)
14157{
14158 char *s;
14159 va_list v;
14160 va_start (v,p);
14161 s = g (p, va_arg (v,int));
14162 va_end (v);
14163 return s;
14164}
14165int test (int i, double x);
14166struct s1 {int (*f) (int a);};
14167struct s2 {int (*f) (double a);};
14168int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14169int argc;
14170char **argv;
14171#ifdef F77_DUMMY_MAIN
14172# ifdef __cplusplus
14173 extern "C"
14174# endif
14175 int F77_DUMMY_MAIN() { return 1; }
14176#endif
14177int
14178main ()
14179{
14180return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14181 ;
14182 return 0;
14183}
14184_ACEOF
14185# Don't try gcc -ansi; that turns off useful extensions and
14186# breaks some systems' header files.
14187# AIX -qlanglvl=ansi
14188# Ultrix and OSF/1 -std1
14189# HP-UX 10.20 and later -Ae
14190# HP-UX older versions -Aa -D_HPUX_SOURCE
14191# SVR4 -Xc -D__EXTENSIONS__
14192for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14193do
14194 CC="$ac_save_CC $ac_arg"
14195 rm -f conftest.$ac_objext
14196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14197 (eval $ac_compile) 2>&5
14198 ac_status=$?
14199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14200 (exit $ac_status); } &&
14201 { ac_try='test -s conftest.$ac_objext'
14202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14203 (eval $ac_try) 2>&5
14204 ac_status=$?
14205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14206 (exit $ac_status); }; }; then
14207 ac_cv_prog_cc_stdc=$ac_arg
14208break
14209else
14210 echo "$as_me: failed program was:" >&5
14211cat conftest.$ac_ext >&5
14212fi
14213rm -f conftest.$ac_objext
14214done
14215rm -f conftest.$ac_ext conftest.$ac_objext
14216CC=$ac_save_CC
14217
14218fi
14219
14220case "x$ac_cv_prog_cc_stdc" in
14221 x|xno)
14222 echo "$as_me:$LINENO: result: none needed" >&5
14223echo "${ECHO_T}none needed" >&6 ;;
14224 *)
14225 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14226echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14227 CC="$CC $ac_cv_prog_cc_stdc" ;;
14228esac
14229
14230echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14231echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14232if test "${ac_cv_c_const+set}" = set; then
14233 echo $ECHO_N "(cached) $ECHO_C" >&6
14234else
14235 cat >conftest.$ac_ext <<_ACEOF
14236#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014237#include "confdefs.h"
14238
Martin v. Löwis11437992002-04-12 09:54:03 +000014239#ifdef F77_DUMMY_MAIN
14240# ifdef __cplusplus
14241 extern "C"
14242# endif
14243 int F77_DUMMY_MAIN() { return 1; }
14244#endif
14245int
14246main ()
14247{
14248/* FIXME: Include the comments suggested by Paul. */
14249#ifndef __cplusplus
14250 /* Ultrix mips cc rejects this. */
14251 typedef int charset[2];
14252 const charset x;
14253 /* SunOS 4.1.1 cc rejects this. */
14254 char const *const *ccp;
14255 char **p;
14256 /* NEC SVR4.0.2 mips cc rejects this. */
14257 struct point {int x, y;};
14258 static struct point const zero = {0,0};
14259 /* AIX XL C 1.02.0.0 rejects this.
14260 It does not let you subtract one const X* pointer from another in
14261 an arm of an if-expression whose if-part is not a constant
14262 expression */
14263 const char *g = "string";
14264 ccp = &g + (g ? g-g : 0);
14265 /* HPUX 7.0 cc rejects these. */
14266 ++ccp;
14267 p = (char**) ccp;
14268 ccp = (char const *const *) p;
14269 { /* SCO 3.2v4 cc rejects this. */
14270 char *t;
14271 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014272
Martin v. Löwis11437992002-04-12 09:54:03 +000014273 *t++ = 0;
14274 }
14275 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14276 int x[] = {25, 17};
14277 const int *foo = &x[0];
14278 ++foo;
14279 }
14280 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14281 typedef const int *iptr;
14282 iptr p = 0;
14283 ++p;
14284 }
14285 { /* AIX XL C 1.02.0.0 rejects this saying
14286 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14287 struct s { int j; const int *ap[3]; };
14288 struct s *b; b->j = 5;
14289 }
14290 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14291 const int foo = 10;
14292 }
14293#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014294
Martin v. Löwis11437992002-04-12 09:54:03 +000014295 ;
14296 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014297}
Martin v. Löwis11437992002-04-12 09:54:03 +000014298_ACEOF
14299rm -f conftest.$ac_objext
14300if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14301 (eval $ac_compile) 2>&5
14302 ac_status=$?
14303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14304 (exit $ac_status); } &&
14305 { ac_try='test -s conftest.$ac_objext'
14306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14307 (eval $ac_try) 2>&5
14308 ac_status=$?
14309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14310 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014311 ac_cv_c_const=yes
14312else
Martin v. Löwis11437992002-04-12 09:54:03 +000014313 echo "$as_me: failed program was:" >&5
14314cat conftest.$ac_ext >&5
14315ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014316fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014317rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014318fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014319echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14320echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014321if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014322
14323cat >>confdefs.h <<\_ACEOF
14324#define const
14325_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014326
14327fi
14328
Michael W. Hudson54241132001-12-07 15:38:26 +000014329
Guido van Rossumda88dad1995-01-26 00:46:29 +000014330works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014331echo "$as_me:$LINENO: checking for working volatile" >&5
14332echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14333cat >conftest.$ac_ext <<_ACEOF
14334#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014335#include "confdefs.h"
14336
Martin v. Löwis11437992002-04-12 09:54:03 +000014337#ifdef F77_DUMMY_MAIN
14338# ifdef __cplusplus
14339 extern "C"
14340# endif
14341 int F77_DUMMY_MAIN() { return 1; }
14342#endif
14343int
14344main ()
14345{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014346volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014347 ;
14348 return 0;
14349}
14350_ACEOF
14351rm -f conftest.$ac_objext
14352if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14353 (eval $ac_compile) 2>&5
14354 ac_status=$?
14355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14356 (exit $ac_status); } &&
14357 { ac_try='test -s conftest.$ac_objext'
14358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14359 (eval $ac_try) 2>&5
14360 ac_status=$?
14361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14362 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014363 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014364else
Martin v. Löwis11437992002-04-12 09:54:03 +000014365 echo "$as_me: failed program was:" >&5
14366cat conftest.$ac_ext >&5
14367
14368cat >>confdefs.h <<\_ACEOF
14369#define volatile
14370_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014371
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014372
Guido van Rossum627b2d71993-12-24 10:39:16 +000014373fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014374rm -f conftest.$ac_objext conftest.$ac_ext
14375echo "$as_me:$LINENO: result: $works" >&5
14376echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014377
Guido van Rossumda88dad1995-01-26 00:46:29 +000014378works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014379echo "$as_me:$LINENO: checking for working signed char" >&5
14380echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14381cat >conftest.$ac_ext <<_ACEOF
14382#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014383#include "confdefs.h"
14384
Martin v. Löwis11437992002-04-12 09:54:03 +000014385#ifdef F77_DUMMY_MAIN
14386# ifdef __cplusplus
14387 extern "C"
14388# endif
14389 int F77_DUMMY_MAIN() { return 1; }
14390#endif
14391int
14392main ()
14393{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014394signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014395 ;
14396 return 0;
14397}
14398_ACEOF
14399rm -f conftest.$ac_objext
14400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14401 (eval $ac_compile) 2>&5
14402 ac_status=$?
14403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14404 (exit $ac_status); } &&
14405 { ac_try='test -s conftest.$ac_objext'
14406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14407 (eval $ac_try) 2>&5
14408 ac_status=$?
14409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14410 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014411 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014412else
Martin v. Löwis11437992002-04-12 09:54:03 +000014413 echo "$as_me: failed program was:" >&5
14414cat conftest.$ac_ext >&5
14415
14416cat >>confdefs.h <<\_ACEOF
14417#define signed
14418_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000014419
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014420
Guido van Rossum7f43da71994-08-01 12:15:30 +000014421fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014422rm -f conftest.$ac_objext conftest.$ac_ext
14423echo "$as_me:$LINENO: result: $works" >&5
14424echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014425
Guido van Rossumda88dad1995-01-26 00:46:29 +000014426have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014427echo "$as_me:$LINENO: checking for prototypes" >&5
14428echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
14429cat >conftest.$ac_ext <<_ACEOF
14430#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014431#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014432int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014433#ifdef F77_DUMMY_MAIN
14434# ifdef __cplusplus
14435 extern "C"
14436# endif
14437 int F77_DUMMY_MAIN() { return 1; }
14438#endif
14439int
14440main ()
14441{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014442return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014443 ;
14444 return 0;
14445}
14446_ACEOF
14447rm -f conftest.$ac_objext
14448if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14449 (eval $ac_compile) 2>&5
14450 ac_status=$?
14451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14452 (exit $ac_status); } &&
14453 { ac_try='test -s conftest.$ac_objext'
14454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14455 (eval $ac_try) 2>&5
14456 ac_status=$?
14457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14458 (exit $ac_status); }; }; then
14459
14460
14461cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014462#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014463_ACEOF
14464
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014465 have_prototypes=yes
14466
Guido van Rossumf78abae1997-01-21 22:02:36 +000014467else
Martin v. Löwis11437992002-04-12 09:54:03 +000014468 echo "$as_me: failed program was:" >&5
14469cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014470fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014471rm -f conftest.$ac_objext conftest.$ac_ext
14472echo "$as_me:$LINENO: result: $have_prototypes" >&5
14473echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014474
Guido van Rossumda88dad1995-01-26 00:46:29 +000014475works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014476echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
14477echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
14478cat >conftest.$ac_ext <<_ACEOF
14479#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014480#include "confdefs.h"
14481
14482#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014483int foo(int x, ...) {
14484 va_list va;
14485 va_start(va, x);
14486 va_arg(va, int);
14487 va_arg(va, char *);
14488 va_arg(va, double);
14489 return 0;
14490}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014491
Martin v. Löwis11437992002-04-12 09:54:03 +000014492#ifdef F77_DUMMY_MAIN
14493# ifdef __cplusplus
14494 extern "C"
14495# endif
14496 int F77_DUMMY_MAIN() { return 1; }
14497#endif
14498int
14499main ()
14500{
Guido van Rossum90eea071996-08-30 20:58:57 +000014501return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014502 ;
14503 return 0;
14504}
14505_ACEOF
14506rm -f conftest.$ac_objext
14507if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14508 (eval $ac_compile) 2>&5
14509 ac_status=$?
14510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14511 (exit $ac_status); } &&
14512 { ac_try='test -s conftest.$ac_objext'
14513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14514 (eval $ac_try) 2>&5
14515 ac_status=$?
14516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14517 (exit $ac_status); }; }; then
14518
14519
14520cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014521#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014522_ACEOF
14523
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014524 works=yes
14525
Guido van Rossumf78abae1997-01-21 22:02:36 +000014526else
Martin v. Löwis11437992002-04-12 09:54:03 +000014527 echo "$as_me: failed program was:" >&5
14528cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000014529fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014530rm -f conftest.$ac_objext conftest.$ac_ext
14531echo "$as_me:$LINENO: result: $works" >&5
14532echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014533
Guido van Rossumda88dad1995-01-26 00:46:29 +000014534if test "$have_prototypes" = yes; then
14535bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014536echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
14537echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
14538cat >conftest.$ac_ext <<_ACEOF
14539#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014540#include "confdefs.h"
14541#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014542#ifdef F77_DUMMY_MAIN
14543# ifdef __cplusplus
14544 extern "C"
14545# endif
14546 int F77_DUMMY_MAIN() { return 1; }
14547#endif
14548int
14549main ()
14550{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014551char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000014552 ;
14553 return 0;
14554}
14555_ACEOF
14556rm -f conftest.$ac_objext
14557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14558 (eval $ac_compile) 2>&5
14559 ac_status=$?
14560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14561 (exit $ac_status); } &&
14562 { ac_try='test -s conftest.$ac_objext'
14563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14564 (eval $ac_try) 2>&5
14565 ac_status=$?
14566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14567 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014568 :
14569else
Martin v. Löwis11437992002-04-12 09:54:03 +000014570 echo "$as_me: failed program was:" >&5
14571cat conftest.$ac_ext >&5
14572
14573cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014574#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014575_ACEOF
14576
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014577 bad_prototypes=yes
14578
Guido van Rossum627b2d71993-12-24 10:39:16 +000014579fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014580rm -f conftest.$ac_objext conftest.$ac_ext
14581echo "$as_me:$LINENO: result: $bad_prototypes" >&5
14582echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014583fi
14584
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014585# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000014586echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
14587echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
14588cat >conftest.$ac_ext <<_ACEOF
14589#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014590#include "confdefs.h"
14591#include <sys/types.h>
14592#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014593#ifdef F77_DUMMY_MAIN
14594# ifdef __cplusplus
14595 extern "C"
14596# endif
14597 int F77_DUMMY_MAIN() { return 1; }
14598#endif
14599int
14600main ()
14601{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014602struct sockaddr x;
14603x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014604 ;
14605 return 0;
14606}
14607_ACEOF
14608rm -f conftest.$ac_objext
14609if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14610 (eval $ac_compile) 2>&5
14611 ac_status=$?
14612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14613 (exit $ac_status); } &&
14614 { ac_try='test -s conftest.$ac_objext'
14615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14616 (eval $ac_try) 2>&5
14617 ac_status=$?
14618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14619 (exit $ac_status); }; }; then
14620 echo "$as_me:$LINENO: result: yes" >&5
14621echo "${ECHO_T}yes" >&6
14622
14623cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014624#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014625_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014626
14627else
Martin v. Löwis11437992002-04-12 09:54:03 +000014628 echo "$as_me: failed program was:" >&5
14629cat conftest.$ac_ext >&5
14630echo "$as_me:$LINENO: result: no" >&5
14631echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014632fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014633rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014634
Guido van Rossumda88dad1995-01-26 00:46:29 +000014635va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014636echo "$as_me:$LINENO: checking whether va_list is an array" >&5
14637echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
14638cat >conftest.$ac_ext <<_ACEOF
14639#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014640#include "confdefs.h"
14641
14642#ifdef HAVE_STDARG_PROTOTYPES
14643#include <stdarg.h>
14644#else
14645#include <varargs.h>
14646#endif
14647
Martin v. Löwis11437992002-04-12 09:54:03 +000014648#ifdef F77_DUMMY_MAIN
14649# ifdef __cplusplus
14650 extern "C"
14651# endif
14652 int F77_DUMMY_MAIN() { return 1; }
14653#endif
14654int
14655main ()
14656{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014657va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000014658 ;
14659 return 0;
14660}
14661_ACEOF
14662rm -f conftest.$ac_objext
14663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14664 (eval $ac_compile) 2>&5
14665 ac_status=$?
14666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14667 (exit $ac_status); } &&
14668 { ac_try='test -s conftest.$ac_objext'
14669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14670 (eval $ac_try) 2>&5
14671 ac_status=$?
14672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14673 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014674 :
14675else
Martin v. Löwis11437992002-04-12 09:54:03 +000014676 echo "$as_me: failed program was:" >&5
14677cat conftest.$ac_ext >&5
14678
14679
14680cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014681#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014682_ACEOF
14683
Guido van Rossumda88dad1995-01-26 00:46:29 +000014684 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014685
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014686fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014687rm -f conftest.$ac_objext conftest.$ac_ext
14688echo "$as_me:$LINENO: result: $va_list_is_array" >&5
14689echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014690
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014691# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014692
14693
14694
14695echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
14696echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
14697if test "${ac_cv_func_gethostbyname_r+set}" = set; then
14698 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014699else
Martin v. Löwis11437992002-04-12 09:54:03 +000014700 cat >conftest.$ac_ext <<_ACEOF
14701#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014702#include "confdefs.h"
14703/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014704 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014705#include <assert.h>
14706/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014707#ifdef __cplusplus
14708extern "C"
14709#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014710/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014711 builtin and then its argument prototype would still apply. */
14712char gethostbyname_r ();
14713char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014714
Martin v. Löwis11437992002-04-12 09:54:03 +000014715#ifdef F77_DUMMY_MAIN
14716# ifdef __cplusplus
14717 extern "C"
14718# endif
14719 int F77_DUMMY_MAIN() { return 1; }
14720#endif
14721int
14722main ()
14723{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014724/* The GNU C library defines this for functions which it implements
14725 to always fail with ENOSYS. Some functions are actually named
14726 something starting with __ and the normal name is an alias. */
14727#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
14728choke me
14729#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014730f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014731#endif
14732
Martin v. Löwis11437992002-04-12 09:54:03 +000014733 ;
14734 return 0;
14735}
14736_ACEOF
14737rm -f conftest.$ac_objext conftest$ac_exeext
14738if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14739 (eval $ac_link) 2>&5
14740 ac_status=$?
14741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14742 (exit $ac_status); } &&
14743 { ac_try='test -s conftest$ac_exeext'
14744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14745 (eval $ac_try) 2>&5
14746 ac_status=$?
14747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14748 (exit $ac_status); }; }; then
14749 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014750else
Martin v. Löwis11437992002-04-12 09:54:03 +000014751 echo "$as_me: failed program was:" >&5
14752cat conftest.$ac_ext >&5
14753ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014754fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014755rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014756fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014757echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
14758echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
14759if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014760
Martin v. Löwis11437992002-04-12 09:54:03 +000014761 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014762#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014763_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014764
Martin v. Löwis11437992002-04-12 09:54:03 +000014765 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
14766echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014767 OLD_CFLAGS=$CFLAGS
14768 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014769 cat >conftest.$ac_ext <<_ACEOF
14770#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014771#include "confdefs.h"
14772
14773# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014774
14775#ifdef F77_DUMMY_MAIN
14776# ifdef __cplusplus
14777 extern "C"
14778# endif
14779 int F77_DUMMY_MAIN() { return 1; }
14780#endif
14781int
14782main ()
14783{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014784
14785 char *name;
14786 struct hostent *he, *res;
14787 char buffer[2048];
14788 int buflen = 2048;
14789 int h_errnop;
14790
14791 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014792
14793 ;
14794 return 0;
14795}
14796_ACEOF
14797rm -f conftest.$ac_objext
14798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14799 (eval $ac_compile) 2>&5
14800 ac_status=$?
14801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14802 (exit $ac_status); } &&
14803 { ac_try='test -s conftest.$ac_objext'
14804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14805 (eval $ac_try) 2>&5
14806 ac_status=$?
14807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14808 (exit $ac_status); }; }; then
14809
14810 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014811#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014812_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014813
Martin v. Löwis11437992002-04-12 09:54:03 +000014814
14815cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014816#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014817_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014818
Martin v. Löwis11437992002-04-12 09:54:03 +000014819 echo "$as_me:$LINENO: result: yes" >&5
14820echo "${ECHO_T}yes" >&6
14821
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014822else
Martin v. Löwis11437992002-04-12 09:54:03 +000014823 echo "$as_me: failed program was:" >&5
14824cat conftest.$ac_ext >&5
14825
14826 echo "$as_me:$LINENO: result: no" >&5
14827echo "${ECHO_T}no" >&6
14828 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14829echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14830 cat >conftest.$ac_ext <<_ACEOF
14831#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014832#include "confdefs.h"
14833
14834# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014835
14836#ifdef F77_DUMMY_MAIN
14837# ifdef __cplusplus
14838 extern "C"
14839# endif
14840 int F77_DUMMY_MAIN() { return 1; }
14841#endif
14842int
14843main ()
14844{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014845
14846 char *name;
14847 struct hostent *he;
14848 char buffer[2048];
14849 int buflen = 2048;
14850 int h_errnop;
14851
14852 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014853
14854 ;
14855 return 0;
14856}
14857_ACEOF
14858rm -f conftest.$ac_objext
14859if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14860 (eval $ac_compile) 2>&5
14861 ac_status=$?
14862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14863 (exit $ac_status); } &&
14864 { ac_try='test -s conftest.$ac_objext'
14865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14866 (eval $ac_try) 2>&5
14867 ac_status=$?
14868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14869 (exit $ac_status); }; }; then
14870
14871 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014872#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014873_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014874
Martin v. Löwis11437992002-04-12 09:54:03 +000014875
14876cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014877#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014878_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014879
Martin v. Löwis11437992002-04-12 09:54:03 +000014880 echo "$as_me:$LINENO: result: yes" >&5
14881echo "${ECHO_T}yes" >&6
14882
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014883else
Martin v. Löwis11437992002-04-12 09:54:03 +000014884 echo "$as_me: failed program was:" >&5
14885cat conftest.$ac_ext >&5
14886
14887 echo "$as_me:$LINENO: result: no" >&5
14888echo "${ECHO_T}no" >&6
14889 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14890echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14891 cat >conftest.$ac_ext <<_ACEOF
14892#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014893#include "confdefs.h"
14894
14895# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014896
14897#ifdef F77_DUMMY_MAIN
14898# ifdef __cplusplus
14899 extern "C"
14900# endif
14901 int F77_DUMMY_MAIN() { return 1; }
14902#endif
14903int
14904main ()
14905{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014906
14907 char *name;
14908 struct hostent *he;
14909 struct hostent_data data;
14910
14911 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014912
14913 ;
14914 return 0;
14915}
14916_ACEOF
14917rm -f conftest.$ac_objext
14918if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14919 (eval $ac_compile) 2>&5
14920 ac_status=$?
14921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14922 (exit $ac_status); } &&
14923 { ac_try='test -s conftest.$ac_objext'
14924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14925 (eval $ac_try) 2>&5
14926 ac_status=$?
14927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14928 (exit $ac_status); }; }; then
14929
14930 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014931#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014932_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014933
Martin v. Löwis11437992002-04-12 09:54:03 +000014934
14935cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014936#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014937_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014938
Martin v. Löwis11437992002-04-12 09:54:03 +000014939 echo "$as_me:$LINENO: result: yes" >&5
14940echo "${ECHO_T}yes" >&6
14941
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014942else
Martin v. Löwis11437992002-04-12 09:54:03 +000014943 echo "$as_me: failed program was:" >&5
14944cat conftest.$ac_ext >&5
14945
14946 echo "$as_me:$LINENO: result: no" >&5
14947echo "${ECHO_T}no" >&6
14948
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014949fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014950rm -f conftest.$ac_objext conftest.$ac_ext
14951
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014952fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014953rm -f conftest.$ac_objext conftest.$ac_ext
14954
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014955fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014956rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014957 CFLAGS=$OLD_CFLAGS
14958
14959else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014960
Martin v. Löwis11437992002-04-12 09:54:03 +000014961
14962for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014963do
Martin v. Löwis11437992002-04-12 09:54:03 +000014964as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14965echo "$as_me:$LINENO: checking for $ac_func" >&5
14966echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14967if eval "test \"\${$as_ac_var+set}\" = set"; then
14968 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014969else
Martin v. Löwis11437992002-04-12 09:54:03 +000014970 cat >conftest.$ac_ext <<_ACEOF
14971#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014972#include "confdefs.h"
14973/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014974 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014975#include <assert.h>
14976/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014977#ifdef __cplusplus
14978extern "C"
14979#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014980/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014981 builtin and then its argument prototype would still apply. */
14982char $ac_func ();
14983char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014984
Martin v. Löwis11437992002-04-12 09:54:03 +000014985#ifdef F77_DUMMY_MAIN
14986# ifdef __cplusplus
14987 extern "C"
14988# endif
14989 int F77_DUMMY_MAIN() { return 1; }
14990#endif
14991int
14992main ()
14993{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014994/* The GNU C library defines this for functions which it implements
14995 to always fail with ENOSYS. Some functions are actually named
14996 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014997#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014998choke me
14999#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015000f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015001#endif
15002
Martin v. Löwis11437992002-04-12 09:54:03 +000015003 ;
15004 return 0;
15005}
15006_ACEOF
15007rm -f conftest.$ac_objext conftest$ac_exeext
15008if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15009 (eval $ac_link) 2>&5
15010 ac_status=$?
15011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15012 (exit $ac_status); } &&
15013 { ac_try='test -s conftest$ac_exeext'
15014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15015 (eval $ac_try) 2>&5
15016 ac_status=$?
15017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15018 (exit $ac_status); }; }; then
15019 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015020else
Martin v. Löwis11437992002-04-12 09:54:03 +000015021 echo "$as_me: failed program was:" >&5
15022cat conftest.$ac_ext >&5
15023eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015024fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015025rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015026fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015027echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15028echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15029if test `eval echo '${'$as_ac_var'}'` = yes; then
15030 cat >>confdefs.h <<_ACEOF
15031#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15032_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015033
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015034fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015035done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015036
Michael W. Hudson54241132001-12-07 15:38:26 +000015037
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015038fi
15039
Michael W. Hudson54241132001-12-07 15:38:26 +000015040
15041
15042
15043
15044
15045
Guido van Rossum627b2d71993-12-24 10:39:16 +000015046# checks for system services
15047# (none yet)
15048
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015049# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015050echo "$as_me:$LINENO: checking for __fpu_control" >&5
15051echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15052if test "${ac_cv_func___fpu_control+set}" = set; then
15053 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015054else
Martin v. Löwis11437992002-04-12 09:54:03 +000015055 cat >conftest.$ac_ext <<_ACEOF
15056#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015057#include "confdefs.h"
15058/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015059 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015060#include <assert.h>
15061/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015062#ifdef __cplusplus
15063extern "C"
15064#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015065/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015066 builtin and then its argument prototype would still apply. */
15067char __fpu_control ();
15068char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015069
Martin v. Löwis11437992002-04-12 09:54:03 +000015070#ifdef F77_DUMMY_MAIN
15071# ifdef __cplusplus
15072 extern "C"
15073# endif
15074 int F77_DUMMY_MAIN() { return 1; }
15075#endif
15076int
15077main ()
15078{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015079/* The GNU C library defines this for functions which it implements
15080 to always fail with ENOSYS. Some functions are actually named
15081 something starting with __ and the normal name is an alias. */
15082#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
15083choke me
15084#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015085f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015086#endif
15087
Martin v. Löwis11437992002-04-12 09:54:03 +000015088 ;
15089 return 0;
15090}
15091_ACEOF
15092rm -f conftest.$ac_objext conftest$ac_exeext
15093if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15094 (eval $ac_link) 2>&5
15095 ac_status=$?
15096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15097 (exit $ac_status); } &&
15098 { ac_try='test -s conftest$ac_exeext'
15099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15100 (eval $ac_try) 2>&5
15101 ac_status=$?
15102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15103 (exit $ac_status); }; }; then
15104 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015105else
Martin v. Löwis11437992002-04-12 09:54:03 +000015106 echo "$as_me: failed program was:" >&5
15107cat conftest.$ac_ext >&5
15108ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015109fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015110rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015111fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015112echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
15113echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
15114if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015115 :
15116else
Martin v. Löwis11437992002-04-12 09:54:03 +000015117
15118echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
15119echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
15120if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
15121 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015122else
Martin v. Löwis11437992002-04-12 09:54:03 +000015123 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015124LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015125cat >conftest.$ac_ext <<_ACEOF
15126#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015127#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015128
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015129/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015130#ifdef __cplusplus
15131extern "C"
15132#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015133/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015134 builtin and then its argument prototype would still apply. */
15135char __fpu_control ();
15136#ifdef F77_DUMMY_MAIN
15137# ifdef __cplusplus
15138 extern "C"
15139# endif
15140 int F77_DUMMY_MAIN() { return 1; }
15141#endif
15142int
15143main ()
15144{
15145__fpu_control ();
15146 ;
15147 return 0;
15148}
15149_ACEOF
15150rm -f conftest.$ac_objext conftest$ac_exeext
15151if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15152 (eval $ac_link) 2>&5
15153 ac_status=$?
15154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15155 (exit $ac_status); } &&
15156 { ac_try='test -s conftest$ac_exeext'
15157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15158 (eval $ac_try) 2>&5
15159 ac_status=$?
15160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15161 (exit $ac_status); }; }; then
15162 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015163else
Martin v. Löwis11437992002-04-12 09:54:03 +000015164 echo "$as_me: failed program was:" >&5
15165cat conftest.$ac_ext >&5
15166ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015167fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015168rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15169LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015170fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015171echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15172echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15173if test $ac_cv_lib_ieee___fpu_control = yes; then
15174 cat >>confdefs.h <<_ACEOF
15175#define HAVE_LIBIEEE 1
15176_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015177
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015178 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015179
Guido van Rossum627b2d71993-12-24 10:39:16 +000015180fi
15181
Michael W. Hudson54241132001-12-07 15:38:26 +000015182
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015183fi
15184
Michael W. Hudson54241132001-12-07 15:38:26 +000015185
Guido van Rossum7f253911997-05-09 02:42:48 +000015186# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015187echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15188echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15189
Guido van Rossum7f253911997-05-09 02:42:48 +000015190# Check whether --with-fpectl or --without-fpectl was given.
15191if test "${with_fpectl+set}" = set; then
15192 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015193
Guido van Rossum7f253911997-05-09 02:42:48 +000015194if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015195then
15196
15197cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015198#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015199_ACEOF
15200
15201 echo "$as_me:$LINENO: result: yes" >&5
15202echo "${ECHO_T}yes" >&6
15203else echo "$as_me:$LINENO: result: no" >&5
15204echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015205fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015206else
Martin v. Löwis11437992002-04-12 09:54:03 +000015207 echo "$as_me:$LINENO: result: no" >&5
15208echo "${ECHO_T}no" >&6
15209fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015210
Guido van Rossum7f43da71994-08-01 12:15:30 +000015211# check for --with-libm=...
15212
Guido van Rossum563e7081996-09-10 18:20:48 +000015213case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015214Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015215BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015216*) LIBM=-lm
15217esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015218echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15219echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15220
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015221# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015222if test "${with_libm+set}" = set; then
15223 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015224
Guido van Rossum7f253911997-05-09 02:42:48 +000015225if test "$withval" = no
15226then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015227 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15228echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015229elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015230then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015231 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15232echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15233else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15234echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15235 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015236fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015237else
Martin v. Löwis11437992002-04-12 09:54:03 +000015238 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15239echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15240fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015241
15242# check for --with-libc=...
15243
Martin v. Löwis11437992002-04-12 09:54:03 +000015244echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15245echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15246
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015247# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015248if test "${with_libc+set}" = set; then
15249 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015250
Guido van Rossum7f253911997-05-09 02:42:48 +000015251if test "$withval" = no
15252then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015253 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15254echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015255elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015256then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015257 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
15258echo "${ECHO_T}set LIBC=\"$withval\"" >&6
15259else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
15260echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
15261 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015262fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015263else
Martin v. Löwis11437992002-04-12 09:54:03 +000015264 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
15265echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
15266fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015267
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015268# check for hypot() in math library
15269LIBS_SAVE=$LIBS
15270LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000015271
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015272for ac_func in hypot
15273do
Martin v. Löwis11437992002-04-12 09:54:03 +000015274as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15275echo "$as_me:$LINENO: checking for $ac_func" >&5
15276echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15277if eval "test \"\${$as_ac_var+set}\" = set"; then
15278 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015279else
Martin v. Löwis11437992002-04-12 09:54:03 +000015280 cat >conftest.$ac_ext <<_ACEOF
15281#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015282#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015283/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015284 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015285#include <assert.h>
15286/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015287#ifdef __cplusplus
15288extern "C"
15289#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015290/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015291 builtin and then its argument prototype would still apply. */
15292char $ac_func ();
15293char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015294
Martin v. Löwis11437992002-04-12 09:54:03 +000015295#ifdef F77_DUMMY_MAIN
15296# ifdef __cplusplus
15297 extern "C"
15298# endif
15299 int F77_DUMMY_MAIN() { return 1; }
15300#endif
15301int
15302main ()
15303{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015304/* The GNU C library defines this for functions which it implements
15305 to always fail with ENOSYS. Some functions are actually named
15306 something starting with __ and the normal name is an alias. */
15307#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15308choke me
15309#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015310f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015311#endif
15312
Martin v. Löwis11437992002-04-12 09:54:03 +000015313 ;
15314 return 0;
15315}
15316_ACEOF
15317rm -f conftest.$ac_objext conftest$ac_exeext
15318if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15319 (eval $ac_link) 2>&5
15320 ac_status=$?
15321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15322 (exit $ac_status); } &&
15323 { ac_try='test -s conftest$ac_exeext'
15324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15325 (eval $ac_try) 2>&5
15326 ac_status=$?
15327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15328 (exit $ac_status); }; }; then
15329 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015330else
Martin v. Löwis11437992002-04-12 09:54:03 +000015331 echo "$as_me: failed program was:" >&5
15332cat conftest.$ac_ext >&5
15333eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015334fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015335rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015336fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015337echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15338echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15339if test `eval echo '${'$as_ac_var'}'` = yes; then
15340 cat >>confdefs.h <<_ACEOF
15341#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15342_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015343
Michael W. Hudson54241132001-12-07 15:38:26 +000015344else
Martin v. Löwis11437992002-04-12 09:54:03 +000015345 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015346fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015347done
15348
Michael W. Hudson54241132001-12-07 15:38:26 +000015349
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015350LIBS=$LIBS_SAVE
15351
Guido van Rossumef2255b2000-03-10 22:30:29 +000015352# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015353if test "${ac_cv_header_wchar_h+set}" = set; then
15354 echo "$as_me:$LINENO: checking for wchar.h" >&5
15355echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15356if test "${ac_cv_header_wchar_h+set}" = set; then
15357 echo $ECHO_N "(cached) $ECHO_C" >&6
15358fi
15359echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15360echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015361else
Martin v. Löwis11437992002-04-12 09:54:03 +000015362 # Is the header compilable?
15363echo "$as_me:$LINENO: checking wchar.h usability" >&5
15364echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15365cat >conftest.$ac_ext <<_ACEOF
15366#line $LINENO "configure"
15367#include "confdefs.h"
15368$ac_includes_default
15369#include <wchar.h>
15370_ACEOF
15371rm -f conftest.$ac_objext
15372if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15373 (eval $ac_compile) 2>&5
15374 ac_status=$?
15375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15376 (exit $ac_status); } &&
15377 { ac_try='test -s conftest.$ac_objext'
15378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15379 (eval $ac_try) 2>&5
15380 ac_status=$?
15381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15382 (exit $ac_status); }; }; then
15383 ac_header_compiler=yes
15384else
15385 echo "$as_me: failed program was:" >&5
15386cat conftest.$ac_ext >&5
15387ac_header_compiler=no
15388fi
15389rm -f conftest.$ac_objext conftest.$ac_ext
15390echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15391echo "${ECHO_T}$ac_header_compiler" >&6
15392
15393# Is the header present?
15394echo "$as_me:$LINENO: checking wchar.h presence" >&5
15395echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
15396cat >conftest.$ac_ext <<_ACEOF
15397#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015398#include "confdefs.h"
15399#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015400_ACEOF
15401if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15402 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15403 ac_status=$?
15404 egrep -v '^ *\+' conftest.er1 >conftest.err
15405 rm -f conftest.er1
15406 cat conftest.err >&5
15407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15408 (exit $ac_status); } >/dev/null; then
15409 if test -s conftest.err; then
15410 ac_cpp_err=$ac_c_preproc_warn_flag
15411 else
15412 ac_cpp_err=
15413 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015414else
Martin v. Löwis11437992002-04-12 09:54:03 +000015415 ac_cpp_err=yes
15416fi
15417if test -z "$ac_cpp_err"; then
15418 ac_header_preproc=yes
15419else
15420 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000015421 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015422 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015423fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015424rm -f conftest.err conftest.$ac_ext
15425echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15426echo "${ECHO_T}$ac_header_preproc" >&6
15427
15428# So? What about this header?
15429case $ac_header_compiler:$ac_header_preproc in
15430 yes:no )
15431 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
15432echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15433 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15434echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15435 no:yes )
15436 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
15437echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
15438 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
15439echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
15440 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15441echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15442esac
15443echo "$as_me:$LINENO: checking for wchar.h" >&5
15444echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15445if test "${ac_cv_header_wchar_h+set}" = set; then
15446 echo $ECHO_N "(cached) $ECHO_C" >&6
15447else
15448 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000015449fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015450echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15451echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
15452
15453fi
15454if test $ac_cv_header_wchar_h = yes; then
15455
15456
15457cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015458#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015459_ACEOF
15460
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015461 wchar_h="yes"
15462
Guido van Rossumef2255b2000-03-10 22:30:29 +000015463else
Martin v. Löwis11437992002-04-12 09:54:03 +000015464 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015465
15466fi
15467
Michael W. Hudson54241132001-12-07 15:38:26 +000015468
Martin v. Löwis11437992002-04-12 09:54:03 +000015469
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015470# determine wchar_t size
15471if test "$wchar_h" = yes
15472then
Martin v. Löwis11437992002-04-12 09:54:03 +000015473 echo "$as_me:$LINENO: checking for wchar_t" >&5
15474echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
15475if test "${ac_cv_type_wchar_t+set}" = set; then
15476 echo $ECHO_N "(cached) $ECHO_C" >&6
15477else
15478 cat >conftest.$ac_ext <<_ACEOF
15479#line $LINENO "configure"
15480#include "confdefs.h"
15481#include <wchar.h>
15482
15483#ifdef F77_DUMMY_MAIN
15484# ifdef __cplusplus
15485 extern "C"
15486# endif
15487 int F77_DUMMY_MAIN() { return 1; }
15488#endif
15489int
15490main ()
15491{
15492if ((wchar_t *) 0)
15493 return 0;
15494if (sizeof (wchar_t))
15495 return 0;
15496 ;
15497 return 0;
15498}
15499_ACEOF
15500rm -f conftest.$ac_objext
15501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15502 (eval $ac_compile) 2>&5
15503 ac_status=$?
15504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15505 (exit $ac_status); } &&
15506 { ac_try='test -s conftest.$ac_objext'
15507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15508 (eval $ac_try) 2>&5
15509 ac_status=$?
15510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15511 (exit $ac_status); }; }; then
15512 ac_cv_type_wchar_t=yes
15513else
15514 echo "$as_me: failed program was:" >&5
15515cat conftest.$ac_ext >&5
15516ac_cv_type_wchar_t=no
15517fi
15518rm -f conftest.$ac_objext conftest.$ac_ext
15519fi
15520echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
15521echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
15522
15523echo "$as_me:$LINENO: checking size of wchar_t" >&5
15524echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
15525if test "${ac_cv_sizeof_wchar_t+set}" = set; then
15526 echo $ECHO_N "(cached) $ECHO_C" >&6
15527else
15528 if test "$ac_cv_type_wchar_t" = yes; then
15529 # The cast to unsigned long works around a bug in the HP C Compiler
15530 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15531 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15532 # This bug is HP SR number 8606223364.
15533 if test "$cross_compiling" = yes; then
15534 # Depending upon the size, compute the lo and hi bounds.
15535cat >conftest.$ac_ext <<_ACEOF
15536#line $LINENO "configure"
15537#include "confdefs.h"
15538#include <wchar.h>
15539
15540#ifdef F77_DUMMY_MAIN
15541# ifdef __cplusplus
15542 extern "C"
15543# endif
15544 int F77_DUMMY_MAIN() { return 1; }
15545#endif
15546int
15547main ()
15548{
15549static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
15550test_array [0] = 0
15551
15552 ;
15553 return 0;
15554}
15555_ACEOF
15556rm -f conftest.$ac_objext
15557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15558 (eval $ac_compile) 2>&5
15559 ac_status=$?
15560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15561 (exit $ac_status); } &&
15562 { ac_try='test -s conftest.$ac_objext'
15563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15564 (eval $ac_try) 2>&5
15565 ac_status=$?
15566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15567 (exit $ac_status); }; }; then
15568 ac_lo=0 ac_mid=0
15569 while :; do
15570 cat >conftest.$ac_ext <<_ACEOF
15571#line $LINENO "configure"
15572#include "confdefs.h"
15573#include <wchar.h>
15574
15575#ifdef F77_DUMMY_MAIN
15576# ifdef __cplusplus
15577 extern "C"
15578# endif
15579 int F77_DUMMY_MAIN() { return 1; }
15580#endif
15581int
15582main ()
15583{
15584static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15585test_array [0] = 0
15586
15587 ;
15588 return 0;
15589}
15590_ACEOF
15591rm -f conftest.$ac_objext
15592if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15593 (eval $ac_compile) 2>&5
15594 ac_status=$?
15595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15596 (exit $ac_status); } &&
15597 { ac_try='test -s conftest.$ac_objext'
15598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15599 (eval $ac_try) 2>&5
15600 ac_status=$?
15601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15602 (exit $ac_status); }; }; then
15603 ac_hi=$ac_mid; break
15604else
15605 echo "$as_me: failed program was:" >&5
15606cat conftest.$ac_ext >&5
15607ac_lo=`expr $ac_mid + 1`
15608 if test $ac_lo -le $ac_mid; then
15609 ac_lo= ac_hi=
15610 break
15611 fi
15612 ac_mid=`expr 2 '*' $ac_mid + 1`
15613fi
15614rm -f conftest.$ac_objext conftest.$ac_ext
15615 done
15616else
15617 echo "$as_me: failed program was:" >&5
15618cat conftest.$ac_ext >&5
15619cat >conftest.$ac_ext <<_ACEOF
15620#line $LINENO "configure"
15621#include "confdefs.h"
15622#include <wchar.h>
15623
15624#ifdef F77_DUMMY_MAIN
15625# ifdef __cplusplus
15626 extern "C"
15627# endif
15628 int F77_DUMMY_MAIN() { return 1; }
15629#endif
15630int
15631main ()
15632{
15633static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
15634test_array [0] = 0
15635
15636 ;
15637 return 0;
15638}
15639_ACEOF
15640rm -f conftest.$ac_objext
15641if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15642 (eval $ac_compile) 2>&5
15643 ac_status=$?
15644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15645 (exit $ac_status); } &&
15646 { ac_try='test -s conftest.$ac_objext'
15647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15648 (eval $ac_try) 2>&5
15649 ac_status=$?
15650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15651 (exit $ac_status); }; }; then
15652 ac_hi=-1 ac_mid=-1
15653 while :; do
15654 cat >conftest.$ac_ext <<_ACEOF
15655#line $LINENO "configure"
15656#include "confdefs.h"
15657#include <wchar.h>
15658
15659#ifdef F77_DUMMY_MAIN
15660# ifdef __cplusplus
15661 extern "C"
15662# endif
15663 int F77_DUMMY_MAIN() { return 1; }
15664#endif
15665int
15666main ()
15667{
15668static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
15669test_array [0] = 0
15670
15671 ;
15672 return 0;
15673}
15674_ACEOF
15675rm -f conftest.$ac_objext
15676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15677 (eval $ac_compile) 2>&5
15678 ac_status=$?
15679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15680 (exit $ac_status); } &&
15681 { ac_try='test -s conftest.$ac_objext'
15682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15683 (eval $ac_try) 2>&5
15684 ac_status=$?
15685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15686 (exit $ac_status); }; }; then
15687 ac_lo=$ac_mid; break
15688else
15689 echo "$as_me: failed program was:" >&5
15690cat conftest.$ac_ext >&5
15691ac_hi=`expr '(' $ac_mid ')' - 1`
15692 if test $ac_mid -le $ac_hi; then
15693 ac_lo= ac_hi=
15694 break
15695 fi
15696 ac_mid=`expr 2 '*' $ac_mid`
15697fi
15698rm -f conftest.$ac_objext conftest.$ac_ext
15699 done
15700else
15701 echo "$as_me: failed program was:" >&5
15702cat conftest.$ac_ext >&5
15703ac_lo= ac_hi=
15704fi
15705rm -f conftest.$ac_objext conftest.$ac_ext
15706fi
15707rm -f conftest.$ac_objext conftest.$ac_ext
15708# Binary search between lo and hi bounds.
15709while test "x$ac_lo" != "x$ac_hi"; do
15710 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15711 cat >conftest.$ac_ext <<_ACEOF
15712#line $LINENO "configure"
15713#include "confdefs.h"
15714#include <wchar.h>
15715
15716#ifdef F77_DUMMY_MAIN
15717# ifdef __cplusplus
15718 extern "C"
15719# endif
15720 int F77_DUMMY_MAIN() { return 1; }
15721#endif
15722int
15723main ()
15724{
15725static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15726test_array [0] = 0
15727
15728 ;
15729 return 0;
15730}
15731_ACEOF
15732rm -f conftest.$ac_objext
15733if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15734 (eval $ac_compile) 2>&5
15735 ac_status=$?
15736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15737 (exit $ac_status); } &&
15738 { ac_try='test -s conftest.$ac_objext'
15739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15740 (eval $ac_try) 2>&5
15741 ac_status=$?
15742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15743 (exit $ac_status); }; }; then
15744 ac_hi=$ac_mid
15745else
15746 echo "$as_me: failed program was:" >&5
15747cat conftest.$ac_ext >&5
15748ac_lo=`expr '(' $ac_mid ')' + 1`
15749fi
15750rm -f conftest.$ac_objext conftest.$ac_ext
15751done
15752case $ac_lo in
15753?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15754'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15755echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15756 { (exit 1); exit 1; }; } ;;
15757esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015758else
15759 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015760 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15761echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15762 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015763else
Martin v. Löwis11437992002-04-12 09:54:03 +000015764 cat >conftest.$ac_ext <<_ACEOF
15765#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015766#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015767#include <wchar.h>
15768
15769long longval () { return (long) (sizeof (wchar_t)); }
15770unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015771#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015772#include <stdlib.h>
15773#ifdef F77_DUMMY_MAIN
15774# ifdef __cplusplus
15775 extern "C"
15776# endif
15777 int F77_DUMMY_MAIN() { return 1; }
15778#endif
15779int
15780main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015781{
Martin v. Löwis11437992002-04-12 09:54:03 +000015782
15783 FILE *f = fopen ("conftest.val", "w");
15784 if (! f)
15785 exit (1);
15786 if (((long) (sizeof (wchar_t))) < 0)
15787 {
15788 long i = longval ();
15789 if (i != ((long) (sizeof (wchar_t))))
15790 exit (1);
15791 fprintf (f, "%ld\n", i);
15792 }
15793 else
15794 {
15795 unsigned long i = ulongval ();
15796 if (i != ((long) (sizeof (wchar_t))))
15797 exit (1);
15798 fprintf (f, "%lu\n", i);
15799 }
15800 exit (ferror (f) || fclose (f) != 0);
15801
15802 ;
15803 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015804}
Martin v. Löwis11437992002-04-12 09:54:03 +000015805_ACEOF
15806rm -f conftest$ac_exeext
15807if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15808 (eval $ac_link) 2>&5
15809 ac_status=$?
15810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15811 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15813 (eval $ac_try) 2>&5
15814 ac_status=$?
15815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15816 (exit $ac_status); }; }; then
15817 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015818else
Martin v. Löwis11437992002-04-12 09:54:03 +000015819 echo "$as_me: program exited with status $ac_status" >&5
15820echo "$as_me: failed program was:" >&5
15821cat conftest.$ac_ext >&5
15822( exit $ac_status )
15823{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15824echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15825 { (exit 1); exit 1; }; }
15826fi
15827rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15828fi
15829fi
15830rm -f conftest.val
15831else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015832 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015833fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015834fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015835echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15836echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15837cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015838#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015839_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015840
Michael W. Hudson54241132001-12-07 15:38:26 +000015841
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015842fi
15843
Martin v. Löwis11437992002-04-12 09:54:03 +000015844echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15845echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015846# Check whether --enable-unicode or --disable-unicode was given.
15847if test "${enable_unicode+set}" = set; then
15848 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015849
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015850else
15851 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015852fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015853
15854if test $enable_unicode = yes
15855then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015856 # Without any arguments, Py_UNICODE defaults to two-byte mode
15857 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015858fi
15859
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015860
15861
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015862case "$enable_unicode" in
15863ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015864 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015865#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015866_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015867
15868 ;;
15869ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015870 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015871#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015872_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015873
15874 ;;
15875esac
15876
Michael W. Hudson54241132001-12-07 15:38:26 +000015877
Martin v. Löwis11437992002-04-12 09:54:03 +000015878
15879
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015880
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015881if test "$enable_unicode" = "no"
15882then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015883 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015884 echo "$as_me:$LINENO: result: not used" >&5
15885echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015886else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015887 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015888
15889cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015890#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015891_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015892
15893 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15894 then
15895 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015896
Martin v. Löwis11437992002-04-12 09:54:03 +000015897cat >>confdefs.h <<\_ACEOF
15898#define HAVE_USABLE_WCHAR_T 1
15899_ACEOF
15900
15901 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015902#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015903_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015904
15905 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15906 then
15907 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015908 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015909#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015910_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015911
15912 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15913 then
15914 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015915 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015916#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015917_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015918
15919 else
15920 PY_UNICODE_TYPE="no type found"
15921 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015922 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15923echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015924fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015925
15926# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015927echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15928echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15929if test "${ac_cv_c_bigendian+set}" = set; then
15930 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015931else
Martin v. Löwis11437992002-04-12 09:54:03 +000015932 # See if sys/param.h defines the BYTE_ORDER macro.
15933cat >conftest.$ac_ext <<_ACEOF
15934#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015935#include "confdefs.h"
15936#include <sys/types.h>
15937#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015938
Martin v. Löwis11437992002-04-12 09:54:03 +000015939#ifdef F77_DUMMY_MAIN
15940# ifdef __cplusplus
15941 extern "C"
15942# endif
15943 int F77_DUMMY_MAIN() { return 1; }
15944#endif
15945int
15946main ()
15947{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015948#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15949 bogus endian macros
15950#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015951
15952 ;
15953 return 0;
15954}
15955_ACEOF
15956rm -f conftest.$ac_objext
15957if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15958 (eval $ac_compile) 2>&5
15959 ac_status=$?
15960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15961 (exit $ac_status); } &&
15962 { ac_try='test -s conftest.$ac_objext'
15963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15964 (eval $ac_try) 2>&5
15965 ac_status=$?
15966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15967 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015968 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015969cat >conftest.$ac_ext <<_ACEOF
15970#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015971#include "confdefs.h"
15972#include <sys/types.h>
15973#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015974
Martin v. Löwis11437992002-04-12 09:54:03 +000015975#ifdef F77_DUMMY_MAIN
15976# ifdef __cplusplus
15977 extern "C"
15978# endif
15979 int F77_DUMMY_MAIN() { return 1; }
15980#endif
15981int
15982main ()
15983{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015984#if BYTE_ORDER != BIG_ENDIAN
15985 not big endian
15986#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015987
15988 ;
15989 return 0;
15990}
15991_ACEOF
15992rm -f conftest.$ac_objext
15993if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15994 (eval $ac_compile) 2>&5
15995 ac_status=$?
15996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15997 (exit $ac_status); } &&
15998 { ac_try='test -s conftest.$ac_objext'
15999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16000 (eval $ac_try) 2>&5
16001 ac_status=$?
16002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16003 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016004 ac_cv_c_bigendian=yes
16005else
Martin v. Löwis11437992002-04-12 09:54:03 +000016006 echo "$as_me: failed program was:" >&5
16007cat conftest.$ac_ext >&5
16008ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016009fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016010rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016011else
Martin v. Löwis11437992002-04-12 09:54:03 +000016012 echo "$as_me: failed program was:" >&5
16013cat conftest.$ac_ext >&5
16014# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000016015if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016016 # try to guess the endianess by grep'ing values into an object file
16017 ac_cv_c_bigendian=unknown
16018 cat >conftest.$ac_ext <<_ACEOF
16019#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016020#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016021short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16022short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16023void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
16024short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16025short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16026void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
16027#ifdef F77_DUMMY_MAIN
16028# ifdef __cplusplus
16029 extern "C"
16030# endif
16031 int F77_DUMMY_MAIN() { return 1; }
16032#endif
16033int
16034main ()
16035{
16036 _ascii (); _ebcdic ();
16037 ;
16038 return 0;
16039}
16040_ACEOF
16041rm -f conftest.$ac_objext
16042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16043 (eval $ac_compile) 2>&5
16044 ac_status=$?
16045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16046 (exit $ac_status); } &&
16047 { ac_try='test -s conftest.$ac_objext'
16048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16049 (eval $ac_try) 2>&5
16050 ac_status=$?
16051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16052 (exit $ac_status); }; }; then
16053 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
16054 ac_cv_c_bigendian=yes
16055fi
16056if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16057 if test "$ac_cv_c_bigendian" = unknown; then
16058 ac_cv_c_bigendian=no
16059 else
16060 # finding both strings is unlikely to happen, but who knows?
16061 ac_cv_c_bigendian=unknown
16062 fi
16063fi
16064else
16065 echo "$as_me: failed program was:" >&5
16066cat conftest.$ac_ext >&5
16067fi
16068rm -f conftest.$ac_objext conftest.$ac_ext
16069else
16070 cat >conftest.$ac_ext <<_ACEOF
16071#line $LINENO "configure"
16072#include "confdefs.h"
16073int
16074main ()
16075{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016076 /* Are we little or big endian? From Harbison&Steele. */
16077 union
16078 {
16079 long l;
16080 char c[sizeof (long)];
16081 } u;
16082 u.l = 1;
16083 exit (u.c[sizeof (long) - 1] == 1);
16084}
Martin v. Löwis11437992002-04-12 09:54:03 +000016085_ACEOF
16086rm -f conftest$ac_exeext
16087if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16088 (eval $ac_link) 2>&5
16089 ac_status=$?
16090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16091 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16093 (eval $ac_try) 2>&5
16094 ac_status=$?
16095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16096 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016097 ac_cv_c_bigendian=no
16098else
Martin v. Löwis11437992002-04-12 09:54:03 +000016099 echo "$as_me: program exited with status $ac_status" >&5
16100echo "$as_me: failed program was:" >&5
16101cat conftest.$ac_ext >&5
16102( exit $ac_status )
16103ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016104fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016105rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016106fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016107fi
16108rm -f conftest.$ac_objext conftest.$ac_ext
16109fi
16110echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16111echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16112case $ac_cv_c_bigendian in
16113 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016114
Martin v. Löwis11437992002-04-12 09:54:03 +000016115cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016116#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016117_ACEOF
16118 ;;
16119 no)
16120 ;;
16121 *)
16122 { { echo "$as_me:$LINENO: error: unknown endianess
16123presetting ac_cv_c_bigendian=no (or yes) will help" >&5
16124echo "$as_me: error: unknown endianess
16125presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16126 { (exit 1); exit 1; }; } ;;
16127esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016128
Michael W. Hudson54241132001-12-07 15:38:26 +000016129
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016130# Check whether right shifting a negative integer extends the sign bit
16131# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016132echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16133echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16134if test "${ac_cv_rshift_extends_sign+set}" = set; then
16135 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016136else
Martin v. Löwis11437992002-04-12 09:54:03 +000016137
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016138if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016139 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016140else
Martin v. Löwis11437992002-04-12 09:54:03 +000016141 cat >conftest.$ac_ext <<_ACEOF
16142#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016143#include "confdefs.h"
16144
16145int main()
16146{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016147 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016148}
16149
Martin v. Löwis11437992002-04-12 09:54:03 +000016150_ACEOF
16151rm -f conftest$ac_exeext
16152if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16153 (eval $ac_link) 2>&5
16154 ac_status=$?
16155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16156 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16158 (eval $ac_try) 2>&5
16159 ac_status=$?
16160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16161 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016162 ac_cv_rshift_extends_sign=yes
16163else
Martin v. Löwis11437992002-04-12 09:54:03 +000016164 echo "$as_me: program exited with status $ac_status" >&5
16165echo "$as_me: failed program was:" >&5
16166cat conftest.$ac_ext >&5
16167( exit $ac_status )
16168ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016169fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016170rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16171fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016172fi
16173
Martin v. Löwis11437992002-04-12 09:54:03 +000016174echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16175echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016176if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016177then
Martin v. Löwis11437992002-04-12 09:54:03 +000016178
16179cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016180#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016181_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016182
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016183fi
16184
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016185# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016186echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16187echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16188if test "${ac_cv_have_getc_unlocked+set}" = set; then
16189 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016190else
Martin v. Löwis11437992002-04-12 09:54:03 +000016191
16192cat >conftest.$ac_ext <<_ACEOF
16193#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016194#include "confdefs.h"
16195#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016196#ifdef F77_DUMMY_MAIN
16197# ifdef __cplusplus
16198 extern "C"
16199# endif
16200 int F77_DUMMY_MAIN() { return 1; }
16201#endif
16202int
16203main ()
16204{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016205
16206 FILE *f = fopen("/dev/null", "r");
16207 flockfile(f);
16208 getc_unlocked(f);
16209 funlockfile(f);
16210
Martin v. Löwis11437992002-04-12 09:54:03 +000016211 ;
16212 return 0;
16213}
16214_ACEOF
16215rm -f conftest.$ac_objext conftest$ac_exeext
16216if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16217 (eval $ac_link) 2>&5
16218 ac_status=$?
16219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16220 (exit $ac_status); } &&
16221 { ac_try='test -s conftest$ac_exeext'
16222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16223 (eval $ac_try) 2>&5
16224 ac_status=$?
16225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16226 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016227 ac_cv_have_getc_unlocked=yes
16228else
Martin v. Löwis11437992002-04-12 09:54:03 +000016229 echo "$as_me: failed program was:" >&5
16230cat conftest.$ac_ext >&5
16231ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016232fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016233rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016234fi
16235
Martin v. Löwis11437992002-04-12 09:54:03 +000016236echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16237echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016238if test "$ac_cv_have_getc_unlocked" = yes
16239then
Martin v. Löwis11437992002-04-12 09:54:03 +000016240
16241cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016242#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016243_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016244
16245fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016246
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016247# check for readline 2.2
16248cat >conftest.$ac_ext <<_ACEOF
16249#line $LINENO "configure"
16250#include "confdefs.h"
16251#include <readline/readline.h>
16252_ACEOF
16253if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16254 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16255 ac_status=$?
16256 egrep -v '^ *\+' conftest.er1 >conftest.err
16257 rm -f conftest.er1
16258 cat conftest.err >&5
16259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16260 (exit $ac_status); } >/dev/null; then
16261 if test -s conftest.err; then
16262 ac_cpp_err=$ac_c_preproc_warn_flag
16263 else
16264 ac_cpp_err=
16265 fi
16266else
16267 ac_cpp_err=yes
16268fi
16269if test -z "$ac_cpp_err"; then
16270 have_readline=yes
16271else
16272 echo "$as_me: failed program was:" >&5
16273 cat conftest.$ac_ext >&5
16274 have_readline=no
16275fi
16276rm -f conftest.err conftest.$ac_ext
16277if test $have_readline = yes
16278then
16279 cat >conftest.$ac_ext <<_ACEOF
16280#line $LINENO "configure"
16281#include "confdefs.h"
16282#include <readline/readline.h>
16283
16284_ACEOF
16285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16286 egrep "extern int rl_completion_append_character;" >/dev/null 2>&1; then
16287
16288cat >>confdefs.h <<\_ACEOF
16289#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
16290_ACEOF
16291
16292fi
16293rm -f conftest*
16294
16295fi
16296
Martin v. Löwis0daad592001-09-30 21:09:59 +000016297# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000016298echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
16299echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
16300if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
16301 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000016302else
Martin v. Löwis11437992002-04-12 09:54:03 +000016303 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000016304LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016305cat >conftest.$ac_ext <<_ACEOF
16306#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000016307#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016308
Guido van Rossum353ae582001-07-10 16:45:32 +000016309/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016310#ifdef __cplusplus
16311extern "C"
16312#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000016313/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016314 builtin and then its argument prototype would still apply. */
16315char rl_pre_input_hook ();
16316#ifdef F77_DUMMY_MAIN
16317# ifdef __cplusplus
16318 extern "C"
16319# endif
16320 int F77_DUMMY_MAIN() { return 1; }
16321#endif
16322int
16323main ()
16324{
16325rl_pre_input_hook ();
16326 ;
16327 return 0;
16328}
16329_ACEOF
16330rm -f conftest.$ac_objext conftest$ac_exeext
16331if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16332 (eval $ac_link) 2>&5
16333 ac_status=$?
16334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16335 (exit $ac_status); } &&
16336 { ac_try='test -s conftest$ac_exeext'
16337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16338 (eval $ac_try) 2>&5
16339 ac_status=$?
16340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16341 (exit $ac_status); }; }; then
16342 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016343else
Martin v. Löwis11437992002-04-12 09:54:03 +000016344 echo "$as_me: failed program was:" >&5
16345cat conftest.$ac_ext >&5
16346ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016347fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016348rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16349LIBS=$ac_check_lib_save_LIBS
16350fi
16351echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16352echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16353if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016354
Martin v. Löwis11437992002-04-12 09:54:03 +000016355cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016356#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016357_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016358
Martin v. Löwis0daad592001-09-30 21:09:59 +000016359fi
16360
Michael W. Hudson54241132001-12-07 15:38:26 +000016361
Martin v. Löwis0daad592001-09-30 21:09:59 +000016362# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016363echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16364echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16365if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16366 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016367else
Martin v. Löwis11437992002-04-12 09:54:03 +000016368 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016369LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016370cat >conftest.$ac_ext <<_ACEOF
16371#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016372#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016373
Martin v. Löwis0daad592001-09-30 21:09:59 +000016374/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016375#ifdef __cplusplus
16376extern "C"
16377#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016378/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016379 builtin and then its argument prototype would still apply. */
16380char rl_completion_matches ();
16381#ifdef F77_DUMMY_MAIN
16382# ifdef __cplusplus
16383 extern "C"
16384# endif
16385 int F77_DUMMY_MAIN() { return 1; }
16386#endif
16387int
16388main ()
16389{
16390rl_completion_matches ();
16391 ;
16392 return 0;
16393}
16394_ACEOF
16395rm -f conftest.$ac_objext conftest$ac_exeext
16396if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16397 (eval $ac_link) 2>&5
16398 ac_status=$?
16399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16400 (exit $ac_status); } &&
16401 { ac_try='test -s conftest$ac_exeext'
16402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16403 (eval $ac_try) 2>&5
16404 ac_status=$?
16405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16406 (exit $ac_status); }; }; then
16407 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000016408else
Martin v. Löwis11437992002-04-12 09:54:03 +000016409 echo "$as_me: failed program was:" >&5
16410cat conftest.$ac_ext >&5
16411ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000016412fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016413rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16414LIBS=$ac_check_lib_save_LIBS
16415fi
16416echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
16417echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
16418if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016419
Martin v. Löwis11437992002-04-12 09:54:03 +000016420cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016421#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016422_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016423
Guido van Rossum353ae582001-07-10 16:45:32 +000016424fi
16425
Jack Jansendd19cf82001-12-06 22:36:17 +000016426
Martin v. Löwis11437992002-04-12 09:54:03 +000016427echo "$as_me:$LINENO: checking for broken nice()" >&5
16428echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
16429if test "${ac_cv_broken_nice+set}" = set; then
16430 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016431else
Martin v. Löwis11437992002-04-12 09:54:03 +000016432
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016433if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016434 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016435else
Martin v. Löwis11437992002-04-12 09:54:03 +000016436 cat >conftest.$ac_ext <<_ACEOF
16437#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016438#include "confdefs.h"
16439
16440int main()
16441{
16442 int val1 = nice(1);
16443 if (val1 != -1 && val1 == nice(2))
16444 exit(0);
16445 exit(1);
16446}
16447
Martin v. Löwis11437992002-04-12 09:54:03 +000016448_ACEOF
16449rm -f conftest$ac_exeext
16450if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16451 (eval $ac_link) 2>&5
16452 ac_status=$?
16453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16454 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16456 (eval $ac_try) 2>&5
16457 ac_status=$?
16458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16459 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016460 ac_cv_broken_nice=yes
16461else
Martin v. Löwis11437992002-04-12 09:54:03 +000016462 echo "$as_me: program exited with status $ac_status" >&5
16463echo "$as_me: failed program was:" >&5
16464cat conftest.$ac_ext >&5
16465( exit $ac_status )
16466ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016467fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016468rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16469fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016470fi
16471
Martin v. Löwis11437992002-04-12 09:54:03 +000016472echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
16473echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016474if test "$ac_cv_broken_nice" = yes
16475then
Martin v. Löwis11437992002-04-12 09:54:03 +000016476
16477cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016478#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016479_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016480
16481fi
16482
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016483# Look for subsecond timestamps in struct stat
16484echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
16485echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
16486if test "${ac_cv_stat_tv_nsec+set}" = set; then
16487 echo $ECHO_N "(cached) $ECHO_C" >&6
16488else
16489 cat >conftest.$ac_ext <<_ACEOF
16490#line $LINENO "configure"
16491#include "confdefs.h"
16492#include <sys/stat.h>
16493#ifdef F77_DUMMY_MAIN
16494# ifdef __cplusplus
16495 extern "C"
16496# endif
16497 int F77_DUMMY_MAIN() { return 1; }
16498#endif
16499int
16500main ()
16501{
16502
16503struct stat st;
16504st.st_mtim.tv_nsec = 1;
16505
16506 ;
16507 return 0;
16508}
16509_ACEOF
16510rm -f conftest.$ac_objext
16511if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16512 (eval $ac_compile) 2>&5
16513 ac_status=$?
16514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16515 (exit $ac_status); } &&
16516 { ac_try='test -s conftest.$ac_objext'
16517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16518 (eval $ac_try) 2>&5
16519 ac_status=$?
16520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16521 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016522 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016523else
16524 echo "$as_me: failed program was:" >&5
16525cat conftest.$ac_ext >&5
16526ac_cv_stat_tv_nsec=no
16527fi
16528rm -f conftest.$ac_objext conftest.$ac_ext
16529fi
16530
16531echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
16532echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
16533if test "$ac_cv_stat_tv_nsec" = yes
16534then
16535
16536cat >>confdefs.h <<\_ACEOF
16537#define HAVE_STAT_TV_NSEC 1
16538_ACEOF
16539
16540fi
16541
Jack Jansen666b1e72001-10-31 12:11:48 +000016542# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000016543echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
16544echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
16545if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
16546 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016547else
Martin v. Löwis11437992002-04-12 09:54:03 +000016548 cat >conftest.$ac_ext <<_ACEOF
16549#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016550#include "confdefs.h"
16551#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016552#ifdef F77_DUMMY_MAIN
16553# ifdef __cplusplus
16554 extern "C"
16555# endif
16556 int F77_DUMMY_MAIN() { return 1; }
16557#endif
16558int
16559main ()
16560{
Jack Jansen666b1e72001-10-31 12:11:48 +000016561
16562 int rtn;
16563 rtn = mvwdelch(0,0,0);
16564
Martin v. Löwis11437992002-04-12 09:54:03 +000016565 ;
16566 return 0;
16567}
16568_ACEOF
16569rm -f conftest.$ac_objext
16570if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16571 (eval $ac_compile) 2>&5
16572 ac_status=$?
16573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16574 (exit $ac_status); } &&
16575 { ac_try='test -s conftest.$ac_objext'
16576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16577 (eval $ac_try) 2>&5
16578 ac_status=$?
16579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16580 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016581 ac_cv_mvwdelch_is_expression=yes
16582else
Martin v. Löwis11437992002-04-12 09:54:03 +000016583 echo "$as_me: failed program was:" >&5
16584cat conftest.$ac_ext >&5
16585ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016586fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016587rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016588fi
16589
Martin v. Löwis11437992002-04-12 09:54:03 +000016590echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
16591echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016592
16593if test "$ac_cv_mvwdelch_is_expression" = yes
16594then
Martin v. Löwis11437992002-04-12 09:54:03 +000016595
16596cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016597#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016598_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016599
16600fi
16601
Martin v. Löwis11437992002-04-12 09:54:03 +000016602echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
16603echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
16604if test "${ac_cv_window_has_flags+set}" = set; then
16605 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016606else
Martin v. Löwis11437992002-04-12 09:54:03 +000016607 cat >conftest.$ac_ext <<_ACEOF
16608#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016609#include "confdefs.h"
16610#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016611#ifdef F77_DUMMY_MAIN
16612# ifdef __cplusplus
16613 extern "C"
16614# endif
16615 int F77_DUMMY_MAIN() { return 1; }
16616#endif
16617int
16618main ()
16619{
Jack Jansen666b1e72001-10-31 12:11:48 +000016620
16621 WINDOW *w;
16622 w->_flags = 0;
16623
Martin v. Löwis11437992002-04-12 09:54:03 +000016624 ;
16625 return 0;
16626}
16627_ACEOF
16628rm -f conftest.$ac_objext
16629if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16630 (eval $ac_compile) 2>&5
16631 ac_status=$?
16632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16633 (exit $ac_status); } &&
16634 { ac_try='test -s conftest.$ac_objext'
16635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16636 (eval $ac_try) 2>&5
16637 ac_status=$?
16638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16639 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016640 ac_cv_window_has_flags=yes
16641else
Martin v. Löwis11437992002-04-12 09:54:03 +000016642 echo "$as_me: failed program was:" >&5
16643cat conftest.$ac_ext >&5
16644ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016645fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016646rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016647fi
16648
Martin v. Löwis11437992002-04-12 09:54:03 +000016649echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
16650echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016651
Jack Jansen666b1e72001-10-31 12:11:48 +000016652
16653if test "$ac_cv_window_has_flags" = yes
16654then
Martin v. Löwis11437992002-04-12 09:54:03 +000016655
16656cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016657#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016658_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016659
16660fi
16661
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016662echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
16663echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
16664
16665if test -e /dev/ptmx
16666then
16667 echo "$as_me:$LINENO: result: yes" >&5
16668echo "${ECHO_T}yes" >&6
16669
16670cat >>confdefs.h <<\_ACEOF
16671#define HAVE_DEV_PTMX 1
16672_ACEOF
16673
16674else
16675 echo "$as_me:$LINENO: result: no" >&5
16676echo "${ECHO_T}no" >&6
16677fi
16678
Martin v. Löwis11437992002-04-12 09:54:03 +000016679echo "$as_me:$LINENO: checking for socklen_t" >&5
16680echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
16681if test "${ac_cv_type_socklen_t+set}" = set; then
16682 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000016683else
Martin v. Löwis11437992002-04-12 09:54:03 +000016684 cat >conftest.$ac_ext <<_ACEOF
16685#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000016686#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000016687
16688#ifdef HAVE_SYS_TYPES_H
16689#include <sys/types.h>
16690#endif
16691#ifdef HAVE_SYS_SOCKET_H
16692#include <sys/socket.h>
16693#endif
16694
16695
Martin v. Löwis11437992002-04-12 09:54:03 +000016696#ifdef F77_DUMMY_MAIN
16697# ifdef __cplusplus
16698 extern "C"
16699# endif
16700 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016702int
16703main ()
16704{
16705if ((socklen_t *) 0)
16706 return 0;
16707if (sizeof (socklen_t))
16708 return 0;
16709 ;
16710 return 0;
16711}
16712_ACEOF
16713rm -f conftest.$ac_objext
16714if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16715 (eval $ac_compile) 2>&5
16716 ac_status=$?
16717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16718 (exit $ac_status); } &&
16719 { ac_try='test -s conftest.$ac_objext'
16720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16721 (eval $ac_try) 2>&5
16722 ac_status=$?
16723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16724 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016725 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000016726else
Martin v. Löwis11437992002-04-12 09:54:03 +000016727 echo "$as_me: failed program was:" >&5
16728cat conftest.$ac_ext >&5
16729ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000016730fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016731rm -f conftest.$ac_objext conftest.$ac_ext
16732fi
16733echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
16734echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
16735if test $ac_cv_type_socklen_t = yes; then
16736 :
16737else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016738
Martin v. Löwis01c04012002-11-11 14:58:44 +000016739cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016740#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000016741_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016742
16743fi
16744
Michael W. Hudson54241132001-12-07 15:38:26 +000016745
Michael W. Hudson54241132001-12-07 15:38:26 +000016746
16747
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016748for h in `(cd $srcdir;echo Python/thread_*.h)`
16749do
16750 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16751done
16752
Michael W. Hudson54241132001-12-07 15:38:26 +000016753
Jack Jansen0b06be72002-06-21 14:48:38 +000016754SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000016755echo "$as_me:$LINENO: checking for build directories" >&5
16756echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016757for dir in $SRCDIRS; do
16758 if test ! -d $dir; then
16759 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016760 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016761done
Martin v. Löwis11437992002-04-12 09:54:03 +000016762echo "$as_me:$LINENO: result: done" >&5
16763echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000016764
Guido van Rossum627b2d71993-12-24 10:39:16 +000016765# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000016766ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016767
Martin v. Löwis11437992002-04-12 09:54:03 +000016768cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016769# This file is a shell script that caches the results of configure
16770# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016771# scripts and configure runs, see configure's option --config-cache.
16772# It is not useful on other systems. If it contains results you don't
16773# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016774#
Martin v. Löwis11437992002-04-12 09:54:03 +000016775# config.status only pays attention to the cache file if you give it
16776# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016777#
Martin v. Löwis11437992002-04-12 09:54:03 +000016778# `ac_cv_env_foo' variables (set or unset) will be overriden when
16779# loading this file, other *unset* `ac_cv_foo' will be assigned the
16780# following values.
16781
16782_ACEOF
16783
Guido van Rossumf78abae1997-01-21 22:02:36 +000016784# The following way of writing the cache mishandles newlines in values,
16785# but we know of no workaround that is simple, portable, and efficient.
16786# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016787# Ultrix sh set writes to stderr and can't be redirected directly,
16788# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000016789{
16790 (set) 2>&1 |
16791 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16792 *ac_space=\ *)
16793 # `set' does not quote correctly, so add quotes (double-quote
16794 # substitution turns \\\\ into \\, and sed turns \\ into \).
16795 sed -n \
16796 "s/'/'\\\\''/g;
16797 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16798 ;;
16799 *)
16800 # `set' quotes correctly as required by POSIX, so do not add quotes.
16801 sed -n \
16802 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16803 ;;
16804 esac;
16805} |
16806 sed '
16807 t clear
16808 : clear
16809 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16810 t end
16811 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16812 : end' >>confcache
16813if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016814 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016815 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16816 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016817 else
16818 echo "not updating unwritable cache $cache_file"
16819 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016820fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016821rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016822
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016823test "x$prefix" = xNONE && prefix=$ac_default_prefix
16824# Let make expand exec_prefix.
16825test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016826
Martin v. Löwis11437992002-04-12 09:54:03 +000016827# VPATH may cause trouble with some makes, so we remove $(srcdir),
16828# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16829# trailing colons and then remove the whole line if VPATH becomes empty
16830# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016831if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016832 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16833s/:*\$(srcdir):*/:/;
16834s/:*\${srcdir}:*/:/;
16835s/:*@srcdir@:*/:/;
16836s/^\([^=]*=[ ]*\):*/\1/;
16837s/:*$//;
16838s/^[^=]*=[ ]*$//;
16839}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016840fi
16841
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016842DEFS=-DHAVE_CONFIG_H
16843
Martin v. Löwis11437992002-04-12 09:54:03 +000016844
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016845: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016846ac_clean_files_save=$ac_clean_files
16847ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16848{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16849echo "$as_me: creating $CONFIG_STATUS" >&6;}
16850cat >$CONFIG_STATUS <<_ACEOF
16851#! $SHELL
16852# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016853# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016854# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016855# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016856
Martin v. Löwis11437992002-04-12 09:54:03 +000016857debug=false
16858SHELL=\${CONFIG_SHELL-$SHELL}
16859_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016860
Martin v. Löwis11437992002-04-12 09:54:03 +000016861cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016862
Martin v. Löwis11437992002-04-12 09:54:03 +000016863## --------------------- ##
16864## M4sh Initialization. ##
16865## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016866
Martin v. Löwis11437992002-04-12 09:54:03 +000016867# Be Bourne compatible
16868if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16869 emulate sh
16870 NULLCMD=:
16871elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16872 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016873fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016874
Martin v. Löwis11437992002-04-12 09:54:03 +000016875# NLS nuisances.
16876# Support unset when possible.
16877if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16878 as_unset=unset
16879else
16880 as_unset=false
16881fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016882
Martin v. Löwis11437992002-04-12 09:54:03 +000016883(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16884 { $as_unset LANG || test "${LANG+set}" != set; } ||
16885 { LANG=C; export LANG; }
16886(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16887 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16888 { LC_ALL=C; export LC_ALL; }
16889(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16890 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16891 { LC_TIME=C; export LC_TIME; }
16892(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16893 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16894 { LC_CTYPE=C; export LC_CTYPE; }
16895(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16896 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16897 { LANGUAGE=C; export LANGUAGE; }
16898(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16899 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16900 { LC_COLLATE=C; export LC_COLLATE; }
16901(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16902 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16903 { LC_NUMERIC=C; export LC_NUMERIC; }
16904(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16905 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16906 { LC_MESSAGES=C; export LC_MESSAGES; }
16907
16908
16909# Name of the executable.
16910as_me=`(basename "$0") 2>/dev/null ||
16911$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16912 X"$0" : 'X\(//\)$' \| \
16913 X"$0" : 'X\(/\)$' \| \
16914 . : '\(.\)' 2>/dev/null ||
16915echo X/"$0" |
16916 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16917 /^X\/\(\/\/\)$/{ s//\1/; q; }
16918 /^X\/\(\/\).*/{ s//\1/; q; }
16919 s/.*/./; q'`
16920
16921# PATH needs CR, and LINENO needs CR and PATH.
16922# Avoid depending upon Character Ranges.
16923as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16924as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16925as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16926as_cr_digits='0123456789'
16927as_cr_alnum=$as_cr_Letters$as_cr_digits
16928
16929# The user is always right.
16930if test "${PATH_SEPARATOR+set}" != set; then
16931 echo "#! /bin/sh" >conftest.sh
16932 echo "exit 0" >>conftest.sh
16933 chmod +x conftest.sh
16934 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16935 PATH_SEPARATOR=';'
16936 else
16937 PATH_SEPARATOR=:
16938 fi
16939 rm -f conftest.sh
16940fi
16941
16942
16943 as_lineno_1=$LINENO
16944 as_lineno_2=$LINENO
16945 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16946 test "x$as_lineno_1" != "x$as_lineno_2" &&
16947 test "x$as_lineno_3" = "x$as_lineno_2" || {
16948 # Find who we are. Look in the path if we contain no path at all
16949 # relative or not.
16950 case $0 in
16951 *[\\/]* ) as_myself=$0 ;;
16952 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16953for as_dir in $PATH
16954do
16955 IFS=$as_save_IFS
16956 test -z "$as_dir" && as_dir=.
16957 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16958done
16959
16960 ;;
16961 esac
16962 # We did not find ourselves, most probably we were run as `sh COMMAND'
16963 # in which case we are not to be found in the path.
16964 if test "x$as_myself" = x; then
16965 as_myself=$0
16966 fi
16967 if test ! -f "$as_myself"; then
16968 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16969echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16970 { (exit 1); exit 1; }; }
16971 fi
16972 case $CONFIG_SHELL in
16973 '')
16974 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16975for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16976do
16977 IFS=$as_save_IFS
16978 test -z "$as_dir" && as_dir=.
16979 for as_base in sh bash ksh sh5; do
16980 case $as_dir in
16981 /*)
16982 if ("$as_dir/$as_base" -c '
16983 as_lineno_1=$LINENO
16984 as_lineno_2=$LINENO
16985 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16986 test "x$as_lineno_1" != "x$as_lineno_2" &&
16987 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16988 CONFIG_SHELL=$as_dir/$as_base
16989 export CONFIG_SHELL
16990 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16991 fi;;
16992 esac
16993 done
16994done
16995;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016996 esac
16997
Martin v. Löwis11437992002-04-12 09:54:03 +000016998 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16999 # uniformly replaced by the line number. The first 'sed' inserts a
17000 # line-number line before each line; the second 'sed' does the real
17001 # work. The second script uses 'N' to pair each line-number line
17002 # with the numbered line, and appends trailing '-' during
17003 # substitution so that $LINENO is not a special case at line end.
17004 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
17005 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
17006 sed '=' <$as_myself |
17007 sed '
17008 N
17009 s,$,-,
17010 : loop
17011 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
17012 t loop
17013 s,-$,,
17014 s,^['$as_cr_digits']*\n,,
17015 ' >$as_me.lineno &&
17016 chmod +x $as_me.lineno ||
17017 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17018echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
17019 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017020
Martin v. Löwis11437992002-04-12 09:54:03 +000017021 # Don't try to exec as it changes $[0], causing all sort of problems
17022 # (the dirname of $[0] is not the place where we might find the
17023 # original and so on. Autoconf is especially sensible to this).
17024 . ./$as_me.lineno
17025 # Exit status is that of the last command.
17026 exit
17027}
17028
17029
17030case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17031 *c*,-n*) ECHO_N= ECHO_C='
17032' ECHO_T=' ' ;;
17033 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17034 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
17035esac
17036
17037if expr a : '\(a\)' >/dev/null 2>&1; then
17038 as_expr=expr
17039else
17040 as_expr=false
17041fi
17042
17043rm -f conf$$ conf$$.exe conf$$.file
17044echo >conf$$.file
17045if ln -s conf$$.file conf$$ 2>/dev/null; then
17046 # We could just check for DJGPP; but this test a) works b) is more generic
17047 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17048 if test -f conf$$.exe; then
17049 # Don't use ln at all; we don't have any links
17050 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017051 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017052 as_ln_s='ln -s'
17053 fi
17054elif ln conf$$.file conf$$ 2>/dev/null; then
17055 as_ln_s=ln
17056else
17057 as_ln_s='cp -p'
17058fi
17059rm -f conf$$ conf$$.exe conf$$.file
17060
17061as_executable_p="test -f"
17062
17063# Sed expression to map a string onto a valid CPP name.
17064as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17065
17066# Sed expression to map a string onto a valid variable name.
17067as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17068
17069
17070# IFS
17071# We need space, tab and new line, in precisely that order.
17072as_nl='
17073'
17074IFS=" $as_nl"
17075
17076# CDPATH.
17077$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
17078
17079exec 6>&1
17080
17081# Open the log real soon, to keep \$[0] and so on meaningful, and to
17082# report actual input values of CONFIG_FILES etc. instead of their
17083# values after options handling. Logging --version etc. is OK.
17084exec 5>>config.log
17085{
17086 echo
17087 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17088## Running $as_me. ##
17089_ASBOX
17090} >&5
17091cat >&5 <<_CSEOF
17092
Martin v. Löwis88afe662002-10-26 13:47:44 +000017093This file was extended by python $as_me 2.3, which was
Martin v. Löwis11437992002-04-12 09:54:03 +000017094generated by GNU Autoconf 2.53. Invocation command line was
17095
17096 CONFIG_FILES = $CONFIG_FILES
17097 CONFIG_HEADERS = $CONFIG_HEADERS
17098 CONFIG_LINKS = $CONFIG_LINKS
17099 CONFIG_COMMANDS = $CONFIG_COMMANDS
17100 $ $0 $@
17101
17102_CSEOF
17103echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17104echo >&5
17105_ACEOF
17106
17107# Files that config.status was made for.
17108if test -n "$ac_config_files"; then
17109 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17110fi
17111
17112if test -n "$ac_config_headers"; then
17113 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17114fi
17115
17116if test -n "$ac_config_links"; then
17117 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17118fi
17119
17120if test -n "$ac_config_commands"; then
17121 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17122fi
17123
17124cat >>$CONFIG_STATUS <<\_ACEOF
17125
17126ac_cs_usage="\
17127\`$as_me' instantiates files from templates according to the
17128current configuration.
17129
17130Usage: $0 [OPTIONS] [FILE]...
17131
17132 -h, --help print this help, then exit
17133 -V, --version print version number, then exit
17134 -d, --debug don't remove temporary files
17135 --recheck update $as_me by reconfiguring in the same conditions
17136 --file=FILE[:TEMPLATE]
17137 instantiate the configuration file FILE
17138 --header=FILE[:TEMPLATE]
17139 instantiate the configuration header FILE
17140
17141Configuration files:
17142$config_files
17143
17144Configuration headers:
17145$config_headers
17146
17147Report bugs to <bug-autoconf@gnu.org>."
17148_ACEOF
17149
17150cat >>$CONFIG_STATUS <<_ACEOF
17151ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017152python config.status 2.3
Martin v. Löwis11437992002-04-12 09:54:03 +000017153configured by $0, generated by GNU Autoconf 2.53,
17154 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17155
17156Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17157Free Software Foundation, Inc.
17158This config.status script is free software; the Free Software Foundation
17159gives unlimited permission to copy, distribute and modify it."
17160srcdir=$srcdir
17161INSTALL="$INSTALL"
17162_ACEOF
17163
17164cat >>$CONFIG_STATUS <<\_ACEOF
17165# If no file are specified by the user, then we need to provide default
17166# value. By we need to know if files were specified by the user.
17167ac_need_defaults=:
17168while test $# != 0
17169do
17170 case $1 in
17171 --*=*)
17172 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17173 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17174 shift
17175 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17176 shift
17177 ;;
17178 -*);;
17179 *) # This is not an option, so the user has probably given explicit
17180 # arguments.
17181 ac_need_defaults=false;;
17182 esac
17183
17184 case $1 in
17185 # Handling of the options.
17186_ACEOF
17187cat >>$CONFIG_STATUS <<_ACEOF
17188 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17189 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17190 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17191_ACEOF
17192cat >>$CONFIG_STATUS <<\_ACEOF
17193 --version | --vers* | -V )
17194 echo "$ac_cs_version"; exit 0 ;;
17195 --he | --h)
17196 # Conflict between --help and --header
17197 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17198Try \`$0 --help' for more information." >&5
17199echo "$as_me: error: ambiguous option: $1
17200Try \`$0 --help' for more information." >&2;}
17201 { (exit 1); exit 1; }; };;
17202 --help | --hel | -h )
17203 echo "$ac_cs_usage"; exit 0 ;;
17204 --debug | --d* | -d )
17205 debug=: ;;
17206 --file | --fil | --fi | --f )
17207 shift
17208 CONFIG_FILES="$CONFIG_FILES $1"
17209 ac_need_defaults=false;;
17210 --header | --heade | --head | --hea )
17211 shift
17212 CONFIG_HEADERS="$CONFIG_HEADERS $1"
17213 ac_need_defaults=false;;
17214
17215 # This is an error.
17216 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17217Try \`$0 --help' for more information." >&5
17218echo "$as_me: error: unrecognized option: $1
17219Try \`$0 --help' for more information." >&2;}
17220 { (exit 1); exit 1; }; } ;;
17221
17222 *) ac_config_targets="$ac_config_targets $1" ;;
17223
17224 esac
17225 shift
17226done
17227
17228_ACEOF
17229
17230
17231
17232
17233
17234cat >>$CONFIG_STATUS <<\_ACEOF
17235for ac_config_target in $ac_config_targets
17236do
17237 case "$ac_config_target" in
17238 # Handling of arguments.
17239 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17240 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
17241 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17242 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17243echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17244 { (exit 1); exit 1; }; };;
17245 esac
17246done
17247
17248# If the user did not use the arguments to specify the items to instantiate,
17249# then the envvar interface is used. Set only those that are not.
17250# We use the long form for the default assignment because of an extremely
17251# bizarre bug on SunOS 4.1.3.
17252if $ac_need_defaults; then
17253 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17254 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17255fi
17256
17257# Create a temporary directory, and hook for its removal unless debugging.
17258$debug ||
17259{
17260 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17261 trap '{ (exit 1); exit 1; }' 1 2 13 15
17262}
17263
17264# Create a (secure) tmp directory for tmp files.
17265: ${TMPDIR=/tmp}
17266{
17267 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17268 test -n "$tmp" && test -d "$tmp"
17269} ||
17270{
17271 tmp=$TMPDIR/cs$$-$RANDOM
17272 (umask 077 && mkdir $tmp)
17273} ||
17274{
17275 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17276 { (exit 1); exit 1; }
17277}
17278
17279_ACEOF
17280
17281cat >>$CONFIG_STATUS <<_ACEOF
17282
17283#
17284# CONFIG_FILES section.
17285#
17286
17287# No need to generate the scripts if there are no CONFIG_FILES.
17288# This happens for instance when ./config.status config.h
17289if test -n "\$CONFIG_FILES"; then
17290 # Protect against being on the right side of a sed subst in config.status.
17291 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17292 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17293s,@SHELL@,$SHELL,;t t
17294s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17295s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17296s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17297s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17298s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17299s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17300s,@exec_prefix@,$exec_prefix,;t t
17301s,@prefix@,$prefix,;t t
17302s,@program_transform_name@,$program_transform_name,;t t
17303s,@bindir@,$bindir,;t t
17304s,@sbindir@,$sbindir,;t t
17305s,@libexecdir@,$libexecdir,;t t
17306s,@datadir@,$datadir,;t t
17307s,@sysconfdir@,$sysconfdir,;t t
17308s,@sharedstatedir@,$sharedstatedir,;t t
17309s,@localstatedir@,$localstatedir,;t t
17310s,@libdir@,$libdir,;t t
17311s,@includedir@,$includedir,;t t
17312s,@oldincludedir@,$oldincludedir,;t t
17313s,@infodir@,$infodir,;t t
17314s,@mandir@,$mandir,;t t
17315s,@build_alias@,$build_alias,;t t
17316s,@host_alias@,$host_alias,;t t
17317s,@target_alias@,$target_alias,;t t
17318s,@DEFS@,$DEFS,;t t
17319s,@ECHO_C@,$ECHO_C,;t t
17320s,@ECHO_N@,$ECHO_N,;t t
17321s,@ECHO_T@,$ECHO_T,;t t
17322s,@LIBS@,$LIBS,;t t
17323s,@VERSION@,$VERSION,;t t
17324s,@SOVERSION@,$SOVERSION,;t t
17325s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
17326s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
17327s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
17328s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
17329s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
17330s,@MACHDEP@,$MACHDEP,;t t
17331s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000017332s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017333s,@CXX@,$CXX,;t t
17334s,@MAINOBJ@,$MAINOBJ,;t t
17335s,@EXEEXT@,$EXEEXT,;t t
17336s,@CC@,$CC,;t t
17337s,@CFLAGS@,$CFLAGS,;t t
17338s,@LDFLAGS@,$LDFLAGS,;t t
17339s,@CPPFLAGS@,$CPPFLAGS,;t t
17340s,@ac_ct_CC@,$ac_ct_CC,;t t
17341s,@OBJEXT@,$OBJEXT,;t t
17342s,@CPP@,$CPP,;t t
17343s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
17344s,@LIBRARY@,$LIBRARY,;t t
17345s,@LDLIBRARY@,$LDLIBRARY,;t t
17346s,@DLLLIBRARY@,$DLLLIBRARY,;t t
17347s,@BLDLIBRARY@,$BLDLIBRARY,;t t
17348s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
17349s,@INSTSONAME@,$INSTSONAME,;t t
17350s,@RUNSHARED@,$RUNSHARED,;t t
17351s,@LINKCC@,$LINKCC,;t t
17352s,@RANLIB@,$RANLIB,;t t
17353s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17354s,@AR@,$AR,;t t
17355s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17356s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17357s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17358s,@LN@,$LN,;t t
17359s,@OPT@,$OPT,;t t
17360s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
17361s,@SO@,$SO,;t t
17362s,@LDSHARED@,$LDSHARED,;t t
17363s,@BLDSHARED@,$BLDSHARED,;t t
17364s,@CCSHARED@,$CCSHARED,;t t
17365s,@LINKFORSHARED@,$LINKFORSHARED,;t t
17366s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017367s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017368s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
17369s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
17370s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
17371s,@LDLAST@,$LDLAST,;t t
17372s,@THREADOBJ@,$THREADOBJ,;t t
17373s,@DLINCLDIR@,$DLINCLDIR,;t t
17374s,@DYNLOADFILE@,$DYNLOADFILE,;t t
17375s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
17376s,@LIBOBJS@,$LIBOBJS,;t t
17377s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
17378s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
17379s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
17380s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
17381s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
17382s,@LIBM@,$LIBM,;t t
17383s,@LIBC@,$LIBC,;t t
17384s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
17385s,@THREADHEADERS@,$THREADHEADERS,;t t
17386s,@SRCDIRS@,$SRCDIRS,;t t
17387CEOF
17388
17389_ACEOF
17390
17391 cat >>$CONFIG_STATUS <<\_ACEOF
17392 # Split the substitutions into bite-sized pieces for seds with
17393 # small command number limits, like on Digital OSF/1 and HP-UX.
17394 ac_max_sed_lines=48
17395 ac_sed_frag=1 # Number of current file.
17396 ac_beg=1 # First line for current file.
17397 ac_end=$ac_max_sed_lines # Line after last line for current file.
17398 ac_more_lines=:
17399 ac_sed_cmds=
17400 while $ac_more_lines; do
17401 if test $ac_beg -gt 1; then
17402 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17403 else
17404 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17405 fi
17406 if test ! -s $tmp/subs.frag; then
17407 ac_more_lines=false
17408 else
17409 # The purpose of the label and of the branching condition is to
17410 # speed up the sed processing (if there are no `@' at all, there
17411 # is no need to browse any of the substitutions).
17412 # These are the two extra sed commands mentioned above.
17413 (echo ':t
17414 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17415 if test -z "$ac_sed_cmds"; then
17416 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17417 else
17418 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17419 fi
17420 ac_sed_frag=`expr $ac_sed_frag + 1`
17421 ac_beg=$ac_end
17422 ac_end=`expr $ac_end + $ac_max_sed_lines`
17423 fi
17424 done
17425 if test -z "$ac_sed_cmds"; then
17426 ac_sed_cmds=cat
17427 fi
17428fi # test -n "$CONFIG_FILES"
17429
17430_ACEOF
17431cat >>$CONFIG_STATUS <<\_ACEOF
17432for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17433 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17434 case $ac_file in
17435 - | *:- | *:-:* ) # input from stdin
17436 cat >$tmp/stdin
17437 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17438 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17439 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17440 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17441 * ) ac_file_in=$ac_file.in ;;
17442 esac
17443
17444 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17445 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17446$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17447 X"$ac_file" : 'X\(//\)[^/]' \| \
17448 X"$ac_file" : 'X\(//\)$' \| \
17449 X"$ac_file" : 'X\(/\)' \| \
17450 . : '\(.\)' 2>/dev/null ||
17451echo X"$ac_file" |
17452 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17453 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17454 /^X\(\/\/\)$/{ s//\1/; q; }
17455 /^X\(\/\).*/{ s//\1/; q; }
17456 s/.*/./; q'`
17457 { case "$ac_dir" in
17458 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17459 *) as_incr_dir=.;;
17460esac
17461as_dummy="$ac_dir"
17462for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17463 case $as_mkdir_dir in
17464 # Skip DOS drivespec
17465 ?:) as_incr_dir=$as_mkdir_dir ;;
17466 *)
17467 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17468 test -d "$as_incr_dir" ||
17469 mkdir "$as_incr_dir" ||
17470 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17471echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17472 { (exit 1); exit 1; }; }
17473 ;;
17474 esac
17475done; }
17476
17477 ac_builddir=.
17478
17479if test "$ac_dir" != .; then
17480 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17481 # A "../" for each directory in $ac_dir_suffix.
17482 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17483else
17484 ac_dir_suffix= ac_top_builddir=
17485fi
17486
17487case $srcdir in
17488 .) # No --srcdir option. We are building in place.
17489 ac_srcdir=.
17490 if test -z "$ac_top_builddir"; then
17491 ac_top_srcdir=.
17492 else
17493 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17494 fi ;;
17495 [\\/]* | ?:[\\/]* ) # Absolute path.
17496 ac_srcdir=$srcdir$ac_dir_suffix;
17497 ac_top_srcdir=$srcdir ;;
17498 *) # Relative path.
17499 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17500 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17501esac
17502# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
17503# absolute.
17504ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017505ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000017506ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
17507ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
17508
17509
17510 case $INSTALL in
17511 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17512 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
17513 esac
17514
17515 if test x"$ac_file" != x-; then
17516 { echo "$as_me:$LINENO: creating $ac_file" >&5
17517echo "$as_me: creating $ac_file" >&6;}
17518 rm -f "$ac_file"
17519 fi
17520 # Let's still pretend it is `configure' which instantiates (i.e., don't
17521 # use $as_me), people would be surprised to read:
17522 # /* config.h. Generated by config.status. */
17523 if test x"$ac_file" = x-; then
17524 configure_input=
17525 else
17526 configure_input="$ac_file. "
17527 fi
17528 configure_input=$configure_input"Generated from `echo $ac_file_in |
17529 sed 's,.*/,,'` by configure."
17530
17531 # First look for the input files in the build tree, otherwise in the
17532 # src tree.
17533 ac_file_inputs=`IFS=:
17534 for f in $ac_file_in; do
17535 case $f in
17536 -) echo $tmp/stdin ;;
17537 [\\/$]*)
17538 # Absolute (can't be DOS-style, as IFS=:)
17539 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17540echo "$as_me: error: cannot find input file: $f" >&2;}
17541 { (exit 1); exit 1; }; }
17542 echo $f;;
17543 *) # Relative
17544 if test -f "$f"; then
17545 # Build tree
17546 echo $f
17547 elif test -f "$srcdir/$f"; then
17548 # Source tree
17549 echo $srcdir/$f
17550 else
17551 # /dev/null tree
17552 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17553echo "$as_me: error: cannot find input file: $f" >&2;}
17554 { (exit 1); exit 1; }; }
17555 fi;;
17556 esac
17557 done` || { (exit 1); exit 1; }
17558_ACEOF
17559cat >>$CONFIG_STATUS <<_ACEOF
17560 sed "$ac_vpsub
17561$extrasub
17562_ACEOF
17563cat >>$CONFIG_STATUS <<\_ACEOF
17564:t
17565/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17566s,@configure_input@,$configure_input,;t t
17567s,@srcdir@,$ac_srcdir,;t t
17568s,@abs_srcdir@,$ac_abs_srcdir,;t t
17569s,@top_srcdir@,$ac_top_srcdir,;t t
17570s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17571s,@builddir@,$ac_builddir,;t t
17572s,@abs_builddir@,$ac_abs_builddir,;t t
17573s,@top_builddir@,$ac_top_builddir,;t t
17574s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17575s,@INSTALL@,$ac_INSTALL,;t t
17576" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17577 rm -f $tmp/stdin
17578 if test x"$ac_file" != x-; then
17579 mv $tmp/out $ac_file
17580 else
17581 cat $tmp/out
17582 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017583 fi
17584
Martin v. Löwis11437992002-04-12 09:54:03 +000017585done
17586_ACEOF
17587cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017588
Martin v. Löwis11437992002-04-12 09:54:03 +000017589#
17590# CONFIG_HEADER section.
17591#
Guido van Rossum627b2d71993-12-24 10:39:16 +000017592
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017593# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17594# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017595#
17596# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000017597ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17598ac_dB='[ ].*$,\1#\2'
17599ac_dC=' '
17600ac_dD=',;t'
17601# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17602ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17603ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017604ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000017605ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017606
Martin v. Löwis11437992002-04-12 09:54:03 +000017607for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000017608 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000017609 case $ac_file in
17610 - | *:- | *:-:* ) # input from stdin
17611 cat >$tmp/stdin
17612 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17613 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17614 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17615 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17616 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017617 esac
17618
Martin v. Löwis11437992002-04-12 09:54:03 +000017619 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17620echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017621
Martin v. Löwis11437992002-04-12 09:54:03 +000017622 # First look for the input files in the build tree, otherwise in the
17623 # src tree.
17624 ac_file_inputs=`IFS=:
17625 for f in $ac_file_in; do
17626 case $f in
17627 -) echo $tmp/stdin ;;
17628 [\\/$]*)
17629 # Absolute (can't be DOS-style, as IFS=:)
17630 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17631echo "$as_me: error: cannot find input file: $f" >&2;}
17632 { (exit 1); exit 1; }; }
17633 echo $f;;
17634 *) # Relative
17635 if test -f "$f"; then
17636 # Build tree
17637 echo $f
17638 elif test -f "$srcdir/$f"; then
17639 # Source tree
17640 echo $srcdir/$f
17641 else
17642 # /dev/null tree
17643 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17644echo "$as_me: error: cannot find input file: $f" >&2;}
17645 { (exit 1); exit 1; }; }
17646 fi;;
17647 esac
17648 done` || { (exit 1); exit 1; }
17649 # Remove the trailing spaces.
17650 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017651
Martin v. Löwis11437992002-04-12 09:54:03 +000017652_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017653
Martin v. Löwis11437992002-04-12 09:54:03 +000017654# Transform confdefs.h into two sed scripts, `conftest.defines' and
17655# `conftest.undefs', that substitutes the proper values into
17656# config.h.in to produce config.h. The first handles `#define'
17657# templates, and the second `#undef' templates.
17658# And first: Protect against being on the right side of a sed subst in
17659# config.status. Protect against being in an unquoted here document
17660# in config.status.
17661rm -f conftest.defines conftest.undefs
17662# Using a here document instead of a string reduces the quoting nightmare.
17663# Putting comments in sed scripts is not portable.
17664#
17665# `end' is used to avoid that the second main sed command (meant for
17666# 0-ary CPP macros) applies to n-ary macro definitions.
17667# See the Autoconf documentation for `clear'.
17668cat >confdef2sed.sed <<\_ACEOF
17669s/[\\&,]/\\&/g
17670s,[\\$`],\\&,g
17671t clear
17672: clear
17673s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
17674t end
17675s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
17676: end
17677_ACEOF
17678# If some macros were called several times there might be several times
17679# the same #defines, which is useless. Nevertheless, we may not want to
17680# sort them, since we want the *last* AC-DEFINE to be honored.
17681uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17682sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17683rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017684
17685# This sed command replaces #undef with comments. This is necessary, for
17686# example, in the case of _POSIX_SOURCE, which is predefined and required
17687# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017688cat >>conftest.undefs <<\_ACEOF
17689s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
17690_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017691
Martin v. Löwis11437992002-04-12 09:54:03 +000017692# Break up conftest.defines because some shells have a limit on the size
17693# of here documents, and old seds have small limits too (100 cmds).
17694echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
17695echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
17696echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17697echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017698rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000017699while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000017700do
Martin v. Löwis11437992002-04-12 09:54:03 +000017701 # Write a limited-size here document to $tmp/defines.sed.
17702 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17703 # Speed up: don't consider the non `#define' lines.
17704 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
17705 # Work around the forget-to-reset-the-flag bug.
17706 echo 't clr' >>$CONFIG_STATUS
17707 echo ': clr' >>$CONFIG_STATUS
17708 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017709 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017710 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17711 rm -f $tmp/in
17712 mv $tmp/out $tmp/in
17713' >>$CONFIG_STATUS
17714 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17715 rm -f conftest.defines
17716 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000017717done
Martin v. Löwis11437992002-04-12 09:54:03 +000017718rm -f conftest.defines
17719echo ' fi # egrep' >>$CONFIG_STATUS
17720echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017721
Martin v. Löwis11437992002-04-12 09:54:03 +000017722# Break up conftest.undefs because some shells have a limit on the size
17723# of here documents, and old seds have small limits too (100 cmds).
17724echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
17725rm -f conftest.tail
17726while grep . conftest.undefs >/dev/null
17727do
17728 # Write a limited-size here document to $tmp/undefs.sed.
17729 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17730 # Speed up: don't consider the non `#undef'
17731 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
17732 # Work around the forget-to-reset-the-flag bug.
17733 echo 't clr' >>$CONFIG_STATUS
17734 echo ': clr' >>$CONFIG_STATUS
17735 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
17736 echo 'CEOF
17737 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17738 rm -f $tmp/in
17739 mv $tmp/out $tmp/in
17740' >>$CONFIG_STATUS
17741 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17742 rm -f conftest.undefs
17743 mv conftest.tail conftest.undefs
17744done
17745rm -f conftest.undefs
17746
17747cat >>$CONFIG_STATUS <<\_ACEOF
17748 # Let's still pretend it is `configure' which instantiates (i.e., don't
17749 # use $as_me), people would be surprised to read:
17750 # /* config.h. Generated by config.status. */
17751 if test x"$ac_file" = x-; then
17752 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000017753 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017754 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000017755 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017756 cat $tmp/in >>$tmp/config.h
17757 rm -f $tmp/in
17758 if test x"$ac_file" != x-; then
17759 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17760 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17761echo "$as_me: $ac_file is unchanged" >&6;}
17762 else
17763 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17764$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17765 X"$ac_file" : 'X\(//\)[^/]' \| \
17766 X"$ac_file" : 'X\(//\)$' \| \
17767 X"$ac_file" : 'X\(/\)' \| \
17768 . : '\(.\)' 2>/dev/null ||
17769echo X"$ac_file" |
17770 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17771 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17772 /^X\(\/\/\)$/{ s//\1/; q; }
17773 /^X\(\/\).*/{ s//\1/; q; }
17774 s/.*/./; q'`
17775 { case "$ac_dir" in
17776 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17777 *) as_incr_dir=.;;
17778esac
17779as_dummy="$ac_dir"
17780for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17781 case $as_mkdir_dir in
17782 # Skip DOS drivespec
17783 ?:) as_incr_dir=$as_mkdir_dir ;;
17784 *)
17785 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17786 test -d "$as_incr_dir" ||
17787 mkdir "$as_incr_dir" ||
17788 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17789echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17790 { (exit 1); exit 1; }; }
17791 ;;
17792 esac
17793done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017794
Martin v. Löwis11437992002-04-12 09:54:03 +000017795 rm -f $ac_file
17796 mv $tmp/config.h $ac_file
17797 fi
17798 else
17799 cat $tmp/config.h
17800 rm -f $tmp/config.h
17801 fi
17802done
17803_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017804
Martin v. Löwis11437992002-04-12 09:54:03 +000017805cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017806
Martin v. Löwis11437992002-04-12 09:54:03 +000017807{ (exit 0); exit 0; }
17808_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017809chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000017810ac_clean_files=$ac_clean_files_save
17811
17812
17813# configure is writing to config.log, and then calls config.status.
17814# config.status does its own redirection, appending to config.log.
17815# Unfortunately, on DOS this fails, as config.log is still kept open
17816# by configure, so config.status won't be able to write to it; its
17817# output is simply discarded. So we exec the FD to /dev/null,
17818# effectively closing config.log, so it can be properly (re)opened and
17819# appended to by config.status. When coming back to configure, we
17820# need to make the FD available again.
17821if test "$no_create" != yes; then
17822 ac_cs_success=:
17823 exec 5>/dev/null
17824 $SHELL $CONFIG_STATUS || ac_cs_success=false
17825 exec 5>>config.log
17826 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17827 # would make configure fail if this is the last instruction.
17828 $ac_cs_success || { (exit 1); exit 1; }
17829fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017830
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017831
17832echo "creating Setup"
17833if test ! -f Modules/Setup
17834then
17835 cp $srcdir/Modules/Setup.dist Modules/Setup
17836fi
17837
17838echo "creating Setup.local"
17839if test ! -f Modules/Setup.local
17840then
17841 echo "# Edit this file for local setup changes" >Modules/Setup.local
17842fi
17843
17844echo "creating Makefile"
17845$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17846 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017847 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017848mv config.c Modules