blob: ffdc0a2ec943ee0d86287d009ea97c6b5fcd1225 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis399a6892002-10-04 10:22:02 +00002# From configure.in Revision: 1.350 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis11437992002-04-12 09:54:03 +00004# Generated by GNU Autoconf 2.53.
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.
256PACKAGE_NAME=
257PACKAGE_TARNAME=
258PACKAGE_VERSION=
259PACKAGE_STRING=
260PACKAGE_BUGREPORT=
261
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
764\`configure' configures this package to adapt to many kinds of systems.
765
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
820
821 cat <<\_ACEOF
822
823Optional Features:
824 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
825 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
826 --enable-framework=INSTALLDIR Build (MacOSX|Darwin) framework
827 --enable-shared disable/enable building shared python library
828 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
829 --enable-ipv6 Enable ipv6 (with ipv4) support
830 --disable-ipv6 Disable ipv6 support
831 --enable-unicode=ucs2,ucs4 Enable Unicode strings (default is yes)
832
833Optional Packages:
834 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
835 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
836 --without-gcc never use gcc
837 --with-cxx=<compiler> enable C++ support
838 --with-suffix=.exe set executable suffix
839 --with-pydebug build with Py_DEBUG defined
840 --with-libs='lib1 ...' link against additional libs
841 --with-signal-module disable/enable signal module
842 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
843 --with(out)-threads=DIRECTORY disable/enable thread support
844 --with(out)-thread=DIRECTORY deprecated; use --with(out)-threads
845 --with-pth use GNU pth threading libraries
Jack Jansen7b8c7542002-04-14 20:12:41 +0000846 --with(out)-universal-newlines disable/enable foreign newlines
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +0000847 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 --with(out)-pymalloc disable/enable specialized mallocs
849 --with-wctype-functions use wctype.h functions
850 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
851 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking
852 --with-fpectl enable SIGFPE catching
853 --with-libm=STRING math library
854 --with-libc=STRING C library
855
856Some influential environment variables:
857 CC C compiler command
858 CFLAGS C compiler flags
859 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
860 nonstandard directory <lib dir>
861 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
862 headers in a nonstandard directory <include dir>
863 CPP C preprocessor
864
865Use these variables to override the choices made by `configure' or to help
866it to find libraries and programs with nonstandard names/locations.
867
868_ACEOF
869fi
870
871if test "$ac_init_help" = "recursive"; then
872 # If there are subdirs, report their specific --help.
873 ac_popdir=`pwd`
874 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
875 test -d $ac_dir || continue
876 ac_builddir=.
877
878if test "$ac_dir" != .; then
879 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
880 # A "../" for each directory in $ac_dir_suffix.
881 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
882else
883 ac_dir_suffix= ac_top_builddir=
884fi
885
886case $srcdir in
887 .) # No --srcdir option. We are building in place.
888 ac_srcdir=.
889 if test -z "$ac_top_builddir"; then
890 ac_top_srcdir=.
891 else
892 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
893 fi ;;
894 [\\/]* | ?:[\\/]* ) # Absolute path.
895 ac_srcdir=$srcdir$ac_dir_suffix;
896 ac_top_srcdir=$srcdir ;;
897 *) # Relative path.
898 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
899 ac_top_srcdir=$ac_top_builddir$srcdir ;;
900esac
901# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
902# absolute.
903ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
904ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
905ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
906ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
907
908 cd $ac_dir
909 # Check for guested configure; otherwise get Cygnus style configure.
910 if test -f $ac_srcdir/configure.gnu; then
911 echo
912 $SHELL $ac_srcdir/configure.gnu --help=recursive
913 elif test -f $ac_srcdir/configure; then
914 echo
915 $SHELL $ac_srcdir/configure --help=recursive
916 elif test -f $ac_srcdir/configure.ac ||
917 test -f $ac_srcdir/configure.in; then
918 echo
919 $ac_configure --help
920 else
921 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
922 fi
923 cd $ac_popdir
924 done
925fi
926
927test -n "$ac_init_help" && exit 0
928if $ac_init_version; then
929 cat <<\_ACEOF
930
931Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
932Free Software Foundation, Inc.
933This configure script is free software; the Free Software Foundation
934gives unlimited permission to copy, distribute and modify it.
935_ACEOF
936 exit 0
937fi
938exec 5>config.log
939cat >&5 <<_ACEOF
940This file contains any messages produced by compilers while
941running configure, to aid debugging if configure makes a mistake.
942
943It was created by $as_me, which was
944generated by GNU Autoconf 2.53. Invocation command line was
945
946 $ $0 $@
947
948_ACEOF
949{
950cat <<_ASUNAME
951## --------- ##
952## Platform. ##
953## --------- ##
954
955hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
956uname -m = `(uname -m) 2>/dev/null || echo unknown`
957uname -r = `(uname -r) 2>/dev/null || echo unknown`
958uname -s = `(uname -s) 2>/dev/null || echo unknown`
959uname -v = `(uname -v) 2>/dev/null || echo unknown`
960
961/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
962/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
963
964/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
965/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
966/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
967hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
968/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
969/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
970/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
971
972_ASUNAME
973
974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
975for as_dir in $PATH
976do
977 IFS=$as_save_IFS
978 test -z "$as_dir" && as_dir=.
979 echo "PATH: $as_dir"
980done
981
982} >&5
983
984cat >&5 <<_ACEOF
985
986
987## ----------- ##
988## Core tests. ##
989## ----------- ##
990
991_ACEOF
992
993
994# Keep a trace of the command line.
995# Strip out --no-create and --no-recursion so they do not pile up.
996# Also quote any args containing shell meta-characters.
997ac_configure_args=
998ac_sep=
999for ac_arg
1000do
1001 case $ac_arg in
1002 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1003 | --no-cr | --no-c | -n ) continue ;;
1004 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1005 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1006 continue ;;
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1009 esac
1010 case " $ac_configure_args " in
1011 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1012 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1013 ac_sep=" " ;;
1014 esac
1015 # Get rid of the leading space.
1016done
1017
1018# When interrupted or exit'd, cleanup temporary files, and complete
1019# config.log. We remove comments because anyway the quotes in there
1020# would cause problems or look ugly.
1021# WARNING: Be sure not to use single quotes in there, as some shells,
1022# such as our DU 5.0 friend, will then `close' the trap.
1023trap 'exit_status=$?
1024 # Save into config.log some information that might help in debugging.
1025 {
1026 echo
1027 cat <<\_ASBOX
1028## ---------------- ##
1029## Cache variables. ##
1030## ---------------- ##
1031_ASBOX
1032 echo
1033 # The following way of writing the cache mishandles newlines in values,
1034{
1035 (set) 2>&1 |
1036 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1037 *ac_space=\ *)
1038 sed -n \
1039 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1040 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1041 ;;
1042 *)
1043 sed -n \
1044 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1045 ;;
1046 esac;
1047}
1048 echo
1049 if test -s confdefs.h; then
1050 cat <<\_ASBOX
1051## ----------- ##
1052## confdefs.h. ##
1053## ----------- ##
1054_ASBOX
1055 echo
1056 sed "/^$/d" confdefs.h
1057 echo
1058 fi
1059 test "$ac_signal" != 0 &&
1060 echo "$as_me: caught signal $ac_signal"
1061 echo "$as_me: exit $exit_status"
1062 } >&5
1063 rm -f core core.* *.core &&
1064 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1065 exit $exit_status
1066 ' 0
1067for ac_signal in 1 2 13 15; do
1068 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1069done
1070ac_signal=0
1071
1072# confdefs.h avoids OS command line length limits that DEFS can exceed.
1073rm -rf conftest* confdefs.h
1074# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1075echo >confdefs.h
1076
1077# Predefined preprocessor variables.
1078
1079cat >>confdefs.h <<_ACEOF
1080#define PACKAGE_NAME "$PACKAGE_NAME"
1081_ACEOF
1082
1083
1084cat >>confdefs.h <<_ACEOF
1085#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1086_ACEOF
1087
1088
1089cat >>confdefs.h <<_ACEOF
1090#define PACKAGE_VERSION "$PACKAGE_VERSION"
1091_ACEOF
1092
1093
1094cat >>confdefs.h <<_ACEOF
1095#define PACKAGE_STRING "$PACKAGE_STRING"
1096_ACEOF
1097
1098
1099cat >>confdefs.h <<_ACEOF
1100#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1101_ACEOF
1102
1103
1104# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105# Prefer explicitly selected file to automatically selected ones.
1106if test -z "$CONFIG_SITE"; then
1107 if test "x$prefix" != xNONE; then
1108 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1109 else
1110 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1111 fi
1112fi
1113for ac_site_file in $CONFIG_SITE; do
1114 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1116echo "$as_me: loading site script $ac_site_file" >&6;}
1117 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 . "$ac_site_file"
1119 fi
1120done
1121
1122if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 # Some versions of bash will fail to source /dev/null (special
1124 # files actually), so we avoid doing that.
1125 if test -f "$cache_file"; then
1126 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1127echo "$as_me: loading cache $cache_file" >&6;}
1128 case $cache_file in
1129 [\\/]* | ?:[\\/]* ) . $cache_file;;
1130 *) . ./$cache_file;;
1131 esac
1132 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133else
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1135echo "$as_me: creating cache $cache_file" >&6;}
1136 >$cache_file
1137fi
1138
1139# Check that the precious variables saved in the cache have kept the same
1140# value.
1141ac_cache_corrupted=false
1142for ac_var in `(set) 2>&1 |
1143 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1144 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1145 eval ac_new_set=\$ac_env_${ac_var}_set
1146 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1147 eval ac_new_val="\$ac_env_${ac_var}_value"
1148 case $ac_old_set,$ac_new_set in
1149 set,)
1150 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1151echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1152 ac_cache_corrupted=: ;;
1153 ,set)
1154 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1155echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1156 ac_cache_corrupted=: ;;
1157 ,);;
1158 *)
1159 if test "x$ac_old_val" != "x$ac_new_val"; then
1160 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1161echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1162 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1163echo "$as_me: former value: $ac_old_val" >&2;}
1164 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1165echo "$as_me: current value: $ac_new_val" >&2;}
1166 ac_cache_corrupted=:
1167 fi;;
1168 esac
1169 # Pass precious variables to config.status.
1170 if test "$ac_new_set" = set; then
1171 case $ac_new_val in
1172 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1173 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1174 *) ac_arg=$ac_var=$ac_new_val ;;
1175 esac
1176 case " $ac_configure_args " in
1177 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1178 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1179 esac
1180 fi
1181done
1182if $ac_cache_corrupted; then
1183 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1184echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1185 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1186echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1187 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188fi
1189
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001192ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1193ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1194ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195
Guido van Rossum627b2d71993-12-24 10:39:16 +00001196
Michael W. Hudson54241132001-12-07 15:38:26 +00001197
1198
Guido van Rossum627b2d71993-12-24 10:39:16 +00001199
Martin v. Löwis11437992002-04-12 09:54:03 +00001200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213ac_config_headers="$ac_config_headers pyconfig.h"
1214
1215
1216# This is for stuff that absolutely must end up in pyconfig.h.
1217# Please use pyport.h instead, if possible.
1218
1219
1220
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001221# Set VERSION so we only need to edit in one place (i.e., here)
1222
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001223VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001224
Martin v. Löwis1142de32002-03-29 16:28:31 +00001225
1226SOVERSION=1.0
1227
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001228# The later defininition of _XOPEN_SOURCE disables certain features
1229# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1230
1231cat >>confdefs.h <<\_ACEOF
1232#define _GNU_SOURCE 1
1233_ACEOF
1234
1235
1236# The definition of _GNU_SOURCE potentially causes a change of the value
1237# of _XOPEN_SOURCE. So define it only conditionally.
1238
1239
1240cat >>confdefs.h <<\_ACEOF
1241#define _XOPEN_SOURCE 500
1242_ACEOF
1243
1244
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001245# Arguments passed to configure.
1246
1247CONFIG_ARGS="$ac_configure_args"
1248
Michael W. Hudson54241132001-12-07 15:38:26 +00001249
Jack Jansene578a632001-08-15 01:27:14 +00001250# Check whether --enable-framework or --disable-framework was given.
1251if test "${enable_framework+set}" = set; then
1252 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
Jack Jansene578a632001-08-15 01:27:14 +00001254 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001256 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001257 esac
1258 case $enableval in
1259 no)
1260 PYTHONFRAMEWORK=
1261 PYTHONFRAMEWORKDIR=no-framework
1262 PYTHONFRAMEWORKPREFIX=
1263 PYTHONFRAMEWORKINSTALLDIR=
1264 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001265 ;;
1266 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001267 PYTHONFRAMEWORK=Python
1268 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001269 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001270 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1271 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001272 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001273
Guido van Rossum563e7081996-09-10 18:20:48 +00001274else
Martin v. Löwis11437992002-04-12 09:54:03 +00001275
Jack Jansene578a632001-08-15 01:27:14 +00001276 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001277 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001278 PYTHONFRAMEWORKPREFIX=
1279 PYTHONFRAMEWORKINSTALLDIR=
1280 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001281
Martin v. Löwis11437992002-04-12 09:54:03 +00001282fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001283
1284
1285
1286
Jack Jansene578a632001-08-15 01:27:14 +00001287
1288##AC_ARG_WITH(dyld,
1289##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1290##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001291# Set name for machine-dependent library files
1292
Martin v. Löwis11437992002-04-12 09:54:03 +00001293echo "$as_me:$LINENO: checking MACHDEP" >&5
1294echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001295if test -z "$MACHDEP"
1296then
Guido van Rossum563e7081996-09-10 18:20:48 +00001297 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001298 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1299 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001300 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001301 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001302 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001303 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001304 ac_md_system=`echo $ac_sys_system |
1305 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1306 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001307 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001308 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001309
Guido van Rossum07397971997-04-29 21:49:50 +00001310 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001311 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001312 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001313 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001314 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001315 esac
1316fi
Guido van Rossum91922671997-10-09 20:24:13 +00001317
1318#
1319# SGI compilers allow the specification of the both the ABI and the
1320# ISA on the command line. Depending on the values of these switches,
1321# different and often incompatable code will be generated.
1322#
1323# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1324# thus supply support for various ABI/ISA combinations. The MACHDEP
1325# variable is also adjusted.
1326#
1327
1328if test ! -z "$SGI_ABI"
1329then
1330 CC="cc $SGI_ABI"
1331 LDFLAGS="$SGI_ABI $LDFLAGS"
1332 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1333fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001334echo "$as_me:$LINENO: result: $MACHDEP" >&5
1335echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001336
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001338echo "$as_me:$LINENO: checking for --without-gcc" >&5
1339echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1340
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001341# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001342if test "${with_gcc+set}" = set; then
1343 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001344
Guido van Rossum7f43da71994-08-01 12:15:30 +00001345 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001346 no) CC=cc
1347 without_gcc=yes;;
1348 yes) CC=gcc
1349 without_gcc=no;;
1350 *) CC=$withval
1351 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001352 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001353else
Martin v. Löwis11437992002-04-12 09:54:03 +00001354
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001355 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001356 AIX*) CC=cc_r
1357 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001358 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001359 case $BE_HOST_CPU in
1360 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001361 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001362 without_gcc=yes
Mark Hammond8235ea12002-07-19 06:55:41 +00001363 OPT="-O -export pragma"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001364 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001365 ;;
1366 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001367 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001368 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001369 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001370 ;;
1371 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001372 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1373echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1374 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001375 ;;
1376 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001377 AR="\$(srcdir)/Modules/ar_beos"
1378 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001379 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001380 Monterey*)
1381 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001382 without_gcc=;;
1383 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001384 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001385fi;
1386echo "$as_me:$LINENO: result: $without_gcc" >&5
1387echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001388
1389
Guido van Rossum95012191999-12-16 17:50:52 +00001390
Fred Drakea1a84e72001-03-06 05:52:16 +00001391MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001392echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1393echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1394
Guido van Rossum95012191999-12-16 17:50:52 +00001395# Check whether --with-cxx or --without-cxx was given.
1396if test "${with_cxx+set}" = set; then
1397 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001398
Martin v. Löwis22352952000-12-13 17:37:02 +00001399 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001400 case $withval in
1401 no) CXX=
1402 with_cxx=no;;
1403 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001404 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001405 with_cxx=$withval;;
1406 esac
1407else
Martin v. Löwis11437992002-04-12 09:54:03 +00001408
Guido van Rossum95012191999-12-16 17:50:52 +00001409 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001410 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001411
Martin v. Löwis11437992002-04-12 09:54:03 +00001412fi;
1413echo "$as_me:$LINENO: result: $with_cxx" >&5
1414echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001415
1416if test "$with_cxx" = "yes"
1417then
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1419echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1420 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001421fi
1422
1423
1424
1425
Martin v. Löwis11437992002-04-12 09:54:03 +00001426if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001427then
1428 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1429do
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 # 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 +00001431set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001432echo "$as_me:$LINENO: checking for $ac_word" >&5
1433echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1434if test "${ac_cv_prog_CXX+set}" = set; then
1435 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001436else
1437 if test -n "$CXX"; then
1438 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1439else
Martin v. Löwis11437992002-04-12 09:54:03 +00001440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1441for as_dir in $PATH
1442do
1443 IFS=$as_save_IFS
1444 test -z "$as_dir" && as_dir=.
1445 for ac_exec_ext in '' $ac_executable_extensions; do
1446 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1447 ac_cv_prog_CXX="$ac_prog"
1448 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1449 break 2
1450 fi
1451done
1452done
1453
Martin v. Löwis22352952000-12-13 17:37:02 +00001454fi
1455fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001456CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001457if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 echo "$as_me:$LINENO: result: $CXX" >&5
1459echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001460else
Martin v. Löwis11437992002-04-12 09:54:03 +00001461 echo "$as_me:$LINENO: result: no" >&5
1462echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001463fi
1464
Martin v. Löwis11437992002-04-12 09:54:03 +00001465 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001466done
1467test -n "$CXX" || CXX="notfound"
1468
1469 if test "$CXX" = "notfound"
1470 then
1471 CXX=
1472 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001473 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001474ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001475ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1476ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1477ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1478 cat >conftest.$ac_ext <<_ACEOF
1479#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001480#include "confdefs.h"
1481
Martin v. Löwis11437992002-04-12 09:54:03 +00001482#ifdef F77_DUMMY_MAIN
1483# ifdef __cplusplus
1484 extern "C"
1485# endif
1486 int F77_DUMMY_MAIN() { return 1; }
1487#endif
1488int
1489main ()
1490{
Michael W. Hudson54241132001-12-07 15:38:26 +00001491
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 ;
1493 return 0;
1494}
1495_ACEOF
1496ac_clean_files_save=$ac_clean_files
1497ac_clean_files="$ac_clean_files a.out a.exe"
1498# Try to create an executable without -o first, disregard a.out.
1499# It will help us diagnose broken compilers, and finding out an intuition
1500# of exeext.
1501echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1502echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1503ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1504if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1505 (eval $ac_link_default) 2>&5
1506 ac_status=$?
1507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1508 (exit $ac_status); }; then
1509 # Find the output, starting from the most likely. This scheme is
1510# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1511# resort.
1512
1513# Be careful to initialize this variable, since it used to be cached.
1514# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1515ac_cv_exeext=
1516for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1517 ls a.out conftest 2>/dev/null;
1518 ls a.* conftest.* 2>/dev/null`; do
1519 case $ac_file in
1520 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1521 a.out ) # We found the default executable, but exeext='' is most
1522 # certainly right.
1523 break;;
1524 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1525 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1526 export ac_cv_exeext
1527 break;;
1528 * ) break;;
1529 esac
1530done
1531else
1532 echo "$as_me: failed program was:" >&5
1533cat conftest.$ac_ext >&5
1534{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1535echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1536 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001537fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001538
1539ac_exeext=$ac_cv_exeext
1540echo "$as_me:$LINENO: result: $ac_file" >&5
1541echo "${ECHO_T}$ac_file" >&6
1542
1543# Check the compiler produces executables we can run. If not, either
1544# the compiler is broken, or we cross compile.
1545echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1546echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1547# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1548# If not cross compiling, check that we can run a simple program.
1549if test "$cross_compiling" != yes; then
1550 if { ac_try='./$ac_file'
1551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1552 (eval $ac_try) 2>&5
1553 ac_status=$?
1554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1555 (exit $ac_status); }; }; then
1556 cross_compiling=no
1557 else
1558 if test "$cross_compiling" = maybe; then
1559 cross_compiling=yes
1560 else
1561 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1562If you meant to cross compile, use \`--host'." >&5
1563echo "$as_me: error: cannot run C++ compiled programs.
1564If you meant to cross compile, use \`--host'." >&2;}
1565 { (exit 1); exit 1; }; }
1566 fi
1567 fi
1568fi
1569echo "$as_me:$LINENO: result: yes" >&5
1570echo "${ECHO_T}yes" >&6
1571
1572rm -f a.out a.exe conftest$ac_cv_exeext
1573ac_clean_files=$ac_clean_files_save
1574# Check the compiler produces executables we can run. If not, either
1575# the compiler is broken, or we cross compile.
1576echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1577echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1578echo "$as_me:$LINENO: result: $cross_compiling" >&5
1579echo "${ECHO_T}$cross_compiling" >&6
1580
1581echo "$as_me:$LINENO: checking for suffix of executables" >&5
1582echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1583if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1584 (eval $ac_link) 2>&5
1585 ac_status=$?
1586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1587 (exit $ac_status); }; then
1588 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1589# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1590# work properly (i.e., refer to `conftest.exe'), while it won't with
1591# `rm'.
1592for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1593 case $ac_file in
1594 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1595 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1596 export ac_cv_exeext
1597 break;;
1598 * ) break;;
1599 esac
1600done
1601else
1602 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1603echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1604 { (exit 1); exit 1; }; }
1605fi
1606
1607rm -f conftest$ac_cv_exeext
1608echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1609echo "${ECHO_T}$ac_cv_exeext" >&6
1610
1611rm -f conftest.$ac_ext
1612EXEEXT=$ac_cv_exeext
1613ac_exeext=$EXEEXT
1614
1615 ac_ext=c
1616ac_cpp='$CPP $CPPFLAGS'
1617ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1618ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1619ac_compiler_gnu=$ac_cv_c_compiler_gnu
1620
1621
Martin v. Löwis22352952000-12-13 17:37:02 +00001622
1623 fi
1624fi
1625
Guido van Rossum8b131c51995-03-09 14:10:13 +00001626# If the user switches compilers, we can't believe the cache
1627if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1628then
Martin v. Löwis11437992002-04-12 09:54:03 +00001629 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1630(it is also a good idea to do 'make clean' before compiling)" >&5
1631echo "$as_me: error: cached CC is different -- throw away $cache_file
1632(it is also a good idea to do 'make clean' before compiling)" >&2;}
1633 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001634fi
1635
Martin v. Löwis11437992002-04-12 09:54:03 +00001636ac_ext=c
1637ac_cpp='$CPP $CPPFLAGS'
1638ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1639ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1640ac_compiler_gnu=$ac_cv_c_compiler_gnu
1641if test -n "$ac_tool_prefix"; then
1642 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1643set dummy ${ac_tool_prefix}gcc; ac_word=$2
1644echo "$as_me:$LINENO: checking for $ac_word" >&5
1645echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1646if test "${ac_cv_prog_CC+set}" = set; then
1647 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001648else
1649 if test -n "$CC"; then
1650 ac_cv_prog_CC="$CC" # Let the user override the test.
1651else
Martin v. Löwis11437992002-04-12 09:54:03 +00001652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1653for as_dir in $PATH
1654do
1655 IFS=$as_save_IFS
1656 test -z "$as_dir" && as_dir=.
1657 for ac_exec_ext in '' $ac_executable_extensions; do
1658 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1659 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1660 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1661 break 2
1662 fi
1663done
1664done
1665
Jack Jansendd19cf82001-12-06 22:36:17 +00001666fi
1667fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001668CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001669if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001670 echo "$as_me:$LINENO: result: $CC" >&5
1671echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001672else
Martin v. Löwis11437992002-04-12 09:54:03 +00001673 echo "$as_me:$LINENO: result: no" >&5
1674echo "${ECHO_T}no" >&6
1675fi
1676
1677fi
1678if test -z "$ac_cv_prog_CC"; then
1679 ac_ct_CC=$CC
1680 # Extract the first word of "gcc", so it can be a program name with args.
1681set dummy gcc; ac_word=$2
1682echo "$as_me:$LINENO: checking for $ac_word" >&5
1683echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1684if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1685 echo $ECHO_N "(cached) $ECHO_C" >&6
1686else
1687 if test -n "$ac_ct_CC"; then
1688 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1689else
1690as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1691for as_dir in $PATH
1692do
1693 IFS=$as_save_IFS
1694 test -z "$as_dir" && as_dir=.
1695 for ac_exec_ext in '' $ac_executable_extensions; do
1696 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1697 ac_cv_prog_ac_ct_CC="gcc"
1698 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1699 break 2
1700 fi
1701done
1702done
1703
1704fi
1705fi
1706ac_ct_CC=$ac_cv_prog_ac_ct_CC
1707if test -n "$ac_ct_CC"; then
1708 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1709echo "${ECHO_T}$ac_ct_CC" >&6
1710else
1711 echo "$as_me:$LINENO: result: no" >&5
1712echo "${ECHO_T}no" >&6
1713fi
1714
1715 CC=$ac_ct_CC
1716else
1717 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001718fi
1719
Jack Jansendd19cf82001-12-06 22:36:17 +00001720if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001721 if test -n "$ac_tool_prefix"; then
1722 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1723set dummy ${ac_tool_prefix}cc; ac_word=$2
1724echo "$as_me:$LINENO: checking for $ac_word" >&5
1725echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1726if test "${ac_cv_prog_CC+set}" = set; then
1727 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001728else
1729 if test -n "$CC"; then
1730 ac_cv_prog_CC="$CC" # Let the user override the test.
1731else
Martin v. Löwis11437992002-04-12 09:54:03 +00001732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1733for as_dir in $PATH
1734do
1735 IFS=$as_save_IFS
1736 test -z "$as_dir" && as_dir=.
1737 for ac_exec_ext in '' $ac_executable_extensions; do
1738 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1739 ac_cv_prog_CC="${ac_tool_prefix}cc"
1740 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1741 break 2
1742 fi
1743done
1744done
1745
1746fi
1747fi
1748CC=$ac_cv_prog_CC
1749if test -n "$CC"; then
1750 echo "$as_me:$LINENO: result: $CC" >&5
1751echo "${ECHO_T}$CC" >&6
1752else
1753 echo "$as_me:$LINENO: result: no" >&5
1754echo "${ECHO_T}no" >&6
1755fi
1756
1757fi
1758if test -z "$ac_cv_prog_CC"; then
1759 ac_ct_CC=$CC
1760 # Extract the first word of "cc", so it can be a program name with args.
1761set dummy cc; ac_word=$2
1762echo "$as_me:$LINENO: checking for $ac_word" >&5
1763echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1764if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1765 echo $ECHO_N "(cached) $ECHO_C" >&6
1766else
1767 if test -n "$ac_ct_CC"; then
1768 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1769else
1770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1771for as_dir in $PATH
1772do
1773 IFS=$as_save_IFS
1774 test -z "$as_dir" && as_dir=.
1775 for ac_exec_ext in '' $ac_executable_extensions; do
1776 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1777 ac_cv_prog_ac_ct_CC="cc"
1778 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1779 break 2
1780 fi
1781done
1782done
1783
1784fi
1785fi
1786ac_ct_CC=$ac_cv_prog_ac_ct_CC
1787if test -n "$ac_ct_CC"; then
1788 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1789echo "${ECHO_T}$ac_ct_CC" >&6
1790else
1791 echo "$as_me:$LINENO: result: no" >&5
1792echo "${ECHO_T}no" >&6
1793fi
1794
1795 CC=$ac_ct_CC
1796else
1797 CC="$ac_cv_prog_CC"
1798fi
1799
1800fi
1801if test -z "$CC"; then
1802 # Extract the first word of "cc", so it can be a program name with args.
1803set dummy cc; ac_word=$2
1804echo "$as_me:$LINENO: checking for $ac_word" >&5
1805echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1806if test "${ac_cv_prog_CC+set}" = set; then
1807 echo $ECHO_N "(cached) $ECHO_C" >&6
1808else
1809 if test -n "$CC"; then
1810 ac_cv_prog_CC="$CC" # Let the user override the test.
1811else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001812 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1814for as_dir in $PATH
1815do
1816 IFS=$as_save_IFS
1817 test -z "$as_dir" && as_dir=.
1818 for ac_exec_ext in '' $ac_executable_extensions; do
1819 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1820 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1821 ac_prog_rejected=yes
1822 continue
1823 fi
1824 ac_cv_prog_CC="cc"
1825 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1826 break 2
1827 fi
1828done
1829done
1830
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001831if test $ac_prog_rejected = yes; then
1832 # We found a bogon in the path, so make sure we never use it.
1833 set dummy $ac_cv_prog_CC
1834 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001835 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001836 # We chose a different compiler from the bogus one.
1837 # However, it has the same basename, so the bogon will be chosen
1838 # first if we set CC to just the basename; use the full file name.
1839 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001840 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001841 shift
1842 ac_cv_prog_CC="$@"
1843 fi
1844fi
1845fi
1846fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001847CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001848if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001849 echo "$as_me:$LINENO: result: $CC" >&5
1850echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001851else
Martin v. Löwis11437992002-04-12 09:54:03 +00001852 echo "$as_me:$LINENO: result: no" >&5
1853echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001854fi
1855
Martin v. Löwis11437992002-04-12 09:54:03 +00001856fi
1857if test -z "$CC"; then
1858 if test -n "$ac_tool_prefix"; then
1859 for ac_prog in cl
1860 do
1861 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1862set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1863echo "$as_me:$LINENO: checking for $ac_word" >&5
1864echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1865if test "${ac_cv_prog_CC+set}" = set; then
1866 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001867else
1868 if test -n "$CC"; then
1869 ac_cv_prog_CC="$CC" # Let the user override the test.
1870else
Martin v. Löwis11437992002-04-12 09:54:03 +00001871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1872for as_dir in $PATH
1873do
1874 IFS=$as_save_IFS
1875 test -z "$as_dir" && as_dir=.
1876 for ac_exec_ext in '' $ac_executable_extensions; do
1877 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1878 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1879 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1880 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001881 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001882done
1883done
1884
1885fi
1886fi
1887CC=$ac_cv_prog_CC
1888if test -n "$CC"; then
1889 echo "$as_me:$LINENO: result: $CC" >&5
1890echo "${ECHO_T}$CC" >&6
1891else
1892 echo "$as_me:$LINENO: result: no" >&5
1893echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001894fi
1895
Martin v. Löwis11437992002-04-12 09:54:03 +00001896 test -n "$CC" && break
1897 done
1898fi
1899if test -z "$CC"; then
1900 ac_ct_CC=$CC
1901 for ac_prog in cl
1902do
1903 # Extract the first word of "$ac_prog", so it can be a program name with args.
1904set dummy $ac_prog; ac_word=$2
1905echo "$as_me:$LINENO: checking for $ac_word" >&5
1906echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1907if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1908 echo $ECHO_N "(cached) $ECHO_C" >&6
1909else
1910 if test -n "$ac_ct_CC"; then
1911 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1912else
1913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1914for as_dir in $PATH
1915do
1916 IFS=$as_save_IFS
1917 test -z "$as_dir" && as_dir=.
1918 for ac_exec_ext in '' $ac_executable_extensions; do
1919 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1920 ac_cv_prog_ac_ct_CC="$ac_prog"
1921 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1922 break 2
1923 fi
1924done
1925done
Jack Jansendd19cf82001-12-06 22:36:17 +00001926
Martin v. Löwis11437992002-04-12 09:54:03 +00001927fi
1928fi
1929ac_ct_CC=$ac_cv_prog_ac_ct_CC
1930if test -n "$ac_ct_CC"; then
1931 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1932echo "${ECHO_T}$ac_ct_CC" >&6
1933else
1934 echo "$as_me:$LINENO: result: no" >&5
1935echo "${ECHO_T}no" >&6
1936fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001937
Martin v. Löwis11437992002-04-12 09:54:03 +00001938 test -n "$ac_ct_CC" && break
1939done
Michael W. Hudson54241132001-12-07 15:38:26 +00001940
Martin v. Löwis11437992002-04-12 09:54:03 +00001941 CC=$ac_ct_CC
1942fi
1943
1944fi
1945
1946
1947test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1948echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1949 { (exit 1); exit 1; }; }
1950
1951# Provide some information about the compiler.
1952echo "$as_me:$LINENO:" \
1953 "checking for C compiler version" >&5
1954ac_compiler=`set X $ac_compile; echo $2`
1955{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1956 (eval $ac_compiler --version </dev/null >&5) 2>&5
1957 ac_status=$?
1958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1959 (exit $ac_status); }
1960{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1961 (eval $ac_compiler -v </dev/null >&5) 2>&5
1962 ac_status=$?
1963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1964 (exit $ac_status); }
1965{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1966 (eval $ac_compiler -V </dev/null >&5) 2>&5
1967 ac_status=$?
1968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1969 (exit $ac_status); }
1970
1971cat >conftest.$ac_ext <<_ACEOF
1972#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001973#include "confdefs.h"
1974
Martin v. Löwis11437992002-04-12 09:54:03 +00001975#ifdef F77_DUMMY_MAIN
1976# ifdef __cplusplus
1977 extern "C"
1978# endif
1979 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001981int
1982main ()
1983{
1984
1985 ;
1986 return 0;
1987}
1988_ACEOF
1989ac_clean_files_save=$ac_clean_files
1990ac_clean_files="$ac_clean_files a.out a.exe"
1991# Try to create an executable without -o first, disregard a.out.
1992# It will help us diagnose broken compilers, and finding out an intuition
1993# of exeext.
1994echo "$as_me:$LINENO: checking for C compiler default output" >&5
1995echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1996ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1997if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1998 (eval $ac_link_default) 2>&5
1999 ac_status=$?
2000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2001 (exit $ac_status); }; then
2002 # Find the output, starting from the most likely. This scheme is
2003# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2004# resort.
2005
2006# Be careful to initialize this variable, since it used to be cached.
2007# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2008ac_cv_exeext=
2009for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2010 ls a.out conftest 2>/dev/null;
2011 ls a.* conftest.* 2>/dev/null`; do
2012 case $ac_file in
2013 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2014 a.out ) # We found the default executable, but exeext='' is most
2015 # certainly right.
2016 break;;
2017 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2018 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2019 export ac_cv_exeext
2020 break;;
2021 * ) break;;
2022 esac
2023done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002024else
Martin v. Löwis11437992002-04-12 09:54:03 +00002025 echo "$as_me: failed program was:" >&5
2026cat conftest.$ac_ext >&5
2027{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2028echo "$as_me: error: C compiler cannot create executables" >&2;}
2029 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002030fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002031
Martin v. Löwis11437992002-04-12 09:54:03 +00002032ac_exeext=$ac_cv_exeext
2033echo "$as_me:$LINENO: result: $ac_file" >&5
2034echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002035
Martin v. Löwis11437992002-04-12 09:54:03 +00002036# Check the compiler produces executables we can run. If not, either
2037# the compiler is broken, or we cross compile.
2038echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2039echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2040# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2041# If not cross compiling, check that we can run a simple program.
2042if test "$cross_compiling" != yes; then
2043 if { ac_try='./$ac_file'
2044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2045 (eval $ac_try) 2>&5
2046 ac_status=$?
2047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2048 (exit $ac_status); }; }; then
2049 cross_compiling=no
2050 else
2051 if test "$cross_compiling" = maybe; then
2052 cross_compiling=yes
2053 else
2054 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2055If you meant to cross compile, use \`--host'." >&5
2056echo "$as_me: error: cannot run C compiled programs.
2057If you meant to cross compile, use \`--host'." >&2;}
2058 { (exit 1); exit 1; }; }
2059 fi
2060 fi
2061fi
2062echo "$as_me:$LINENO: result: yes" >&5
2063echo "${ECHO_T}yes" >&6
2064
2065rm -f a.out a.exe conftest$ac_cv_exeext
2066ac_clean_files=$ac_clean_files_save
2067# Check the compiler produces executables we can run. If not, either
2068# the compiler is broken, or we cross compile.
2069echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2070echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2071echo "$as_me:$LINENO: result: $cross_compiling" >&5
2072echo "${ECHO_T}$cross_compiling" >&6
2073
2074echo "$as_me:$LINENO: checking for suffix of executables" >&5
2075echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2076if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2077 (eval $ac_link) 2>&5
2078 ac_status=$?
2079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2080 (exit $ac_status); }; then
2081 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2082# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2083# work properly (i.e., refer to `conftest.exe'), while it won't with
2084# `rm'.
2085for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2086 case $ac_file in
2087 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2088 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2089 export ac_cv_exeext
2090 break;;
2091 * ) break;;
2092 esac
2093done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002094else
Martin v. Löwis11437992002-04-12 09:54:03 +00002095 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2096echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2097 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002098fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002099
Martin v. Löwis11437992002-04-12 09:54:03 +00002100rm -f conftest$ac_cv_exeext
2101echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2102echo "${ECHO_T}$ac_cv_exeext" >&6
2103
2104rm -f conftest.$ac_ext
2105EXEEXT=$ac_cv_exeext
2106ac_exeext=$EXEEXT
2107echo "$as_me:$LINENO: checking for suffix of object files" >&5
2108echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2109if test "${ac_cv_objext+set}" = set; then
2110 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002111else
Martin v. Löwis11437992002-04-12 09:54:03 +00002112 cat >conftest.$ac_ext <<_ACEOF
2113#line $LINENO "configure"
2114#include "confdefs.h"
2115
2116#ifdef F77_DUMMY_MAIN
2117# ifdef __cplusplus
2118 extern "C"
2119# endif
2120 int F77_DUMMY_MAIN() { return 1; }
2121#endif
2122int
2123main ()
2124{
2125
2126 ;
2127 return 0;
2128}
2129_ACEOF
2130rm -f conftest.o conftest.obj
2131if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2132 (eval $ac_compile) 2>&5
2133 ac_status=$?
2134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2135 (exit $ac_status); }; then
2136 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2137 case $ac_file in
2138 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2139 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2140 break;;
2141 esac
2142done
2143else
2144 echo "$as_me: failed program was:" >&5
2145cat conftest.$ac_ext >&5
2146{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2147echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2148 { (exit 1); exit 1; }; }
2149fi
2150
2151rm -f conftest.$ac_cv_objext conftest.$ac_ext
2152fi
2153echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2154echo "${ECHO_T}$ac_cv_objext" >&6
2155OBJEXT=$ac_cv_objext
2156ac_objext=$OBJEXT
2157echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2158echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2159if test "${ac_cv_c_compiler_gnu+set}" = set; then
2160 echo $ECHO_N "(cached) $ECHO_C" >&6
2161else
2162 cat >conftest.$ac_ext <<_ACEOF
2163#line $LINENO "configure"
2164#include "confdefs.h"
2165
2166#ifdef F77_DUMMY_MAIN
2167# ifdef __cplusplus
2168 extern "C"
2169# endif
2170 int F77_DUMMY_MAIN() { return 1; }
2171#endif
2172int
2173main ()
2174{
2175#ifndef __GNUC__
2176 choke me
2177#endif
2178
2179 ;
2180 return 0;
2181}
2182_ACEOF
2183rm -f conftest.$ac_objext
2184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2185 (eval $ac_compile) 2>&5
2186 ac_status=$?
2187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2188 (exit $ac_status); } &&
2189 { ac_try='test -s conftest.$ac_objext'
2190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2191 (eval $ac_try) 2>&5
2192 ac_status=$?
2193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2194 (exit $ac_status); }; }; then
2195 ac_compiler_gnu=yes
2196else
2197 echo "$as_me: failed program was:" >&5
2198cat conftest.$ac_ext >&5
2199ac_compiler_gnu=no
2200fi
2201rm -f conftest.$ac_objext conftest.$ac_ext
2202ac_cv_c_compiler_gnu=$ac_compiler_gnu
2203
2204fi
2205echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2206echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2207GCC=`test $ac_compiler_gnu = yes && echo yes`
2208ac_test_CFLAGS=${CFLAGS+set}
2209ac_save_CFLAGS=$CFLAGS
2210CFLAGS="-g"
2211echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2212echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2213if test "${ac_cv_prog_cc_g+set}" = set; then
2214 echo $ECHO_N "(cached) $ECHO_C" >&6
2215else
2216 cat >conftest.$ac_ext <<_ACEOF
2217#line $LINENO "configure"
2218#include "confdefs.h"
2219
2220#ifdef F77_DUMMY_MAIN
2221# ifdef __cplusplus
2222 extern "C"
2223# endif
2224 int F77_DUMMY_MAIN() { return 1; }
2225#endif
2226int
2227main ()
2228{
2229
2230 ;
2231 return 0;
2232}
2233_ACEOF
2234rm -f conftest.$ac_objext
2235if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2236 (eval $ac_compile) 2>&5
2237 ac_status=$?
2238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2239 (exit $ac_status); } &&
2240 { ac_try='test -s conftest.$ac_objext'
2241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2242 (eval $ac_try) 2>&5
2243 ac_status=$?
2244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2245 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002246 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002247else
Martin v. Löwis11437992002-04-12 09:54:03 +00002248 echo "$as_me: failed program was:" >&5
2249cat conftest.$ac_ext >&5
2250ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002251fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002252rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002253fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002254echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2255echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002256if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002257 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002258elif test $ac_cv_prog_cc_g = yes; then
2259 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002260 CFLAGS="-g -O2"
2261 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002262 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002263 fi
2264else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002265 if test "$GCC" = yes; then
2266 CFLAGS="-O2"
2267 else
2268 CFLAGS=
2269 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002270fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002271# Some people use a C++ compiler to compile C. Since we use `exit',
2272# in C++ we need to declare it. In case someone uses the same compiler
2273# for both compiling C and C++ we need to have the C++ compiler decide
2274# the declaration of exit, since it's the most demanding environment.
2275cat >conftest.$ac_ext <<_ACEOF
2276#ifndef __cplusplus
2277 choke me
2278#endif
2279_ACEOF
2280rm -f conftest.$ac_objext
2281if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2282 (eval $ac_compile) 2>&5
2283 ac_status=$?
2284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2285 (exit $ac_status); } &&
2286 { ac_try='test -s conftest.$ac_objext'
2287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2288 (eval $ac_try) 2>&5
2289 ac_status=$?
2290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2291 (exit $ac_status); }; }; then
2292 for ac_declaration in \
2293 ''\
2294 '#include <stdlib.h>' \
2295 'extern "C" void std::exit (int) throw (); using std::exit;' \
2296 'extern "C" void std::exit (int); using std::exit;' \
2297 'extern "C" void exit (int) throw ();' \
2298 'extern "C" void exit (int);' \
2299 'void exit (int);'
2300do
2301 cat >conftest.$ac_ext <<_ACEOF
2302#line $LINENO "configure"
2303#include "confdefs.h"
2304#include <stdlib.h>
2305$ac_declaration
2306#ifdef F77_DUMMY_MAIN
2307# ifdef __cplusplus
2308 extern "C"
2309# endif
2310 int F77_DUMMY_MAIN() { return 1; }
2311#endif
2312int
2313main ()
2314{
2315exit (42);
2316 ;
2317 return 0;
2318}
2319_ACEOF
2320rm -f conftest.$ac_objext
2321if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2322 (eval $ac_compile) 2>&5
2323 ac_status=$?
2324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2325 (exit $ac_status); } &&
2326 { ac_try='test -s conftest.$ac_objext'
2327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2328 (eval $ac_try) 2>&5
2329 ac_status=$?
2330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2331 (exit $ac_status); }; }; then
2332 :
2333else
2334 echo "$as_me: failed program was:" >&5
2335cat conftest.$ac_ext >&5
2336continue
2337fi
2338rm -f conftest.$ac_objext conftest.$ac_ext
2339 cat >conftest.$ac_ext <<_ACEOF
2340#line $LINENO "configure"
2341#include "confdefs.h"
2342$ac_declaration
2343#ifdef F77_DUMMY_MAIN
2344# ifdef __cplusplus
2345 extern "C"
2346# endif
2347 int F77_DUMMY_MAIN() { return 1; }
2348#endif
2349int
2350main ()
2351{
2352exit (42);
2353 ;
2354 return 0;
2355}
2356_ACEOF
2357rm -f conftest.$ac_objext
2358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2359 (eval $ac_compile) 2>&5
2360 ac_status=$?
2361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2362 (exit $ac_status); } &&
2363 { ac_try='test -s conftest.$ac_objext'
2364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2365 (eval $ac_try) 2>&5
2366 ac_status=$?
2367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2368 (exit $ac_status); }; }; then
2369 break
2370else
2371 echo "$as_me: failed program was:" >&5
2372cat conftest.$ac_ext >&5
2373fi
2374rm -f conftest.$ac_objext conftest.$ac_ext
2375done
2376rm -f conftest*
2377if test -n "$ac_declaration"; then
2378 echo '#ifdef __cplusplus' >>confdefs.h
2379 echo $ac_declaration >>confdefs.h
2380 echo '#endif' >>confdefs.h
2381fi
2382
2383else
2384 echo "$as_me: failed program was:" >&5
2385cat conftest.$ac_ext >&5
2386fi
2387rm -f conftest.$ac_objext conftest.$ac_ext
2388ac_ext=c
2389ac_cpp='$CPP $CPPFLAGS'
2390ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2391ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2392ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002393
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002394
2395# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002396
2397ac_ext=c
2398ac_cpp='$CPP $CPPFLAGS'
2399ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2400ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2401ac_compiler_gnu=$ac_cv_c_compiler_gnu
2402echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2403echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002404# On Suns, sometimes $CPP names a directory.
2405if test -n "$CPP" && test -d "$CPP"; then
2406 CPP=
2407fi
2408if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002409 if test "${ac_cv_prog_CPP+set}" = set; then
2410 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002411else
Martin v. Löwis11437992002-04-12 09:54:03 +00002412 # Double quotes because CPP needs to be expanded
2413 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2414 do
2415 ac_preproc_ok=false
2416for ac_c_preproc_warn_flag in '' yes
2417do
2418 # Use a header file that comes with gcc, so configuring glibc
2419 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002420 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002421 # not just through cpp. "Syntax error" is here to catch this case.
2422 cat >conftest.$ac_ext <<_ACEOF
2423#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002424#include "confdefs.h"
2425#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002426 Syntax error
2427_ACEOF
2428if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2429 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2430 ac_status=$?
2431 egrep -v '^ *\+' conftest.er1 >conftest.err
2432 rm -f conftest.er1
2433 cat conftest.err >&5
2434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2435 (exit $ac_status); } >/dev/null; then
2436 if test -s conftest.err; then
2437 ac_cpp_err=$ac_c_preproc_warn_flag
2438 else
2439 ac_cpp_err=
2440 fi
2441else
2442 ac_cpp_err=yes
2443fi
2444if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002445 :
2446else
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002448 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002449 # Broken: fails on valid input.
2450continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002451fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002452rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002453
Martin v. Löwis11437992002-04-12 09:54:03 +00002454 # OK, works on sane cases. Now check whether non-existent headers
2455 # can be detected and how.
2456 cat >conftest.$ac_ext <<_ACEOF
2457#line $LINENO "configure"
2458#include "confdefs.h"
2459#include <ac_nonexistent.h>
2460_ACEOF
2461if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2462 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2463 ac_status=$?
2464 egrep -v '^ *\+' conftest.er1 >conftest.err
2465 rm -f conftest.er1
2466 cat conftest.err >&5
2467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2468 (exit $ac_status); } >/dev/null; then
2469 if test -s conftest.err; then
2470 ac_cpp_err=$ac_c_preproc_warn_flag
2471 else
2472 ac_cpp_err=
2473 fi
2474else
2475 ac_cpp_err=yes
2476fi
2477if test -z "$ac_cpp_err"; then
2478 # Broken: success on invalid input.
2479continue
2480else
2481 echo "$as_me: failed program was:" >&5
2482 cat conftest.$ac_ext >&5
2483 # Passes both tests.
2484ac_preproc_ok=:
2485break
2486fi
2487rm -f conftest.err conftest.$ac_ext
2488
2489done
2490# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2491rm -f conftest.err conftest.$ac_ext
2492if $ac_preproc_ok; then
2493 break
2494fi
2495
2496 done
2497 ac_cv_prog_CPP=$CPP
2498
2499fi
2500 CPP=$ac_cv_prog_CPP
2501else
2502 ac_cv_prog_CPP=$CPP
2503fi
2504echo "$as_me:$LINENO: result: $CPP" >&5
2505echo "${ECHO_T}$CPP" >&6
2506ac_preproc_ok=false
2507for ac_c_preproc_warn_flag in '' yes
2508do
2509 # Use a header file that comes with gcc, so configuring glibc
2510 # with a fresh cross-compiler works.
2511 # On the NeXT, cc -E runs the code through the compiler's parser,
2512 # not just through cpp. "Syntax error" is here to catch this case.
2513 cat >conftest.$ac_ext <<_ACEOF
2514#line $LINENO "configure"
2515#include "confdefs.h"
2516#include <assert.h>
2517 Syntax error
2518_ACEOF
2519if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2520 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2521 ac_status=$?
2522 egrep -v '^ *\+' conftest.er1 >conftest.err
2523 rm -f conftest.er1
2524 cat conftest.err >&5
2525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2526 (exit $ac_status); } >/dev/null; then
2527 if test -s conftest.err; then
2528 ac_cpp_err=$ac_c_preproc_warn_flag
2529 else
2530 ac_cpp_err=
2531 fi
2532else
2533 ac_cpp_err=yes
2534fi
2535if test -z "$ac_cpp_err"; then
2536 :
2537else
2538 echo "$as_me: failed program was:" >&5
2539 cat conftest.$ac_ext >&5
2540 # Broken: fails on valid input.
2541continue
2542fi
2543rm -f conftest.err conftest.$ac_ext
2544
2545 # OK, works on sane cases. Now check whether non-existent headers
2546 # can be detected and how.
2547 cat >conftest.$ac_ext <<_ACEOF
2548#line $LINENO "configure"
2549#include "confdefs.h"
2550#include <ac_nonexistent.h>
2551_ACEOF
2552if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2553 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2554 ac_status=$?
2555 egrep -v '^ *\+' conftest.er1 >conftest.err
2556 rm -f conftest.er1
2557 cat conftest.err >&5
2558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2559 (exit $ac_status); } >/dev/null; then
2560 if test -s conftest.err; then
2561 ac_cpp_err=$ac_c_preproc_warn_flag
2562 else
2563 ac_cpp_err=
2564 fi
2565else
2566 ac_cpp_err=yes
2567fi
2568if test -z "$ac_cpp_err"; then
2569 # Broken: success on invalid input.
2570continue
2571else
2572 echo "$as_me: failed program was:" >&5
2573 cat conftest.$ac_ext >&5
2574 # Passes both tests.
2575ac_preproc_ok=:
2576break
2577fi
2578rm -f conftest.err conftest.$ac_ext
2579
2580done
2581# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2582rm -f conftest.err conftest.$ac_ext
2583if $ac_preproc_ok; then
2584 :
2585else
2586 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2587echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2588 { (exit 1); exit 1; }; }
2589fi
2590
2591ac_ext=c
2592ac_cpp='$CPP $CPPFLAGS'
2593ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2594ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2595ac_compiler_gnu=$ac_cv_c_compiler_gnu
2596
2597
2598
2599echo "$as_me:$LINENO: checking for AIX" >&5
2600echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2601cat >conftest.$ac_ext <<_ACEOF
2602#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002603#include "confdefs.h"
2604#ifdef _AIX
2605 yes
2606#endif
2607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002609if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2610 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 echo "$as_me:$LINENO: result: yes" >&5
2612echo "${ECHO_T}yes" >&6
2613cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002614#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002615_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002616
2617else
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 echo "$as_me:$LINENO: result: no" >&5
2619echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002620fi
2621rm -f conftest*
2622
Michael W. Hudson54241132001-12-07 15:38:26 +00002623
Martin v. Löwis11437992002-04-12 09:54:03 +00002624echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2625echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2626if test "${ac_cv_header_stdc+set}" = set; then
2627 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002628else
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 cat >conftest.$ac_ext <<_ACEOF
2630#line $LINENO "configure"
2631#include "confdefs.h"
2632#include <stdlib.h>
2633#include <stdarg.h>
2634#include <string.h>
2635#include <float.h>
2636
2637_ACEOF
2638if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2639 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2640 ac_status=$?
2641 egrep -v '^ *\+' conftest.er1 >conftest.err
2642 rm -f conftest.er1
2643 cat conftest.err >&5
2644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2645 (exit $ac_status); } >/dev/null; then
2646 if test -s conftest.err; then
2647 ac_cpp_err=$ac_c_preproc_warn_flag
2648 else
2649 ac_cpp_err=
2650 fi
2651else
2652 ac_cpp_err=yes
2653fi
2654if test -z "$ac_cpp_err"; then
2655 ac_cv_header_stdc=yes
2656else
2657 echo "$as_me: failed program was:" >&5
2658 cat conftest.$ac_ext >&5
2659 ac_cv_header_stdc=no
2660fi
2661rm -f conftest.err conftest.$ac_ext
2662
2663if test $ac_cv_header_stdc = yes; then
2664 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2665 cat >conftest.$ac_ext <<_ACEOF
2666#line $LINENO "configure"
2667#include "confdefs.h"
2668#include <string.h>
2669
2670_ACEOF
2671if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2672 egrep "memchr" >/dev/null 2>&1; then
2673 :
2674else
2675 ac_cv_header_stdc=no
2676fi
2677rm -f conftest*
2678
2679fi
2680
2681if test $ac_cv_header_stdc = yes; then
2682 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2683 cat >conftest.$ac_ext <<_ACEOF
2684#line $LINENO "configure"
2685#include "confdefs.h"
2686#include <stdlib.h>
2687
2688_ACEOF
2689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2690 egrep "free" >/dev/null 2>&1; then
2691 :
2692else
2693 ac_cv_header_stdc=no
2694fi
2695rm -f conftest*
2696
2697fi
2698
2699if test $ac_cv_header_stdc = yes; then
2700 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2701 if test "$cross_compiling" = yes; then
2702 :
2703else
2704 cat >conftest.$ac_ext <<_ACEOF
2705#line $LINENO "configure"
2706#include "confdefs.h"
2707#include <ctype.h>
2708#if ((' ' & 0x0FF) == 0x020)
2709# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2710# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2711#else
2712# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2713 || ('j' <= (c) && (c) <= 'r') \
2714 || ('s' <= (c) && (c) <= 'z'))
2715# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2716#endif
2717
2718#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2719int
2720main ()
2721{
2722 int i;
2723 for (i = 0; i < 256; i++)
2724 if (XOR (islower (i), ISLOWER (i))
2725 || toupper (i) != TOUPPER (i))
2726 exit(2);
2727 exit (0);
2728}
2729_ACEOF
2730rm -f conftest$ac_exeext
2731if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2732 (eval $ac_link) 2>&5
2733 ac_status=$?
2734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2735 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2737 (eval $ac_try) 2>&5
2738 ac_status=$?
2739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2740 (exit $ac_status); }; }; then
2741 :
2742else
2743 echo "$as_me: program exited with status $ac_status" >&5
2744echo "$as_me: failed program was:" >&5
2745cat conftest.$ac_ext >&5
2746( exit $ac_status )
2747ac_cv_header_stdc=no
2748fi
2749rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2750fi
2751fi
2752fi
2753echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2754echo "${ECHO_T}$ac_cv_header_stdc" >&6
2755if test $ac_cv_header_stdc = yes; then
2756
2757cat >>confdefs.h <<\_ACEOF
2758#define STDC_HEADERS 1
2759_ACEOF
2760
2761fi
2762
2763# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2774 inttypes.h stdint.h unistd.h
2775do
2776as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2777echo "$as_me:$LINENO: checking for $ac_header" >&5
2778echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2779if eval "test \"\${$as_ac_Header+set}\" = set"; then
2780 echo $ECHO_N "(cached) $ECHO_C" >&6
2781else
2782 cat >conftest.$ac_ext <<_ACEOF
2783#line $LINENO "configure"
2784#include "confdefs.h"
2785$ac_includes_default
2786
2787#include <$ac_header>
2788_ACEOF
2789rm -f conftest.$ac_objext
2790if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2791 (eval $ac_compile) 2>&5
2792 ac_status=$?
2793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2794 (exit $ac_status); } &&
2795 { ac_try='test -s conftest.$ac_objext'
2796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2797 (eval $ac_try) 2>&5
2798 ac_status=$?
2799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2800 (exit $ac_status); }; }; then
2801 eval "$as_ac_Header=yes"
2802else
2803 echo "$as_me: failed program was:" >&5
2804cat conftest.$ac_ext >&5
2805eval "$as_ac_Header=no"
2806fi
2807rm -f conftest.$ac_objext conftest.$ac_ext
2808fi
2809echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2810echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2811if test `eval echo '${'$as_ac_Header'}'` = yes; then
2812 cat >>confdefs.h <<_ACEOF
2813#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2814_ACEOF
2815
2816fi
2817
2818done
2819
2820
2821if test "${ac_cv_header_minix_config_h+set}" = set; then
2822 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2823echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2824if test "${ac_cv_header_minix_config_h+set}" = set; then
2825 echo $ECHO_N "(cached) $ECHO_C" >&6
2826fi
2827echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2828echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2829else
2830 # Is the header compilable?
2831echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2832echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2833cat >conftest.$ac_ext <<_ACEOF
2834#line $LINENO "configure"
2835#include "confdefs.h"
2836$ac_includes_default
2837#include <minix/config.h>
2838_ACEOF
2839rm -f conftest.$ac_objext
2840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2841 (eval $ac_compile) 2>&5
2842 ac_status=$?
2843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2844 (exit $ac_status); } &&
2845 { ac_try='test -s conftest.$ac_objext'
2846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2847 (eval $ac_try) 2>&5
2848 ac_status=$?
2849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2850 (exit $ac_status); }; }; then
2851 ac_header_compiler=yes
2852else
2853 echo "$as_me: failed program was:" >&5
2854cat conftest.$ac_ext >&5
2855ac_header_compiler=no
2856fi
2857rm -f conftest.$ac_objext conftest.$ac_ext
2858echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2859echo "${ECHO_T}$ac_header_compiler" >&6
2860
2861# Is the header present?
2862echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2863echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2864cat >conftest.$ac_ext <<_ACEOF
2865#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002866#include "confdefs.h"
2867#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002868_ACEOF
2869if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2870 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2871 ac_status=$?
2872 egrep -v '^ *\+' conftest.er1 >conftest.err
2873 rm -f conftest.er1
2874 cat conftest.err >&5
2875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2876 (exit $ac_status); } >/dev/null; then
2877 if test -s conftest.err; then
2878 ac_cpp_err=$ac_c_preproc_warn_flag
2879 else
2880 ac_cpp_err=
2881 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002882else
Martin v. Löwis11437992002-04-12 09:54:03 +00002883 ac_cpp_err=yes
2884fi
2885if test -z "$ac_cpp_err"; then
2886 ac_header_preproc=yes
2887else
2888 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002889 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002890 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002891fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002892rm -f conftest.err conftest.$ac_ext
2893echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2894echo "${ECHO_T}$ac_header_preproc" >&6
2895
2896# So? What about this header?
2897case $ac_header_compiler:$ac_header_preproc in
2898 yes:no )
2899 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2900echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2901 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2902echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2903 no:yes )
2904 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2905echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2906 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2907echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2908 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2909echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2910esac
2911echo "$as_me:$LINENO: checking for minix/config.h" >&5
2912echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2913if test "${ac_cv_header_minix_config_h+set}" = set; then
2914 echo $ECHO_N "(cached) $ECHO_C" >&6
2915else
2916 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002917fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002918echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2919echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2920
2921fi
2922if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002923 MINIX=yes
2924else
Martin v. Löwis11437992002-04-12 09:54:03 +00002925 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002926fi
2927
Martin v. Löwis11437992002-04-12 09:54:03 +00002928
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002929if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002930
2931cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002932#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002933_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002934
Martin v. Löwis11437992002-04-12 09:54:03 +00002935
2936cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002937#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002938_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002939
Martin v. Löwis11437992002-04-12 09:54:03 +00002940
2941cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002942#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002943_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002944
2945fi
2946
2947
Michael W. Hudson54241132001-12-07 15:38:26 +00002948
Martin v. Löwis11437992002-04-12 09:54:03 +00002949echo "$as_me:$LINENO: checking for --with-suffix" >&5
2950echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002951
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002952# Check whether --with-suffix or --without-suffix was given.
2953if test "${with_suffix+set}" = set; then
2954 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002955
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002956 case $withval in
2957 no) EXEEXT=;;
2958 yes) EXEEXT=.exe;;
2959 *) EXEEXT=$withval;;
2960 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002961fi;
2962echo "$as_me:$LINENO: result: $EXEEXT" >&5
2963echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002964
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002965# Test whether we're running on a non-case-sensitive system, in which
2966# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002967
Martin v. Löwis11437992002-04-12 09:54:03 +00002968echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
2969echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen0b06be72002-06-21 14:48:38 +00002970if test -d "${srcdir}/python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002971then
Martin v. Löwis11437992002-04-12 09:54:03 +00002972 echo "$as_me:$LINENO: result: yes" >&5
2973echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002974 BUILDEXEEXT=.exe
2975else
Martin v. Löwis11437992002-04-12 09:54:03 +00002976 echo "$as_me:$LINENO: result: no" >&5
2977echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002978 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002979fi
Guido van Rossumff555e32000-09-22 15:38:21 +00002980
Guido van Rossumdd997f71998-10-07 19:58:26 +00002981case $MACHDEP in
2982bsdos*)
2983 case $CC in
2984 gcc) CC="$CC -D_HAVE_BSDI";;
2985 esac;;
2986esac
2987
Guido van Rossum24b1e751997-08-21 02:29:16 +00002988case $ac_sys_system in
2989hp*|HP*)
2990 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00002991 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002992 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002993Monterey*)
2994 case $CC in
2995 cc) CC="$CC -Wl,-Bexport";;
2996 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002997SunOS*)
2998 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00002999
3000cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003001#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003002_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003003
3004 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003005esac
3006
Michael W. Hudson54241132001-12-07 15:38:26 +00003007
3008
Martin v. Löwis11437992002-04-12 09:54:03 +00003009echo "$as_me:$LINENO: checking LIBRARY" >&5
3010echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003011if test -z "$LIBRARY"
3012then
3013 LIBRARY='libpython$(VERSION).a'
3014fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003015echo "$as_me:$LINENO: result: $LIBRARY" >&5
3016echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003017
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003018# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003019# name of the library into which to insert object files). BLDLIBRARY is also
3020# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3021# is blank as the main program is not linked directly against LDLIBRARY.
3022# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3023# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3024# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3025# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003026#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003027# RUNSHARED is used to run shared python without installed libraries
3028#
3029# INSTSONAME is the name of the shared library that will be use to install
3030# on the system - some systems like version suffix, others don't
3031
3032
Michael W. Hudson54241132001-12-07 15:38:26 +00003033
3034
3035
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003036
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003037LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003038BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003039INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003040DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003041LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003042RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003043
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003044# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003045# If CXX is set, and if it is needed to link a main function that was
3046# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3047# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003048# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003049# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003050
Martin v. Löwis11437992002-04-12 09:54:03 +00003051echo "$as_me:$LINENO: checking LINKCC" >&5
3052echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003053if test -z "$LINKCC"
3054then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003055 if test -z "$CXX"; then
3056 LINKCC="\$(PURIFY) \$(CC)"
3057 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003058 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003059 $CXX -c conftest.$ac_ext 2>&5
3060 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3061 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3062 then
3063 LINKCC="\$(PURIFY) \$(CC)"
3064 else
3065 LINKCC="\$(PURIFY) \$(CXX)"
3066 fi
3067 rm -fr conftest*
3068 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003069 case $ac_sys_system in
3070 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003071 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003072 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003073 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003074 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003075 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003076 esac
3077fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003078echo "$as_me:$LINENO: result: $LINKCC" >&5
3079echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003080
Martin v. Löwis11437992002-04-12 09:54:03 +00003081echo "$as_me:$LINENO: checking for --enable-shared" >&5
3082echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003083# Check whether --enable-shared or --disable-shared was given.
3084if test "${enable_shared+set}" = set; then
3085 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003086
Martin v. Löwis11437992002-04-12 09:54:03 +00003087fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003088
3089if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003090then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003091 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003092 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003093 enable_shared="yes";;
3094 *)
3095 enable_shared="no";;
3096 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003097fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003098echo "$as_me:$LINENO: result: $enable_shared" >&5
3099echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003100
3101
Martin v. Löwis11437992002-04-12 09:54:03 +00003102echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3103echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003104
Guido van Rossumb8552162001-09-05 14:58:11 +00003105# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3106# library that we build, but we do not want to link against it (we
3107# will find it with a -framework option). For this reason there is an
3108# extra variable BLDLIBRARY against which Python and the extension
3109# modules are linked, BLDLIBRARY. This is normally the same as
3110# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003111if test "$enable_framework"
3112then
3113 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3114 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3115 BLDLIBRARY=''
3116else
3117 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003118fi
Jack Jansene578a632001-08-15 01:27:14 +00003119
Martin v. Löwis1142de32002-03-29 16:28:31 +00003120# Other platforms follow
3121if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003122
3123cat >>confdefs.h <<\_ACEOF
3124#define Py_ENABLE_SHARED 1
3125_ACEOF
3126
Martin v. Löwis1142de32002-03-29 16:28:31 +00003127 case $ac_sys_system in
3128 BeOS*)
3129 LDLIBRARY='libpython$(VERSION).so'
3130 ;;
3131 CYGWIN*)
3132 LDLIBRARY='libpython$(VERSION).dll.a'
3133 DLLLIBRARY='libpython$(VERSION).dll'
3134 ;;
3135 SunOS*)
3136 LDLIBRARY='libpython$(VERSION).so'
3137 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3138 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3139 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003140 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003141 LDLIBRARY='libpython$(VERSION).so'
3142 BLDLIBRARY='-L. -lpython$(VERSION)'
3143 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3144 INSTSONAME="$LDLIBRARY".$SOVERSION
3145 ;;
3146 hp*|HP*)
3147 LDLIBRARY='libpython$(VERSION).sl'
3148 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3149 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3150 ;;
3151 OSF*)
3152 LDLIBRARY='libpython$(VERSION).so'
3153 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3154 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3155 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003156 atheos*)
3157 LDLIBRARY='libpython$(VERSION).so'
3158 BLDLIBRARY='-L. -lpython$(VERSION)'
3159 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3160 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003161 esac
3162 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3163 case $MACHDEP in
3164 dguxR4)
3165 LDLIBRARY='libpython$(VERSION).so'
3166 OPT="$OPT -pic"
3167 ;;
3168 esac
3169fi
3170
Martin v. Löwis11437992002-04-12 09:54:03 +00003171echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3172echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003173
Martin v. Löwis11437992002-04-12 09:54:03 +00003174if test -n "$ac_tool_prefix"; then
3175 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3176set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3177echo "$as_me:$LINENO: checking for $ac_word" >&5
3178echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3179if test "${ac_cv_prog_RANLIB+set}" = set; then
3180 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003181else
3182 if test -n "$RANLIB"; then
3183 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3184else
Martin v. Löwis11437992002-04-12 09:54:03 +00003185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3186for as_dir in $PATH
3187do
3188 IFS=$as_save_IFS
3189 test -z "$as_dir" && as_dir=.
3190 for ac_exec_ext in '' $ac_executable_extensions; do
3191 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3192 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3193 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3194 break 2
3195 fi
3196done
3197done
3198
Guido van Rossum627b2d71993-12-24 10:39:16 +00003199fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003200fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003201RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003202if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003203 echo "$as_me:$LINENO: result: $RANLIB" >&5
3204echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003205else
Martin v. Löwis11437992002-04-12 09:54:03 +00003206 echo "$as_me:$LINENO: result: no" >&5
3207echo "${ECHO_T}no" >&6
3208fi
3209
3210fi
3211if test -z "$ac_cv_prog_RANLIB"; then
3212 ac_ct_RANLIB=$RANLIB
3213 # Extract the first word of "ranlib", so it can be a program name with args.
3214set dummy ranlib; ac_word=$2
3215echo "$as_me:$LINENO: checking for $ac_word" >&5
3216echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3217if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3218 echo $ECHO_N "(cached) $ECHO_C" >&6
3219else
3220 if test -n "$ac_ct_RANLIB"; then
3221 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3222else
3223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3224for as_dir in $PATH
3225do
3226 IFS=$as_save_IFS
3227 test -z "$as_dir" && as_dir=.
3228 for ac_exec_ext in '' $ac_executable_extensions; do
3229 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3230 ac_cv_prog_ac_ct_RANLIB="ranlib"
3231 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3232 break 2
3233 fi
3234done
3235done
3236
3237 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3238fi
3239fi
3240ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3241if test -n "$ac_ct_RANLIB"; then
3242 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3243echo "${ECHO_T}$ac_ct_RANLIB" >&6
3244else
3245 echo "$as_me:$LINENO: result: no" >&5
3246echo "${ECHO_T}no" >&6
3247fi
3248
3249 RANLIB=$ac_ct_RANLIB
3250else
3251 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003252fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003253
3254
Guido van Rossum7f43da71994-08-01 12:15:30 +00003255for ac_prog in ar aal
3256do
Martin v. Löwis11437992002-04-12 09:54:03 +00003257 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003258set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003259echo "$as_me:$LINENO: checking for $ac_word" >&5
3260echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3261if test "${ac_cv_prog_AR+set}" = set; then
3262 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003263else
3264 if test -n "$AR"; then
3265 ac_cv_prog_AR="$AR" # Let the user override the test.
3266else
Martin v. Löwis11437992002-04-12 09:54:03 +00003267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3268for as_dir in $PATH
3269do
3270 IFS=$as_save_IFS
3271 test -z "$as_dir" && as_dir=.
3272 for ac_exec_ext in '' $ac_executable_extensions; do
3273 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3274 ac_cv_prog_AR="$ac_prog"
3275 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3276 break 2
3277 fi
3278done
3279done
3280
Guido van Rossum7f43da71994-08-01 12:15:30 +00003281fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003282fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003283AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003284if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003285 echo "$as_me:$LINENO: result: $AR" >&5
3286echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003287else
Martin v. Löwis11437992002-04-12 09:54:03 +00003288 echo "$as_me:$LINENO: result: no" >&5
3289echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003290fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003291
Martin v. Löwis11437992002-04-12 09:54:03 +00003292 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003293done
3294test -n "$AR" || AR="ar"
3295
Michael W. Hudson54241132001-12-07 15:38:26 +00003296
Neil Schemenauera42c8272001-03-31 00:01:55 +00003297case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003298bsdos*|hp*|HP*)
3299 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003300 if test -z "$INSTALL"
3301 then
3302 INSTALL="${srcdir}/install-sh -c"
3303 fi
3304esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003305ac_aux_dir=
3306for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3307 if test -f $ac_dir/install-sh; then
3308 ac_aux_dir=$ac_dir
3309 ac_install_sh="$ac_aux_dir/install-sh -c"
3310 break
3311 elif test -f $ac_dir/install.sh; then
3312 ac_aux_dir=$ac_dir
3313 ac_install_sh="$ac_aux_dir/install.sh -c"
3314 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003315 elif test -f $ac_dir/shtool; then
3316 ac_aux_dir=$ac_dir
3317 ac_install_sh="$ac_aux_dir/shtool install -c"
3318 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003319 fi
3320done
3321if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003322 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3323echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3324 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003325fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003326ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3327ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3328ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003329
3330# Find a good install program. We prefer a C program (faster),
3331# so one script is as good as another. But avoid the broken or
3332# incompatible versions:
3333# SysV /etc/install, /usr/sbin/install
3334# SunOS /usr/etc/install
3335# IRIX /sbin/install
3336# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003337# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003338# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3339# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3340# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3341# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003342echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3343echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003344if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003345if test "${ac_cv_path_install+set}" = set; then
3346 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003347else
Martin v. Löwis11437992002-04-12 09:54:03 +00003348 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3349for as_dir in $PATH
3350do
3351 IFS=$as_save_IFS
3352 test -z "$as_dir" && as_dir=.
3353 # Account for people who put trailing slashes in PATH elements.
3354case $as_dir/ in
3355 ./ | .// | /cC/* | \
3356 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3357 /usr/ucb/* ) ;;
3358 *)
3359 # OSF1 and SCO ODT 3.0 have their own names for install.
3360 # Don't use installbsd from OSF since it installs stuff as root
3361 # by default.
3362 for ac_prog in ginstall scoinst install; do
3363 for ac_exec_ext in '' $ac_executable_extensions; do
3364 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3365 if test $ac_prog = install &&
3366 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3367 # AIX install. It has an incompatible calling convention.
3368 :
3369 elif test $ac_prog = install &&
3370 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3371 # program-specific install script used by HP pwplus--don't use.
3372 :
3373 else
3374 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3375 break 3
3376 fi
3377 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003378 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003379 done
3380 ;;
3381esac
3382done
3383
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003384
3385fi
3386 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003387 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003388 else
3389 # As a last resort, use the slow shell script. We don't cache a
3390 # path for INSTALL within a source directory, because that will
3391 # break other packages using the cache if that directory is
3392 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003393 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003394 fi
3395fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003396echo "$as_me:$LINENO: result: $INSTALL" >&5
3397echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003398
3399# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3400# It thinks the first close brace ends the variable substitution.
3401test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3402
Martin v. Löwis11437992002-04-12 09:54:03 +00003403test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003404
3405test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3406
Michael W. Hudson54241132001-12-07 15:38:26 +00003407
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003408# Not every filesystem supports hard links
3409
3410if test -z "$LN" ; then
3411 case $ac_sys_system in
3412 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003413 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003414 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003415 *) LN=ln;;
3416 esac
3417fi
3418
Fred Drake109d9862001-07-11 06:27:56 +00003419# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003420echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3421echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3422
Fred Drake109d9862001-07-11 06:27:56 +00003423# Check whether --with-pydebug or --without-pydebug was given.
3424if test "${with_pydebug+set}" = set; then
3425 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003426
Fred Drake109d9862001-07-11 06:27:56 +00003427if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003428then
3429
3430cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003431#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003432_ACEOF
3433
3434 echo "$as_me:$LINENO: result: yes" >&5
3435echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003436 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003437else echo "$as_me:$LINENO: result: no" >&5
3438echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003439fi
3440else
Martin v. Löwis11437992002-04-12 09:54:03 +00003441 echo "$as_me:$LINENO: result: no" >&5
3442echo "${ECHO_T}no" >&6
3443fi;
Fred Drake109d9862001-07-11 06:27:56 +00003444
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003445# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003446
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003447if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003448then
Neal Norwitzd957f392002-09-25 21:26:19 +00003449 case $GCC in
Guido van Rossumedca74a1997-07-18 23:29:40 +00003450 yes)
3451 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003452 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003453 if test "$Py_DEBUG" = 'true' ; then
3454 # Optimization messes up debuggers, so turn it off for
3455 # debug builds.
3456 OPT="-g -Wall -Wstrict-prototypes"
3457 else
3458 OPT="-g -O3 -Wall -Wstrict-prototypes"
3459 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003460 *)
Fred Drake109d9862001-07-11 06:27:56 +00003461 OPT="-O3 -Wall -Wstrict-prototypes";;
3462 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003463 case $ac_sys_system in
3464 SCO_SV*) OPT="$OPT -m486 -DSCO5";;
3465 esac
Fred Drake109d9862001-07-11 06:27:56 +00003466 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003467 *)
3468 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003469 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003470 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003471 SCO_SV*)
3472 CFLAGS="$CFLAGS -belf"
3473 OPT="-belf -O -Ki486 -DSCO5";;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003474 *)
3475 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003476 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003477 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003478 case $ac_sys_system in
3479 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003480 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003481 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003482fi
3483
Fred Drakee1ceaa02001-12-04 20:55:47 +00003484if test "$Py_DEBUG" = 'true'; then
3485 :
3486else
3487 OPT="-DNDEBUG $OPT"
3488fi
3489
Trent Mick635f6fb2000-08-23 21:33:05 +00003490# The current (beta) Monterey compiler dies with optimizations
3491case $ac_sys_system in
3492Monterey*) OPT="";;
3493esac
3494
Guido van Rossum563e7081996-09-10 18:20:48 +00003495if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003496then
3497 OPT="$OPT $ac_arch_flags"
3498fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003499
Martin v. Löwis11437992002-04-12 09:54:03 +00003500echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3501echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3502if test "${ac_cv_opt_olimit_ok+set}" = set; then
3503 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003504else
3505 ac_save_cc="$CC"
3506CC="$CC -OPT:Olimit=0"
3507if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003508 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003509else
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 cat >conftest.$ac_ext <<_ACEOF
3511#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003512#include "confdefs.h"
3513int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003514_ACEOF
3515rm -f conftest$ac_exeext
3516if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3517 (eval $ac_link) 2>&5
3518 ac_status=$?
3519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3520 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3522 (eval $ac_try) 2>&5
3523 ac_status=$?
3524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3525 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003526 ac_cv_opt_olimit_ok=yes
3527else
Martin v. Löwis11437992002-04-12 09:54:03 +00003528 echo "$as_me: program exited with status $ac_status" >&5
3529echo "$as_me: failed program was:" >&5
3530cat conftest.$ac_ext >&5
3531( exit $ac_status )
3532ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003533fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003534rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003535fi
Guido van Rossum91922671997-10-09 20:24:13 +00003536CC="$ac_save_cc"
3537fi
3538
Martin v. Löwis11437992002-04-12 09:54:03 +00003539echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3540echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003541if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003542 case $ac_sys_system in
3543 Darwin*) OPT="$OPT" ;;
3544 *) OPT="$OPT -OPT:Olimit=0";;
3545 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003546else
Martin v. Löwis11437992002-04-12 09:54:03 +00003547 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3548echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3549 if test "${ac_cv_olimit_ok+set}" = set; then
3550 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003551else
3552 ac_save_cc="$CC"
3553 CC="$CC -Olimit 1500"
3554 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003555 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003556else
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 cat >conftest.$ac_ext <<_ACEOF
3558#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003559#include "confdefs.h"
3560int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003561_ACEOF
3562rm -f conftest$ac_exeext
3563if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3564 (eval $ac_link) 2>&5
3565 ac_status=$?
3566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3567 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3569 (eval $ac_try) 2>&5
3570 ac_status=$?
3571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3572 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003573 ac_cv_olimit_ok=yes
3574else
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 echo "$as_me: program exited with status $ac_status" >&5
3576echo "$as_me: failed program was:" >&5
3577cat conftest.$ac_ext >&5
3578( exit $ac_status )
3579ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003580fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003581rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003582fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003583 CC="$ac_save_cc"
3584fi
3585
Martin v. Löwis11437992002-04-12 09:54:03 +00003586 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3587echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003588 if test $ac_cv_olimit_ok = yes; then
3589 OPT="$OPT -Olimit 1500"
3590 fi
3591fi
3592
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003593# On some compilers, pthreads are available without further options
3594# (e.g. MacOS X). On some of these systems, the compiler will not
3595# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3596# So we have to see first whether pthreads are available without
3597# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003598echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3599echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3600if test "${ac_cv_pthread_is_default+set}" = set; then
3601 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003602else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003603 if test "$cross_compiling" = yes; then
3604 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003605else
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 cat >conftest.$ac_ext <<_ACEOF
3607#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003608#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003609
Martin v. Löwis130fb172001-07-19 11:00:41 +00003610#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003611
3612void* routine(void* p){return NULL;}
3613
3614int main(){
3615 pthread_t p;
3616 if(pthread_create(&p,NULL,routine,NULL)!=0)
3617 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003618 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003619 return 0;
3620}
3621
Martin v. Löwis11437992002-04-12 09:54:03 +00003622_ACEOF
3623rm -f conftest$ac_exeext
3624if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3625 (eval $ac_link) 2>&5
3626 ac_status=$?
3627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3628 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3630 (eval $ac_try) 2>&5
3631 ac_status=$?
3632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3633 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003634 ac_cv_pthread_is_default=yes
3635else
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 echo "$as_me: program exited with status $ac_status" >&5
3637echo "$as_me: failed program was:" >&5
3638cat conftest.$ac_ext >&5
3639( exit $ac_status )
3640ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003641fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003642rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003643fi
3644
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003645fi
3646
Martin v. Löwis11437992002-04-12 09:54:03 +00003647echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3648echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003649
Michael W. Hudson54241132001-12-07 15:38:26 +00003650
Martin v. Löwis11437992002-04-12 09:54:03 +00003651if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003652then
3653 ac_cv_kpthread=no
3654else
3655# -Kpthread, if available, provides the right #defines
3656# and linker options to make pthread_create available
3657# Some compilers won't report that they do not support -Kpthread,
3658# so we need to run a program to see whether it really made the
3659# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003660echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3661echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3662if test "${ac_cv_kpthread+set}" = set; then
3663 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003664else
3665 ac_save_cc="$CC"
3666CC="$CC -Kpthread"
3667if test "$cross_compiling" = yes; then
3668 ac_cv_kpthread=no
3669else
Martin v. Löwis11437992002-04-12 09:54:03 +00003670 cat >conftest.$ac_ext <<_ACEOF
3671#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003672#include "confdefs.h"
3673
3674#include <pthread.h>
3675
3676void* routine(void* p){return NULL;}
3677
3678int main(){
3679 pthread_t p;
3680 if(pthread_create(&p,NULL,routine,NULL)!=0)
3681 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003682 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003683 return 0;
3684}
3685
Martin v. Löwis11437992002-04-12 09:54:03 +00003686_ACEOF
3687rm -f conftest$ac_exeext
3688if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3689 (eval $ac_link) 2>&5
3690 ac_status=$?
3691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3692 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3694 (eval $ac_try) 2>&5
3695 ac_status=$?
3696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3697 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003698 ac_cv_kpthread=yes
3699else
Martin v. Löwis11437992002-04-12 09:54:03 +00003700 echo "$as_me: program exited with status $ac_status" >&5
3701echo "$as_me: failed program was:" >&5
3702cat conftest.$ac_ext >&5
3703( exit $ac_status )
3704ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003705fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003706rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003707fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003708CC="$ac_save_cc"
3709fi
3710
Martin v. Löwis11437992002-04-12 09:54:03 +00003711echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3712echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003713fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003714
Michael W. Hudson54241132001-12-07 15:38:26 +00003715
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003716# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003717echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3718echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3719if test "${ac_cv_header_stdc+set}" = set; then
3720 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003721else
Martin v. Löwis11437992002-04-12 09:54:03 +00003722 cat >conftest.$ac_ext <<_ACEOF
3723#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003724#include "confdefs.h"
3725#include <stdlib.h>
3726#include <stdarg.h>
3727#include <string.h>
3728#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003729
3730_ACEOF
3731if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3732 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3733 ac_status=$?
3734 egrep -v '^ *\+' conftest.er1 >conftest.err
3735 rm -f conftest.er1
3736 cat conftest.err >&5
3737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3738 (exit $ac_status); } >/dev/null; then
3739 if test -s conftest.err; then
3740 ac_cpp_err=$ac_c_preproc_warn_flag
3741 else
3742 ac_cpp_err=
3743 fi
3744else
3745 ac_cpp_err=yes
3746fi
3747if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003748 ac_cv_header_stdc=yes
3749else
Martin v. Löwis11437992002-04-12 09:54:03 +00003750 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003751 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003752 ac_cv_header_stdc=no
3753fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003754rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003755
3756if test $ac_cv_header_stdc = yes; then
3757 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003758 cat >conftest.$ac_ext <<_ACEOF
3759#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003760#include "confdefs.h"
3761#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003762
3763_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003764if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3765 egrep "memchr" >/dev/null 2>&1; then
3766 :
3767else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003768 ac_cv_header_stdc=no
3769fi
3770rm -f conftest*
3771
3772fi
3773
3774if test $ac_cv_header_stdc = yes; then
3775 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 cat >conftest.$ac_ext <<_ACEOF
3777#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003778#include "confdefs.h"
3779#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003780
3781_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3783 egrep "free" >/dev/null 2>&1; then
3784 :
3785else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003786 ac_cv_header_stdc=no
3787fi
3788rm -f conftest*
3789
3790fi
3791
3792if test $ac_cv_header_stdc = yes; then
3793 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003794 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003795 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003796else
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 cat >conftest.$ac_ext <<_ACEOF
3798#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003799#include "confdefs.h"
3800#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003801#if ((' ' & 0x0FF) == 0x020)
3802# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3803# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3804#else
3805# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3806 || ('j' <= (c) && (c) <= 'r') \
3807 || ('s' <= (c) && (c) <= 'z'))
3808# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3809#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003810
Martin v. Löwis11437992002-04-12 09:54:03 +00003811#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3812int
3813main ()
3814{
3815 int i;
3816 for (i = 0; i < 256; i++)
3817 if (XOR (islower (i), ISLOWER (i))
3818 || toupper (i) != TOUPPER (i))
3819 exit(2);
3820 exit (0);
3821}
3822_ACEOF
3823rm -f conftest$ac_exeext
3824if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3825 (eval $ac_link) 2>&5
3826 ac_status=$?
3827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3828 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3830 (eval $ac_try) 2>&5
3831 ac_status=$?
3832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3833 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003834 :
3835else
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 echo "$as_me: program exited with status $ac_status" >&5
3837echo "$as_me: failed program was:" >&5
3838cat conftest.$ac_ext >&5
3839( exit $ac_status )
3840ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003841fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003842rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003843fi
3844fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003845fi
3846echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3847echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003848if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003849
3850cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003851#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003852_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003853
3854fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003855
Martin v. Löwis11437992002-04-12 09:54:03 +00003856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
Martin v. Löwis11437992002-04-12 09:54:03 +00003893for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003894libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003895signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003896sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003897sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwis69532332001-10-13 09:12:41 +00003898sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003899sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003900do
Martin v. Löwis11437992002-04-12 09:54:03 +00003901as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3902if eval "test \"\${$as_ac_Header+set}\" = set"; then
3903 echo "$as_me:$LINENO: checking for $ac_header" >&5
3904echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3905if eval "test \"\${$as_ac_Header+set}\" = set"; then
3906 echo $ECHO_N "(cached) $ECHO_C" >&6
3907fi
3908echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3909echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003910else
Martin v. Löwis11437992002-04-12 09:54:03 +00003911 # Is the header compilable?
3912echo "$as_me:$LINENO: checking $ac_header usability" >&5
3913echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3914cat >conftest.$ac_ext <<_ACEOF
3915#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003916#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003917$ac_includes_default
3918#include <$ac_header>
3919_ACEOF
3920rm -f conftest.$ac_objext
3921if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3922 (eval $ac_compile) 2>&5
3923 ac_status=$?
3924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3925 (exit $ac_status); } &&
3926 { ac_try='test -s conftest.$ac_objext'
3927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3928 (eval $ac_try) 2>&5
3929 ac_status=$?
3930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3931 (exit $ac_status); }; }; then
3932 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003933else
Martin v. Löwis11437992002-04-12 09:54:03 +00003934 echo "$as_me: failed program was:" >&5
3935cat conftest.$ac_ext >&5
3936ac_header_compiler=no
3937fi
3938rm -f conftest.$ac_objext conftest.$ac_ext
3939echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3940echo "${ECHO_T}$ac_header_compiler" >&6
3941
3942# Is the header present?
3943echo "$as_me:$LINENO: checking $ac_header presence" >&5
3944echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3945cat >conftest.$ac_ext <<_ACEOF
3946#line $LINENO "configure"
3947#include "confdefs.h"
3948#include <$ac_header>
3949_ACEOF
3950if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3951 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3952 ac_status=$?
3953 egrep -v '^ *\+' conftest.er1 >conftest.err
3954 rm -f conftest.er1
3955 cat conftest.err >&5
3956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3957 (exit $ac_status); } >/dev/null; then
3958 if test -s conftest.err; then
3959 ac_cpp_err=$ac_c_preproc_warn_flag
3960 else
3961 ac_cpp_err=
3962 fi
3963else
3964 ac_cpp_err=yes
3965fi
3966if test -z "$ac_cpp_err"; then
3967 ac_header_preproc=yes
3968else
3969 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003970 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003971 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003972fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003973rm -f conftest.err conftest.$ac_ext
3974echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3975echo "${ECHO_T}$ac_header_preproc" >&6
3976
3977# So? What about this header?
3978case $ac_header_compiler:$ac_header_preproc in
3979 yes:no )
3980 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3981echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3982 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3983echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3984 no:yes )
3985 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3986echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3987 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3988echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3989 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3990echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3991esac
3992echo "$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
Michael W. Hudson54241132001-12-07 15:38:26 +00003996else
Martin v. Löwis11437992002-04-12 09:54:03 +00003997 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003998fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003999echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4000echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4001
4002fi
4003if test `eval echo '${'$as_ac_Header'}'` = yes; then
4004 cat >>confdefs.h <<_ACEOF
4005#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4006_ACEOF
4007
4008fi
4009
Guido van Rossum627b2d71993-12-24 10:39:16 +00004010done
4011
Martin v. Löwis11437992002-04-12 09:54:03 +00004012
4013
4014
4015
4016
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004017ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004018for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4019 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4020echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4021echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4022if eval "test \"\${$as_ac_Header+set}\" = set"; then
4023 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004024else
Martin v. Löwis11437992002-04-12 09:54:03 +00004025 cat >conftest.$ac_ext <<_ACEOF
4026#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004027#include "confdefs.h"
4028#include <sys/types.h>
4029#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004030
4031#ifdef F77_DUMMY_MAIN
4032# ifdef __cplusplus
4033 extern "C"
4034# endif
4035 int F77_DUMMY_MAIN() { return 1; }
4036#endif
4037int
4038main ()
4039{
4040if ((DIR *) 0)
4041return 0;
4042 ;
4043 return 0;
4044}
4045_ACEOF
4046rm -f conftest.$ac_objext
4047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4048 (eval $ac_compile) 2>&5
4049 ac_status=$?
4050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4051 (exit $ac_status); } &&
4052 { ac_try='test -s conftest.$ac_objext'
4053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4054 (eval $ac_try) 2>&5
4055 ac_status=$?
4056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4057 (exit $ac_status); }; }; then
4058 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004059else
Martin v. Löwis11437992002-04-12 09:54:03 +00004060 echo "$as_me: failed program was:" >&5
4061cat conftest.$ac_ext >&5
4062eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004063fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004064rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004065fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004066echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4067echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4068if test `eval echo '${'$as_ac_Header'}'` = yes; then
4069 cat >>confdefs.h <<_ACEOF
4070#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4071_ACEOF
4072
4073ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004074fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004076done
4077# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4078if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004079 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4080echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4081if test "${ac_cv_search_opendir+set}" = set; then
4082 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004083else
Martin v. Löwis11437992002-04-12 09:54:03 +00004084 ac_func_search_save_LIBS=$LIBS
4085ac_cv_search_opendir=no
4086cat >conftest.$ac_ext <<_ACEOF
4087#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004088#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004090/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004091#ifdef __cplusplus
4092extern "C"
4093#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004094/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004095 builtin and then its argument prototype would still apply. */
4096char opendir ();
4097#ifdef F77_DUMMY_MAIN
4098# ifdef __cplusplus
4099 extern "C"
4100# endif
4101 int F77_DUMMY_MAIN() { return 1; }
4102#endif
4103int
4104main ()
4105{
4106opendir ();
4107 ;
4108 return 0;
4109}
4110_ACEOF
4111rm -f conftest.$ac_objext conftest$ac_exeext
4112if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4113 (eval $ac_link) 2>&5
4114 ac_status=$?
4115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4116 (exit $ac_status); } &&
4117 { ac_try='test -s conftest$ac_exeext'
4118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4119 (eval $ac_try) 2>&5
4120 ac_status=$?
4121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4122 (exit $ac_status); }; }; then
4123 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004124else
Martin v. Löwis11437992002-04-12 09:54:03 +00004125 echo "$as_me: failed program was:" >&5
4126cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004127fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004128rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4129if test "$ac_cv_search_opendir" = no; then
4130 for ac_lib in dir; do
4131 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4132 cat >conftest.$ac_ext <<_ACEOF
4133#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004134#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004135
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004136/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004137#ifdef __cplusplus
4138extern "C"
4139#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004140/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004141 builtin and then its argument prototype would still apply. */
4142char opendir ();
4143#ifdef F77_DUMMY_MAIN
4144# ifdef __cplusplus
4145 extern "C"
4146# endif
4147 int F77_DUMMY_MAIN() { return 1; }
4148#endif
4149int
4150main ()
4151{
4152opendir ();
4153 ;
4154 return 0;
4155}
4156_ACEOF
4157rm -f conftest.$ac_objext conftest$ac_exeext
4158if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4159 (eval $ac_link) 2>&5
4160 ac_status=$?
4161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4162 (exit $ac_status); } &&
4163 { ac_try='test -s conftest$ac_exeext'
4164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4165 (eval $ac_try) 2>&5
4166 ac_status=$?
4167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4168 (exit $ac_status); }; }; then
4169 ac_cv_search_opendir="-l$ac_lib"
4170break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004171else
Martin v. Löwis11437992002-04-12 09:54:03 +00004172 echo "$as_me: failed program was:" >&5
4173cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004174fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004175rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4176 done
4177fi
4178LIBS=$ac_func_search_save_LIBS
4179fi
4180echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4181echo "${ECHO_T}$ac_cv_search_opendir" >&6
4182if test "$ac_cv_search_opendir" != no; then
4183 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004184
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004185fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004186
Michael W. Hudson54241132001-12-07 15:38:26 +00004187else
Martin v. Löwis11437992002-04-12 09:54:03 +00004188 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4189echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4190if test "${ac_cv_search_opendir+set}" = set; then
4191 echo $ECHO_N "(cached) $ECHO_C" >&6
4192else
4193 ac_func_search_save_LIBS=$LIBS
4194ac_cv_search_opendir=no
4195cat >conftest.$ac_ext <<_ACEOF
4196#line $LINENO "configure"
4197#include "confdefs.h"
4198
4199/* Override any gcc2 internal prototype to avoid an error. */
4200#ifdef __cplusplus
4201extern "C"
4202#endif
4203/* We use char because int might match the return type of a gcc2
4204 builtin and then its argument prototype would still apply. */
4205char opendir ();
4206#ifdef F77_DUMMY_MAIN
4207# ifdef __cplusplus
4208 extern "C"
4209# endif
4210 int F77_DUMMY_MAIN() { return 1; }
4211#endif
4212int
4213main ()
4214{
4215opendir ();
4216 ;
4217 return 0;
4218}
4219_ACEOF
4220rm -f conftest.$ac_objext conftest$ac_exeext
4221if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4222 (eval $ac_link) 2>&5
4223 ac_status=$?
4224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4225 (exit $ac_status); } &&
4226 { ac_try='test -s conftest$ac_exeext'
4227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4228 (eval $ac_try) 2>&5
4229 ac_status=$?
4230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4231 (exit $ac_status); }; }; then
4232 ac_cv_search_opendir="none required"
4233else
4234 echo "$as_me: failed program was:" >&5
4235cat conftest.$ac_ext >&5
4236fi
4237rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4238if test "$ac_cv_search_opendir" = no; then
4239 for ac_lib in x; do
4240 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4241 cat >conftest.$ac_ext <<_ACEOF
4242#line $LINENO "configure"
4243#include "confdefs.h"
4244
4245/* Override any gcc2 internal prototype to avoid an error. */
4246#ifdef __cplusplus
4247extern "C"
4248#endif
4249/* We use char because int might match the return type of a gcc2
4250 builtin and then its argument prototype would still apply. */
4251char opendir ();
4252#ifdef F77_DUMMY_MAIN
4253# ifdef __cplusplus
4254 extern "C"
4255# endif
4256 int F77_DUMMY_MAIN() { return 1; }
4257#endif
4258int
4259main ()
4260{
4261opendir ();
4262 ;
4263 return 0;
4264}
4265_ACEOF
4266rm -f conftest.$ac_objext conftest$ac_exeext
4267if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4268 (eval $ac_link) 2>&5
4269 ac_status=$?
4270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4271 (exit $ac_status); } &&
4272 { ac_try='test -s conftest$ac_exeext'
4273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4274 (eval $ac_try) 2>&5
4275 ac_status=$?
4276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4277 (exit $ac_status); }; }; then
4278 ac_cv_search_opendir="-l$ac_lib"
4279break
4280else
4281 echo "$as_me: failed program was:" >&5
4282cat conftest.$ac_ext >&5
4283fi
4284rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4285 done
4286fi
4287LIBS=$ac_func_search_save_LIBS
4288fi
4289echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4290echo "${ECHO_T}$ac_cv_search_opendir" >&6
4291if test "$ac_cv_search_opendir" != no; then
4292 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4293
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004294fi
4295
4296fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004297
Michael W. Hudson54241132001-12-07 15:38:26 +00004298
Guido van Rossum627b2d71993-12-24 10:39:16 +00004299# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004300was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004301echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4302echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4303cat >conftest.$ac_ext <<_ACEOF
4304#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004305#include "confdefs.h"
4306#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004307
4308_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004309if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4310 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004311 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004312else
Martin v. Löwis11437992002-04-12 09:54:03 +00004313
4314
4315cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004316#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004317_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004318
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004319
Guido van Rossum627b2d71993-12-24 10:39:16 +00004320fi
4321rm -f conftest*
4322
Martin v. Löwis11437992002-04-12 09:54:03 +00004323echo "$as_me:$LINENO: result: $was_it_defined" >&5
4324echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004325
Neal Norwitz11690112002-07-30 01:08:28 +00004326# Check whether using makedev requires defining _OSF_SOURCE
4327echo "$as_me:$LINENO: checking for makedev" >&5
4328echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4329cat >conftest.$ac_ext <<_ACEOF
4330#line $LINENO "configure"
4331#include "confdefs.h"
4332 #include <sys/types.h>
4333#ifdef F77_DUMMY_MAIN
4334# ifdef __cplusplus
4335 extern "C"
4336# endif
4337 int F77_DUMMY_MAIN() { return 1; }
4338#endif
4339int
4340main ()
4341{
4342 makedev(0, 0)
4343 ;
4344 return 0;
4345}
4346_ACEOF
4347rm -f conftest.$ac_objext conftest$ac_exeext
4348if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4349 (eval $ac_link) 2>&5
4350 ac_status=$?
4351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4352 (exit $ac_status); } &&
4353 { ac_try='test -s conftest$ac_exeext'
4354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4355 (eval $ac_try) 2>&5
4356 ac_status=$?
4357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4358 (exit $ac_status); }; }; then
4359 ac_cv_has_makedev=yes
4360else
4361 echo "$as_me: failed program was:" >&5
4362cat conftest.$ac_ext >&5
4363ac_cv_has_makedev=no
4364fi
4365rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4366if test "$ac_cv_has_makedev" = "no"; then
4367 # we didn't link, try if _OSF_SOURCE will allow us to link
4368 cat >conftest.$ac_ext <<_ACEOF
4369#line $LINENO "configure"
4370#include "confdefs.h"
4371
4372 #define _OSF_SOURCE 1
4373 #include <sys/types.h>
4374
4375#ifdef F77_DUMMY_MAIN
4376# ifdef __cplusplus
4377 extern "C"
4378# endif
4379 int F77_DUMMY_MAIN() { return 1; }
4380#endif
4381int
4382main ()
4383{
4384 makedev(0, 0)
4385 ;
4386 return 0;
4387}
4388_ACEOF
4389rm -f conftest.$ac_objext conftest$ac_exeext
4390if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4391 (eval $ac_link) 2>&5
4392 ac_status=$?
4393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4394 (exit $ac_status); } &&
4395 { ac_try='test -s conftest$ac_exeext'
4396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4397 (eval $ac_try) 2>&5
4398 ac_status=$?
4399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4400 (exit $ac_status); }; }; then
4401 ac_cv_has_makedev=yes
4402else
4403 echo "$as_me: failed program was:" >&5
4404cat conftest.$ac_ext >&5
4405ac_cv_has_makedev=no
4406fi
4407rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4408 if test "$ac_cv_has_makedev" = "yes"; then
4409
4410cat >>confdefs.h <<\_ACEOF
4411#define _OSF_SOURCE 1
4412_ACEOF
4413
4414 fi
4415fi
4416echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4417echo "${ECHO_T}$ac_cv_has_makedev" >&6
4418if test "$ac_cv_has_makedev" = "yes"; then
4419
4420cat >>confdefs.h <<\_ACEOF
4421#define HAVE_MAKEDEV 1
4422_ACEOF
4423
4424fi
4425
Martin v. Löwis399a6892002-10-04 10:22:02 +00004426# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4427# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4428# defined, but the compiler does not support pragma redefine_extname,
4429# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4430# structures (such as rlimit64) without declaring them. As a
4431# work-around, disable LFS on such configurations
4432
4433use_lfs=yes
4434echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4435echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4436cat >conftest.$ac_ext <<_ACEOF
4437#line $LINENO "configure"
4438#include "confdefs.h"
4439
4440#define _LARGEFILE_SOURCE 1
4441#define _FILE_OFFSET_BITS 64
4442#include <sys/resource.h>
4443
4444#ifdef F77_DUMMY_MAIN
4445# ifdef __cplusplus
4446 extern "C"
4447# endif
4448 int F77_DUMMY_MAIN() { return 1; }
4449#endif
4450int
4451main ()
4452{
4453struct rlimit foo;
4454 ;
4455 return 0;
4456}
4457_ACEOF
4458rm -f conftest.$ac_objext
4459if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4460 (eval $ac_compile) 2>&5
4461 ac_status=$?
4462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4463 (exit $ac_status); } &&
4464 { ac_try='test -s conftest.$ac_objext'
4465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4466 (eval $ac_try) 2>&5
4467 ac_status=$?
4468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4469 (exit $ac_status); }; }; then
4470 sol_lfs_bug=no
4471else
4472 echo "$as_me: failed program was:" >&5
4473cat conftest.$ac_ext >&5
4474sol_lfs_bug=yes
4475fi
4476rm -f conftest.$ac_objext conftest.$ac_ext
4477echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4478echo "${ECHO_T}$sol_lfs_bug" >&6
4479if test "$sol_lfs_bug" = "yes"; then
4480 use_lfs=no
4481fi
4482
4483if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004484# Two defines needed to enable largefile support on various platforms
4485# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004486
Martin v. Löwis11437992002-04-12 09:54:03 +00004487cat >>confdefs.h <<\_ACEOF
4488#define _LARGEFILE_SOURCE 1
4489_ACEOF
4490
4491
4492cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004493#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004494_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004495
Martin v. Löwis399a6892002-10-04 10:22:02 +00004496fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004497
Guido van Rossum84e7b241996-08-19 21:59:00 +00004498# Add some code to confdefs.h so that the test for off_t works on SCO
4499cat >> confdefs.h <<\EOF
4500#if defined(SCO_DS)
4501#undef _OFF_T
4502#endif
4503EOF
4504
Guido van Rossumef2255b2000-03-10 22:30:29 +00004505# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004506echo "$as_me:$LINENO: checking for mode_t" >&5
4507echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4508if test "${ac_cv_type_mode_t+set}" = set; then
4509 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004510else
Martin v. Löwis11437992002-04-12 09:54:03 +00004511 cat >conftest.$ac_ext <<_ACEOF
4512#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004513#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004514$ac_includes_default
4515#ifdef F77_DUMMY_MAIN
4516# ifdef __cplusplus
4517 extern "C"
4518# endif
4519 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004521int
4522main ()
4523{
4524if ((mode_t *) 0)
4525 return 0;
4526if (sizeof (mode_t))
4527 return 0;
4528 ;
4529 return 0;
4530}
4531_ACEOF
4532rm -f conftest.$ac_objext
4533if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4534 (eval $ac_compile) 2>&5
4535 ac_status=$?
4536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4537 (exit $ac_status); } &&
4538 { ac_try='test -s conftest.$ac_objext'
4539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4540 (eval $ac_try) 2>&5
4541 ac_status=$?
4542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4543 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004544 ac_cv_type_mode_t=yes
4545else
Martin v. Löwis11437992002-04-12 09:54:03 +00004546 echo "$as_me: failed program was:" >&5
4547cat conftest.$ac_ext >&5
4548ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004549fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004550rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004551fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004552echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4553echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4554if test $ac_cv_type_mode_t = yes; then
4555 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004556else
Martin v. Löwis11437992002-04-12 09:54:03 +00004557
4558cat >>confdefs.h <<_ACEOF
4559#define mode_t int
4560_ACEOF
4561
4562fi
4563
4564echo "$as_me:$LINENO: checking for off_t" >&5
4565echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4566if test "${ac_cv_type_off_t+set}" = set; then
4567 echo $ECHO_N "(cached) $ECHO_C" >&6
4568else
4569 cat >conftest.$ac_ext <<_ACEOF
4570#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004571#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004572$ac_includes_default
4573#ifdef F77_DUMMY_MAIN
4574# ifdef __cplusplus
4575 extern "C"
4576# endif
4577 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004578#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004579int
4580main ()
4581{
4582if ((off_t *) 0)
4583 return 0;
4584if (sizeof (off_t))
4585 return 0;
4586 ;
4587 return 0;
4588}
4589_ACEOF
4590rm -f conftest.$ac_objext
4591if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4592 (eval $ac_compile) 2>&5
4593 ac_status=$?
4594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4595 (exit $ac_status); } &&
4596 { ac_try='test -s conftest.$ac_objext'
4597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4598 (eval $ac_try) 2>&5
4599 ac_status=$?
4600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4601 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004602 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004603else
Martin v. Löwis11437992002-04-12 09:54:03 +00004604 echo "$as_me: failed program was:" >&5
4605cat conftest.$ac_ext >&5
4606ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004607fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004608rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004609fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004610echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4611echo "${ECHO_T}$ac_cv_type_off_t" >&6
4612if test $ac_cv_type_off_t = yes; then
4613 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004614else
Martin v. Löwis11437992002-04-12 09:54:03 +00004615
4616cat >>confdefs.h <<_ACEOF
4617#define off_t long
4618_ACEOF
4619
4620fi
4621
4622echo "$as_me:$LINENO: checking for pid_t" >&5
4623echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4624if test "${ac_cv_type_pid_t+set}" = set; then
4625 echo $ECHO_N "(cached) $ECHO_C" >&6
4626else
4627 cat >conftest.$ac_ext <<_ACEOF
4628#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004629#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004630$ac_includes_default
4631#ifdef F77_DUMMY_MAIN
4632# ifdef __cplusplus
4633 extern "C"
4634# endif
4635 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004636#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004637int
4638main ()
4639{
4640if ((pid_t *) 0)
4641 return 0;
4642if (sizeof (pid_t))
4643 return 0;
4644 ;
4645 return 0;
4646}
4647_ACEOF
4648rm -f conftest.$ac_objext
4649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4650 (eval $ac_compile) 2>&5
4651 ac_status=$?
4652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4653 (exit $ac_status); } &&
4654 { ac_try='test -s conftest.$ac_objext'
4655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4656 (eval $ac_try) 2>&5
4657 ac_status=$?
4658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4659 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004660 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004661else
Martin v. Löwis11437992002-04-12 09:54:03 +00004662 echo "$as_me: failed program was:" >&5
4663cat conftest.$ac_ext >&5
4664ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004665fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004666rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004667fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004668echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4669echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4670if test $ac_cv_type_pid_t = yes; then
4671 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004672else
Martin v. Löwis11437992002-04-12 09:54:03 +00004673
4674cat >>confdefs.h <<_ACEOF
4675#define pid_t int
4676_ACEOF
4677
4678fi
4679
4680echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4681echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4682if test "${ac_cv_type_signal+set}" = set; then
4683 echo $ECHO_N "(cached) $ECHO_C" >&6
4684else
4685 cat >conftest.$ac_ext <<_ACEOF
4686#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004687#include "confdefs.h"
4688#include <sys/types.h>
4689#include <signal.h>
4690#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004691# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004692#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004693#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004694extern "C" void (*signal (int, void (*)(int)))(int);
4695#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004696void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004697#endif
4698
Martin v. Löwis11437992002-04-12 09:54:03 +00004699#ifdef F77_DUMMY_MAIN
4700# ifdef __cplusplus
4701 extern "C"
4702# endif
4703 int F77_DUMMY_MAIN() { return 1; }
4704#endif
4705int
4706main ()
4707{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004708int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004709 ;
4710 return 0;
4711}
4712_ACEOF
4713rm -f conftest.$ac_objext
4714if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4715 (eval $ac_compile) 2>&5
4716 ac_status=$?
4717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4718 (exit $ac_status); } &&
4719 { ac_try='test -s conftest.$ac_objext'
4720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4721 (eval $ac_try) 2>&5
4722 ac_status=$?
4723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4724 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004725 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004726else
Martin v. Löwis11437992002-04-12 09:54:03 +00004727 echo "$as_me: failed program was:" >&5
4728cat conftest.$ac_ext >&5
4729ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004730fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004731rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004732fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004733echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4734echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004735
Martin v. Löwis11437992002-04-12 09:54:03 +00004736cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004737#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004738_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004739
Michael W. Hudson54241132001-12-07 15:38:26 +00004740
Martin v. Löwis11437992002-04-12 09:54:03 +00004741echo "$as_me:$LINENO: checking for size_t" >&5
4742echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4743if test "${ac_cv_type_size_t+set}" = set; then
4744 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004745else
Martin v. Löwis11437992002-04-12 09:54:03 +00004746 cat >conftest.$ac_ext <<_ACEOF
4747#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004748#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004749$ac_includes_default
4750#ifdef F77_DUMMY_MAIN
4751# ifdef __cplusplus
4752 extern "C"
4753# endif
4754 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004756int
4757main ()
4758{
4759if ((size_t *) 0)
4760 return 0;
4761if (sizeof (size_t))
4762 return 0;
4763 ;
4764 return 0;
4765}
4766_ACEOF
4767rm -f conftest.$ac_objext
4768if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4769 (eval $ac_compile) 2>&5
4770 ac_status=$?
4771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4772 (exit $ac_status); } &&
4773 { ac_try='test -s conftest.$ac_objext'
4774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4775 (eval $ac_try) 2>&5
4776 ac_status=$?
4777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4778 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004779 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004780else
Martin v. Löwis11437992002-04-12 09:54:03 +00004781 echo "$as_me: failed program was:" >&5
4782cat conftest.$ac_ext >&5
4783ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004784fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004785rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004786fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004787echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4788echo "${ECHO_T}$ac_cv_type_size_t" >&6
4789if test $ac_cv_type_size_t = yes; then
4790 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004791else
Martin v. Löwis11437992002-04-12 09:54:03 +00004792
4793cat >>confdefs.h <<_ACEOF
4794#define size_t unsigned
4795_ACEOF
4796
4797fi
4798
4799echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4800echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4801if test "${ac_cv_type_uid_t+set}" = set; then
4802 echo $ECHO_N "(cached) $ECHO_C" >&6
4803else
4804 cat >conftest.$ac_ext <<_ACEOF
4805#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004806#include "confdefs.h"
4807#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004808
4809_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004810if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4811 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004812 ac_cv_type_uid_t=yes
4813else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004814 ac_cv_type_uid_t=no
4815fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004816rm -f conftest*
4817
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004818fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004819echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4820echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004821if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004822
Martin v. Löwis11437992002-04-12 09:54:03 +00004823cat >>confdefs.h <<\_ACEOF
4824#define uid_t int
4825_ACEOF
4826
4827
4828cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004829#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004830_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004831
4832fi
4833
Jack Jansendd19cf82001-12-06 22:36:17 +00004834
Michael W. Hudson54241132001-12-07 15:38:26 +00004835# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004836echo "$as_me:$LINENO: checking for int" >&5
4837echo $ECHO_N "checking for int... $ECHO_C" >&6
4838if test "${ac_cv_type_int+set}" = set; then
4839 echo $ECHO_N "(cached) $ECHO_C" >&6
4840else
4841 cat >conftest.$ac_ext <<_ACEOF
4842#line $LINENO "configure"
4843#include "confdefs.h"
4844$ac_includes_default
4845#ifdef F77_DUMMY_MAIN
4846# ifdef __cplusplus
4847 extern "C"
4848# endif
4849 int F77_DUMMY_MAIN() { return 1; }
4850#endif
4851int
4852main ()
4853{
4854if ((int *) 0)
4855 return 0;
4856if (sizeof (int))
4857 return 0;
4858 ;
4859 return 0;
4860}
4861_ACEOF
4862rm -f conftest.$ac_objext
4863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4864 (eval $ac_compile) 2>&5
4865 ac_status=$?
4866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4867 (exit $ac_status); } &&
4868 { ac_try='test -s conftest.$ac_objext'
4869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4870 (eval $ac_try) 2>&5
4871 ac_status=$?
4872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4873 (exit $ac_status); }; }; then
4874 ac_cv_type_int=yes
4875else
4876 echo "$as_me: failed program was:" >&5
4877cat conftest.$ac_ext >&5
4878ac_cv_type_int=no
4879fi
4880rm -f conftest.$ac_objext conftest.$ac_ext
4881fi
4882echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4883echo "${ECHO_T}$ac_cv_type_int" >&6
4884
4885echo "$as_me:$LINENO: checking size of int" >&5
4886echo $ECHO_N "checking size of int... $ECHO_C" >&6
4887if test "${ac_cv_sizeof_int+set}" = set; then
4888 echo $ECHO_N "(cached) $ECHO_C" >&6
4889else
4890 if test "$ac_cv_type_int" = yes; then
4891 # The cast to unsigned long works around a bug in the HP C Compiler
4892 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4893 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4894 # This bug is HP SR number 8606223364.
4895 if test "$cross_compiling" = yes; then
4896 # Depending upon the size, compute the lo and hi bounds.
4897cat >conftest.$ac_ext <<_ACEOF
4898#line $LINENO "configure"
4899#include "confdefs.h"
4900$ac_includes_default
4901#ifdef F77_DUMMY_MAIN
4902# ifdef __cplusplus
4903 extern "C"
4904# endif
4905 int F77_DUMMY_MAIN() { return 1; }
4906#endif
4907int
4908main ()
4909{
4910static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4911test_array [0] = 0
4912
4913 ;
4914 return 0;
4915}
4916_ACEOF
4917rm -f conftest.$ac_objext
4918if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4919 (eval $ac_compile) 2>&5
4920 ac_status=$?
4921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4922 (exit $ac_status); } &&
4923 { ac_try='test -s conftest.$ac_objext'
4924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4925 (eval $ac_try) 2>&5
4926 ac_status=$?
4927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4928 (exit $ac_status); }; }; then
4929 ac_lo=0 ac_mid=0
4930 while :; do
4931 cat >conftest.$ac_ext <<_ACEOF
4932#line $LINENO "configure"
4933#include "confdefs.h"
4934$ac_includes_default
4935#ifdef F77_DUMMY_MAIN
4936# ifdef __cplusplus
4937 extern "C"
4938# endif
4939 int F77_DUMMY_MAIN() { return 1; }
4940#endif
4941int
4942main ()
4943{
4944static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4945test_array [0] = 0
4946
4947 ;
4948 return 0;
4949}
4950_ACEOF
4951rm -f conftest.$ac_objext
4952if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4953 (eval $ac_compile) 2>&5
4954 ac_status=$?
4955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4956 (exit $ac_status); } &&
4957 { ac_try='test -s conftest.$ac_objext'
4958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4959 (eval $ac_try) 2>&5
4960 ac_status=$?
4961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4962 (exit $ac_status); }; }; then
4963 ac_hi=$ac_mid; break
4964else
4965 echo "$as_me: failed program was:" >&5
4966cat conftest.$ac_ext >&5
4967ac_lo=`expr $ac_mid + 1`
4968 if test $ac_lo -le $ac_mid; then
4969 ac_lo= ac_hi=
4970 break
4971 fi
4972 ac_mid=`expr 2 '*' $ac_mid + 1`
4973fi
4974rm -f conftest.$ac_objext conftest.$ac_ext
4975 done
4976else
4977 echo "$as_me: failed program was:" >&5
4978cat conftest.$ac_ext >&5
4979cat >conftest.$ac_ext <<_ACEOF
4980#line $LINENO "configure"
4981#include "confdefs.h"
4982$ac_includes_default
4983#ifdef F77_DUMMY_MAIN
4984# ifdef __cplusplus
4985 extern "C"
4986# endif
4987 int F77_DUMMY_MAIN() { return 1; }
4988#endif
4989int
4990main ()
4991{
4992static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4993test_array [0] = 0
4994
4995 ;
4996 return 0;
4997}
4998_ACEOF
4999rm -f conftest.$ac_objext
5000if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5001 (eval $ac_compile) 2>&5
5002 ac_status=$?
5003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5004 (exit $ac_status); } &&
5005 { ac_try='test -s conftest.$ac_objext'
5006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5007 (eval $ac_try) 2>&5
5008 ac_status=$?
5009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5010 (exit $ac_status); }; }; then
5011 ac_hi=-1 ac_mid=-1
5012 while :; do
5013 cat >conftest.$ac_ext <<_ACEOF
5014#line $LINENO "configure"
5015#include "confdefs.h"
5016$ac_includes_default
5017#ifdef F77_DUMMY_MAIN
5018# ifdef __cplusplus
5019 extern "C"
5020# endif
5021 int F77_DUMMY_MAIN() { return 1; }
5022#endif
5023int
5024main ()
5025{
5026static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5027test_array [0] = 0
5028
5029 ;
5030 return 0;
5031}
5032_ACEOF
5033rm -f conftest.$ac_objext
5034if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5035 (eval $ac_compile) 2>&5
5036 ac_status=$?
5037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5038 (exit $ac_status); } &&
5039 { ac_try='test -s conftest.$ac_objext'
5040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5041 (eval $ac_try) 2>&5
5042 ac_status=$?
5043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5044 (exit $ac_status); }; }; then
5045 ac_lo=$ac_mid; break
5046else
5047 echo "$as_me: failed program was:" >&5
5048cat conftest.$ac_ext >&5
5049ac_hi=`expr '(' $ac_mid ')' - 1`
5050 if test $ac_mid -le $ac_hi; then
5051 ac_lo= ac_hi=
5052 break
5053 fi
5054 ac_mid=`expr 2 '*' $ac_mid`
5055fi
5056rm -f conftest.$ac_objext conftest.$ac_ext
5057 done
5058else
5059 echo "$as_me: failed program was:" >&5
5060cat conftest.$ac_ext >&5
5061ac_lo= ac_hi=
5062fi
5063rm -f conftest.$ac_objext conftest.$ac_ext
5064fi
5065rm -f conftest.$ac_objext conftest.$ac_ext
5066# Binary search between lo and hi bounds.
5067while test "x$ac_lo" != "x$ac_hi"; do
5068 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5069 cat >conftest.$ac_ext <<_ACEOF
5070#line $LINENO "configure"
5071#include "confdefs.h"
5072$ac_includes_default
5073#ifdef F77_DUMMY_MAIN
5074# ifdef __cplusplus
5075 extern "C"
5076# endif
5077 int F77_DUMMY_MAIN() { return 1; }
5078#endif
5079int
5080main ()
5081{
5082static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5083test_array [0] = 0
5084
5085 ;
5086 return 0;
5087}
5088_ACEOF
5089rm -f conftest.$ac_objext
5090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5091 (eval $ac_compile) 2>&5
5092 ac_status=$?
5093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5094 (exit $ac_status); } &&
5095 { ac_try='test -s conftest.$ac_objext'
5096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5097 (eval $ac_try) 2>&5
5098 ac_status=$?
5099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5100 (exit $ac_status); }; }; then
5101 ac_hi=$ac_mid
5102else
5103 echo "$as_me: failed program was:" >&5
5104cat conftest.$ac_ext >&5
5105ac_lo=`expr '(' $ac_mid ')' + 1`
5106fi
5107rm -f conftest.$ac_objext conftest.$ac_ext
5108done
5109case $ac_lo in
5110?*) ac_cv_sizeof_int=$ac_lo;;
5111'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5112echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5113 { (exit 1); exit 1; }; } ;;
5114esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005115else
5116 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005117 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5118echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5119 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005120else
Martin v. Löwis11437992002-04-12 09:54:03 +00005121 cat >conftest.$ac_ext <<_ACEOF
5122#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005123#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005124$ac_includes_default
5125long longval () { return (long) (sizeof (int)); }
5126unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005127#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005128#include <stdlib.h>
5129#ifdef F77_DUMMY_MAIN
5130# ifdef __cplusplus
5131 extern "C"
5132# endif
5133 int F77_DUMMY_MAIN() { return 1; }
5134#endif
5135int
5136main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005137{
Martin v. Löwis11437992002-04-12 09:54:03 +00005138
5139 FILE *f = fopen ("conftest.val", "w");
5140 if (! f)
5141 exit (1);
5142 if (((long) (sizeof (int))) < 0)
5143 {
5144 long i = longval ();
5145 if (i != ((long) (sizeof (int))))
5146 exit (1);
5147 fprintf (f, "%ld\n", i);
5148 }
5149 else
5150 {
5151 unsigned long i = ulongval ();
5152 if (i != ((long) (sizeof (int))))
5153 exit (1);
5154 fprintf (f, "%lu\n", i);
5155 }
5156 exit (ferror (f) || fclose (f) != 0);
5157
5158 ;
5159 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005160}
Martin v. Löwis11437992002-04-12 09:54:03 +00005161_ACEOF
5162rm -f conftest$ac_exeext
5163if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5164 (eval $ac_link) 2>&5
5165 ac_status=$?
5166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5167 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5169 (eval $ac_try) 2>&5
5170 ac_status=$?
5171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5172 (exit $ac_status); }; }; then
5173 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005174else
Martin v. Löwis11437992002-04-12 09:54:03 +00005175 echo "$as_me: program exited with status $ac_status" >&5
5176echo "$as_me: failed program was:" >&5
5177cat conftest.$ac_ext >&5
5178( exit $ac_status )
5179{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5180echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5181 { (exit 1); exit 1; }; }
5182fi
5183rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5184fi
5185fi
5186rm -f conftest.val
5187else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005188 ac_cv_sizeof_int=0
5189fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005190fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005191echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5192echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5193cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005194#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005195_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005196
5197
Martin v. Löwis11437992002-04-12 09:54:03 +00005198echo "$as_me:$LINENO: checking for long" >&5
5199echo $ECHO_N "checking for long... $ECHO_C" >&6
5200if test "${ac_cv_type_long+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 ((long *) 0)
5217 return 0;
5218if (sizeof (long))
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_long=yes
5237else
5238 echo "$as_me: failed program was:" >&5
5239cat conftest.$ac_ext >&5
5240ac_cv_type_long=no
5241fi
5242rm -f conftest.$ac_objext conftest.$ac_ext
5243fi
5244echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5245echo "${ECHO_T}$ac_cv_type_long" >&6
5246
5247echo "$as_me:$LINENO: checking size of long" >&5
5248echo $ECHO_N "checking size of long... $ECHO_C" >&6
5249if test "${ac_cv_sizeof_long+set}" = set; then
5250 echo $ECHO_N "(cached) $ECHO_C" >&6
5251else
5252 if test "$ac_cv_type_long" = 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 (long))) >= 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 (long))) <= $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 (long))) < 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 (long))) >= $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 (long))) <= $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_long=$ac_lo;;
5473'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5474echo "$as_me: error: cannot compute sizeof (long), 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 (long)); }
5488unsigned long ulongval () { return (long) (sizeof (long)); }
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 (long))) < 0)
5505 {
5506 long i = longval ();
5507 if (i != ((long) (sizeof (long))))
5508 exit (1);
5509 fprintf (f, "%ld\n", i);
5510 }
5511 else
5512 {
5513 unsigned long i = ulongval ();
5514 if (i != ((long) (sizeof (long))))
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_long=`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 (long), 77" >&5
5542echo "$as_me: error: cannot compute sizeof (long), 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_long=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_long" >&5
5554echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5555cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005556#define SIZEOF_LONG $ac_cv_sizeof_long
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 void *" >&5
5561echo $ECHO_N "checking for void *... $ECHO_C" >&6
5562if test "${ac_cv_type_void_p+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 ((void * *) 0)
5579 return 0;
5580if (sizeof (void *))
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_void_p=yes
5599else
5600 echo "$as_me: failed program was:" >&5
5601cat conftest.$ac_ext >&5
5602ac_cv_type_void_p=no
5603fi
5604rm -f conftest.$ac_objext conftest.$ac_ext
5605fi
5606echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5607echo "${ECHO_T}$ac_cv_type_void_p" >&6
5608
5609echo "$as_me:$LINENO: checking size of void *" >&5
5610echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5611if test "${ac_cv_sizeof_void_p+set}" = set; then
5612 echo $ECHO_N "(cached) $ECHO_C" >&6
5613else
5614 if test "$ac_cv_type_void_p" = 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 (void *))) >= 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 (void *))) <= $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 (void *))) < 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 (void *))) >= $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 (void *))) <= $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_void_p=$ac_lo;;
5835'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5836echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5837 { (exit 1); exit 1; }; } ;;
5838esac
Guido van Rossumad678af1998-10-02 14:42:15 +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 Rossumad678af1998-10-02 14:42:15 +00005844else
Martin v. Löwis11437992002-04-12 09:54:03 +00005845 cat >conftest.$ac_ext <<_ACEOF
5846#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005847#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005848$ac_includes_default
5849long longval () { return (long) (sizeof (void *)); }
5850unsigned long ulongval () { return (long) (sizeof (void *)); }
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 Rossumad678af1998-10-02 14:42:15 +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 (void *))) < 0)
5867 {
5868 long i = longval ();
5869 if (i != ((long) (sizeof (void *))))
5870 exit (1);
5871 fprintf (f, "%ld\n", i);
5872 }
5873 else
5874 {
5875 unsigned long i = ulongval ();
5876 if (i != ((long) (sizeof (void *))))
5877 exit (1);
5878 fprintf (f, "%lu\n", i);
5879 }
5880 exit (ferror (f) || fclose (f) != 0);
5881
5882 ;
5883 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +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_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +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 (void *), 77" >&5
5904echo "$as_me: error: cannot compute sizeof (void *), 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 Rossumad678af1998-10-02 14:42:15 +00005912 ac_cv_sizeof_void_p=0
5913fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005914fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005915echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5916echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5917cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005918#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005919_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005920
5921
Martin v. Löwis11437992002-04-12 09:54:03 +00005922echo "$as_me:$LINENO: checking for char" >&5
5923echo $ECHO_N "checking for char... $ECHO_C" >&6
5924if test "${ac_cv_type_char+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 ((char *) 0)
5941 return 0;
5942if (sizeof (char))
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_char=yes
5961else
5962 echo "$as_me: failed program was:" >&5
5963cat conftest.$ac_ext >&5
5964ac_cv_type_char=no
5965fi
5966rm -f conftest.$ac_objext conftest.$ac_ext
5967fi
5968echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5969echo "${ECHO_T}$ac_cv_type_char" >&6
5970
5971echo "$as_me:$LINENO: checking size of char" >&5
5972echo $ECHO_N "checking size of char... $ECHO_C" >&6
5973if test "${ac_cv_sizeof_char+set}" = set; then
5974 echo $ECHO_N "(cached) $ECHO_C" >&6
5975else
5976 if test "$ac_cv_type_char" = 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 (char))) >= 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 (char))) <= $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 (char))) < 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 (char))) >= $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 (char))) <= $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_char=$ac_lo;;
6197'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6198echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6199 { (exit 1); exit 1; }; } ;;
6200esac
Guido van Rossumef2255b2000-03-10 22:30:29 +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 Rossumef2255b2000-03-10 22:30:29 +00006206else
Martin v. Löwis11437992002-04-12 09:54:03 +00006207 cat >conftest.$ac_ext <<_ACEOF
6208#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006209#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006210$ac_includes_default
6211long longval () { return (long) (sizeof (char)); }
6212unsigned long ulongval () { return (long) (sizeof (char)); }
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 Rossumef2255b2000-03-10 22:30:29 +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 (char))) < 0)
6229 {
6230 long i = longval ();
6231 if (i != ((long) (sizeof (char))))
6232 exit (1);
6233 fprintf (f, "%ld\n", i);
6234 }
6235 else
6236 {
6237 unsigned long i = ulongval ();
6238 if (i != ((long) (sizeof (char))))
6239 exit (1);
6240 fprintf (f, "%lu\n", i);
6241 }
6242 exit (ferror (f) || fclose (f) != 0);
6243
6244 ;
6245 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +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_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +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 (char), 77" >&5
6266echo "$as_me: error: cannot compute sizeof (char), 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 Rossumef2255b2000-03-10 22:30:29 +00006274 ac_cv_sizeof_char=0
6275fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006276fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006277echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6278echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6279cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006280#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006281_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006282
6283
Martin v. Löwis11437992002-04-12 09:54:03 +00006284echo "$as_me:$LINENO: checking for short" >&5
6285echo $ECHO_N "checking for short... $ECHO_C" >&6
6286if test "${ac_cv_type_short+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 ((short *) 0)
6303 return 0;
6304if (sizeof (short))
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_short=yes
6323else
6324 echo "$as_me: failed program was:" >&5
6325cat conftest.$ac_ext >&5
6326ac_cv_type_short=no
6327fi
6328rm -f conftest.$ac_objext conftest.$ac_ext
6329fi
6330echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6331echo "${ECHO_T}$ac_cv_type_short" >&6
6332
6333echo "$as_me:$LINENO: checking size of short" >&5
6334echo $ECHO_N "checking size of short... $ECHO_C" >&6
6335if test "${ac_cv_sizeof_short+set}" = set; then
6336 echo $ECHO_N "(cached) $ECHO_C" >&6
6337else
6338 if test "$ac_cv_type_short" = 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 (short))) >= 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 (short))) <= $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 (short))) < 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 (short))) >= $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 (short))) <= $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_short=$ac_lo;;
6559'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6560echo "$as_me: error: cannot compute sizeof (short), 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 (short)); }
6574unsigned long ulongval () { return (long) (sizeof (short)); }
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 (short))) < 0)
6591 {
6592 long i = longval ();
6593 if (i != ((long) (sizeof (short))))
6594 exit (1);
6595 fprintf (f, "%ld\n", i);
6596 }
6597 else
6598 {
6599 unsigned long i = ulongval ();
6600 if (i != ((long) (sizeof (short))))
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_short=`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 (short), 77" >&5
6628echo "$as_me: error: cannot compute sizeof (short), 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_short=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_short" >&5
6640echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6641cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006642#define SIZEOF_SHORT $ac_cv_sizeof_short
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 float" >&5
6647echo $ECHO_N "checking for float... $ECHO_C" >&6
6648if test "${ac_cv_type_float+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 ((float *) 0)
6665 return 0;
6666if (sizeof (float))
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_float=yes
6685else
6686 echo "$as_me: failed program was:" >&5
6687cat conftest.$ac_ext >&5
6688ac_cv_type_float=no
6689fi
6690rm -f conftest.$ac_objext conftest.$ac_ext
6691fi
6692echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6693echo "${ECHO_T}$ac_cv_type_float" >&6
6694
6695echo "$as_me:$LINENO: checking size of float" >&5
6696echo $ECHO_N "checking size of float... $ECHO_C" >&6
6697if test "${ac_cv_sizeof_float+set}" = set; then
6698 echo $ECHO_N "(cached) $ECHO_C" >&6
6699else
6700 if test "$ac_cv_type_float" = 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 (float))) >= 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 (float))) <= $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 (float))) < 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 (float))) >= $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 (float))) <= $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_float=$ac_lo;;
6921'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6922echo "$as_me: error: cannot compute sizeof (float), 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 (float)); }
6936unsigned long ulongval () { return (long) (sizeof (float)); }
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 (float))) < 0)
6953 {
6954 long i = longval ();
6955 if (i != ((long) (sizeof (float))))
6956 exit (1);
6957 fprintf (f, "%ld\n", i);
6958 }
6959 else
6960 {
6961 unsigned long i = ulongval ();
6962 if (i != ((long) (sizeof (float))))
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_float=`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 (float), 77" >&5
6990echo "$as_me: error: cannot compute sizeof (float), 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_float=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_float" >&5
7002echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7003cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007004#define SIZEOF_FLOAT $ac_cv_sizeof_float
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 double" >&5
7009echo $ECHO_N "checking for double... $ECHO_C" >&6
7010if test "${ac_cv_type_double+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 ((double *) 0)
7027 return 0;
7028if (sizeof (double))
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_double=yes
7047else
7048 echo "$as_me: failed program was:" >&5
7049cat conftest.$ac_ext >&5
7050ac_cv_type_double=no
7051fi
7052rm -f conftest.$ac_objext conftest.$ac_ext
7053fi
7054echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7055echo "${ECHO_T}$ac_cv_type_double" >&6
7056
7057echo "$as_me:$LINENO: checking size of double" >&5
7058echo $ECHO_N "checking size of double... $ECHO_C" >&6
7059if test "${ac_cv_sizeof_double+set}" = set; then
7060 echo $ECHO_N "(cached) $ECHO_C" >&6
7061else
7062 if test "$ac_cv_type_double" = 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 (double))) >= 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 (double))) <= $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 (double))) < 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 (double))) >= $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 (double))) <= $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_double=$ac_lo;;
7283'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7284echo "$as_me: error: cannot compute sizeof (double), 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 (double)); }
7298unsigned long ulongval () { return (long) (sizeof (double)); }
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 (double))) < 0)
7315 {
7316 long i = longval ();
7317 if (i != ((long) (sizeof (double))))
7318 exit (1);
7319 fprintf (f, "%ld\n", i);
7320 }
7321 else
7322 {
7323 unsigned long i = ulongval ();
7324 if (i != ((long) (sizeof (double))))
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_double=`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 (double), 77" >&5
7352echo "$as_me: error: cannot compute sizeof (double), 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_double=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_double" >&5
7364echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7365cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007366#define SIZEOF_DOUBLE $ac_cv_sizeof_double
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 fpos_t" >&5
7371echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7372if test "${ac_cv_type_fpos_t+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 ((fpos_t *) 0)
7389 return 0;
7390if (sizeof (fpos_t))
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_fpos_t=yes
7409else
7410 echo "$as_me: failed program was:" >&5
7411cat conftest.$ac_ext >&5
7412ac_cv_type_fpos_t=no
7413fi
7414rm -f conftest.$ac_objext conftest.$ac_ext
7415fi
7416echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7417echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7418
7419echo "$as_me:$LINENO: checking size of fpos_t" >&5
7420echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7421if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7422 echo $ECHO_N "(cached) $ECHO_C" >&6
7423else
7424 if test "$ac_cv_type_fpos_t" = 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 (fpos_t))) >= 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 (fpos_t))) <= $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 (fpos_t))) < 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 (fpos_t))) >= $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 (fpos_t))) <= $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_fpos_t=$ac_lo;;
7645'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7646echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7647 { (exit 1); exit 1; }; } ;;
7648esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +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 Rossumb9a22a12000-06-30 02:48:53 +00007654else
Martin v. Löwis11437992002-04-12 09:54:03 +00007655 cat >conftest.$ac_ext <<_ACEOF
7656#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007657#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007658$ac_includes_default
7659long longval () { return (long) (sizeof (fpos_t)); }
7660unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
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 Rossumb9a22a12000-06-30 02:48:53 +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 (fpos_t))) < 0)
7677 {
7678 long i = longval ();
7679 if (i != ((long) (sizeof (fpos_t))))
7680 exit (1);
7681 fprintf (f, "%ld\n", i);
7682 }
7683 else
7684 {
7685 unsigned long i = ulongval ();
7686 if (i != ((long) (sizeof (fpos_t))))
7687 exit (1);
7688 fprintf (f, "%lu\n", i);
7689 }
7690 exit (ferror (f) || fclose (f) != 0);
7691
7692 ;
7693 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +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_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +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 (fpos_t), 77" >&5
7714echo "$as_me: error: cannot compute sizeof (fpos_t), 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 Rossumb9a22a12000-06-30 02:48:53 +00007722 ac_cv_sizeof_fpos_t=0
7723fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007724fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007725echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7726echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7727cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007728#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007729_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007730
Michael W. Hudson54241132001-12-07 15:38:26 +00007731
7732
Martin v. Löwis11437992002-04-12 09:54:03 +00007733echo "$as_me:$LINENO: checking for long long support" >&5
7734echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007735have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007736cat >conftest.$ac_ext <<_ACEOF
7737#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007738#include "confdefs.h"
7739
Martin v. Löwis11437992002-04-12 09:54:03 +00007740#ifdef F77_DUMMY_MAIN
7741# ifdef __cplusplus
7742 extern "C"
7743# endif
7744 int F77_DUMMY_MAIN() { return 1; }
7745#endif
7746int
7747main ()
7748{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007749long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007750 ;
7751 return 0;
7752}
7753_ACEOF
7754rm -f conftest.$ac_objext
7755if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7756 (eval $ac_compile) 2>&5
7757 ac_status=$?
7758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7759 (exit $ac_status); } &&
7760 { ac_try='test -s conftest.$ac_objext'
7761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7762 (eval $ac_try) 2>&5
7763 ac_status=$?
7764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7765 (exit $ac_status); }; }; then
7766
7767
7768cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007769#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007770_ACEOF
7771
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007772 have_long_long=yes
7773
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007774else
Martin v. Löwis11437992002-04-12 09:54:03 +00007775 echo "$as_me: failed program was:" >&5
7776cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007777fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007778rm -f conftest.$ac_objext conftest.$ac_ext
7779echo "$as_me:$LINENO: result: $have_long_long" >&5
7780echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007781if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007782echo "$as_me:$LINENO: checking for long long" >&5
7783echo $ECHO_N "checking for long long... $ECHO_C" >&6
7784if test "${ac_cv_type_long_long+set}" = set; then
7785 echo $ECHO_N "(cached) $ECHO_C" >&6
7786else
7787 cat >conftest.$ac_ext <<_ACEOF
7788#line $LINENO "configure"
7789#include "confdefs.h"
7790$ac_includes_default
7791#ifdef F77_DUMMY_MAIN
7792# ifdef __cplusplus
7793 extern "C"
7794# endif
7795 int F77_DUMMY_MAIN() { return 1; }
7796#endif
7797int
7798main ()
7799{
7800if ((long long *) 0)
7801 return 0;
7802if (sizeof (long long))
7803 return 0;
7804 ;
7805 return 0;
7806}
7807_ACEOF
7808rm -f conftest.$ac_objext
7809if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7810 (eval $ac_compile) 2>&5
7811 ac_status=$?
7812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7813 (exit $ac_status); } &&
7814 { ac_try='test -s conftest.$ac_objext'
7815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7816 (eval $ac_try) 2>&5
7817 ac_status=$?
7818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7819 (exit $ac_status); }; }; then
7820 ac_cv_type_long_long=yes
7821else
7822 echo "$as_me: failed program was:" >&5
7823cat conftest.$ac_ext >&5
7824ac_cv_type_long_long=no
7825fi
7826rm -f conftest.$ac_objext conftest.$ac_ext
7827fi
7828echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7829echo "${ECHO_T}$ac_cv_type_long_long" >&6
7830
7831echo "$as_me:$LINENO: checking size of long long" >&5
7832echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7833if test "${ac_cv_sizeof_long_long+set}" = set; then
7834 echo $ECHO_N "(cached) $ECHO_C" >&6
7835else
7836 if test "$ac_cv_type_long_long" = yes; then
7837 # The cast to unsigned long works around a bug in the HP C Compiler
7838 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7839 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7840 # This bug is HP SR number 8606223364.
7841 if test "$cross_compiling" = yes; then
7842 # Depending upon the size, compute the lo and hi bounds.
7843cat >conftest.$ac_ext <<_ACEOF
7844#line $LINENO "configure"
7845#include "confdefs.h"
7846$ac_includes_default
7847#ifdef F77_DUMMY_MAIN
7848# ifdef __cplusplus
7849 extern "C"
7850# endif
7851 int F77_DUMMY_MAIN() { return 1; }
7852#endif
7853int
7854main ()
7855{
7856static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7857test_array [0] = 0
7858
7859 ;
7860 return 0;
7861}
7862_ACEOF
7863rm -f conftest.$ac_objext
7864if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7865 (eval $ac_compile) 2>&5
7866 ac_status=$?
7867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7868 (exit $ac_status); } &&
7869 { ac_try='test -s conftest.$ac_objext'
7870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7871 (eval $ac_try) 2>&5
7872 ac_status=$?
7873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7874 (exit $ac_status); }; }; then
7875 ac_lo=0 ac_mid=0
7876 while :; do
7877 cat >conftest.$ac_ext <<_ACEOF
7878#line $LINENO "configure"
7879#include "confdefs.h"
7880$ac_includes_default
7881#ifdef F77_DUMMY_MAIN
7882# ifdef __cplusplus
7883 extern "C"
7884# endif
7885 int F77_DUMMY_MAIN() { return 1; }
7886#endif
7887int
7888main ()
7889{
7890static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7891test_array [0] = 0
7892
7893 ;
7894 return 0;
7895}
7896_ACEOF
7897rm -f conftest.$ac_objext
7898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7899 (eval $ac_compile) 2>&5
7900 ac_status=$?
7901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7902 (exit $ac_status); } &&
7903 { ac_try='test -s conftest.$ac_objext'
7904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7905 (eval $ac_try) 2>&5
7906 ac_status=$?
7907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7908 (exit $ac_status); }; }; then
7909 ac_hi=$ac_mid; break
7910else
7911 echo "$as_me: failed program was:" >&5
7912cat conftest.$ac_ext >&5
7913ac_lo=`expr $ac_mid + 1`
7914 if test $ac_lo -le $ac_mid; then
7915 ac_lo= ac_hi=
7916 break
7917 fi
7918 ac_mid=`expr 2 '*' $ac_mid + 1`
7919fi
7920rm -f conftest.$ac_objext conftest.$ac_ext
7921 done
7922else
7923 echo "$as_me: failed program was:" >&5
7924cat conftest.$ac_ext >&5
7925cat >conftest.$ac_ext <<_ACEOF
7926#line $LINENO "configure"
7927#include "confdefs.h"
7928$ac_includes_default
7929#ifdef F77_DUMMY_MAIN
7930# ifdef __cplusplus
7931 extern "C"
7932# endif
7933 int F77_DUMMY_MAIN() { return 1; }
7934#endif
7935int
7936main ()
7937{
7938static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7939test_array [0] = 0
7940
7941 ;
7942 return 0;
7943}
7944_ACEOF
7945rm -f conftest.$ac_objext
7946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7947 (eval $ac_compile) 2>&5
7948 ac_status=$?
7949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7950 (exit $ac_status); } &&
7951 { ac_try='test -s conftest.$ac_objext'
7952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7953 (eval $ac_try) 2>&5
7954 ac_status=$?
7955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7956 (exit $ac_status); }; }; then
7957 ac_hi=-1 ac_mid=-1
7958 while :; do
7959 cat >conftest.$ac_ext <<_ACEOF
7960#line $LINENO "configure"
7961#include "confdefs.h"
7962$ac_includes_default
7963#ifdef F77_DUMMY_MAIN
7964# ifdef __cplusplus
7965 extern "C"
7966# endif
7967 int F77_DUMMY_MAIN() { return 1; }
7968#endif
7969int
7970main ()
7971{
7972static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7973test_array [0] = 0
7974
7975 ;
7976 return 0;
7977}
7978_ACEOF
7979rm -f conftest.$ac_objext
7980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7981 (eval $ac_compile) 2>&5
7982 ac_status=$?
7983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7984 (exit $ac_status); } &&
7985 { ac_try='test -s conftest.$ac_objext'
7986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7987 (eval $ac_try) 2>&5
7988 ac_status=$?
7989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7990 (exit $ac_status); }; }; then
7991 ac_lo=$ac_mid; break
7992else
7993 echo "$as_me: failed program was:" >&5
7994cat conftest.$ac_ext >&5
7995ac_hi=`expr '(' $ac_mid ')' - 1`
7996 if test $ac_mid -le $ac_hi; then
7997 ac_lo= ac_hi=
7998 break
7999 fi
8000 ac_mid=`expr 2 '*' $ac_mid`
8001fi
8002rm -f conftest.$ac_objext conftest.$ac_ext
8003 done
8004else
8005 echo "$as_me: failed program was:" >&5
8006cat conftest.$ac_ext >&5
8007ac_lo= ac_hi=
8008fi
8009rm -f conftest.$ac_objext conftest.$ac_ext
8010fi
8011rm -f conftest.$ac_objext conftest.$ac_ext
8012# Binary search between lo and hi bounds.
8013while test "x$ac_lo" != "x$ac_hi"; do
8014 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8015 cat >conftest.$ac_ext <<_ACEOF
8016#line $LINENO "configure"
8017#include "confdefs.h"
8018$ac_includes_default
8019#ifdef F77_DUMMY_MAIN
8020# ifdef __cplusplus
8021 extern "C"
8022# endif
8023 int F77_DUMMY_MAIN() { return 1; }
8024#endif
8025int
8026main ()
8027{
8028static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8029test_array [0] = 0
8030
8031 ;
8032 return 0;
8033}
8034_ACEOF
8035rm -f conftest.$ac_objext
8036if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8037 (eval $ac_compile) 2>&5
8038 ac_status=$?
8039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8040 (exit $ac_status); } &&
8041 { ac_try='test -s conftest.$ac_objext'
8042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8043 (eval $ac_try) 2>&5
8044 ac_status=$?
8045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8046 (exit $ac_status); }; }; then
8047 ac_hi=$ac_mid
8048else
8049 echo "$as_me: failed program was:" >&5
8050cat conftest.$ac_ext >&5
8051ac_lo=`expr '(' $ac_mid ')' + 1`
8052fi
8053rm -f conftest.$ac_objext conftest.$ac_ext
8054done
8055case $ac_lo in
8056?*) ac_cv_sizeof_long_long=$ac_lo;;
8057'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8058echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8059 { (exit 1); exit 1; }; } ;;
8060esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008061else
8062 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008063 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8064echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8065 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008066else
Martin v. Löwis11437992002-04-12 09:54:03 +00008067 cat >conftest.$ac_ext <<_ACEOF
8068#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008069#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008070$ac_includes_default
8071long longval () { return (long) (sizeof (long long)); }
8072unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008073#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008074#include <stdlib.h>
8075#ifdef F77_DUMMY_MAIN
8076# ifdef __cplusplus
8077 extern "C"
8078# endif
8079 int F77_DUMMY_MAIN() { return 1; }
8080#endif
8081int
8082main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008083{
Martin v. Löwis11437992002-04-12 09:54:03 +00008084
8085 FILE *f = fopen ("conftest.val", "w");
8086 if (! f)
8087 exit (1);
8088 if (((long) (sizeof (long long))) < 0)
8089 {
8090 long i = longval ();
8091 if (i != ((long) (sizeof (long long))))
8092 exit (1);
8093 fprintf (f, "%ld\n", i);
8094 }
8095 else
8096 {
8097 unsigned long i = ulongval ();
8098 if (i != ((long) (sizeof (long long))))
8099 exit (1);
8100 fprintf (f, "%lu\n", i);
8101 }
8102 exit (ferror (f) || fclose (f) != 0);
8103
8104 ;
8105 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008106}
Martin v. Löwis11437992002-04-12 09:54:03 +00008107_ACEOF
8108rm -f conftest$ac_exeext
8109if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8110 (eval $ac_link) 2>&5
8111 ac_status=$?
8112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8113 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8115 (eval $ac_try) 2>&5
8116 ac_status=$?
8117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8118 (exit $ac_status); }; }; then
8119 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008120else
Martin v. Löwis11437992002-04-12 09:54:03 +00008121 echo "$as_me: program exited with status $ac_status" >&5
8122echo "$as_me: failed program was:" >&5
8123cat conftest.$ac_ext >&5
8124( exit $ac_status )
8125{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8126echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8127 { (exit 1); exit 1; }; }
8128fi
8129rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8130fi
8131fi
8132rm -f conftest.val
8133else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008134 ac_cv_sizeof_long_long=0
8135fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008136fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008137echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8138echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8139cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008140#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008141_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008142
Michael W. Hudson54241132001-12-07 15:38:26 +00008143
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008144fi
8145
Martin v. Löwis11437992002-04-12 09:54:03 +00008146echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8147echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008148have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008149cat >conftest.$ac_ext <<_ACEOF
8150#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008151#include "confdefs.h"
8152
Martin v. Löwis11437992002-04-12 09:54:03 +00008153#ifdef F77_DUMMY_MAIN
8154# ifdef __cplusplus
8155 extern "C"
8156# endif
8157 int F77_DUMMY_MAIN() { return 1; }
8158#endif
8159int
8160main ()
8161{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008162uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008163 ;
8164 return 0;
8165}
8166_ACEOF
8167rm -f conftest.$ac_objext
8168if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8169 (eval $ac_compile) 2>&5
8170 ac_status=$?
8171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8172 (exit $ac_status); } &&
8173 { ac_try='test -s conftest.$ac_objext'
8174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8175 (eval $ac_try) 2>&5
8176 ac_status=$?
8177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8178 (exit $ac_status); }; }; then
8179
8180
8181cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008182#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008183_ACEOF
8184
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008185 have_uintptr_t=yes
8186
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008187else
Martin v. Löwis11437992002-04-12 09:54:03 +00008188 echo "$as_me: failed program was:" >&5
8189cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008190fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008191rm -f conftest.$ac_objext conftest.$ac_ext
8192echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8193echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008194if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008195echo "$as_me:$LINENO: checking for uintptr_t" >&5
8196echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8197if test "${ac_cv_type_uintptr_t+set}" = set; then
8198 echo $ECHO_N "(cached) $ECHO_C" >&6
8199else
8200 cat >conftest.$ac_ext <<_ACEOF
8201#line $LINENO "configure"
8202#include "confdefs.h"
8203$ac_includes_default
8204#ifdef F77_DUMMY_MAIN
8205# ifdef __cplusplus
8206 extern "C"
8207# endif
8208 int F77_DUMMY_MAIN() { return 1; }
8209#endif
8210int
8211main ()
8212{
8213if ((uintptr_t *) 0)
8214 return 0;
8215if (sizeof (uintptr_t))
8216 return 0;
8217 ;
8218 return 0;
8219}
8220_ACEOF
8221rm -f conftest.$ac_objext
8222if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8223 (eval $ac_compile) 2>&5
8224 ac_status=$?
8225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8226 (exit $ac_status); } &&
8227 { ac_try='test -s conftest.$ac_objext'
8228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8229 (eval $ac_try) 2>&5
8230 ac_status=$?
8231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8232 (exit $ac_status); }; }; then
8233 ac_cv_type_uintptr_t=yes
8234else
8235 echo "$as_me: failed program was:" >&5
8236cat conftest.$ac_ext >&5
8237ac_cv_type_uintptr_t=no
8238fi
8239rm -f conftest.$ac_objext conftest.$ac_ext
8240fi
8241echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8242echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8243
8244echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8245echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8246if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8247 echo $ECHO_N "(cached) $ECHO_C" >&6
8248else
8249 if test "$ac_cv_type_uintptr_t" = yes; then
8250 # The cast to unsigned long works around a bug in the HP C Compiler
8251 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8252 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8253 # This bug is HP SR number 8606223364.
8254 if test "$cross_compiling" = yes; then
8255 # Depending upon the size, compute the lo and hi bounds.
8256cat >conftest.$ac_ext <<_ACEOF
8257#line $LINENO "configure"
8258#include "confdefs.h"
8259$ac_includes_default
8260#ifdef F77_DUMMY_MAIN
8261# ifdef __cplusplus
8262 extern "C"
8263# endif
8264 int F77_DUMMY_MAIN() { return 1; }
8265#endif
8266int
8267main ()
8268{
8269static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8270test_array [0] = 0
8271
8272 ;
8273 return 0;
8274}
8275_ACEOF
8276rm -f conftest.$ac_objext
8277if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8278 (eval $ac_compile) 2>&5
8279 ac_status=$?
8280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8281 (exit $ac_status); } &&
8282 { ac_try='test -s conftest.$ac_objext'
8283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8284 (eval $ac_try) 2>&5
8285 ac_status=$?
8286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8287 (exit $ac_status); }; }; then
8288 ac_lo=0 ac_mid=0
8289 while :; do
8290 cat >conftest.$ac_ext <<_ACEOF
8291#line $LINENO "configure"
8292#include "confdefs.h"
8293$ac_includes_default
8294#ifdef F77_DUMMY_MAIN
8295# ifdef __cplusplus
8296 extern "C"
8297# endif
8298 int F77_DUMMY_MAIN() { return 1; }
8299#endif
8300int
8301main ()
8302{
8303static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8304test_array [0] = 0
8305
8306 ;
8307 return 0;
8308}
8309_ACEOF
8310rm -f conftest.$ac_objext
8311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8312 (eval $ac_compile) 2>&5
8313 ac_status=$?
8314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8315 (exit $ac_status); } &&
8316 { ac_try='test -s conftest.$ac_objext'
8317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8318 (eval $ac_try) 2>&5
8319 ac_status=$?
8320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8321 (exit $ac_status); }; }; then
8322 ac_hi=$ac_mid; break
8323else
8324 echo "$as_me: failed program was:" >&5
8325cat conftest.$ac_ext >&5
8326ac_lo=`expr $ac_mid + 1`
8327 if test $ac_lo -le $ac_mid; then
8328 ac_lo= ac_hi=
8329 break
8330 fi
8331 ac_mid=`expr 2 '*' $ac_mid + 1`
8332fi
8333rm -f conftest.$ac_objext conftest.$ac_ext
8334 done
8335else
8336 echo "$as_me: failed program was:" >&5
8337cat conftest.$ac_ext >&5
8338cat >conftest.$ac_ext <<_ACEOF
8339#line $LINENO "configure"
8340#include "confdefs.h"
8341$ac_includes_default
8342#ifdef F77_DUMMY_MAIN
8343# ifdef __cplusplus
8344 extern "C"
8345# endif
8346 int F77_DUMMY_MAIN() { return 1; }
8347#endif
8348int
8349main ()
8350{
8351static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8352test_array [0] = 0
8353
8354 ;
8355 return 0;
8356}
8357_ACEOF
8358rm -f conftest.$ac_objext
8359if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8360 (eval $ac_compile) 2>&5
8361 ac_status=$?
8362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8363 (exit $ac_status); } &&
8364 { ac_try='test -s conftest.$ac_objext'
8365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8366 (eval $ac_try) 2>&5
8367 ac_status=$?
8368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8369 (exit $ac_status); }; }; then
8370 ac_hi=-1 ac_mid=-1
8371 while :; do
8372 cat >conftest.$ac_ext <<_ACEOF
8373#line $LINENO "configure"
8374#include "confdefs.h"
8375$ac_includes_default
8376#ifdef F77_DUMMY_MAIN
8377# ifdef __cplusplus
8378 extern "C"
8379# endif
8380 int F77_DUMMY_MAIN() { return 1; }
8381#endif
8382int
8383main ()
8384{
8385static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8386test_array [0] = 0
8387
8388 ;
8389 return 0;
8390}
8391_ACEOF
8392rm -f conftest.$ac_objext
8393if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8394 (eval $ac_compile) 2>&5
8395 ac_status=$?
8396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8397 (exit $ac_status); } &&
8398 { ac_try='test -s conftest.$ac_objext'
8399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8400 (eval $ac_try) 2>&5
8401 ac_status=$?
8402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8403 (exit $ac_status); }; }; then
8404 ac_lo=$ac_mid; break
8405else
8406 echo "$as_me: failed program was:" >&5
8407cat conftest.$ac_ext >&5
8408ac_hi=`expr '(' $ac_mid ')' - 1`
8409 if test $ac_mid -le $ac_hi; then
8410 ac_lo= ac_hi=
8411 break
8412 fi
8413 ac_mid=`expr 2 '*' $ac_mid`
8414fi
8415rm -f conftest.$ac_objext conftest.$ac_ext
8416 done
8417else
8418 echo "$as_me: failed program was:" >&5
8419cat conftest.$ac_ext >&5
8420ac_lo= ac_hi=
8421fi
8422rm -f conftest.$ac_objext conftest.$ac_ext
8423fi
8424rm -f conftest.$ac_objext conftest.$ac_ext
8425# Binary search between lo and hi bounds.
8426while test "x$ac_lo" != "x$ac_hi"; do
8427 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8428 cat >conftest.$ac_ext <<_ACEOF
8429#line $LINENO "configure"
8430#include "confdefs.h"
8431$ac_includes_default
8432#ifdef F77_DUMMY_MAIN
8433# ifdef __cplusplus
8434 extern "C"
8435# endif
8436 int F77_DUMMY_MAIN() { return 1; }
8437#endif
8438int
8439main ()
8440{
8441static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8442test_array [0] = 0
8443
8444 ;
8445 return 0;
8446}
8447_ACEOF
8448rm -f conftest.$ac_objext
8449if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8450 (eval $ac_compile) 2>&5
8451 ac_status=$?
8452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8453 (exit $ac_status); } &&
8454 { ac_try='test -s conftest.$ac_objext'
8455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8456 (eval $ac_try) 2>&5
8457 ac_status=$?
8458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8459 (exit $ac_status); }; }; then
8460 ac_hi=$ac_mid
8461else
8462 echo "$as_me: failed program was:" >&5
8463cat conftest.$ac_ext >&5
8464ac_lo=`expr '(' $ac_mid ')' + 1`
8465fi
8466rm -f conftest.$ac_objext conftest.$ac_ext
8467done
8468case $ac_lo in
8469?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8470'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8471echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8472 { (exit 1); exit 1; }; } ;;
8473esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008474else
8475 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008476 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8477echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8478 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008479else
Martin v. Löwis11437992002-04-12 09:54:03 +00008480 cat >conftest.$ac_ext <<_ACEOF
8481#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008482#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008483$ac_includes_default
8484long longval () { return (long) (sizeof (uintptr_t)); }
8485unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008486#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008487#include <stdlib.h>
8488#ifdef F77_DUMMY_MAIN
8489# ifdef __cplusplus
8490 extern "C"
8491# endif
8492 int F77_DUMMY_MAIN() { return 1; }
8493#endif
8494int
8495main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008496{
Martin v. Löwis11437992002-04-12 09:54:03 +00008497
8498 FILE *f = fopen ("conftest.val", "w");
8499 if (! f)
8500 exit (1);
8501 if (((long) (sizeof (uintptr_t))) < 0)
8502 {
8503 long i = longval ();
8504 if (i != ((long) (sizeof (uintptr_t))))
8505 exit (1);
8506 fprintf (f, "%ld\n", i);
8507 }
8508 else
8509 {
8510 unsigned long i = ulongval ();
8511 if (i != ((long) (sizeof (uintptr_t))))
8512 exit (1);
8513 fprintf (f, "%lu\n", i);
8514 }
8515 exit (ferror (f) || fclose (f) != 0);
8516
8517 ;
8518 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008519}
Martin v. Löwis11437992002-04-12 09:54:03 +00008520_ACEOF
8521rm -f conftest$ac_exeext
8522if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8523 (eval $ac_link) 2>&5
8524 ac_status=$?
8525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8526 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8528 (eval $ac_try) 2>&5
8529 ac_status=$?
8530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8531 (exit $ac_status); }; }; then
8532 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008533else
Martin v. Löwis11437992002-04-12 09:54:03 +00008534 echo "$as_me: program exited with status $ac_status" >&5
8535echo "$as_me: failed program was:" >&5
8536cat conftest.$ac_ext >&5
8537( exit $ac_status )
8538{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8539echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8540 { (exit 1); exit 1; }; }
8541fi
8542rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8543fi
8544fi
8545rm -f conftest.val
8546else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008547 ac_cv_sizeof_uintptr_t=0
8548fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008549fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008550echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8551echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8552cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008553#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008554_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008555
Michael W. Hudson54241132001-12-07 15:38:26 +00008556
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008557fi
8558
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008559# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008560echo "$as_me:$LINENO: checking size of off_t" >&5
8561echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8562if test "${ac_cv_sizeof_off_t+set}" = set; then
8563 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008564else
8565 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008566 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008567else
Martin v. Löwis11437992002-04-12 09:54:03 +00008568 cat >conftest.$ac_ext <<_ACEOF
8569#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008570#include "confdefs.h"
8571#include <stdio.h>
8572#include <sys/types.h>
8573main()
8574{
8575 FILE *f=fopen("conftestval", "w");
8576 if (!f) exit(1);
8577 fprintf(f, "%d\n", sizeof(off_t));
8578 exit(0);
8579}
Martin v. Löwis11437992002-04-12 09:54:03 +00008580_ACEOF
8581rm -f conftest$ac_exeext
8582if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8583 (eval $ac_link) 2>&5
8584 ac_status=$?
8585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8586 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8588 (eval $ac_try) 2>&5
8589 ac_status=$?
8590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8591 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008592 ac_cv_sizeof_off_t=`cat conftestval`
8593else
Martin v. Löwis11437992002-04-12 09:54:03 +00008594 echo "$as_me: program exited with status $ac_status" >&5
8595echo "$as_me: failed program was:" >&5
8596cat conftest.$ac_ext >&5
8597( exit $ac_status )
8598ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008599fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008600rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008601fi
8602
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008603fi
8604
Martin v. Löwis11437992002-04-12 09:54:03 +00008605echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8606echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8607
8608cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008609#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008610_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008611
Michael W. Hudson54241132001-12-07 15:38:26 +00008612
Martin v. Löwis11437992002-04-12 09:54:03 +00008613echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8614echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008615if test "$have_long_long" = yes -a \
8616 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8617 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008618
Martin v. Löwis11437992002-04-12 09:54:03 +00008619cat >>confdefs.h <<\_ACEOF
8620#define HAVE_LARGEFILE_SUPPORT 1
8621_ACEOF
8622
8623 echo "$as_me:$LINENO: result: yes" >&5
8624echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008625else
Martin v. Löwis11437992002-04-12 09:54:03 +00008626 echo "$as_me:$LINENO: result: no" >&5
8627echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008628fi
8629
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008630# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008631echo "$as_me:$LINENO: checking size of time_t" >&5
8632echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8633if test "${ac_cv_sizeof_time_t+set}" = set; then
8634 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008635else
8636 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008637 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008638else
Martin v. Löwis11437992002-04-12 09:54:03 +00008639 cat >conftest.$ac_ext <<_ACEOF
8640#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008641#include "confdefs.h"
8642#include <stdio.h>
8643#include <time.h>
8644main()
8645{
8646 FILE *f=fopen("conftestval", "w");
8647 if (!f) exit(1);
8648 fprintf(f, "%d\n", sizeof(time_t));
8649 exit(0);
8650}
Martin v. Löwis11437992002-04-12 09:54:03 +00008651_ACEOF
8652rm -f conftest$ac_exeext
8653if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8654 (eval $ac_link) 2>&5
8655 ac_status=$?
8656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8657 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8659 (eval $ac_try) 2>&5
8660 ac_status=$?
8661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8662 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008663 ac_cv_sizeof_time_t=`cat conftestval`
8664else
Martin v. Löwis11437992002-04-12 09:54:03 +00008665 echo "$as_me: program exited with status $ac_status" >&5
8666echo "$as_me: failed program was:" >&5
8667cat conftest.$ac_ext >&5
8668( exit $ac_status )
8669ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008670fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008671rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008672fi
8673
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008674fi
8675
Martin v. Löwis11437992002-04-12 09:54:03 +00008676echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8677echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8678
8679cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008680#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008681_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008682
Michael W. Hudson54241132001-12-07 15:38:26 +00008683
8684
Trent Mick635f6fb2000-08-23 21:33:05 +00008685# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008686ac_save_cc="$CC"
8687if test "$ac_cv_kpthread" = "yes"
8688then CC="$CC -Kpthread"
8689fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008690echo "$as_me:$LINENO: checking for pthread_t" >&5
8691echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008692have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008693cat >conftest.$ac_ext <<_ACEOF
8694#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008695#include "confdefs.h"
8696#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008697#ifdef F77_DUMMY_MAIN
8698# ifdef __cplusplus
8699 extern "C"
8700# endif
8701 int F77_DUMMY_MAIN() { return 1; }
8702#endif
8703int
8704main ()
8705{
Guido van Rossum12580492000-09-24 16:47:19 +00008706pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 ;
8708 return 0;
8709}
8710_ACEOF
8711rm -f conftest.$ac_objext
8712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8713 (eval $ac_compile) 2>&5
8714 ac_status=$?
8715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8716 (exit $ac_status); } &&
8717 { ac_try='test -s conftest.$ac_objext'
8718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8719 (eval $ac_try) 2>&5
8720 ac_status=$?
8721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8722 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008723 have_pthread_t=yes
8724else
Martin v. Löwis11437992002-04-12 09:54:03 +00008725 echo "$as_me: failed program was:" >&5
8726cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008727fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008728rm -f conftest.$ac_objext conftest.$ac_ext
8729echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8730echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008731if test "$have_pthread_t" = yes ; then
8732 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008733 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8734echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8735 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8736 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008737else
8738 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008739 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008740else
Martin v. Löwis11437992002-04-12 09:54:03 +00008741 cat >conftest.$ac_ext <<_ACEOF
8742#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008743#include "confdefs.h"
8744#include <stdio.h>
8745 #include <pthread.h>
8746 main()
8747 {
8748 FILE *f=fopen("conftestval", "w");
8749 if (!f) exit(1);
8750 fprintf(f, "%d\n", sizeof(pthread_t));
8751 exit(0);
8752 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008753_ACEOF
8754rm -f conftest$ac_exeext
8755if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8756 (eval $ac_link) 2>&5
8757 ac_status=$?
8758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8759 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8761 (eval $ac_try) 2>&5
8762 ac_status=$?
8763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8764 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008765 ac_cv_sizeof_pthread_t=`cat conftestval`
8766else
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 echo "$as_me: program exited with status $ac_status" >&5
8768echo "$as_me: failed program was:" >&5
8769cat conftest.$ac_ext >&5
8770( exit $ac_status )
8771ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008772fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008773rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008774fi
8775
Trent Mick635f6fb2000-08-23 21:33:05 +00008776fi
8777
Martin v. Löwis11437992002-04-12 09:54:03 +00008778 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8779echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8780
8781cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008782#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008783_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008784
8785fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008786CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008787
Martin v. Löwis11437992002-04-12 09:54:03 +00008788echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8789echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008790# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8791if test "${enable_toolbox_glue+set}" = set; then
8792 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008793
Martin v. Löwis11437992002-04-12 09:54:03 +00008794fi;
Jack Jansene578a632001-08-15 01:27:14 +00008795
8796if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008797then
Jack Jansene578a632001-08-15 01:27:14 +00008798 case $ac_sys_system/$ac_sys_release in
8799 Darwin/*)
8800 enable_toolbox_glue="yes";;
8801 *)
8802 enable_toolbox_glue="no";;
8803 esac
8804fi
8805case "$enable_toolbox_glue" in
8806yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008807 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008808 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008809 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008810
8811cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008812#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008813_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008814
8815 ;;
8816*)
8817 extra_frameworks=""
8818 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008819 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008820 ;;
8821esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008822echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8823echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008824
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008825
8826case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008827 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00008828 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00008829 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008830 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8831 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008832 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00008833 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00008834 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008835 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8836 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008837esac
8838
Martin v. Löwis11437992002-04-12 09:54:03 +00008839echo "$as_me:$LINENO: checking for --enable-framework" >&5
8840echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008841if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008842then
Jack Jansenca06bc62001-08-03 15:32:23 +00008843 OPT="$OPT -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008844 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008845 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00008846 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008847
Martin v. Löwis11437992002-04-12 09:54:03 +00008848cat >>confdefs.h <<\_ACEOF
8849#define WITH_NEXT_FRAMEWORK 1
8850_ACEOF
8851
8852 echo "$as_me:$LINENO: result: yes" >&5
8853echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008854else
Martin v. Löwis11437992002-04-12 09:54:03 +00008855 echo "$as_me:$LINENO: result: no" >&5
8856echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008857fi
8858
Martin v. Löwis11437992002-04-12 09:54:03 +00008859echo "$as_me:$LINENO: checking for dyld" >&5
8860echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008861case $ac_sys_system/$ac_sys_release in
8862 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008863
Martin v. Löwis11437992002-04-12 09:54:03 +00008864cat >>confdefs.h <<\_ACEOF
8865#define WITH_DYLD 1
8866_ACEOF
8867
8868 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8869echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008870 ;;
8871 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008872 echo "$as_me:$LINENO: result: no" >&5
8873echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008874 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008875esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008876
Guido van Rossum0a516c91994-09-12 10:58:40 +00008877# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008878
Michael W. Hudson54241132001-12-07 15:38:26 +00008879
8880
8881
8882
Guido van Rossum0a516c91994-09-12 10:58:40 +00008883# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008884# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008885echo "$as_me:$LINENO: checking SO" >&5
8886echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008887if test -z "$SO"
8888then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008889 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008890 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008891 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008892 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008893 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008894fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008895echo "$as_me:$LINENO: result: $SO" >&5
8896echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008897# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008898# -- "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 +00008899# (Shared libraries in this instance are shared modules to be loaded into
8900# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008901echo "$as_me:$LINENO: checking LDSHARED" >&5
8902echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008903if test -z "$LDSHARED"
8904then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008905 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008906 AIX*)
8907 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008908 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008909 ;;
8910 BeOS*)
8911 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008912 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008913 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008914 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008915 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008916 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008917 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00008918 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008919 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008920 else LDSHARED="$(CC) -G";
Greg Ward57c9a6632000-05-26 12:22:54 +00008921 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008922 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008923 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8924 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008925 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008926 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8927 if test "$enable_framework" ; then
8928 # Link against the framework. All externals should be defined.
8929 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8930 else
8931 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008932 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008933 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008934 Darwin/*)
8935 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8936 if test "$enable_framework" ; then
8937 # Link against the framework. All externals should be defined.
8938 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8939 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008940 # No framework, use the Python app as bundle-loader
8941 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8942 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008943 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00008944 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008945 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008946 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00008947 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008948 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008949 then
8950 LDSHARED="cc -shared ${LDFLAGS}"
8951 else
8952 LDSHARED="ld -Bshareable ${LDFLAGS}"
8953 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00008954 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008955 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008956 if test "$GCC" = "yes"
8957 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008958 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008959 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008960 SCO_SV*) LDSHARED="$(CC) -Wl,-G,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008961 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008962 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008963 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008964 *) LDSHARED="ld";;
8965 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008966fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008967echo "$as_me:$LINENO: result: $LDSHARED" >&5
8968echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008969BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008970# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008971# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008972echo "$as_me:$LINENO: checking CCSHARED" >&5
8973echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008974if test -z "$CCSHARED"
8975then
Guido van Rossum07397971997-04-29 21:49:50 +00008976 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008977 SunOS*) if test "$GCC" = yes;
8978 then CCSHARED="-fPIC";
8979 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008980 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008981 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008982 else CCSHARED="+z";
8983 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008984 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008985 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008986 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008987 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008988 if test "$GCC" = "yes"
8989 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008990 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008991 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008992 SCO_SV*)
8993 if test "$GCC" = "yes"
8994 then CCSHARED="-fPIC"
8995 else CCSHARED="-Kpic -belf"
8996 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00008997 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008998 IRIX*/6*) case $CC in
8999 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009000 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009001 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009002 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009003 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009004fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009005echo "$as_me:$LINENO: result: $CCSHARED" >&5
9006echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009007# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009008# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009009echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9010echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009011if test -z "$LINKFORSHARED"
9012then
Guido van Rossum07397971997-04-29 21:49:50 +00009013 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009014 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009015 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009016 LINKFORSHARED="-Wl,-E -Wl,+s";;
9017# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009018 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009019 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009020 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009021 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009022 # -u __dummy makes the linker aware of the objc runtime
9023 # in System.framework; otherwise, __objcInit (referenced in
9024 # crt1.o) gets erroneously defined as common, which breaks dynamic
9025 # loading of any modules which reference it in System.framework.
9026 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9027 # not used by the core itself but which needs to be in the core so
9028 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00009029 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009030 if test "$enable_framework"
9031 then
9032 LINKFORSHARED="$LINKFORSHARED -framework Python"
9033 fi
9034 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009035 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009036 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009037 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009039 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9040 then
9041 LINKFORSHARED="-Wl,--export-dynamic"
9042 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009043 SunOS/5*) case $CC in
9044 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009045 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009046 then
9047 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009048 fi;;
9049 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009050 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009051fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009052echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9053echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009054
Michael W. Hudson54241132001-12-07 15:38:26 +00009055
Martin v. Löwis11437992002-04-12 09:54:03 +00009056echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9057echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009058if test ! "$LIBRARY" = "$LDLIBRARY"
9059then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009060 case $ac_sys_system in
9061 CYGWIN*)
9062 # Cygwin needs CCSHARED when building extension DLLs
9063 # but not when building the interpreter DLL.
9064 CFLAGSFORSHARED='';;
9065 *)
9066 CFLAGSFORSHARED='$(CCSHARED)'
9067 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009068fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009069echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9070echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009071
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009072# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9073# library (with --enable-shared).
9074# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009075# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9076# if it is not required, since it creates a dependency of the shared library
9077# to LIBS. This, in turn, means that applications linking the shared libpython
9078# don't need to link LIBS explicitly. The default should be only changed
9079# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009080
9081echo "$as_me:$LINENO: checking SHLIBS" >&5
9082echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9083case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009084 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009085 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009086esac
9087echo "$as_me:$LINENO: result: $SHLIBS" >&5
9088echo "${ECHO_T}$SHLIBS" >&6
9089
9090
Guido van Rossum627b2d71993-12-24 10:39:16 +00009091# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009092
9093echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9094echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9095if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9096 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009097else
Martin v. Löwis11437992002-04-12 09:54:03 +00009098 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009099LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009100cat >conftest.$ac_ext <<_ACEOF
9101#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009102#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009103
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009104/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009105#ifdef __cplusplus
9106extern "C"
9107#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009108/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009109 builtin and then its argument prototype would still apply. */
9110char dlopen ();
9111#ifdef F77_DUMMY_MAIN
9112# ifdef __cplusplus
9113 extern "C"
9114# endif
9115 int F77_DUMMY_MAIN() { return 1; }
9116#endif
9117int
9118main ()
9119{
9120dlopen ();
9121 ;
9122 return 0;
9123}
9124_ACEOF
9125rm -f conftest.$ac_objext conftest$ac_exeext
9126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9127 (eval $ac_link) 2>&5
9128 ac_status=$?
9129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9130 (exit $ac_status); } &&
9131 { ac_try='test -s conftest$ac_exeext'
9132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9133 (eval $ac_try) 2>&5
9134 ac_status=$?
9135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9136 (exit $ac_status); }; }; then
9137 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009138else
Martin v. Löwis11437992002-04-12 09:54:03 +00009139 echo "$as_me: failed program was:" >&5
9140cat conftest.$ac_ext >&5
9141ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009142fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009143rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9144LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009145fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009146echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9147echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9148if test $ac_cv_lib_dl_dlopen = yes; then
9149 cat >>confdefs.h <<_ACEOF
9150#define HAVE_LIBDL 1
9151_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009152
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009153 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009154
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009155fi
9156 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009157
9158echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9159echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9160if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9161 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009162else
Martin v. Löwis11437992002-04-12 09:54:03 +00009163 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009164LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009165cat >conftest.$ac_ext <<_ACEOF
9166#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009167#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009168
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009169/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009170#ifdef __cplusplus
9171extern "C"
9172#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009173/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009174 builtin and then its argument prototype would still apply. */
9175char shl_load ();
9176#ifdef F77_DUMMY_MAIN
9177# ifdef __cplusplus
9178 extern "C"
9179# endif
9180 int F77_DUMMY_MAIN() { return 1; }
9181#endif
9182int
9183main ()
9184{
9185shl_load ();
9186 ;
9187 return 0;
9188}
9189_ACEOF
9190rm -f conftest.$ac_objext conftest$ac_exeext
9191if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9192 (eval $ac_link) 2>&5
9193 ac_status=$?
9194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9195 (exit $ac_status); } &&
9196 { ac_try='test -s conftest$ac_exeext'
9197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9198 (eval $ac_try) 2>&5
9199 ac_status=$?
9200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9201 (exit $ac_status); }; }; then
9202 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009203else
Martin v. Löwis11437992002-04-12 09:54:03 +00009204 echo "$as_me: failed program was:" >&5
9205cat conftest.$ac_ext >&5
9206ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009207fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009208rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9209LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009210fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009211echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9212echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9213if test $ac_cv_lib_dld_shl_load = yes; then
9214 cat >>confdefs.h <<_ACEOF
9215#define HAVE_LIBDLD 1
9216_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009217
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009218 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009219
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009220fi
9221 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009222
9223echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9224echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9225if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9226 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009227else
Martin v. Löwis11437992002-04-12 09:54:03 +00009228 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009229LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009230cat >conftest.$ac_ext <<_ACEOF
9231#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009232#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009233
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009234/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009235#ifdef __cplusplus
9236extern "C"
9237#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009238/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009239 builtin and then its argument prototype would still apply. */
9240char sem_init ();
9241#ifdef F77_DUMMY_MAIN
9242# ifdef __cplusplus
9243 extern "C"
9244# endif
9245 int F77_DUMMY_MAIN() { return 1; }
9246#endif
9247int
9248main ()
9249{
9250sem_init ();
9251 ;
9252 return 0;
9253}
9254_ACEOF
9255rm -f conftest.$ac_objext conftest$ac_exeext
9256if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9257 (eval $ac_link) 2>&5
9258 ac_status=$?
9259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9260 (exit $ac_status); } &&
9261 { ac_try='test -s conftest$ac_exeext'
9262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9263 (eval $ac_try) 2>&5
9264 ac_status=$?
9265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9266 (exit $ac_status); }; }; then
9267 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009268else
Martin v. Löwis11437992002-04-12 09:54:03 +00009269 echo "$as_me: failed program was:" >&5
9270cat conftest.$ac_ext >&5
9271ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009272fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009273rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9274LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009275fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009276echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9277echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9278if test $ac_cv_lib_rt_sem_init = yes; then
9279 cat >>confdefs.h <<_ACEOF
9280#define HAVE_LIBRT 1
9281_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009282
9283 LIBS="-lrt $LIBS"
9284
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009285fi
9286 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009287
9288# checks for system dependent C++ extensions support
9289case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9291echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9292 cat >conftest.$ac_ext <<_ACEOF
9293#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009294#include "confdefs.h"
9295#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009296#ifdef F77_DUMMY_MAIN
9297# ifdef __cplusplus
9298 extern "C"
9299# endif
9300 int F77_DUMMY_MAIN() { return 1; }
9301#endif
9302int
9303main ()
9304{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009305loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009306 ;
9307 return 0;
9308}
9309_ACEOF
9310rm -f conftest.$ac_objext conftest$ac_exeext
9311if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9312 (eval $ac_link) 2>&5
9313 ac_status=$?
9314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9315 (exit $ac_status); } &&
9316 { ac_try='test -s conftest$ac_exeext'
9317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9318 (eval $ac_try) 2>&5
9319 ac_status=$?
9320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9321 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009322
Martin v. Löwis11437992002-04-12 09:54:03 +00009323cat >>confdefs.h <<\_ACEOF
9324#define AIX_GENUINE_CPLUSPLUS 1
9325_ACEOF
9326
9327 echo "$as_me:$LINENO: result: yes" >&5
9328echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009329else
Martin v. Löwis11437992002-04-12 09:54:03 +00009330 echo "$as_me: failed program was:" >&5
9331cat conftest.$ac_ext >&5
9332echo "$as_me:$LINENO: result: no" >&5
9333echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009334fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009335rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009336 *) ;;
9337esac
9338
Guido van Rossum70c7f481998-03-26 18:44:10 +00009339# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9340# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009341# BeOS' sockets are stashed in libnet.
9342case "$ac_sys_system" in
9343IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009344*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009345echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9346echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9347if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9348 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009349else
Martin v. Löwis11437992002-04-12 09:54:03 +00009350 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009351LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009352cat >conftest.$ac_ext <<_ACEOF
9353#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009354#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009355
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009356/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009357#ifdef __cplusplus
9358extern "C"
9359#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009360/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 builtin and then its argument prototype would still apply. */
9362char t_open ();
9363#ifdef F77_DUMMY_MAIN
9364# ifdef __cplusplus
9365 extern "C"
9366# endif
9367 int F77_DUMMY_MAIN() { return 1; }
9368#endif
9369int
9370main ()
9371{
9372t_open ();
9373 ;
9374 return 0;
9375}
9376_ACEOF
9377rm -f conftest.$ac_objext conftest$ac_exeext
9378if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9379 (eval $ac_link) 2>&5
9380 ac_status=$?
9381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9382 (exit $ac_status); } &&
9383 { ac_try='test -s conftest$ac_exeext'
9384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9385 (eval $ac_try) 2>&5
9386 ac_status=$?
9387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9388 (exit $ac_status); }; }; then
9389 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009390else
Martin v. Löwis11437992002-04-12 09:54:03 +00009391 echo "$as_me: failed program was:" >&5
9392cat conftest.$ac_ext >&5
9393ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009394fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009395rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9396LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009397fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009398echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9399echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9400if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009401 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009402fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009403 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009404echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9405echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9406if test "${ac_cv_lib_socket_socket+set}" = set; then
9407 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009408else
Martin v. Löwis11437992002-04-12 09:54:03 +00009409 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009410LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009411cat >conftest.$ac_ext <<_ACEOF
9412#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009413#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009414
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009415/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009416#ifdef __cplusplus
9417extern "C"
9418#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009419/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009420 builtin and then its argument prototype would still apply. */
9421char socket ();
9422#ifdef F77_DUMMY_MAIN
9423# ifdef __cplusplus
9424 extern "C"
9425# endif
9426 int F77_DUMMY_MAIN() { return 1; }
9427#endif
9428int
9429main ()
9430{
9431socket ();
9432 ;
9433 return 0;
9434}
9435_ACEOF
9436rm -f conftest.$ac_objext conftest$ac_exeext
9437if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9438 (eval $ac_link) 2>&5
9439 ac_status=$?
9440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9441 (exit $ac_status); } &&
9442 { ac_try='test -s conftest$ac_exeext'
9443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9444 (eval $ac_try) 2>&5
9445 ac_status=$?
9446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9447 (exit $ac_status); }; }; then
9448 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009449else
Martin v. Löwis11437992002-04-12 09:54:03 +00009450 echo "$as_me: failed program was:" >&5
9451cat conftest.$ac_ext >&5
9452ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009453fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009454rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9455LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009456fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009457echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9458echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9459if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009460 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009461fi
9462 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009463;;
9464esac
9465case "$ac_sys_system" in
9466BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009467echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9468echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9469if test "${ac_cv_lib_net_socket+set}" = set; then
9470 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009471else
Martin v. Löwis11437992002-04-12 09:54:03 +00009472 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009473LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009474cat >conftest.$ac_ext <<_ACEOF
9475#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009476#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009477
Guido van Rossumad678af1998-10-02 14:42:15 +00009478/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009479#ifdef __cplusplus
9480extern "C"
9481#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009482/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 builtin and then its argument prototype would still apply. */
9484char socket ();
9485#ifdef F77_DUMMY_MAIN
9486# ifdef __cplusplus
9487 extern "C"
9488# endif
9489 int F77_DUMMY_MAIN() { return 1; }
9490#endif
9491int
9492main ()
9493{
9494socket ();
9495 ;
9496 return 0;
9497}
9498_ACEOF
9499rm -f conftest.$ac_objext conftest$ac_exeext
9500if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9501 (eval $ac_link) 2>&5
9502 ac_status=$?
9503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9504 (exit $ac_status); } &&
9505 { ac_try='test -s conftest$ac_exeext'
9506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9507 (eval $ac_try) 2>&5
9508 ac_status=$?
9509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9510 (exit $ac_status); }; }; then
9511 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009512else
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 echo "$as_me: failed program was:" >&5
9514cat conftest.$ac_ext >&5
9515ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009516fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009517rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9518LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009519fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009520echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9521echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9522if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009523 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009524fi
9525 # BeOS
9526;;
9527esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009528
Martin v. Löwis11437992002-04-12 09:54:03 +00009529echo "$as_me:$LINENO: checking for --with-libs" >&5
9530echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9531
Guido van Rossuma68acba1996-07-31 17:36:39 +00009532# Check whether --with-libs or --without-libs was given.
9533if test "${with_libs+set}" = set; then
9534 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009535
9536echo "$as_me:$LINENO: result: $withval" >&5
9537echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009538LIBS="$withval $LIBS"
9539
9540else
Martin v. Löwis11437992002-04-12 09:54:03 +00009541 echo "$as_me:$LINENO: result: no" >&5
9542echo "${ECHO_T}no" >&6
9543fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009544
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009545# Determine if signalmodule should be used.
9546
9547
Martin v. Löwis11437992002-04-12 09:54:03 +00009548echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9549echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9550
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009551# Check whether --with-signal-module or --without-signal-module was given.
9552if test "${with_signal_module+set}" = set; then
9553 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009554
Martin v. Löwis11437992002-04-12 09:54:03 +00009555fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009556
9557if test -z "$with_signal_module"
9558then with_signal_module="yes"
9559fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009560echo "$as_me:$LINENO: result: $with_signal_module" >&5
9561echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009562
9563if test "${with_signal_module}" = "yes"; then
9564 USE_SIGNAL_MODULE=""
9565 SIGNAL_OBJS=""
9566else
9567 USE_SIGNAL_MODULE="#"
9568 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9569fi
9570
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009571# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009572
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009573USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009574
Martin v. Löwis11437992002-04-12 09:54:03 +00009575echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9576echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9577
Guido van Rossumec2f0731997-01-22 20:54:01 +00009578
9579# Check whether --with-dec-threads or --without-dec-threads was given.
9580if test "${with_dec_threads+set}" = set; then
9581 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009582
9583echo "$as_me:$LINENO: result: $withval" >&5
9584echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009585LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009586if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009587 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009588fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009589else
Martin v. Löwis11437992002-04-12 09:54:03 +00009590 echo "$as_me:$LINENO: result: no" >&5
9591echo "${ECHO_T}no" >&6
9592fi;
9593
9594# Templates for things AC_DEFINEd more than once.
9595# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009596
9597
Martin v. Löwis11437992002-04-12 09:54:03 +00009598
9599
9600
9601
9602
9603echo "$as_me:$LINENO: checking for --with-threads" >&5
9604echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9605
Guido van Rossumec2f0731997-01-22 20:54:01 +00009606# Check whether --with-threads or --without-threads was given.
9607if test "${with_threads+set}" = set; then
9608 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009609
Martin v. Löwis11437992002-04-12 09:54:03 +00009610fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009611
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009612# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009613
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009614# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009615if test "${with_thread+set}" = set; then
9616 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009617
Martin v. Löwis11437992002-04-12 09:54:03 +00009618with_threads=$with_thread
9619fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009620
9621if test -z "$with_threads"
9622then with_threads="yes"
9623fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009624echo "$as_me:$LINENO: result: $with_threads" >&5
9625echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009626
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009627
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009628if test "$with_threads" = "no"
9629then
9630 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009631elif test "$ac_cv_pthread_is_default" = yes
9632then
Martin v. Löwis11437992002-04-12 09:54:03 +00009633 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009634#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009635_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009636
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009637 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009638 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009639#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009640_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009641
9642 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009643 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009644elif test "$ac_cv_kpthread" = "yes"
9645then
9646 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009647 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009648#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009649_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009650
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009651 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009652 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009653else
9654 if test ! -z "$with_threads" -a -d "$with_threads"
9655 then LDFLAGS="$LDFLAGS -L$with_threads"
9656 fi
9657 if test ! -z "$withval" -a -d "$withval"
9658 then LDFLAGS="$LDFLAGS -L$withval"
9659 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009660
9661 # According to the POSIX spec, a pthreads implementation must
9662 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009663 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9664echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9665 cat >conftest.$ac_ext <<_ACEOF
9666#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009667#include "confdefs.h"
9668#include <unistd.h>
9669 #ifdef _POSIX_THREADS
9670 yes
9671 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009672
9673_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009674if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9675 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009676 unistd_defines_pthreads=yes
9677else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009678 unistd_defines_pthreads=no
9679fi
9680rm -f conftest*
9681
Martin v. Löwis11437992002-04-12 09:54:03 +00009682 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9683echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009684
Martin v. Löwis11437992002-04-12 09:54:03 +00009685 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009686#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009687_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009688
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 if test "${ac_cv_header_cthreads_h+set}" = set; then
9690 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9691echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9692if test "${ac_cv_header_cthreads_h+set}" = set; then
9693 echo $ECHO_N "(cached) $ECHO_C" >&6
9694fi
9695echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9696echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009697else
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 # Is the header compilable?
9699echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9700echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9701cat >conftest.$ac_ext <<_ACEOF
9702#line $LINENO "configure"
9703#include "confdefs.h"
9704$ac_includes_default
9705#include <cthreads.h>
9706_ACEOF
9707rm -f conftest.$ac_objext
9708if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9709 (eval $ac_compile) 2>&5
9710 ac_status=$?
9711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9712 (exit $ac_status); } &&
9713 { ac_try='test -s conftest.$ac_objext'
9714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9715 (eval $ac_try) 2>&5
9716 ac_status=$?
9717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9718 (exit $ac_status); }; }; then
9719 ac_header_compiler=yes
9720else
9721 echo "$as_me: failed program was:" >&5
9722cat conftest.$ac_ext >&5
9723ac_header_compiler=no
9724fi
9725rm -f conftest.$ac_objext conftest.$ac_ext
9726echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9727echo "${ECHO_T}$ac_header_compiler" >&6
9728
9729# Is the header present?
9730echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9731echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9732cat >conftest.$ac_ext <<_ACEOF
9733#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009734#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009735#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009736_ACEOF
9737if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9738 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9739 ac_status=$?
9740 egrep -v '^ *\+' conftest.er1 >conftest.err
9741 rm -f conftest.er1
9742 cat conftest.err >&5
9743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9744 (exit $ac_status); } >/dev/null; then
9745 if test -s conftest.err; then
9746 ac_cpp_err=$ac_c_preproc_warn_flag
9747 else
9748 ac_cpp_err=
9749 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009750else
Martin v. Löwis11437992002-04-12 09:54:03 +00009751 ac_cpp_err=yes
9752fi
9753if test -z "$ac_cpp_err"; then
9754 ac_header_preproc=yes
9755else
9756 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009757 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009758 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009759fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009760rm -f conftest.err conftest.$ac_ext
9761echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9762echo "${ECHO_T}$ac_header_preproc" >&6
9763
9764# So? What about this header?
9765case $ac_header_compiler:$ac_header_preproc in
9766 yes:no )
9767 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9768echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9769 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9770echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9771 no:yes )
9772 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9773echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9774 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9775echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9776 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9777echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9778esac
9779echo "$as_me:$LINENO: checking for cthreads.h" >&5
9780echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9781if test "${ac_cv_header_cthreads_h+set}" = set; then
9782 echo $ECHO_N "(cached) $ECHO_C" >&6
9783else
9784 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009785fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009786echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9787echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9788
9789fi
9790if test $ac_cv_header_cthreads_h = yes; then
9791 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009792#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009793_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009794
Martin v. Löwis11437992002-04-12 09:54:03 +00009795 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009796#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009797_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009798
Martin v. Löwis11437992002-04-12 09:54:03 +00009799
9800cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009801#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009802_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009803
9804 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009805 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009806else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009807
Martin v. Löwis11437992002-04-12 09:54:03 +00009808 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9809 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9810echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9811if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9812 echo $ECHO_N "(cached) $ECHO_C" >&6
9813fi
9814echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9815echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009816else
Martin v. Löwis11437992002-04-12 09:54:03 +00009817 # Is the header compilable?
9818echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9819echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9820cat >conftest.$ac_ext <<_ACEOF
9821#line $LINENO "configure"
9822#include "confdefs.h"
9823$ac_includes_default
9824#include <mach/cthreads.h>
9825_ACEOF
9826rm -f conftest.$ac_objext
9827if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9828 (eval $ac_compile) 2>&5
9829 ac_status=$?
9830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9831 (exit $ac_status); } &&
9832 { ac_try='test -s conftest.$ac_objext'
9833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9834 (eval $ac_try) 2>&5
9835 ac_status=$?
9836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9837 (exit $ac_status); }; }; then
9838 ac_header_compiler=yes
9839else
9840 echo "$as_me: failed program was:" >&5
9841cat conftest.$ac_ext >&5
9842ac_header_compiler=no
9843fi
9844rm -f conftest.$ac_objext conftest.$ac_ext
9845echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9846echo "${ECHO_T}$ac_header_compiler" >&6
9847
9848# Is the header present?
9849echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9850echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9851cat >conftest.$ac_ext <<_ACEOF
9852#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009853#include "confdefs.h"
9854#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009855_ACEOF
9856if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9857 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9858 ac_status=$?
9859 egrep -v '^ *\+' conftest.er1 >conftest.err
9860 rm -f conftest.er1
9861 cat conftest.err >&5
9862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9863 (exit $ac_status); } >/dev/null; then
9864 if test -s conftest.err; then
9865 ac_cpp_err=$ac_c_preproc_warn_flag
9866 else
9867 ac_cpp_err=
9868 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009869else
Martin v. Löwis11437992002-04-12 09:54:03 +00009870 ac_cpp_err=yes
9871fi
9872if test -z "$ac_cpp_err"; then
9873 ac_header_preproc=yes
9874else
9875 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009876 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009877 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009878fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009879rm -f conftest.err conftest.$ac_ext
9880echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9881echo "${ECHO_T}$ac_header_preproc" >&6
9882
9883# So? What about this header?
9884case $ac_header_compiler:$ac_header_preproc in
9885 yes:no )
9886 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9887echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9888 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9889echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9890 no:yes )
9891 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9892echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9893 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9894echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9895 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9896echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9897esac
9898echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9899echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9900if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9901 echo $ECHO_N "(cached) $ECHO_C" >&6
9902else
9903 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009904fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009905echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9906echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9907
9908fi
9909if test $ac_cv_header_mach_cthreads_h = yes; then
9910 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009911#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009912_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009913
Martin v. Löwis11437992002-04-12 09:54:03 +00009914 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009915#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009916_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009917
Martin v. Löwis11437992002-04-12 09:54:03 +00009918
9919cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009920#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009921_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009922
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009923 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009924else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009925
Martin v. Löwis11437992002-04-12 09:54:03 +00009926 echo "$as_me:$LINENO: checking for --with-pth" >&5
9927echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9928
9929# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009930if test "${with_pth+set}" = set; then
9931 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009932
Martin v. Löwis11437992002-04-12 09:54:03 +00009933 echo "$as_me:$LINENO: result: $withval" >&5
9934echo "${ECHO_T}$withval" >&6
9935 cat >>confdefs.h <<\_ACEOF
9936#define WITH_THREAD 1
9937_ACEOF
9938
9939
9940cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009941#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009942_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009943
Martin v. Löwis130fb172001-07-19 11:00:41 +00009944 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009945 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009946else
Martin v. Löwis11437992002-04-12 09:54:03 +00009947
9948 echo "$as_me:$LINENO: result: no" >&5
9949echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009950
9951 # Just looking for pthread_create in libpthread is not enough:
9952 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9953 # So we really have to include pthread.h, and then link.
9954 _libs=$LIBS
9955 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009956 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9957echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9958 cat >conftest.$ac_ext <<_ACEOF
9959#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009960#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009961#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009962
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009963void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009964#ifdef F77_DUMMY_MAIN
9965# ifdef __cplusplus
9966 extern "C"
9967# endif
9968 int F77_DUMMY_MAIN() { return 1; }
9969#endif
9970int
9971main ()
9972{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009973
9974pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009975 ;
9976 return 0;
9977}
9978_ACEOF
9979rm -f conftest.$ac_objext conftest$ac_exeext
9980if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9981 (eval $ac_link) 2>&5
9982 ac_status=$?
9983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9984 (exit $ac_status); } &&
9985 { ac_try='test -s conftest$ac_exeext'
9986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9987 (eval $ac_try) 2>&5
9988 ac_status=$?
9989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9990 (exit $ac_status); }; }; then
9991
9992 echo "$as_me:$LINENO: result: yes" >&5
9993echo "${ECHO_T}yes" >&6
9994 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009995#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009996_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009997
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009998 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009999 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010000else
Martin v. Löwis11437992002-04-12 09:54:03 +000010001 echo "$as_me: failed program was:" >&5
10002cat conftest.$ac_ext >&5
10003
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010004 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010005 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10006echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10007if test "${ac_cv_func_pthread_detach+set}" = set; then
10008 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010009else
Martin v. Löwis11437992002-04-12 09:54:03 +000010010 cat >conftest.$ac_ext <<_ACEOF
10011#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010012#include "confdefs.h"
10013/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010014 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010015#include <assert.h>
10016/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010017#ifdef __cplusplus
10018extern "C"
10019#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010020/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010021 builtin and then its argument prototype would still apply. */
10022char pthread_detach ();
10023char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010024
Martin v. Löwis11437992002-04-12 09:54:03 +000010025#ifdef F77_DUMMY_MAIN
10026# ifdef __cplusplus
10027 extern "C"
10028# endif
10029 int F77_DUMMY_MAIN() { return 1; }
10030#endif
10031int
10032main ()
10033{
Guido van Rossumad678af1998-10-02 14:42:15 +000010034/* The GNU C library defines this for functions which it implements
10035 to always fail with ENOSYS. Some functions are actually named
10036 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010037#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010038choke me
10039#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010040f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010041#endif
10042
Martin v. Löwis11437992002-04-12 09:54:03 +000010043 ;
10044 return 0;
10045}
10046_ACEOF
10047rm -f conftest.$ac_objext conftest$ac_exeext
10048if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10049 (eval $ac_link) 2>&5
10050 ac_status=$?
10051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10052 (exit $ac_status); } &&
10053 { ac_try='test -s conftest$ac_exeext'
10054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10055 (eval $ac_try) 2>&5
10056 ac_status=$?
10057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10058 (exit $ac_status); }; }; then
10059 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010060else
Martin v. Löwis11437992002-04-12 09:54:03 +000010061 echo "$as_me: failed program was:" >&5
10062cat conftest.$ac_ext >&5
10063ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010064fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010065rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010066fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010067echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10068echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10069if test $ac_cv_func_pthread_detach = yes; then
10070 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010071#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010072_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010073
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010074 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010075 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010076else
Guido van Rossumad678af1998-10-02 14:42:15 +000010077
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010078 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10079 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10080echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10081if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10082 echo $ECHO_N "(cached) $ECHO_C" >&6
10083fi
10084echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10085echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10086else
10087 # Is the header compilable?
10088echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10089echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10090cat >conftest.$ac_ext <<_ACEOF
10091#line $LINENO "configure"
10092#include "confdefs.h"
10093$ac_includes_default
10094#include <atheos/threads.h>
10095_ACEOF
10096rm -f conftest.$ac_objext
10097if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10098 (eval $ac_compile) 2>&5
10099 ac_status=$?
10100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10101 (exit $ac_status); } &&
10102 { ac_try='test -s conftest.$ac_objext'
10103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10104 (eval $ac_try) 2>&5
10105 ac_status=$?
10106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10107 (exit $ac_status); }; }; then
10108 ac_header_compiler=yes
10109else
10110 echo "$as_me: failed program was:" >&5
10111cat conftest.$ac_ext >&5
10112ac_header_compiler=no
10113fi
10114rm -f conftest.$ac_objext conftest.$ac_ext
10115echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10116echo "${ECHO_T}$ac_header_compiler" >&6
10117
10118# Is the header present?
10119echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10120echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10121cat >conftest.$ac_ext <<_ACEOF
10122#line $LINENO "configure"
10123#include "confdefs.h"
10124#include <atheos/threads.h>
10125_ACEOF
10126if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10127 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10128 ac_status=$?
10129 egrep -v '^ *\+' conftest.er1 >conftest.err
10130 rm -f conftest.er1
10131 cat conftest.err >&5
10132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10133 (exit $ac_status); } >/dev/null; then
10134 if test -s conftest.err; then
10135 ac_cpp_err=$ac_c_preproc_warn_flag
10136 else
10137 ac_cpp_err=
10138 fi
10139else
10140 ac_cpp_err=yes
10141fi
10142if test -z "$ac_cpp_err"; then
10143 ac_header_preproc=yes
10144else
10145 echo "$as_me: failed program was:" >&5
10146 cat conftest.$ac_ext >&5
10147 ac_header_preproc=no
10148fi
10149rm -f conftest.err conftest.$ac_ext
10150echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10151echo "${ECHO_T}$ac_header_preproc" >&6
10152
10153# So? What about this header?
10154case $ac_header_compiler:$ac_header_preproc in
10155 yes:no )
10156 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10157echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10158 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10159echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10160 no:yes )
10161 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10162echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10163 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10164echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10165 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10166echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10167esac
10168echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10169echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10170if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10171 echo $ECHO_N "(cached) $ECHO_C" >&6
10172else
10173 ac_cv_header_atheos_threads_h=$ac_header_preproc
10174fi
10175echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10176echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10177
10178fi
10179if test $ac_cv_header_atheos_threads_h = yes; then
10180 cat >>confdefs.h <<\_ACEOF
10181#define WITH_THREAD 1
10182_ACEOF
10183
10184
10185cat >>confdefs.h <<\_ACEOF
10186#define ATHEOS_THREADS 1
10187_ACEOF
10188
10189 THREADOBJ="Python/thread.o"
10190else
10191
Martin v. Löwis11437992002-04-12 09:54:03 +000010192 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10193 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10194echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10195if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10196 echo $ECHO_N "(cached) $ECHO_C" >&6
10197fi
10198echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10199echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010200else
Martin v. Löwis11437992002-04-12 09:54:03 +000010201 # Is the header compilable?
10202echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10203echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10204cat >conftest.$ac_ext <<_ACEOF
10205#line $LINENO "configure"
10206#include "confdefs.h"
10207$ac_includes_default
10208#include <kernel/OS.h>
10209_ACEOF
10210rm -f conftest.$ac_objext
10211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10212 (eval $ac_compile) 2>&5
10213 ac_status=$?
10214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10215 (exit $ac_status); } &&
10216 { ac_try='test -s conftest.$ac_objext'
10217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10218 (eval $ac_try) 2>&5
10219 ac_status=$?
10220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10221 (exit $ac_status); }; }; then
10222 ac_header_compiler=yes
10223else
10224 echo "$as_me: failed program was:" >&5
10225cat conftest.$ac_ext >&5
10226ac_header_compiler=no
10227fi
10228rm -f conftest.$ac_objext conftest.$ac_ext
10229echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10230echo "${ECHO_T}$ac_header_compiler" >&6
10231
10232# Is the header present?
10233echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10234echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10235cat >conftest.$ac_ext <<_ACEOF
10236#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010237#include "confdefs.h"
10238#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010239_ACEOF
10240if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10241 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10242 ac_status=$?
10243 egrep -v '^ *\+' conftest.er1 >conftest.err
10244 rm -f conftest.er1
10245 cat conftest.err >&5
10246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10247 (exit $ac_status); } >/dev/null; then
10248 if test -s conftest.err; then
10249 ac_cpp_err=$ac_c_preproc_warn_flag
10250 else
10251 ac_cpp_err=
10252 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010253else
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 ac_cpp_err=yes
10255fi
10256if test -z "$ac_cpp_err"; then
10257 ac_header_preproc=yes
10258else
10259 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010260 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010261 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010262fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010263rm -f conftest.err conftest.$ac_ext
10264echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10265echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010266
Martin v. Löwis11437992002-04-12 09:54:03 +000010267# So? What about this header?
10268case $ac_header_compiler:$ac_header_preproc in
10269 yes:no )
10270 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10271echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10272 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10273echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10274 no:yes )
10275 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10276echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10277 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10278echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10279 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10280echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10281esac
10282echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10283echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10284if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10285 echo $ECHO_N "(cached) $ECHO_C" >&6
10286else
10287 ac_cv_header_kernel_OS_h=$ac_header_preproc
10288fi
10289echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10290echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10291
10292fi
10293if test $ac_cv_header_kernel_OS_h = yes; then
10294 cat >>confdefs.h <<\_ACEOF
10295#define WITH_THREAD 1
10296_ACEOF
10297
10298
10299cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010300#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010301_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010302
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010303 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010304else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010305
Martin v. Löwis11437992002-04-12 09:54:03 +000010306 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10307echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10308if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10309 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010310else
Martin v. Löwis11437992002-04-12 09:54:03 +000010311 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010312LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010313cat >conftest.$ac_ext <<_ACEOF
10314#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010315#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010316
Greg Steinadf63d62000-07-05 10:38:09 +000010317/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010318#ifdef __cplusplus
10319extern "C"
10320#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010321/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010322 builtin and then its argument prototype would still apply. */
10323char pthread_create ();
10324#ifdef F77_DUMMY_MAIN
10325# ifdef __cplusplus
10326 extern "C"
10327# endif
10328 int F77_DUMMY_MAIN() { return 1; }
10329#endif
10330int
10331main ()
10332{
10333pthread_create ();
10334 ;
10335 return 0;
10336}
10337_ACEOF
10338rm -f conftest.$ac_objext conftest$ac_exeext
10339if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10340 (eval $ac_link) 2>&5
10341 ac_status=$?
10342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10343 (exit $ac_status); } &&
10344 { ac_try='test -s conftest$ac_exeext'
10345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10346 (eval $ac_try) 2>&5
10347 ac_status=$?
10348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10349 (exit $ac_status); }; }; then
10350 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010351else
Martin v. Löwis11437992002-04-12 09:54:03 +000010352 echo "$as_me: failed program was:" >&5
10353cat conftest.$ac_ext >&5
10354ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010355fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010356rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10357LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010358fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010359echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10360echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10361if test $ac_cv_lib_pthreads_pthread_create = yes; then
10362 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010363#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010364_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010365
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010366 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010367 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010368 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010369else
Greg Steinadf63d62000-07-05 10:38:09 +000010370
Martin v. Löwis11437992002-04-12 09:54:03 +000010371 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10372echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10373if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10374 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010375else
Martin v. Löwis11437992002-04-12 09:54:03 +000010376 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010377LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010378cat >conftest.$ac_ext <<_ACEOF
10379#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010380#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010381
Guido van Rossum49545951997-12-02 19:28:29 +000010382/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010383#ifdef __cplusplus
10384extern "C"
10385#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010386/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010387 builtin and then its argument prototype would still apply. */
10388char pthread_create ();
10389#ifdef F77_DUMMY_MAIN
10390# ifdef __cplusplus
10391 extern "C"
10392# endif
10393 int F77_DUMMY_MAIN() { return 1; }
10394#endif
10395int
10396main ()
10397{
10398pthread_create ();
10399 ;
10400 return 0;
10401}
10402_ACEOF
10403rm -f conftest.$ac_objext conftest$ac_exeext
10404if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10405 (eval $ac_link) 2>&5
10406 ac_status=$?
10407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10408 (exit $ac_status); } &&
10409 { ac_try='test -s conftest$ac_exeext'
10410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10411 (eval $ac_try) 2>&5
10412 ac_status=$?
10413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10414 (exit $ac_status); }; }; then
10415 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010416else
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 echo "$as_me: failed program was:" >&5
10418cat conftest.$ac_ext >&5
10419ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010420fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010421rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10422LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010423fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010424echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10425echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10426if test $ac_cv_lib_c_r_pthread_create = yes; then
10427 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010428#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010429_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010430
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010431 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010432 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010433 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010434else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010435
Martin v. Löwis11437992002-04-12 09:54:03 +000010436 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10437echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10438if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10439 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010440else
Martin v. Löwis11437992002-04-12 09:54:03 +000010441 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010442LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010443cat >conftest.$ac_ext <<_ACEOF
10444#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010445#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010446
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010447/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010448#ifdef __cplusplus
10449extern "C"
10450#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010451/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010452 builtin and then its argument prototype would still apply. */
10453char __d6_pthread_create ();
10454#ifdef F77_DUMMY_MAIN
10455# ifdef __cplusplus
10456 extern "C"
10457# endif
10458 int F77_DUMMY_MAIN() { return 1; }
10459#endif
10460int
10461main ()
10462{
10463__d6_pthread_create ();
10464 ;
10465 return 0;
10466}
10467_ACEOF
10468rm -f conftest.$ac_objext conftest$ac_exeext
10469if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10470 (eval $ac_link) 2>&5
10471 ac_status=$?
10472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10473 (exit $ac_status); } &&
10474 { ac_try='test -s conftest$ac_exeext'
10475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10476 (eval $ac_try) 2>&5
10477 ac_status=$?
10478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10479 (exit $ac_status); }; }; then
10480 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010481else
Martin v. Löwis11437992002-04-12 09:54:03 +000010482 echo "$as_me: failed program was:" >&5
10483cat conftest.$ac_ext >&5
10484ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010485fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010486rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10487LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010488fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010489echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10490echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10491if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10492 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010493#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010494_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010495
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010496 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010497 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010498 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010499else
Guido van Rossum49545951997-12-02 19:28:29 +000010500
Martin v. Löwis11437992002-04-12 09:54:03 +000010501 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10502echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10503if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10504 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010505else
Martin v. Löwis11437992002-04-12 09:54:03 +000010506 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010507LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010508cat >conftest.$ac_ext <<_ACEOF
10509#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010510#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010511
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010512/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010513#ifdef __cplusplus
10514extern "C"
10515#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010516/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010517 builtin and then its argument prototype would still apply. */
10518char __pthread_create_system ();
10519#ifdef F77_DUMMY_MAIN
10520# ifdef __cplusplus
10521 extern "C"
10522# endif
10523 int F77_DUMMY_MAIN() { return 1; }
10524#endif
10525int
10526main ()
10527{
10528__pthread_create_system ();
10529 ;
10530 return 0;
10531}
10532_ACEOF
10533rm -f conftest.$ac_objext conftest$ac_exeext
10534if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10535 (eval $ac_link) 2>&5
10536 ac_status=$?
10537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10538 (exit $ac_status); } &&
10539 { ac_try='test -s conftest$ac_exeext'
10540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10541 (eval $ac_try) 2>&5
10542 ac_status=$?
10543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10544 (exit $ac_status); }; }; then
10545 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010546else
Martin v. Löwis11437992002-04-12 09:54:03 +000010547 echo "$as_me: failed program was:" >&5
10548cat conftest.$ac_ext >&5
10549ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010550fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010551rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10552LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010553fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010554echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10555echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10556if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10557 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010558#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010559_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010560
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010561 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010562 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010563 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010564else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010565
Martin v. Löwis11437992002-04-12 09:54:03 +000010566 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10567echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10568if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10569 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010570else
Martin v. Löwis11437992002-04-12 09:54:03 +000010571 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010572LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010573cat >conftest.$ac_ext <<_ACEOF
10574#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010575#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010576
Guido van Rossumb93a8621998-05-07 13:27:32 +000010577/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010578#ifdef __cplusplus
10579extern "C"
10580#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010581/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010582 builtin and then its argument prototype would still apply. */
10583char pthread_create ();
10584#ifdef F77_DUMMY_MAIN
10585# ifdef __cplusplus
10586 extern "C"
10587# endif
10588 int F77_DUMMY_MAIN() { return 1; }
10589#endif
10590int
10591main ()
10592{
10593pthread_create ();
10594 ;
10595 return 0;
10596}
10597_ACEOF
10598rm -f conftest.$ac_objext conftest$ac_exeext
10599if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10600 (eval $ac_link) 2>&5
10601 ac_status=$?
10602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10603 (exit $ac_status); } &&
10604 { ac_try='test -s conftest$ac_exeext'
10605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10606 (eval $ac_try) 2>&5
10607 ac_status=$?
10608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10609 (exit $ac_status); }; }; then
10610 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010611else
Martin v. Löwis11437992002-04-12 09:54:03 +000010612 echo "$as_me: failed program was:" >&5
10613cat conftest.$ac_ext >&5
10614ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010615fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010616rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10617LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010618fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010619echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10620echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10621if test $ac_cv_lib_cma_pthread_create = yes; then
10622 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010623#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010624_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010625
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010626 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010627 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010628 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010629else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010630
Martin v. Löwis130fb172001-07-19 11:00:41 +000010631 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010632fi
10633
Guido van Rossum627b2d71993-12-24 10:39:16 +000010634
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010635fi
10636
Guido van Rossum0be3e491997-05-22 20:33:33 +000010637fi
10638
Guido van Rossum49545951997-12-02 19:28:29 +000010639fi
10640
Guido van Rossumb93a8621998-05-07 13:27:32 +000010641fi
10642
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010643fi
10644
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010645
Michael W. Hudson54241132001-12-07 15:38:26 +000010646fi
10647
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010648
10649fi
10650
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010651fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010652rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10653fi;
10654fi
10655
10656
10657fi
10658
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010659
Michael W. Hudson54241132001-12-07 15:38:26 +000010660
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010661 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010662 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010663
10664cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010665#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010666_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010667
10668 fi
10669
Martin v. Löwis11437992002-04-12 09:54:03 +000010670 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10671echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10672 if test "${ac_cv_pthread_system_supported+set}" = set; then
10673 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010674else
10675 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010676 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010677else
Martin v. Löwis11437992002-04-12 09:54:03 +000010678 cat >conftest.$ac_ext <<_ACEOF
10679#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010680#include "confdefs.h"
10681#include <pthread.h>
10682 void *foo(void *parm) {
10683 return NULL;
10684 }
10685 main() {
10686 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010687 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010688 if (pthread_attr_init(&attr)) exit(-1);
10689 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010690 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010691 exit(0);
10692 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010693_ACEOF
10694rm -f conftest$ac_exeext
10695if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10696 (eval $ac_link) 2>&5
10697 ac_status=$?
10698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10699 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10701 (eval $ac_try) 2>&5
10702 ac_status=$?
10703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10704 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010705 ac_cv_pthread_system_supported=yes
10706else
Martin v. Löwis11437992002-04-12 09:54:03 +000010707 echo "$as_me: program exited with status $ac_status" >&5
10708echo "$as_me: failed program was:" >&5
10709cat conftest.$ac_ext >&5
10710( exit $ac_status )
10711ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010712fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010713rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010714fi
10715
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010716fi
10717
Martin v. Löwis11437992002-04-12 09:54:03 +000010718 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10719echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010720 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010721
10722cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010723#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010724_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010725
10726 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010727
10728for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010729do
Martin v. Löwis11437992002-04-12 09:54:03 +000010730as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10731echo "$as_me:$LINENO: checking for $ac_func" >&5
10732echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10733if eval "test \"\${$as_ac_var+set}\" = set"; then
10734 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010735else
Martin v. Löwis11437992002-04-12 09:54:03 +000010736 cat >conftest.$ac_ext <<_ACEOF
10737#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010738#include "confdefs.h"
10739/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010740 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010741#include <assert.h>
10742/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010743#ifdef __cplusplus
10744extern "C"
10745#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010746/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010747 builtin and then its argument prototype would still apply. */
10748char $ac_func ();
10749char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010750
Martin v. Löwis11437992002-04-12 09:54:03 +000010751#ifdef F77_DUMMY_MAIN
10752# ifdef __cplusplus
10753 extern "C"
10754# endif
10755 int F77_DUMMY_MAIN() { return 1; }
10756#endif
10757int
10758main ()
10759{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010760/* The GNU C library defines this for functions which it implements
10761 to always fail with ENOSYS. Some functions are actually named
10762 something starting with __ and the normal name is an alias. */
10763#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10764choke me
10765#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010766f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010767#endif
10768
Martin v. Löwis11437992002-04-12 09:54:03 +000010769 ;
10770 return 0;
10771}
10772_ACEOF
10773rm -f conftest.$ac_objext conftest$ac_exeext
10774if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10775 (eval $ac_link) 2>&5
10776 ac_status=$?
10777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10778 (exit $ac_status); } &&
10779 { ac_try='test -s conftest$ac_exeext'
10780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10781 (eval $ac_try) 2>&5
10782 ac_status=$?
10783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10784 (exit $ac_status); }; }; then
10785 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010786else
Martin v. Löwis11437992002-04-12 09:54:03 +000010787 echo "$as_me: failed program was:" >&5
10788cat conftest.$ac_ext >&5
10789eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010790fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010791rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010792fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010793echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10794echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10795if test `eval echo '${'$as_ac_var'}'` = yes; then
10796 cat >>confdefs.h <<_ACEOF
10797#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10798_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010799
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010800fi
10801done
10802
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010803 fi
10804
Martin v. Löwis11437992002-04-12 09:54:03 +000010805 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10806echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10807if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10808 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010809else
Martin v. Löwis11437992002-04-12 09:54:03 +000010810 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010811LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010812cat >conftest.$ac_ext <<_ACEOF
10813#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010814#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010815
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010816/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010817#ifdef __cplusplus
10818extern "C"
10819#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010820/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010821 builtin and then its argument prototype would still apply. */
10822char usconfig ();
10823#ifdef F77_DUMMY_MAIN
10824# ifdef __cplusplus
10825 extern "C"
10826# endif
10827 int F77_DUMMY_MAIN() { return 1; }
10828#endif
10829int
10830main ()
10831{
10832usconfig ();
10833 ;
10834 return 0;
10835}
10836_ACEOF
10837rm -f conftest.$ac_objext conftest$ac_exeext
10838if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10839 (eval $ac_link) 2>&5
10840 ac_status=$?
10841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10842 (exit $ac_status); } &&
10843 { ac_try='test -s conftest$ac_exeext'
10844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10845 (eval $ac_try) 2>&5
10846 ac_status=$?
10847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10848 (exit $ac_status); }; }; then
10849 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010850else
Martin v. Löwis11437992002-04-12 09:54:03 +000010851 echo "$as_me: failed program was:" >&5
10852cat conftest.$ac_ext >&5
10853ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010854fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010855rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10856LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010857fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010858echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10859echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10860if test $ac_cv_lib_mpc_usconfig = yes; then
10861 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010862#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010863_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010864
Martin v. Löwis130fb172001-07-19 11:00:41 +000010865 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010866 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010867 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010868fi
10869
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010870
Martin v. Löwis11437992002-04-12 09:54:03 +000010871 if test $posix_threads != "yes"; then
10872 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10873echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10874if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10875 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010876else
Martin v. Löwis11437992002-04-12 09:54:03 +000010877 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010878LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010879cat >conftest.$ac_ext <<_ACEOF
10880#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010881#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010882
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010883/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010884#ifdef __cplusplus
10885extern "C"
10886#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010887/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010888 builtin and then its argument prototype would still apply. */
10889char thr_create ();
10890#ifdef F77_DUMMY_MAIN
10891# ifdef __cplusplus
10892 extern "C"
10893# endif
10894 int F77_DUMMY_MAIN() { return 1; }
10895#endif
10896int
10897main ()
10898{
10899thr_create ();
10900 ;
10901 return 0;
10902}
10903_ACEOF
10904rm -f conftest.$ac_objext conftest$ac_exeext
10905if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10906 (eval $ac_link) 2>&5
10907 ac_status=$?
10908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10909 (exit $ac_status); } &&
10910 { ac_try='test -s conftest$ac_exeext'
10911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10912 (eval $ac_try) 2>&5
10913 ac_status=$?
10914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10915 (exit $ac_status); }; }; then
10916 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010917else
Martin v. Löwis11437992002-04-12 09:54:03 +000010918 echo "$as_me: failed program was:" >&5
10919cat conftest.$ac_ext >&5
10920ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010921fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010922rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10923LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010924fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010925echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10926echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10927if test $ac_cv_lib_thread_thr_create = yes; then
10928 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010929#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010930_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010931
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010932 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010933 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010934 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010935fi
10936
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010937 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010938
Martin v. Löwis130fb172001-07-19 11:00:41 +000010939 if test "$USE_THREAD_MODULE" != "#"
10940 then
10941 # If the above checks didn't disable threads, (at least) OSF1
10942 # needs this '-threads' argument during linking.
10943 case $ac_sys_system in
10944 OSF1) LDLAST=-threads;;
10945 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010946 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010947
10948 if test "$posix_threads" = yes -a \
10949 "$ac_sys_system" = "SunOS" -a \
10950 "$ac_sys_release" = "5.6"; then
10951
10952cat >>confdefs.h <<\_ACEOF
10953#define HAVE_PTHREAD_DESTRUCTOR 1
10954_ACEOF
10955
10956 fi
10957
Guido van Rossum627b2d71993-12-24 10:39:16 +000010958fi
10959
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010960# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010961
10962
10963echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10964echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010965# Check whether --enable-ipv6 or --disable-ipv6 was given.
10966if test "${enable_ipv6+set}" = set; then
10967 enableval="$enable_ipv6"
10968 case "$enableval" in
10969 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010970 echo "$as_me:$LINENO: result: no" >&5
10971echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010972 ipv6=no
10973 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010974 *) echo "$as_me:$LINENO: result: yes" >&5
10975echo "${ECHO_T}yes" >&6
10976 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010977#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010978_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010979
10980 ipv6=yes
10981 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010982 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010983else
Martin v. Löwis11437992002-04-12 09:54:03 +000010984
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010985 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010986 echo "$as_me:$LINENO: result: no" >&5
10987echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010988 ipv6=no
10989
10990else
Martin v. Löwis11437992002-04-12 09:54:03 +000010991 cat >conftest.$ac_ext <<_ACEOF
10992#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010993#include "confdefs.h"
10994 /* AF_INET6 available check */
10995#include <sys/types.h>
10996#include <sys/socket.h>
10997main()
10998{
10999 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11000 exit(1);
11001 else
11002 exit(0);
11003}
11004
Martin v. Löwis11437992002-04-12 09:54:03 +000011005_ACEOF
11006rm -f conftest$ac_exeext
11007if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11008 (eval $ac_link) 2>&5
11009 ac_status=$?
11010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11011 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11013 (eval $ac_try) 2>&5
11014 ac_status=$?
11015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11016 (exit $ac_status); }; }; then
11017 echo "$as_me:$LINENO: result: yes" >&5
11018echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011019 ipv6=yes
11020else
Martin v. Löwis11437992002-04-12 09:54:03 +000011021 echo "$as_me: program exited with status $ac_status" >&5
11022echo "$as_me: failed program was:" >&5
11023cat conftest.$ac_ext >&5
11024( exit $ac_status )
11025echo "$as_me:$LINENO: result: no" >&5
11026echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011027 ipv6=no
11028fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011029rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011030fi
11031
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011032if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011033 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11034echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11035 cat >conftest.$ac_ext <<_ACEOF
11036#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011037#include "confdefs.h"
11038#include <sys/types.h>
11039#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011040#ifdef F77_DUMMY_MAIN
11041# ifdef __cplusplus
11042 extern "C"
11043# endif
11044 int F77_DUMMY_MAIN() { return 1; }
11045#endif
11046int
11047main ()
11048{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011049struct sockaddr_in6 x;
11050x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011051 ;
11052 return 0;
11053}
11054_ACEOF
11055rm -f conftest.$ac_objext
11056if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11057 (eval $ac_compile) 2>&5
11058 ac_status=$?
11059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11060 (exit $ac_status); } &&
11061 { ac_try='test -s conftest.$ac_objext'
11062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11063 (eval $ac_try) 2>&5
11064 ac_status=$?
11065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11066 (exit $ac_status); }; }; then
11067 echo "$as_me:$LINENO: result: yes" >&5
11068echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011069 ipv6=yes
11070else
Martin v. Löwis11437992002-04-12 09:54:03 +000011071 echo "$as_me: failed program was:" >&5
11072cat conftest.$ac_ext >&5
11073echo "$as_me:$LINENO: result: no" >&5
11074echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011075 ipv6=no
11076fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011077rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011078fi
11079
11080if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011081 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011082#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011083_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011084
11085fi
11086
Martin v. Löwis11437992002-04-12 09:54:03 +000011087fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011088
11089ipv6type=unknown
11090ipv6lib=none
11091ipv6trylibc=no
11092
11093if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011094 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11095echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011096 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11097 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011098 case $i in
11099 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011100 cat >conftest.$ac_ext <<_ACEOF
11101#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011102#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011103
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011104#include <netinet/in.h>
11105#ifdef IPV6_INRIA_VERSION
11106yes
11107#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011108_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011109if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11110 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011111 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011112fi
11113rm -f conftest*
11114
11115 ;;
11116 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011117 cat >conftest.$ac_ext <<_ACEOF
11118#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011119#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011120
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011121#include <netinet/in.h>
11122#ifdef __KAME__
11123yes
11124#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011125_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011126if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11127 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011128 ipv6type=$i;
11129 ipv6lib=inet6
11130 ipv6libdir=/usr/local/v6/lib
11131 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011132fi
11133rm -f conftest*
11134
11135 ;;
11136 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011137 cat >conftest.$ac_ext <<_ACEOF
11138#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011139#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011140
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011141#include <features.h>
11142#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11143yes
11144#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011145_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011146if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11147 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011148 ipv6type=$i;
11149 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011150fi
11151rm -f conftest*
11152
11153 ;;
11154 linux-inet6)
11155 if test -d /usr/inet6; then
11156 ipv6type=$i
11157 ipv6lib=inet6
11158 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011159 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011160 fi
11161 ;;
11162 solaris)
11163 if test -f /etc/netconfig; then
11164 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11165 ipv6type=$i
11166 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011167 fi
11168 fi
11169 ;;
11170 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011171 cat >conftest.$ac_ext <<_ACEOF
11172#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011173#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011174
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011175#include <sys/param.h>
11176#ifdef _TOSHIBA_INET6
11177yes
11178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011179_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011180if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11181 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011182 ipv6type=$i;
11183 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011184 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011185fi
11186rm -f conftest*
11187
11188 ;;
11189 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011190 cat >conftest.$ac_ext <<_ACEOF
11191#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011192#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011193
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011194#include </usr/local/v6/include/sys/v6config.h>
11195#ifdef __V6D__
11196yes
11197#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011198_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011199if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11200 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011201 ipv6type=$i;
11202 ipv6lib=v6;
11203 ipv6libdir=/usr/local/v6/lib;
11204 OPT="-I/usr/local/v6/include $OPT"
11205fi
11206rm -f conftest*
11207
11208 ;;
11209 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011210 cat >conftest.$ac_ext <<_ACEOF
11211#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011212#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011213
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011214#include <sys/param.h>
11215#ifdef _ZETA_MINAMI_INET6
11216yes
11217#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011218_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011219if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11220 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011221 ipv6type=$i;
11222 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011223 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011224fi
11225rm -f conftest*
11226
11227 ;;
11228 esac
11229 if test "$ipv6type" != "unknown"; then
11230 break
11231 fi
11232 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011233 echo "$as_me:$LINENO: result: $ipv6type" >&5
11234echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011235fi
11236
11237if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11238 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11239 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11240 echo "using lib$ipv6lib"
11241 else
11242 if test $ipv6trylibc = "yes"; then
11243 echo "using libc"
11244 else
11245 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11246 echo "You need to fetch lib$ipv6lib.a from appropriate"
11247 echo 'ipv6 kit and compile beforehand.'
11248 exit 1
11249 fi
11250 fi
11251fi
11252
Jack Jansen7b8c7542002-04-14 20:12:41 +000011253# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011254echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11255echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011256
11257# Check whether --with-universal-newlines or --without-universal-newlines was given.
11258if test "${with_universal_newlines+set}" = set; then
11259 withval="$with_universal_newlines"
11260
11261fi;
11262
11263if test -z "$with_universal_newlines"
11264then with_universal_newlines="yes"
11265fi
11266if test "$with_universal_newlines" != "no"
11267then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011268
11269cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011270#define WITH_UNIVERSAL_NEWLINES 1
11271_ACEOF
11272
11273fi
11274echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11275echo "${ECHO_T}$with_universal_newlines" >&6
11276
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011277# Check for --with-doc-strings
11278echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11279echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11280
11281# Check whether --with-doc-strings or --without-doc-strings was given.
11282if test "${with_doc_strings+set}" = set; then
11283 withval="$with_doc_strings"
11284
11285fi;
11286
11287if test -z "$with_doc_strings"
11288then with_doc_strings="yes"
11289fi
11290if test "$with_doc_strings" != "no"
11291then
11292
11293cat >>confdefs.h <<\_ACEOF
11294#define WITH_DOC_STRINGS 1
11295_ACEOF
11296
11297fi
11298echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11299echo "${ECHO_T}$with_doc_strings" >&6
11300
Neil Schemenauera35c6882001-02-27 04:45:05 +000011301# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011302echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11303echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11304
Neil Schemenauera35c6882001-02-27 04:45:05 +000011305# Check whether --with-pymalloc or --without-pymalloc was given.
11306if test "${with_pymalloc+set}" = set; then
11307 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011308
Martin v. Löwis11437992002-04-12 09:54:03 +000011309fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011310
Neil Schemenauer16c22972002-03-22 15:34:49 +000011311if test -z "$with_pymalloc"
11312then with_pymalloc="yes"
11313fi
11314if test "$with_pymalloc" != "no"
11315then
Martin v. Löwis11437992002-04-12 09:54:03 +000011316
11317cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011318#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011319_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011320
11321fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011322echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11323echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011324
Barry Warsawef82cd72000-06-30 16:21:01 +000011325# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011326echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11327echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11328
Barry Warsawef82cd72000-06-30 16:21:01 +000011329# Check whether --with-wctype-functions or --without-wctype-functions was given.
11330if test "${with_wctype_functions+set}" = set; then
11331 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011332
Barry Warsawef82cd72000-06-30 16:21:01 +000011333if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011334then
11335
11336cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011337#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011338_ACEOF
11339
11340 echo "$as_me:$LINENO: result: yes" >&5
11341echo "${ECHO_T}yes" >&6
11342else echo "$as_me:$LINENO: result: no" >&5
11343echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011344fi
11345else
Martin v. Löwis11437992002-04-12 09:54:03 +000011346 echo "$as_me:$LINENO: result: no" >&5
11347echo "${ECHO_T}no" >&6
11348fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011349
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011350# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011351
Guido van Rossum98935bf2001-09-05 19:13:16 +000011352DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011353
Martin v. Löwis11437992002-04-12 09:54:03 +000011354echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11355echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11356
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011357# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011358if test "${with_sgi_dl+set}" = set; then
11359 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011360
11361echo "$as_me:$LINENO: result: $withval" >&5
11362echo "${ECHO_T}$withval" >&6
11363
11364cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011365#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011366_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011367
Guido van Rossume97ee181999-12-20 21:27:22 +000011368DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011369dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011370if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011371then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011372else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11373echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11374 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011375fi
11376DLINCLDIR=${dldir}
11377LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011378else
Martin v. Löwis11437992002-04-12 09:54:03 +000011379 echo "$as_me:$LINENO: result: no" >&5
11380echo "${ECHO_T}no" >&6
11381fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011382
Martin v. Löwis11437992002-04-12 09:54:03 +000011383echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11384echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011385
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011386# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011387if test "${with_dl_dld+set}" = set; then
11388 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011389
11390echo "$as_me:$LINENO: result: $withval" >&5
11391echo "${ECHO_T}$withval" >&6
11392
11393cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011394#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011395_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011396
Guido van Rossume97ee181999-12-20 21:27:22 +000011397DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011398dldir=`echo "$withval" | sed 's/,.*//'`
11399dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011400if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011401then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011402else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11403echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11404 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011405fi
11406DLINCLDIR=${dldir}
11407LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011408else
Martin v. Löwis11437992002-04-12 09:54:03 +000011409 echo "$as_me:$LINENO: result: no" >&5
11410echo "${ECHO_T}no" >&6
11411fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011412
Guido van Rossume97ee181999-12-20 21:27:22 +000011413# the dlopen() function means we might want to use dynload_shlib.o. some
11414# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011415
Thomas Wouters3a584202000-08-05 23:28:51 +000011416for ac_func in dlopen
11417do
Martin v. Löwis11437992002-04-12 09:54:03 +000011418as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11419echo "$as_me:$LINENO: checking for $ac_func" >&5
11420echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11421if eval "test \"\${$as_ac_var+set}\" = set"; then
11422 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011423else
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 cat >conftest.$ac_ext <<_ACEOF
11425#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011426#include "confdefs.h"
11427/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011428 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011429#include <assert.h>
11430/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011431#ifdef __cplusplus
11432extern "C"
11433#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011434/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011435 builtin and then its argument prototype would still apply. */
11436char $ac_func ();
11437char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011438
Martin v. Löwis11437992002-04-12 09:54:03 +000011439#ifdef F77_DUMMY_MAIN
11440# ifdef __cplusplus
11441 extern "C"
11442# endif
11443 int F77_DUMMY_MAIN() { return 1; }
11444#endif
11445int
11446main ()
11447{
Guido van Rossume97ee181999-12-20 21:27:22 +000011448/* The GNU C library defines this for functions which it implements
11449 to always fail with ENOSYS. Some functions are actually named
11450 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011451#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011452choke me
11453#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011454f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011455#endif
11456
Martin v. Löwis11437992002-04-12 09:54:03 +000011457 ;
11458 return 0;
11459}
11460_ACEOF
11461rm -f conftest.$ac_objext conftest$ac_exeext
11462if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11463 (eval $ac_link) 2>&5
11464 ac_status=$?
11465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11466 (exit $ac_status); } &&
11467 { ac_try='test -s conftest$ac_exeext'
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 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011474else
Martin v. Löwis11437992002-04-12 09:54:03 +000011475 echo "$as_me: failed program was:" >&5
11476cat conftest.$ac_ext >&5
11477eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011478fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011479rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011480fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011481echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11482echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11483if test `eval echo '${'$as_ac_var'}'` = yes; then
11484 cat >>confdefs.h <<_ACEOF
11485#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11486_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011487
Guido van Rossume97ee181999-12-20 21:27:22 +000011488fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011489done
Guido van Rossume97ee181999-12-20 21:27:22 +000011490
Michael W. Hudson54241132001-12-07 15:38:26 +000011491
Guido van Rossume97ee181999-12-20 21:27:22 +000011492# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11493# loading of modules.
11494
Martin v. Löwis11437992002-04-12 09:54:03 +000011495echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11496echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011497if test -z "$DYNLOADFILE"
11498then
11499 case $ac_sys_system/$ac_sys_release in
11500 AIX*) DYNLOADFILE="dynload_aix.o";;
11501 BeOS*) DYNLOADFILE="dynload_beos.o";;
11502 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011503 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011504 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011505 *)
11506 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11507 # out any dynamic loading
11508 if test "$ac_cv_func_dlopen" = yes
11509 then DYNLOADFILE="dynload_shlib.o"
11510 else DYNLOADFILE="dynload_stub.o"
11511 fi
11512 ;;
11513 esac
11514fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011515echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11516echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011517if test "$DYNLOADFILE" != "dynload_stub.o"
11518then
Martin v. Löwis11437992002-04-12 09:54:03 +000011519
11520cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011521#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011522_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011523
11524fi
11525
Neil Schemenauer4e425612001-06-19 15:44:15 +000011526# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11527
Michael W. Hudson54241132001-12-07 15:38:26 +000011528
Martin v. Löwis11437992002-04-12 09:54:03 +000011529echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11530echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011531if test -z "$MACHDEP_OBJS"
11532then
Jack Jansene578a632001-08-15 01:27:14 +000011533 MACHDEP_OBJS=$extra_machdep_objs
11534else
11535 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011536fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011537echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11538echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011539
Guido van Rossum627b2d71993-12-24 10:39:16 +000011540# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011614
Fred Drake6b3cc522002-04-15 19:20:27 +000011615
Jack Jansen0b06be72002-06-21 14:48:38 +000011616
Martin v. Löwis0cec0ff2002-07-28 16:33:45 +000011617
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011618
Martin v. Löwis244edc82001-10-04 22:44:26 +000011619for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011620 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011621 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwis0cec0ff2002-07-28 16:33:45 +000011622 hstrerror inet_pton kill killpg lchown link lstat mkfifo mknod mktime \
11623 mremap nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011624 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011625 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011626 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011627 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011628 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011629 truncate uname unsetenv utimes waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011630do
Martin v. Löwis11437992002-04-12 09:54:03 +000011631as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11632echo "$as_me:$LINENO: checking for $ac_func" >&5
11633echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11634if eval "test \"\${$as_ac_var+set}\" = set"; then
11635 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011636else
Martin v. Löwis11437992002-04-12 09:54:03 +000011637 cat >conftest.$ac_ext <<_ACEOF
11638#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011639#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011640/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011641 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011642#include <assert.h>
11643/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011644#ifdef __cplusplus
11645extern "C"
11646#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011647/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011648 builtin and then its argument prototype would still apply. */
11649char $ac_func ();
11650char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011651
Martin v. Löwis11437992002-04-12 09:54:03 +000011652#ifdef F77_DUMMY_MAIN
11653# ifdef __cplusplus
11654 extern "C"
11655# endif
11656 int F77_DUMMY_MAIN() { return 1; }
11657#endif
11658int
11659main ()
11660{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011661/* The GNU C library defines this for functions which it implements
11662 to always fail with ENOSYS. Some functions are actually named
11663 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011664#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011665choke me
11666#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011667f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011668#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011669
Martin v. Löwis11437992002-04-12 09:54:03 +000011670 ;
11671 return 0;
11672}
11673_ACEOF
11674rm -f conftest.$ac_objext conftest$ac_exeext
11675if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11676 (eval $ac_link) 2>&5
11677 ac_status=$?
11678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11679 (exit $ac_status); } &&
11680 { ac_try='test -s conftest$ac_exeext'
11681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11682 (eval $ac_try) 2>&5
11683 ac_status=$?
11684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11685 (exit $ac_status); }; }; then
11686 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011687else
Martin v. Löwis11437992002-04-12 09:54:03 +000011688 echo "$as_me: failed program was:" >&5
11689cat conftest.$ac_ext >&5
11690eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011691fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011692rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011693fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011694echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11695echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11696if test `eval echo '${'$as_ac_var'}'` = yes; then
11697 cat >>confdefs.h <<_ACEOF
11698#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11699_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011700
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011701fi
11702done
11703
Michael W. Hudson54241132001-12-07 15:38:26 +000011704
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011705# check for openpty and forkpty
11706
Martin v. Löwis11437992002-04-12 09:54:03 +000011707
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011708for ac_func in openpty
11709do
Martin v. Löwis11437992002-04-12 09:54:03 +000011710as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11711echo "$as_me:$LINENO: checking for $ac_func" >&5
11712echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11713if eval "test \"\${$as_ac_var+set}\" = set"; then
11714 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011715else
Martin v. Löwis11437992002-04-12 09:54:03 +000011716 cat >conftest.$ac_ext <<_ACEOF
11717#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011718#include "confdefs.h"
11719/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011720 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011721#include <assert.h>
11722/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011723#ifdef __cplusplus
11724extern "C"
11725#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011726/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011727 builtin and then its argument prototype would still apply. */
11728char $ac_func ();
11729char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011730
Martin v. Löwis11437992002-04-12 09:54:03 +000011731#ifdef F77_DUMMY_MAIN
11732# ifdef __cplusplus
11733 extern "C"
11734# endif
11735 int F77_DUMMY_MAIN() { return 1; }
11736#endif
11737int
11738main ()
11739{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011740/* The GNU C library defines this for functions which it implements
11741 to always fail with ENOSYS. Some functions are actually named
11742 something starting with __ and the normal name is an alias. */
11743#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11744choke me
11745#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011746f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011747#endif
11748
Martin v. Löwis11437992002-04-12 09:54:03 +000011749 ;
11750 return 0;
11751}
11752_ACEOF
11753rm -f conftest.$ac_objext conftest$ac_exeext
11754if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11755 (eval $ac_link) 2>&5
11756 ac_status=$?
11757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11758 (exit $ac_status); } &&
11759 { ac_try='test -s conftest$ac_exeext'
11760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11761 (eval $ac_try) 2>&5
11762 ac_status=$?
11763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11764 (exit $ac_status); }; }; then
11765 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011766else
Martin v. Löwis11437992002-04-12 09:54:03 +000011767 echo "$as_me: failed program was:" >&5
11768cat conftest.$ac_ext >&5
11769eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011770fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011771rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011772fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011773echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11774echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11775if test `eval echo '${'$as_ac_var'}'` = yes; then
11776 cat >>confdefs.h <<_ACEOF
11777#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11778_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011779
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011780else
Martin v. Löwis11437992002-04-12 09:54:03 +000011781 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11782echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11783if test "${ac_cv_lib_util_openpty+set}" = set; then
11784 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011785else
Martin v. Löwis11437992002-04-12 09:54:03 +000011786 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011787LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011788cat >conftest.$ac_ext <<_ACEOF
11789#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011790#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011791
Fred Drake8cef4cf2000-06-28 16:40:38 +000011792/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011793#ifdef __cplusplus
11794extern "C"
11795#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011796/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011797 builtin and then its argument prototype would still apply. */
11798char openpty ();
11799#ifdef F77_DUMMY_MAIN
11800# ifdef __cplusplus
11801 extern "C"
11802# endif
11803 int F77_DUMMY_MAIN() { return 1; }
11804#endif
11805int
11806main ()
11807{
11808openpty ();
11809 ;
11810 return 0;
11811}
11812_ACEOF
11813rm -f conftest.$ac_objext conftest$ac_exeext
11814if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11815 (eval $ac_link) 2>&5
11816 ac_status=$?
11817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11818 (exit $ac_status); } &&
11819 { ac_try='test -s conftest$ac_exeext'
11820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11821 (eval $ac_try) 2>&5
11822 ac_status=$?
11823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11824 (exit $ac_status); }; }; then
11825 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011826else
Martin v. Löwis11437992002-04-12 09:54:03 +000011827 echo "$as_me: failed program was:" >&5
11828cat conftest.$ac_ext >&5
11829ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011830fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011831rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11832LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011833fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011834echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11835echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11836if test $ac_cv_lib_util_openpty = yes; then
11837 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011838#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011839_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011840 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011841fi
11842
11843fi
11844done
11845
Martin v. Löwis11437992002-04-12 09:54:03 +000011846
Fred Drake8cef4cf2000-06-28 16:40:38 +000011847for ac_func in forkpty
11848do
Martin v. Löwis11437992002-04-12 09:54:03 +000011849as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11850echo "$as_me:$LINENO: checking for $ac_func" >&5
11851echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11852if eval "test \"\${$as_ac_var+set}\" = set"; then
11853 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011854else
Martin v. Löwis11437992002-04-12 09:54:03 +000011855 cat >conftest.$ac_ext <<_ACEOF
11856#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011857#include "confdefs.h"
11858/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011859 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011860#include <assert.h>
11861/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011862#ifdef __cplusplus
11863extern "C"
11864#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011865/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011866 builtin and then its argument prototype would still apply. */
11867char $ac_func ();
11868char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011869
Martin v. Löwis11437992002-04-12 09:54:03 +000011870#ifdef F77_DUMMY_MAIN
11871# ifdef __cplusplus
11872 extern "C"
11873# endif
11874 int F77_DUMMY_MAIN() { return 1; }
11875#endif
11876int
11877main ()
11878{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011879/* The GNU C library defines this for functions which it implements
11880 to always fail with ENOSYS. Some functions are actually named
11881 something starting with __ and the normal name is an alias. */
11882#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11883choke me
11884#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011885f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011886#endif
11887
Martin v. Löwis11437992002-04-12 09:54:03 +000011888 ;
11889 return 0;
11890}
11891_ACEOF
11892rm -f conftest.$ac_objext conftest$ac_exeext
11893if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11894 (eval $ac_link) 2>&5
11895 ac_status=$?
11896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11897 (exit $ac_status); } &&
11898 { ac_try='test -s conftest$ac_exeext'
11899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11900 (eval $ac_try) 2>&5
11901 ac_status=$?
11902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11903 (exit $ac_status); }; }; then
11904 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011905else
Martin v. Löwis11437992002-04-12 09:54:03 +000011906 echo "$as_me: failed program was:" >&5
11907cat conftest.$ac_ext >&5
11908eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011909fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011910rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011911fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011912echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11913echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11914if test `eval echo '${'$as_ac_var'}'` = yes; then
11915 cat >>confdefs.h <<_ACEOF
11916#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11917_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011918
Fred Drake8cef4cf2000-06-28 16:40:38 +000011919else
Martin v. Löwis11437992002-04-12 09:54:03 +000011920 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11921echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11922if test "${ac_cv_lib_util_forkpty+set}" = set; then
11923 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011924else
Martin v. Löwis11437992002-04-12 09:54:03 +000011925 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011926LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011927cat >conftest.$ac_ext <<_ACEOF
11928#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011929#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011930
Fred Drake8cef4cf2000-06-28 16:40:38 +000011931/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011932#ifdef __cplusplus
11933extern "C"
11934#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011935/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011936 builtin and then its argument prototype would still apply. */
11937char forkpty ();
11938#ifdef F77_DUMMY_MAIN
11939# ifdef __cplusplus
11940 extern "C"
11941# endif
11942 int F77_DUMMY_MAIN() { return 1; }
11943#endif
11944int
11945main ()
11946{
11947forkpty ();
11948 ;
11949 return 0;
11950}
11951_ACEOF
11952rm -f conftest.$ac_objext conftest$ac_exeext
11953if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11954 (eval $ac_link) 2>&5
11955 ac_status=$?
11956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11957 (exit $ac_status); } &&
11958 { ac_try='test -s conftest$ac_exeext'
11959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11960 (eval $ac_try) 2>&5
11961 ac_status=$?
11962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11963 (exit $ac_status); }; }; then
11964 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011965else
Martin v. Löwis11437992002-04-12 09:54:03 +000011966 echo "$as_me: failed program was:" >&5
11967cat conftest.$ac_ext >&5
11968ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011969fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011970rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11971LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011972fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011973echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11974echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11975if test $ac_cv_lib_util_forkpty = yes; then
11976 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011977#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011978_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011979 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011980fi
11981
11982fi
11983done
11984
Jack Jansendd19cf82001-12-06 22:36:17 +000011985
Michael W. Hudson54241132001-12-07 15:38:26 +000011986# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011987
11988
11989
11990
11991
11992
Fred Drake8cef4cf2000-06-28 16:40:38 +000011993for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11994do
Martin v. Löwis11437992002-04-12 09:54:03 +000011995as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11996echo "$as_me:$LINENO: checking for $ac_func" >&5
11997echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11998if eval "test \"\${$as_ac_var+set}\" = set"; then
11999 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012000else
Martin v. Löwis11437992002-04-12 09:54:03 +000012001 cat >conftest.$ac_ext <<_ACEOF
12002#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012003#include "confdefs.h"
12004/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012005 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012006#include <assert.h>
12007/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012008#ifdef __cplusplus
12009extern "C"
12010#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012011/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012012 builtin and then its argument prototype would still apply. */
12013char $ac_func ();
12014char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012015
Martin v. Löwis11437992002-04-12 09:54:03 +000012016#ifdef F77_DUMMY_MAIN
12017# ifdef __cplusplus
12018 extern "C"
12019# endif
12020 int F77_DUMMY_MAIN() { return 1; }
12021#endif
12022int
12023main ()
12024{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012025/* The GNU C library defines this for functions which it implements
12026 to always fail with ENOSYS. Some functions are actually named
12027 something starting with __ and the normal name is an alias. */
12028#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12029choke me
12030#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012031f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012032#endif
12033
Martin v. Löwis11437992002-04-12 09:54:03 +000012034 ;
12035 return 0;
12036}
12037_ACEOF
12038rm -f conftest.$ac_objext conftest$ac_exeext
12039if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12040 (eval $ac_link) 2>&5
12041 ac_status=$?
12042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12043 (exit $ac_status); } &&
12044 { ac_try='test -s conftest$ac_exeext'
12045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12046 (eval $ac_try) 2>&5
12047 ac_status=$?
12048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12049 (exit $ac_status); }; }; then
12050 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012051else
Martin v. Löwis11437992002-04-12 09:54:03 +000012052 echo "$as_me: failed program was:" >&5
12053cat conftest.$ac_ext >&5
12054eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012055fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012056rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012057fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012058echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12059echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12060if test `eval echo '${'$as_ac_var'}'` = yes; then
12061 cat >>confdefs.h <<_ACEOF
12062#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12063_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012064
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012065fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012066done
12067
Michael W. Hudson54241132001-12-07 15:38:26 +000012068
Martin v. Löwis11437992002-04-12 09:54:03 +000012069
12070
12071
12072
12073
Martin v. Löwis1142de32002-03-29 16:28:31 +000012074for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000012075do
Martin v. Löwis11437992002-04-12 09:54:03 +000012076as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12077echo "$as_me:$LINENO: checking for $ac_func" >&5
12078echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12079if eval "test \"\${$as_ac_var+set}\" = set"; then
12080 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012081else
Martin v. Löwis11437992002-04-12 09:54:03 +000012082 cat >conftest.$ac_ext <<_ACEOF
12083#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012084#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012085/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012086 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012087#include <assert.h>
12088/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012089#ifdef __cplusplus
12090extern "C"
12091#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012092/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012093 builtin and then its argument prototype would still apply. */
12094char $ac_func ();
12095char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012096
Martin v. Löwis11437992002-04-12 09:54:03 +000012097#ifdef F77_DUMMY_MAIN
12098# ifdef __cplusplus
12099 extern "C"
12100# endif
12101 int F77_DUMMY_MAIN() { return 1; }
12102#endif
12103int
12104main ()
12105{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012106/* The GNU C library defines this for functions which it implements
12107 to always fail with ENOSYS. Some functions are actually named
12108 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012109#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012110choke me
12111#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012112f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012113#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012114
Martin v. Löwis11437992002-04-12 09:54:03 +000012115 ;
12116 return 0;
12117}
12118_ACEOF
12119rm -f conftest.$ac_objext conftest$ac_exeext
12120if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12121 (eval $ac_link) 2>&5
12122 ac_status=$?
12123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12124 (exit $ac_status); } &&
12125 { ac_try='test -s conftest$ac_exeext'
12126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12127 (eval $ac_try) 2>&5
12128 ac_status=$?
12129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12130 (exit $ac_status); }; }; then
12131 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012132else
Martin v. Löwis11437992002-04-12 09:54:03 +000012133 echo "$as_me: failed program was:" >&5
12134cat conftest.$ac_ext >&5
12135eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012137rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000012138fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012139echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12140echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12141if test `eval echo '${'$as_ac_var'}'` = yes; then
12142 cat >>confdefs.h <<_ACEOF
12143#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12144_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000012145
Martin v. Löwis1142de32002-03-29 16:28:31 +000012146else
Martin v. Löwis11437992002-04-12 09:54:03 +000012147 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012148fi
12149done
12150
12151
Martin v. Löwis11437992002-04-12 09:54:03 +000012152
Martin v. Löwis1142de32002-03-29 16:28:31 +000012153for ac_func in getpgrp
12154do
Martin v. Löwis11437992002-04-12 09:54:03 +000012155as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12156echo "$as_me:$LINENO: checking for $ac_func" >&5
12157echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12158if eval "test \"\${$as_ac_var+set}\" = set"; then
12159 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000012160else
Martin v. Löwis11437992002-04-12 09:54:03 +000012161 cat >conftest.$ac_ext <<_ACEOF
12162#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012163#include "confdefs.h"
12164/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012165 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000012166#include <assert.h>
12167/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012168#ifdef __cplusplus
12169extern "C"
12170#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012171/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012172 builtin and then its argument prototype would still apply. */
12173char $ac_func ();
12174char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012175
Martin v. Löwis11437992002-04-12 09:54:03 +000012176#ifdef F77_DUMMY_MAIN
12177# ifdef __cplusplus
12178 extern "C"
12179# endif
12180 int F77_DUMMY_MAIN() { return 1; }
12181#endif
12182int
12183main ()
12184{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012185/* The GNU C library defines this for functions which it implements
12186 to always fail with ENOSYS. Some functions are actually named
12187 something starting with __ and the normal name is an alias. */
12188#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12189choke me
12190#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012191f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012192#endif
12193
Martin v. Löwis11437992002-04-12 09:54:03 +000012194 ;
12195 return 0;
12196}
12197_ACEOF
12198rm -f conftest.$ac_objext conftest$ac_exeext
12199if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12200 (eval $ac_link) 2>&5
12201 ac_status=$?
12202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12203 (exit $ac_status); } &&
12204 { ac_try='test -s conftest$ac_exeext'
12205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12206 (eval $ac_try) 2>&5
12207 ac_status=$?
12208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12209 (exit $ac_status); }; }; then
12210 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012211else
Martin v. Löwis11437992002-04-12 09:54:03 +000012212 echo "$as_me: failed program was:" >&5
12213cat conftest.$ac_ext >&5
12214eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012215fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012216rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012217fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012218echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12219echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12220if test `eval echo '${'$as_ac_var'}'` = yes; then
12221 cat >>confdefs.h <<_ACEOF
12222#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12223_ACEOF
12224 cat >conftest.$ac_ext <<_ACEOF
12225#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012226#include "confdefs.h"
12227#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012228#ifdef F77_DUMMY_MAIN
12229# ifdef __cplusplus
12230 extern "C"
12231# endif
12232 int F77_DUMMY_MAIN() { return 1; }
12233#endif
12234int
12235main ()
12236{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012237getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012238 ;
12239 return 0;
12240}
12241_ACEOF
12242rm -f conftest.$ac_objext
12243if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12244 (eval $ac_compile) 2>&5
12245 ac_status=$?
12246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12247 (exit $ac_status); } &&
12248 { ac_try='test -s conftest.$ac_objext'
12249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12250 (eval $ac_try) 2>&5
12251 ac_status=$?
12252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12253 (exit $ac_status); }; }; then
12254
12255cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012256#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012257_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012258
Martin v. Löwis11437992002-04-12 09:54:03 +000012259
Guido van Rossumf78abae1997-01-21 22:02:36 +000012260else
Martin v. Löwis11437992002-04-12 09:54:03 +000012261 echo "$as_me: failed program was:" >&5
12262cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012263fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012264rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012265
Guido van Rossum627b2d71993-12-24 10:39:16 +000012266fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012267done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012268
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012269echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12270echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12271if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012272 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012273else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012274 if test "$cross_compiling" = yes; then
12275 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12276echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12277 { (exit 1); exit 1; }; }
12278else
Martin v. Löwis11437992002-04-12 09:54:03 +000012279 cat >conftest.$ac_ext <<_ACEOF
12280#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012281#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012282#if HAVE_UNISTD_H
12283# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012284#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012285
Martin v. Löwis11437992002-04-12 09:54:03 +000012286#ifdef F77_DUMMY_MAIN
12287# ifdef __cplusplus
12288 extern "C"
12289# endif
12290 int F77_DUMMY_MAIN() { return 1; }
12291#endif
12292int
12293main ()
12294{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012295/* If this system has a BSD-style setpgrp which takes arguments,
12296 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12297 exit successfully. */
12298 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012299 ;
12300 return 0;
12301}
12302_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012303rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012304if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12305 (eval $ac_link) 2>&5
12306 ac_status=$?
12307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012308 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12310 (eval $ac_try) 2>&5
12311 ac_status=$?
12312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12313 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012314 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012315else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012316 echo "$as_me: program exited with status $ac_status" >&5
12317echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012318cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012319( exit $ac_status )
12320ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012321fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012322rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012323fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012324fi
12325echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12326echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12327if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012328
12329cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012330#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012331_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012332
12333fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012334
Martin v. Löwis11437992002-04-12 09:54:03 +000012335
Thomas Wouters3a584202000-08-05 23:28:51 +000012336for ac_func in gettimeofday
12337do
Martin v. Löwis11437992002-04-12 09:54:03 +000012338as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12339echo "$as_me:$LINENO: checking for $ac_func" >&5
12340echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12341if eval "test \"\${$as_ac_var+set}\" = set"; then
12342 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012343else
Martin v. Löwis11437992002-04-12 09:54:03 +000012344 cat >conftest.$ac_ext <<_ACEOF
12345#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012346#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012347/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012348 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012349#include <assert.h>
12350/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012351#ifdef __cplusplus
12352extern "C"
12353#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012354/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012355 builtin and then its argument prototype would still apply. */
12356char $ac_func ();
12357char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012358
Martin v. Löwis11437992002-04-12 09:54:03 +000012359#ifdef F77_DUMMY_MAIN
12360# ifdef __cplusplus
12361 extern "C"
12362# endif
12363 int F77_DUMMY_MAIN() { return 1; }
12364#endif
12365int
12366main ()
12367{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012368/* The GNU C library defines this for functions which it implements
12369 to always fail with ENOSYS. Some functions are actually named
12370 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012371#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012372choke me
12373#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012374f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012375#endif
12376
Martin v. Löwis11437992002-04-12 09:54:03 +000012377 ;
12378 return 0;
12379}
12380_ACEOF
12381rm -f conftest.$ac_objext conftest$ac_exeext
12382if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12383 (eval $ac_link) 2>&5
12384 ac_status=$?
12385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12386 (exit $ac_status); } &&
12387 { ac_try='test -s conftest$ac_exeext'
12388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12389 (eval $ac_try) 2>&5
12390 ac_status=$?
12391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12392 (exit $ac_status); }; }; then
12393 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012394else
Martin v. Löwis11437992002-04-12 09:54:03 +000012395 echo "$as_me: failed program was:" >&5
12396cat conftest.$ac_ext >&5
12397eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012398fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012399rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012400fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012401echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12402echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12403if test `eval echo '${'$as_ac_var'}'` = yes; then
12404 cat >>confdefs.h <<_ACEOF
12405#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12406_ACEOF
12407 cat >conftest.$ac_ext <<_ACEOF
12408#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012409#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012410#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012411#ifdef F77_DUMMY_MAIN
12412# ifdef __cplusplus
12413 extern "C"
12414# endif
12415 int F77_DUMMY_MAIN() { return 1; }
12416#endif
12417int
12418main ()
12419{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012420gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012421 ;
12422 return 0;
12423}
12424_ACEOF
12425rm -f conftest.$ac_objext
12426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12427 (eval $ac_compile) 2>&5
12428 ac_status=$?
12429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12430 (exit $ac_status); } &&
12431 { ac_try='test -s conftest.$ac_objext'
12432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12433 (eval $ac_try) 2>&5
12434 ac_status=$?
12435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12436 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012437 :
12438else
Martin v. Löwis11437992002-04-12 09:54:03 +000012439 echo "$as_me: failed program was:" >&5
12440cat conftest.$ac_ext >&5
12441
12442cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012443#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012444_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012445
Martin v. Löwis11437992002-04-12 09:54:03 +000012446
Guido van Rossum627b2d71993-12-24 10:39:16 +000012447fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012448rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012449
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012450fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012451done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012452
Michael W. Hudson54241132001-12-07 15:38:26 +000012453
12454
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012455# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012456# for [no]getaddrinfo in netdb.h.
12457echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12458echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12459cat >conftest.$ac_ext <<_ACEOF
12460#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012461#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012462
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012463#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012464#include <sys/socket.h>
12465#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012466#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012467
Martin v. Löwis11437992002-04-12 09:54:03 +000012468#ifdef F77_DUMMY_MAIN
12469# ifdef __cplusplus
12470 extern "C"
12471# endif
12472 int F77_DUMMY_MAIN() { return 1; }
12473#endif
12474int
12475main ()
12476{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012477
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012478getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012479
Martin v. Löwis11437992002-04-12 09:54:03 +000012480 ;
12481 return 0;
12482}
12483_ACEOF
12484rm -f conftest.$ac_objext conftest$ac_exeext
12485if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12486 (eval $ac_link) 2>&5
12487 ac_status=$?
12488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12489 (exit $ac_status); } &&
12490 { ac_try='test -s conftest$ac_exeext'
12491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12492 (eval $ac_try) 2>&5
12493 ac_status=$?
12494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12495 (exit $ac_status); }; }; then
12496
12497echo "$as_me:$LINENO: result: yes" >&5
12498echo "${ECHO_T}yes" >&6
12499echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12500echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012501if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012502 echo "$as_me:$LINENO: result: buggy" >&5
12503echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012504buggygetaddrinfo=yes
12505else
Martin v. Löwis11437992002-04-12 09:54:03 +000012506 cat >conftest.$ac_ext <<_ACEOF
12507#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012508#include "confdefs.h"
12509
12510#include <sys/types.h>
12511#include <netdb.h>
12512#include <string.h>
12513#include <sys/socket.h>
12514#include <netinet/in.h>
12515
12516main()
12517{
12518 int passive, gaierr, inet4 = 0, inet6 = 0;
12519 struct addrinfo hints, *ai, *aitop;
12520 char straddr[INET6_ADDRSTRLEN], strport[16];
12521
12522 for (passive = 0; passive <= 1; passive++) {
12523 memset(&hints, 0, sizeof(hints));
12524 hints.ai_family = AF_UNSPEC;
12525 hints.ai_flags = passive ? AI_PASSIVE : 0;
12526 hints.ai_socktype = SOCK_STREAM;
12527 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12528 (void)gai_strerror(gaierr);
12529 goto bad;
12530 }
12531 for (ai = aitop; ai; ai = ai->ai_next) {
12532 if (ai->ai_addr == NULL ||
12533 ai->ai_addrlen == 0 ||
12534 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12535 straddr, sizeof(straddr), strport, sizeof(strport),
12536 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12537 goto bad;
12538 }
12539 switch (ai->ai_family) {
12540 case AF_INET:
12541 if (strcmp(strport, "54321") != 0) {
12542 goto bad;
12543 }
12544 if (passive) {
12545 if (strcmp(straddr, "0.0.0.0") != 0) {
12546 goto bad;
12547 }
12548 } else {
12549 if (strcmp(straddr, "127.0.0.1") != 0) {
12550 goto bad;
12551 }
12552 }
12553 inet4++;
12554 break;
12555 case AF_INET6:
12556 if (strcmp(strport, "54321") != 0) {
12557 goto bad;
12558 }
12559 if (passive) {
12560 if (strcmp(straddr, "::") != 0) {
12561 goto bad;
12562 }
12563 } else {
12564 if (strcmp(straddr, "::1") != 0) {
12565 goto bad;
12566 }
12567 }
12568 inet6++;
12569 break;
12570 case AF_UNSPEC:
12571 goto bad;
12572 break;
12573 default:
12574 /* another family support? */
12575 break;
12576 }
12577 }
12578 }
12579
12580 if (!(inet4 == 0 || inet4 == 2))
12581 goto bad;
12582 if (!(inet6 == 0 || inet6 == 2))
12583 goto bad;
12584
12585 if (aitop)
12586 freeaddrinfo(aitop);
12587 exit(0);
12588
12589 bad:
12590 if (aitop)
12591 freeaddrinfo(aitop);
12592 exit(1);
12593}
12594
Martin v. Löwis11437992002-04-12 09:54:03 +000012595_ACEOF
12596rm -f conftest$ac_exeext
12597if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12598 (eval $ac_link) 2>&5
12599 ac_status=$?
12600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12601 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12603 (eval $ac_try) 2>&5
12604 ac_status=$?
12605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12606 (exit $ac_status); }; }; then
12607 echo "$as_me:$LINENO: result: good" >&5
12608echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012609buggygetaddrinfo=no
12610else
Martin v. Löwis11437992002-04-12 09:54:03 +000012611 echo "$as_me: program exited with status $ac_status" >&5
12612echo "$as_me: failed program was:" >&5
12613cat conftest.$ac_ext >&5
12614( exit $ac_status )
12615echo "$as_me:$LINENO: result: buggy" >&5
12616echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012617buggygetaddrinfo=yes
12618fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012619rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012620fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012621else
Martin v. Löwis11437992002-04-12 09:54:03 +000012622 echo "$as_me: failed program was:" >&5
12623cat conftest.$ac_ext >&5
12624
12625echo "$as_me:$LINENO: result: no" >&5
12626echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012627buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012628
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012629fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012630rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012631
12632if test "$buggygetaddrinfo" = "yes"; then
12633 if test "$ipv6" = "yes"; then
12634 echo 'Fatal: You must get working getaddrinfo() function.'
12635 echo ' or you can specify "--disable-ipv6"'.
12636 exit 1
12637 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012638else
Martin v. Löwis11437992002-04-12 09:54:03 +000012639
12640cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012641#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012642_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012643
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012644fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012645
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012646for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012647do
Martin v. Löwis11437992002-04-12 09:54:03 +000012648as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12649echo "$as_me:$LINENO: checking for $ac_func" >&5
12650echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12651if eval "test \"\${$as_ac_var+set}\" = set"; then
12652 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012653else
Martin v. Löwis11437992002-04-12 09:54:03 +000012654 cat >conftest.$ac_ext <<_ACEOF
12655#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012656#include "confdefs.h"
12657/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012658 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012659#include <assert.h>
12660/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012661#ifdef __cplusplus
12662extern "C"
12663#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012664/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012665 builtin and then its argument prototype would still apply. */
12666char $ac_func ();
12667char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012668
Martin v. Löwis11437992002-04-12 09:54:03 +000012669#ifdef F77_DUMMY_MAIN
12670# ifdef __cplusplus
12671 extern "C"
12672# endif
12673 int F77_DUMMY_MAIN() { return 1; }
12674#endif
12675int
12676main ()
12677{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012678/* The GNU C library defines this for functions which it implements
12679 to always fail with ENOSYS. Some functions are actually named
12680 something starting with __ and the normal name is an alias. */
12681#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12682choke me
12683#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012684f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012685#endif
12686
Martin v. Löwis11437992002-04-12 09:54:03 +000012687 ;
12688 return 0;
12689}
12690_ACEOF
12691rm -f conftest.$ac_objext conftest$ac_exeext
12692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12693 (eval $ac_link) 2>&5
12694 ac_status=$?
12695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12696 (exit $ac_status); } &&
12697 { ac_try='test -s conftest$ac_exeext'
12698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12699 (eval $ac_try) 2>&5
12700 ac_status=$?
12701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12702 (exit $ac_status); }; }; then
12703 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012704else
Martin v. Löwis11437992002-04-12 09:54:03 +000012705 echo "$as_me: failed program was:" >&5
12706cat conftest.$ac_ext >&5
12707eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012708fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012709rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012710fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012711echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12712echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12713if test `eval echo '${'$as_ac_var'}'` = yes; then
12714 cat >>confdefs.h <<_ACEOF
12715#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12716_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012717
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012718fi
12719done
12720
Michael W. Hudson54241132001-12-07 15:38:26 +000012721
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012722# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012723echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12724echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12725if test "${ac_cv_header_time+set}" = set; then
12726 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012727else
Martin v. Löwis11437992002-04-12 09:54:03 +000012728 cat >conftest.$ac_ext <<_ACEOF
12729#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012730#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012731#include <sys/types.h>
12732#include <sys/time.h>
12733#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012734
12735#ifdef F77_DUMMY_MAIN
12736# ifdef __cplusplus
12737 extern "C"
12738# endif
12739 int F77_DUMMY_MAIN() { return 1; }
12740#endif
12741int
12742main ()
12743{
12744if ((struct tm *) 0)
12745return 0;
12746 ;
12747 return 0;
12748}
12749_ACEOF
12750rm -f conftest.$ac_objext
12751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12752 (eval $ac_compile) 2>&5
12753 ac_status=$?
12754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12755 (exit $ac_status); } &&
12756 { ac_try='test -s conftest.$ac_objext'
12757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12758 (eval $ac_try) 2>&5
12759 ac_status=$?
12760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12761 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012762 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012763else
Martin v. Löwis11437992002-04-12 09:54:03 +000012764 echo "$as_me: failed program was:" >&5
12765cat conftest.$ac_ext >&5
12766ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012767fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012768rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012769fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012770echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12771echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012772if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012773
12774cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012775#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012776_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012777
12778fi
12779
Martin v. Löwis11437992002-04-12 09:54:03 +000012780echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12781echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12782if test "${ac_cv_struct_tm+set}" = set; then
12783 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012784else
Martin v. Löwis11437992002-04-12 09:54:03 +000012785 cat >conftest.$ac_ext <<_ACEOF
12786#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012787#include "confdefs.h"
12788#include <sys/types.h>
12789#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012790
12791#ifdef F77_DUMMY_MAIN
12792# ifdef __cplusplus
12793 extern "C"
12794# endif
12795 int F77_DUMMY_MAIN() { return 1; }
12796#endif
12797int
12798main ()
12799{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012800struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012801 ;
12802 return 0;
12803}
12804_ACEOF
12805rm -f conftest.$ac_objext
12806if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12807 (eval $ac_compile) 2>&5
12808 ac_status=$?
12809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12810 (exit $ac_status); } &&
12811 { ac_try='test -s conftest.$ac_objext'
12812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12813 (eval $ac_try) 2>&5
12814 ac_status=$?
12815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12816 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012817 ac_cv_struct_tm=time.h
12818else
Martin v. Löwis11437992002-04-12 09:54:03 +000012819 echo "$as_me: failed program was:" >&5
12820cat conftest.$ac_ext >&5
12821ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012822fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012823rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012824fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012825echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12826echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012827if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012828
12829cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012830#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012831_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012832
12833fi
12834
Martin v. Löwis11437992002-04-12 09:54:03 +000012835echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12836echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12837if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12838 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012839else
Martin v. Löwis11437992002-04-12 09:54:03 +000012840 cat >conftest.$ac_ext <<_ACEOF
12841#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012842#include "confdefs.h"
12843#include <sys/types.h>
12844#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012845
12846
12847#ifdef F77_DUMMY_MAIN
12848# ifdef __cplusplus
12849 extern "C"
12850# endif
12851 int F77_DUMMY_MAIN() { return 1; }
12852#endif
12853int
12854main ()
12855{
12856static struct tm ac_aggr;
12857if (ac_aggr.tm_zone)
12858return 0;
12859 ;
12860 return 0;
12861}
12862_ACEOF
12863rm -f conftest.$ac_objext
12864if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12865 (eval $ac_compile) 2>&5
12866 ac_status=$?
12867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12868 (exit $ac_status); } &&
12869 { ac_try='test -s conftest.$ac_objext'
12870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12871 (eval $ac_try) 2>&5
12872 ac_status=$?
12873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12874 (exit $ac_status); }; }; then
12875 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012876else
Martin v. Löwis11437992002-04-12 09:54:03 +000012877 echo "$as_me: failed program was:" >&5
12878cat conftest.$ac_ext >&5
12879ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012880fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012881rm -f conftest.$ac_objext conftest.$ac_ext
12882fi
12883echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12884echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12885if test $ac_cv_member_struct_tm_tm_zone = yes; then
12886
12887cat >>confdefs.h <<_ACEOF
12888#define HAVE_STRUCT_TM_TM_ZONE 1
12889_ACEOF
12890
12891
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012892fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012893
Martin v. Löwis11437992002-04-12 09:54:03 +000012894if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12895
12896cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012897#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012898_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012899
12900else
Martin v. Löwis11437992002-04-12 09:54:03 +000012901 echo "$as_me:$LINENO: checking for tzname" >&5
12902echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12903if test "${ac_cv_var_tzname+set}" = set; then
12904 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012905else
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 cat >conftest.$ac_ext <<_ACEOF
12907#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012908#include "confdefs.h"
12909#include <time.h>
12910#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012911extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012913
12914#ifdef F77_DUMMY_MAIN
12915# ifdef __cplusplus
12916 extern "C"
12917# endif
12918 int F77_DUMMY_MAIN() { return 1; }
12919#endif
12920int
12921main ()
12922{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012923atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 ;
12925 return 0;
12926}
12927_ACEOF
12928rm -f conftest.$ac_objext conftest$ac_exeext
12929if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12930 (eval $ac_link) 2>&5
12931 ac_status=$?
12932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12933 (exit $ac_status); } &&
12934 { ac_try='test -s conftest$ac_exeext'
12935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12936 (eval $ac_try) 2>&5
12937 ac_status=$?
12938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12939 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012940 ac_cv_var_tzname=yes
12941else
Martin v. Löwis11437992002-04-12 09:54:03 +000012942 echo "$as_me: failed program was:" >&5
12943cat conftest.$ac_ext >&5
12944ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012945fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012946rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012947fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012948echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12949echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012950 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012951
12952cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012953#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012954_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012955
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012956 fi
12957fi
12958
Jack Jansendd19cf82001-12-06 22:36:17 +000012959
Martin v. Löwis11437992002-04-12 09:54:03 +000012960echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12961echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12962if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12963 echo $ECHO_N "(cached) $ECHO_C" >&6
12964else
12965 cat >conftest.$ac_ext <<_ACEOF
12966#line $LINENO "configure"
12967#include "confdefs.h"
12968$ac_includes_default
12969#ifdef F77_DUMMY_MAIN
12970# ifdef __cplusplus
12971 extern "C"
12972# endif
12973 int F77_DUMMY_MAIN() { return 1; }
12974#endif
12975int
12976main ()
12977{
12978static struct stat ac_aggr;
12979if (ac_aggr.st_rdev)
12980return 0;
12981 ;
12982 return 0;
12983}
12984_ACEOF
12985rm -f conftest.$ac_objext
12986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12987 (eval $ac_compile) 2>&5
12988 ac_status=$?
12989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12990 (exit $ac_status); } &&
12991 { ac_try='test -s conftest.$ac_objext'
12992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12993 (eval $ac_try) 2>&5
12994 ac_status=$?
12995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12996 (exit $ac_status); }; }; then
12997 ac_cv_member_struct_stat_st_rdev=yes
12998else
12999 echo "$as_me: failed program was:" >&5
13000cat conftest.$ac_ext >&5
13001ac_cv_member_struct_stat_st_rdev=no
13002fi
13003rm -f conftest.$ac_objext conftest.$ac_ext
13004fi
13005echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
13006echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
13007if test $ac_cv_member_struct_stat_st_rdev = yes; then
13008
13009cat >>confdefs.h <<_ACEOF
13010#define HAVE_STRUCT_STAT_ST_RDEV 1
13011_ACEOF
13012
13013
13014cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013015#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013016_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013017
13018fi
13019
Martin v. Löwis11437992002-04-12 09:54:03 +000013020
13021
13022echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13023echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13024if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13025 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013026else
Martin v. Löwis11437992002-04-12 09:54:03 +000013027 cat >conftest.$ac_ext <<_ACEOF
13028#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013029#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013030$ac_includes_default
13031#ifdef F77_DUMMY_MAIN
13032# ifdef __cplusplus
13033 extern "C"
13034# endif
13035 int F77_DUMMY_MAIN() { return 1; }
13036#endif
13037int
13038main ()
13039{
13040static struct stat ac_aggr;
13041if (ac_aggr.st_blksize)
13042return 0;
13043 ;
13044 return 0;
13045}
13046_ACEOF
13047rm -f conftest.$ac_objext
13048if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13049 (eval $ac_compile) 2>&5
13050 ac_status=$?
13051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13052 (exit $ac_status); } &&
13053 { ac_try='test -s conftest.$ac_objext'
13054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13055 (eval $ac_try) 2>&5
13056 ac_status=$?
13057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13058 (exit $ac_status); }; }; then
13059 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013060else
Martin v. Löwis11437992002-04-12 09:54:03 +000013061 echo "$as_me: failed program was:" >&5
13062cat conftest.$ac_ext >&5
13063ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013064fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013065rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013066fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013067echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13068echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13069if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013070
Martin v. Löwis11437992002-04-12 09:54:03 +000013071cat >>confdefs.h <<_ACEOF
13072#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13073_ACEOF
13074
13075
13076cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013077#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013078_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013079
13080fi
13081
Martin v. Löwis11437992002-04-12 09:54:03 +000013082
13083echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13084echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13085if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13086 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013087else
Martin v. Löwis11437992002-04-12 09:54:03 +000013088 cat >conftest.$ac_ext <<_ACEOF
13089#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013090#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013091$ac_includes_default
13092#ifdef F77_DUMMY_MAIN
13093# ifdef __cplusplus
13094 extern "C"
13095# endif
13096 int F77_DUMMY_MAIN() { return 1; }
13097#endif
13098int
13099main ()
13100{
13101static struct stat ac_aggr;
13102if (ac_aggr.st_blocks)
13103return 0;
13104 ;
13105 return 0;
13106}
13107_ACEOF
13108rm -f conftest.$ac_objext
13109if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13110 (eval $ac_compile) 2>&5
13111 ac_status=$?
13112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13113 (exit $ac_status); } &&
13114 { ac_try='test -s conftest.$ac_objext'
13115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13116 (eval $ac_try) 2>&5
13117 ac_status=$?
13118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13119 (exit $ac_status); }; }; then
13120 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013121else
Martin v. Löwis11437992002-04-12 09:54:03 +000013122 echo "$as_me: failed program was:" >&5
13123cat conftest.$ac_ext >&5
13124ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013125fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013126rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013127fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013128echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13129echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13130if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013131
Martin v. Löwis11437992002-04-12 09:54:03 +000013132cat >>confdefs.h <<_ACEOF
13133#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13134_ACEOF
13135
13136
13137cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013138#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013139_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013140
13141else
Martin v. Löwis11437992002-04-12 09:54:03 +000013142 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013143fi
13144
Michael W. Hudson54241132001-12-07 15:38:26 +000013145
Martin v. Löwis11437992002-04-12 09:54:03 +000013146
13147echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13148echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13149if test "${ac_cv_header_time_altzone+set}" = set; then
13150 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013151else
Martin v. Löwis11437992002-04-12 09:54:03 +000013152 cat >conftest.$ac_ext <<_ACEOF
13153#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013154#include "confdefs.h"
13155#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013156#ifdef F77_DUMMY_MAIN
13157# ifdef __cplusplus
13158 extern "C"
13159# endif
13160 int F77_DUMMY_MAIN() { return 1; }
13161#endif
13162int
13163main ()
13164{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013165return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013166 ;
13167 return 0;
13168}
13169_ACEOF
13170rm -f conftest.$ac_objext
13171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13172 (eval $ac_compile) 2>&5
13173 ac_status=$?
13174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13175 (exit $ac_status); } &&
13176 { ac_try='test -s conftest.$ac_objext'
13177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13178 (eval $ac_try) 2>&5
13179 ac_status=$?
13180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13181 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013182 ac_cv_header_time_altzone=yes
13183else
Martin v. Löwis11437992002-04-12 09:54:03 +000013184 echo "$as_me: failed program was:" >&5
13185cat conftest.$ac_ext >&5
13186ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013187fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013188rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013189fi
13190
Martin v. Löwis11437992002-04-12 09:54:03 +000013191echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13192echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013193if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013194
13195cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013196#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013197_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013198
13199fi
13200
Guido van Rossumda88dad1995-01-26 00:46:29 +000013201was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013202echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13203echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13204cat >conftest.$ac_ext <<_ACEOF
13205#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013206#include "confdefs.h"
13207
13208#include <sys/types.h>
13209#include <sys/select.h>
13210#include <sys/time.h>
13211
Martin v. Löwis11437992002-04-12 09:54:03 +000013212#ifdef F77_DUMMY_MAIN
13213# ifdef __cplusplus
13214 extern "C"
13215# endif
13216 int F77_DUMMY_MAIN() { return 1; }
13217#endif
13218int
13219main ()
13220{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013221;
Martin v. Löwis11437992002-04-12 09:54:03 +000013222 ;
13223 return 0;
13224}
13225_ACEOF
13226rm -f conftest.$ac_objext
13227if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13228 (eval $ac_compile) 2>&5
13229 ac_status=$?
13230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13231 (exit $ac_status); } &&
13232 { ac_try='test -s conftest.$ac_objext'
13233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13234 (eval $ac_try) 2>&5
13235 ac_status=$?
13236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13237 (exit $ac_status); }; }; then
13238
13239
13240cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013241#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013242_ACEOF
13243
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013244 was_it_defined=yes
13245
Guido van Rossumf78abae1997-01-21 22:02:36 +000013246else
Martin v. Löwis11437992002-04-12 09:54:03 +000013247 echo "$as_me: failed program was:" >&5
13248cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013249fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013250rm -f conftest.$ac_objext conftest.$ac_ext
13251echo "$as_me:$LINENO: result: $was_it_defined" >&5
13252echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013253
Martin v. Löwis11437992002-04-12 09:54:03 +000013254echo "$as_me:$LINENO: checking for addrinfo" >&5
13255echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13256if test "${ac_cv_struct_addrinfo+set}" = set; then
13257 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013258else
Martin v. Löwis11437992002-04-12 09:54:03 +000013259 cat >conftest.$ac_ext <<_ACEOF
13260#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013261#include "confdefs.h"
13262
13263# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013264#ifdef F77_DUMMY_MAIN
13265# ifdef __cplusplus
13266 extern "C"
13267# endif
13268 int F77_DUMMY_MAIN() { return 1; }
13269#endif
13270int
13271main ()
13272{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013273struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013274 ;
13275 return 0;
13276}
13277_ACEOF
13278rm -f conftest.$ac_objext
13279if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13280 (eval $ac_compile) 2>&5
13281 ac_status=$?
13282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13283 (exit $ac_status); } &&
13284 { ac_try='test -s conftest.$ac_objext'
13285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13286 (eval $ac_try) 2>&5
13287 ac_status=$?
13288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13289 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013290 ac_cv_struct_addrinfo=yes
13291else
Martin v. Löwis11437992002-04-12 09:54:03 +000013292 echo "$as_me: failed program was:" >&5
13293cat conftest.$ac_ext >&5
13294ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013295fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013296rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013297fi
13298
Martin v. Löwis11437992002-04-12 09:54:03 +000013299echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13300echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013301if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013302
13303cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013304#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013305_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013306
13307fi
13308
Martin v. Löwis11437992002-04-12 09:54:03 +000013309echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13310echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13311if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13312 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013313else
Martin v. Löwis11437992002-04-12 09:54:03 +000013314 cat >conftest.$ac_ext <<_ACEOF
13315#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013316#include "confdefs.h"
13317
13318# include <sys/types.h>
13319# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013320#ifdef F77_DUMMY_MAIN
13321# ifdef __cplusplus
13322 extern "C"
13323# endif
13324 int F77_DUMMY_MAIN() { return 1; }
13325#endif
13326int
13327main ()
13328{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013329struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013330 ;
13331 return 0;
13332}
13333_ACEOF
13334rm -f conftest.$ac_objext
13335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13336 (eval $ac_compile) 2>&5
13337 ac_status=$?
13338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13339 (exit $ac_status); } &&
13340 { ac_try='test -s conftest.$ac_objext'
13341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13342 (eval $ac_try) 2>&5
13343 ac_status=$?
13344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13345 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013346 ac_cv_struct_sockaddr_storage=yes
13347else
Martin v. Löwis11437992002-04-12 09:54:03 +000013348 echo "$as_me: failed program was:" >&5
13349cat conftest.$ac_ext >&5
13350ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013351fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013352rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013353fi
13354
Martin v. Löwis11437992002-04-12 09:54:03 +000013355echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13356echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013357if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013358
13359cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013360#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013361_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013362
13363fi
13364
Guido van Rossum627b2d71993-12-24 10:39:16 +000013365# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013366
Michael W. Hudson54241132001-12-07 15:38:26 +000013367
Martin v. Löwis11437992002-04-12 09:54:03 +000013368echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13369echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13370if test "${ac_cv_c_char_unsigned+set}" = set; then
13371 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013372else
Martin v. Löwis11437992002-04-12 09:54:03 +000013373 cat >conftest.$ac_ext <<_ACEOF
13374#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013375#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013376$ac_includes_default
13377#ifdef F77_DUMMY_MAIN
13378# ifdef __cplusplus
13379 extern "C"
13380# endif
13381 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013382#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013383int
13384main ()
13385{
13386static int test_array [1 - 2 * !(((char) -1) < 0)];
13387test_array [0] = 0
13388
13389 ;
13390 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013391}
Martin v. Löwis11437992002-04-12 09:54:03 +000013392_ACEOF
13393rm -f conftest.$ac_objext
13394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13395 (eval $ac_compile) 2>&5
13396 ac_status=$?
13397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13398 (exit $ac_status); } &&
13399 { ac_try='test -s conftest.$ac_objext'
13400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13401 (eval $ac_try) 2>&5
13402 ac_status=$?
13403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13404 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013405 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013406else
13407 echo "$as_me: failed program was:" >&5
13408cat conftest.$ac_ext >&5
13409ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013410fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013411rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013412fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013413echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13414echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013415if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013416 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013417#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013418_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013419
13420fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013421
Martin v. Löwis11437992002-04-12 09:54:03 +000013422echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13423echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13424if test "${ac_cv_prog_cc_stdc+set}" = set; then
13425 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013426else
Martin v. Löwis11437992002-04-12 09:54:03 +000013427 ac_cv_prog_cc_stdc=no
13428ac_save_CC=$CC
13429cat >conftest.$ac_ext <<_ACEOF
13430#line $LINENO "configure"
13431#include "confdefs.h"
13432#include <stdarg.h>
13433#include <stdio.h>
13434#include <sys/types.h>
13435#include <sys/stat.h>
13436/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13437struct buf { int x; };
13438FILE * (*rcsopen) (struct buf *, struct stat *, int);
13439static char *e (p, i)
13440 char **p;
13441 int i;
13442{
13443 return p[i];
13444}
13445static char *f (char * (*g) (char **, int), char **p, ...)
13446{
13447 char *s;
13448 va_list v;
13449 va_start (v,p);
13450 s = g (p, va_arg (v,int));
13451 va_end (v);
13452 return s;
13453}
13454int test (int i, double x);
13455struct s1 {int (*f) (int a);};
13456struct s2 {int (*f) (double a);};
13457int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13458int argc;
13459char **argv;
13460#ifdef F77_DUMMY_MAIN
13461# ifdef __cplusplus
13462 extern "C"
13463# endif
13464 int F77_DUMMY_MAIN() { return 1; }
13465#endif
13466int
13467main ()
13468{
13469return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13470 ;
13471 return 0;
13472}
13473_ACEOF
13474# Don't try gcc -ansi; that turns off useful extensions and
13475# breaks some systems' header files.
13476# AIX -qlanglvl=ansi
13477# Ultrix and OSF/1 -std1
13478# HP-UX 10.20 and later -Ae
13479# HP-UX older versions -Aa -D_HPUX_SOURCE
13480# SVR4 -Xc -D__EXTENSIONS__
13481for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13482do
13483 CC="$ac_save_CC $ac_arg"
13484 rm -f conftest.$ac_objext
13485if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13486 (eval $ac_compile) 2>&5
13487 ac_status=$?
13488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13489 (exit $ac_status); } &&
13490 { ac_try='test -s conftest.$ac_objext'
13491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13492 (eval $ac_try) 2>&5
13493 ac_status=$?
13494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13495 (exit $ac_status); }; }; then
13496 ac_cv_prog_cc_stdc=$ac_arg
13497break
13498else
13499 echo "$as_me: failed program was:" >&5
13500cat conftest.$ac_ext >&5
13501fi
13502rm -f conftest.$ac_objext
13503done
13504rm -f conftest.$ac_ext conftest.$ac_objext
13505CC=$ac_save_CC
13506
13507fi
13508
13509case "x$ac_cv_prog_cc_stdc" in
13510 x|xno)
13511 echo "$as_me:$LINENO: result: none needed" >&5
13512echo "${ECHO_T}none needed" >&6 ;;
13513 *)
13514 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13515echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13516 CC="$CC $ac_cv_prog_cc_stdc" ;;
13517esac
13518
13519echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13520echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13521if test "${ac_cv_c_const+set}" = set; then
13522 echo $ECHO_N "(cached) $ECHO_C" >&6
13523else
13524 cat >conftest.$ac_ext <<_ACEOF
13525#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013526#include "confdefs.h"
13527
Martin v. Löwis11437992002-04-12 09:54:03 +000013528#ifdef F77_DUMMY_MAIN
13529# ifdef __cplusplus
13530 extern "C"
13531# endif
13532 int F77_DUMMY_MAIN() { return 1; }
13533#endif
13534int
13535main ()
13536{
13537/* FIXME: Include the comments suggested by Paul. */
13538#ifndef __cplusplus
13539 /* Ultrix mips cc rejects this. */
13540 typedef int charset[2];
13541 const charset x;
13542 /* SunOS 4.1.1 cc rejects this. */
13543 char const *const *ccp;
13544 char **p;
13545 /* NEC SVR4.0.2 mips cc rejects this. */
13546 struct point {int x, y;};
13547 static struct point const zero = {0,0};
13548 /* AIX XL C 1.02.0.0 rejects this.
13549 It does not let you subtract one const X* pointer from another in
13550 an arm of an if-expression whose if-part is not a constant
13551 expression */
13552 const char *g = "string";
13553 ccp = &g + (g ? g-g : 0);
13554 /* HPUX 7.0 cc rejects these. */
13555 ++ccp;
13556 p = (char**) ccp;
13557 ccp = (char const *const *) p;
13558 { /* SCO 3.2v4 cc rejects this. */
13559 char *t;
13560 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013561
Martin v. Löwis11437992002-04-12 09:54:03 +000013562 *t++ = 0;
13563 }
13564 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13565 int x[] = {25, 17};
13566 const int *foo = &x[0];
13567 ++foo;
13568 }
13569 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13570 typedef const int *iptr;
13571 iptr p = 0;
13572 ++p;
13573 }
13574 { /* AIX XL C 1.02.0.0 rejects this saying
13575 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13576 struct s { int j; const int *ap[3]; };
13577 struct s *b; b->j = 5;
13578 }
13579 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13580 const int foo = 10;
13581 }
13582#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013583
Martin v. Löwis11437992002-04-12 09:54:03 +000013584 ;
13585 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013586}
Martin v. Löwis11437992002-04-12 09:54:03 +000013587_ACEOF
13588rm -f conftest.$ac_objext
13589if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13590 (eval $ac_compile) 2>&5
13591 ac_status=$?
13592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13593 (exit $ac_status); } &&
13594 { ac_try='test -s conftest.$ac_objext'
13595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13596 (eval $ac_try) 2>&5
13597 ac_status=$?
13598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13599 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013600 ac_cv_c_const=yes
13601else
Martin v. Löwis11437992002-04-12 09:54:03 +000013602 echo "$as_me: failed program was:" >&5
13603cat conftest.$ac_ext >&5
13604ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013605fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013606rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013607fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013608echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13609echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013610if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013611
13612cat >>confdefs.h <<\_ACEOF
13613#define const
13614_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013615
13616fi
13617
Michael W. Hudson54241132001-12-07 15:38:26 +000013618
Guido van Rossumda88dad1995-01-26 00:46:29 +000013619works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013620echo "$as_me:$LINENO: checking for working volatile" >&5
13621echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13622cat >conftest.$ac_ext <<_ACEOF
13623#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013624#include "confdefs.h"
13625
Martin v. Löwis11437992002-04-12 09:54:03 +000013626#ifdef F77_DUMMY_MAIN
13627# ifdef __cplusplus
13628 extern "C"
13629# endif
13630 int F77_DUMMY_MAIN() { return 1; }
13631#endif
13632int
13633main ()
13634{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013635volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013636 ;
13637 return 0;
13638}
13639_ACEOF
13640rm -f conftest.$ac_objext
13641if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13642 (eval $ac_compile) 2>&5
13643 ac_status=$?
13644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13645 (exit $ac_status); } &&
13646 { ac_try='test -s conftest.$ac_objext'
13647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13648 (eval $ac_try) 2>&5
13649 ac_status=$?
13650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13651 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013652 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013653else
Martin v. Löwis11437992002-04-12 09:54:03 +000013654 echo "$as_me: failed program was:" >&5
13655cat conftest.$ac_ext >&5
13656
13657cat >>confdefs.h <<\_ACEOF
13658#define volatile
13659_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013660
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013661
Guido van Rossum627b2d71993-12-24 10:39:16 +000013662fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013663rm -f conftest.$ac_objext conftest.$ac_ext
13664echo "$as_me:$LINENO: result: $works" >&5
13665echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013666
Guido van Rossumda88dad1995-01-26 00:46:29 +000013667works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013668echo "$as_me:$LINENO: checking for working signed char" >&5
13669echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13670cat >conftest.$ac_ext <<_ACEOF
13671#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013672#include "confdefs.h"
13673
Martin v. Löwis11437992002-04-12 09:54:03 +000013674#ifdef F77_DUMMY_MAIN
13675# ifdef __cplusplus
13676 extern "C"
13677# endif
13678 int F77_DUMMY_MAIN() { return 1; }
13679#endif
13680int
13681main ()
13682{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013683signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013684 ;
13685 return 0;
13686}
13687_ACEOF
13688rm -f conftest.$ac_objext
13689if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13690 (eval $ac_compile) 2>&5
13691 ac_status=$?
13692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13693 (exit $ac_status); } &&
13694 { ac_try='test -s conftest.$ac_objext'
13695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13696 (eval $ac_try) 2>&5
13697 ac_status=$?
13698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13699 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013700 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013701else
Martin v. Löwis11437992002-04-12 09:54:03 +000013702 echo "$as_me: failed program was:" >&5
13703cat conftest.$ac_ext >&5
13704
13705cat >>confdefs.h <<\_ACEOF
13706#define signed
13707_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013708
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013709
Guido van Rossum7f43da71994-08-01 12:15:30 +000013710fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013711rm -f conftest.$ac_objext conftest.$ac_ext
13712echo "$as_me:$LINENO: result: $works" >&5
13713echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013714
Guido van Rossumda88dad1995-01-26 00:46:29 +000013715have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013716echo "$as_me:$LINENO: checking for prototypes" >&5
13717echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13718cat >conftest.$ac_ext <<_ACEOF
13719#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013720#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013721int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013722#ifdef F77_DUMMY_MAIN
13723# ifdef __cplusplus
13724 extern "C"
13725# endif
13726 int F77_DUMMY_MAIN() { return 1; }
13727#endif
13728int
13729main ()
13730{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013731return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013732 ;
13733 return 0;
13734}
13735_ACEOF
13736rm -f conftest.$ac_objext
13737if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13738 (eval $ac_compile) 2>&5
13739 ac_status=$?
13740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13741 (exit $ac_status); } &&
13742 { ac_try='test -s conftest.$ac_objext'
13743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13744 (eval $ac_try) 2>&5
13745 ac_status=$?
13746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13747 (exit $ac_status); }; }; then
13748
13749
13750cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013751#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013752_ACEOF
13753
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013754 have_prototypes=yes
13755
Guido van Rossumf78abae1997-01-21 22:02:36 +000013756else
Martin v. Löwis11437992002-04-12 09:54:03 +000013757 echo "$as_me: failed program was:" >&5
13758cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013759fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013760rm -f conftest.$ac_objext conftest.$ac_ext
13761echo "$as_me:$LINENO: result: $have_prototypes" >&5
13762echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013763
Guido van Rossumda88dad1995-01-26 00:46:29 +000013764works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013765echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13766echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13767cat >conftest.$ac_ext <<_ACEOF
13768#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013769#include "confdefs.h"
13770
13771#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013772int foo(int x, ...) {
13773 va_list va;
13774 va_start(va, x);
13775 va_arg(va, int);
13776 va_arg(va, char *);
13777 va_arg(va, double);
13778 return 0;
13779}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013780
Martin v. Löwis11437992002-04-12 09:54:03 +000013781#ifdef F77_DUMMY_MAIN
13782# ifdef __cplusplus
13783 extern "C"
13784# endif
13785 int F77_DUMMY_MAIN() { return 1; }
13786#endif
13787int
13788main ()
13789{
Guido van Rossum90eea071996-08-30 20:58:57 +000013790return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013791 ;
13792 return 0;
13793}
13794_ACEOF
13795rm -f conftest.$ac_objext
13796if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13797 (eval $ac_compile) 2>&5
13798 ac_status=$?
13799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13800 (exit $ac_status); } &&
13801 { ac_try='test -s conftest.$ac_objext'
13802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13803 (eval $ac_try) 2>&5
13804 ac_status=$?
13805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13806 (exit $ac_status); }; }; then
13807
13808
13809cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013810#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013811_ACEOF
13812
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013813 works=yes
13814
Guido van Rossumf78abae1997-01-21 22:02:36 +000013815else
Martin v. Löwis11437992002-04-12 09:54:03 +000013816 echo "$as_me: failed program was:" >&5
13817cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013818fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013819rm -f conftest.$ac_objext conftest.$ac_ext
13820echo "$as_me:$LINENO: result: $works" >&5
13821echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013822
Guido van Rossumda88dad1995-01-26 00:46:29 +000013823if test "$have_prototypes" = yes; then
13824bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013825echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13826echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13827cat >conftest.$ac_ext <<_ACEOF
13828#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013829#include "confdefs.h"
13830#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013831#ifdef F77_DUMMY_MAIN
13832# ifdef __cplusplus
13833 extern "C"
13834# endif
13835 int F77_DUMMY_MAIN() { return 1; }
13836#endif
13837int
13838main ()
13839{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013840char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013841 ;
13842 return 0;
13843}
13844_ACEOF
13845rm -f conftest.$ac_objext
13846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13847 (eval $ac_compile) 2>&5
13848 ac_status=$?
13849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13850 (exit $ac_status); } &&
13851 { ac_try='test -s conftest.$ac_objext'
13852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13853 (eval $ac_try) 2>&5
13854 ac_status=$?
13855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13856 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013857 :
13858else
Martin v. Löwis11437992002-04-12 09:54:03 +000013859 echo "$as_me: failed program was:" >&5
13860cat conftest.$ac_ext >&5
13861
13862cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013863#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013864_ACEOF
13865
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013866 bad_prototypes=yes
13867
Guido van Rossum627b2d71993-12-24 10:39:16 +000013868fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013869rm -f conftest.$ac_objext conftest.$ac_ext
13870echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13871echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013872fi
13873
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013874# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013875echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13876echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13877cat >conftest.$ac_ext <<_ACEOF
13878#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013879#include "confdefs.h"
13880#include <sys/types.h>
13881#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013882#ifdef F77_DUMMY_MAIN
13883# ifdef __cplusplus
13884 extern "C"
13885# endif
13886 int F77_DUMMY_MAIN() { return 1; }
13887#endif
13888int
13889main ()
13890{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013891struct sockaddr x;
13892x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013893 ;
13894 return 0;
13895}
13896_ACEOF
13897rm -f conftest.$ac_objext
13898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13899 (eval $ac_compile) 2>&5
13900 ac_status=$?
13901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13902 (exit $ac_status); } &&
13903 { ac_try='test -s conftest.$ac_objext'
13904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13905 (eval $ac_try) 2>&5
13906 ac_status=$?
13907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13908 (exit $ac_status); }; }; then
13909 echo "$as_me:$LINENO: result: yes" >&5
13910echo "${ECHO_T}yes" >&6
13911
13912cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013913#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013914_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013915
13916else
Martin v. Löwis11437992002-04-12 09:54:03 +000013917 echo "$as_me: failed program was:" >&5
13918cat conftest.$ac_ext >&5
13919echo "$as_me:$LINENO: result: no" >&5
13920echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013921fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013922rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013923
Guido van Rossumda88dad1995-01-26 00:46:29 +000013924va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013925echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13926echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13927cat >conftest.$ac_ext <<_ACEOF
13928#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013929#include "confdefs.h"
13930
13931#ifdef HAVE_STDARG_PROTOTYPES
13932#include <stdarg.h>
13933#else
13934#include <varargs.h>
13935#endif
13936
Martin v. Löwis11437992002-04-12 09:54:03 +000013937#ifdef F77_DUMMY_MAIN
13938# ifdef __cplusplus
13939 extern "C"
13940# endif
13941 int F77_DUMMY_MAIN() { return 1; }
13942#endif
13943int
13944main ()
13945{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013946va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013947 ;
13948 return 0;
13949}
13950_ACEOF
13951rm -f conftest.$ac_objext
13952if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13953 (eval $ac_compile) 2>&5
13954 ac_status=$?
13955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13956 (exit $ac_status); } &&
13957 { ac_try='test -s conftest.$ac_objext'
13958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13959 (eval $ac_try) 2>&5
13960 ac_status=$?
13961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13962 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013963 :
13964else
Martin v. Löwis11437992002-04-12 09:54:03 +000013965 echo "$as_me: failed program was:" >&5
13966cat conftest.$ac_ext >&5
13967
13968
13969cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013970#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013971_ACEOF
13972
Guido van Rossumda88dad1995-01-26 00:46:29 +000013973 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013974
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013975fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013976rm -f conftest.$ac_objext conftest.$ac_ext
13977echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13978echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013979
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013980# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013981
13982
13983
13984echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13985echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13986if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13987 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013988else
Martin v. Löwis11437992002-04-12 09:54:03 +000013989 cat >conftest.$ac_ext <<_ACEOF
13990#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013991#include "confdefs.h"
13992/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013993 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013994#include <assert.h>
13995/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013996#ifdef __cplusplus
13997extern "C"
13998#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013999/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014000 builtin and then its argument prototype would still apply. */
14001char gethostbyname_r ();
14002char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014003
Martin v. Löwis11437992002-04-12 09:54:03 +000014004#ifdef F77_DUMMY_MAIN
14005# ifdef __cplusplus
14006 extern "C"
14007# endif
14008 int F77_DUMMY_MAIN() { return 1; }
14009#endif
14010int
14011main ()
14012{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014013/* The GNU C library defines this for functions which it implements
14014 to always fail with ENOSYS. Some functions are actually named
14015 something starting with __ and the normal name is an alias. */
14016#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
14017choke me
14018#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014019f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014020#endif
14021
Martin v. Löwis11437992002-04-12 09:54:03 +000014022 ;
14023 return 0;
14024}
14025_ACEOF
14026rm -f conftest.$ac_objext conftest$ac_exeext
14027if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14028 (eval $ac_link) 2>&5
14029 ac_status=$?
14030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14031 (exit $ac_status); } &&
14032 { ac_try='test -s conftest$ac_exeext'
14033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14034 (eval $ac_try) 2>&5
14035 ac_status=$?
14036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14037 (exit $ac_status); }; }; then
14038 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014039else
Martin v. Löwis11437992002-04-12 09:54:03 +000014040 echo "$as_me: failed program was:" >&5
14041cat conftest.$ac_ext >&5
14042ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014043fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014044rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014045fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014046echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
14047echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
14048if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014049
Martin v. Löwis11437992002-04-12 09:54:03 +000014050 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014051#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014052_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014053
Martin v. Löwis11437992002-04-12 09:54:03 +000014054 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
14055echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014056 OLD_CFLAGS=$CFLAGS
14057 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014058 cat >conftest.$ac_ext <<_ACEOF
14059#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014060#include "confdefs.h"
14061
14062# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014063
14064#ifdef F77_DUMMY_MAIN
14065# ifdef __cplusplus
14066 extern "C"
14067# endif
14068 int F77_DUMMY_MAIN() { return 1; }
14069#endif
14070int
14071main ()
14072{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014073
14074 char *name;
14075 struct hostent *he, *res;
14076 char buffer[2048];
14077 int buflen = 2048;
14078 int h_errnop;
14079
14080 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014081
14082 ;
14083 return 0;
14084}
14085_ACEOF
14086rm -f conftest.$ac_objext
14087if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14088 (eval $ac_compile) 2>&5
14089 ac_status=$?
14090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14091 (exit $ac_status); } &&
14092 { ac_try='test -s conftest.$ac_objext'
14093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14094 (eval $ac_try) 2>&5
14095 ac_status=$?
14096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14097 (exit $ac_status); }; }; then
14098
14099 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014100#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014101_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014102
Martin v. Löwis11437992002-04-12 09:54:03 +000014103
14104cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014105#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014106_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014107
Martin v. Löwis11437992002-04-12 09:54:03 +000014108 echo "$as_me:$LINENO: result: yes" >&5
14109echo "${ECHO_T}yes" >&6
14110
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014111else
Martin v. Löwis11437992002-04-12 09:54:03 +000014112 echo "$as_me: failed program was:" >&5
14113cat conftest.$ac_ext >&5
14114
14115 echo "$as_me:$LINENO: result: no" >&5
14116echo "${ECHO_T}no" >&6
14117 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14118echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14119 cat >conftest.$ac_ext <<_ACEOF
14120#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014121#include "confdefs.h"
14122
14123# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014124
14125#ifdef F77_DUMMY_MAIN
14126# ifdef __cplusplus
14127 extern "C"
14128# endif
14129 int F77_DUMMY_MAIN() { return 1; }
14130#endif
14131int
14132main ()
14133{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014134
14135 char *name;
14136 struct hostent *he;
14137 char buffer[2048];
14138 int buflen = 2048;
14139 int h_errnop;
14140
14141 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014142
14143 ;
14144 return 0;
14145}
14146_ACEOF
14147rm -f conftest.$ac_objext
14148if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14149 (eval $ac_compile) 2>&5
14150 ac_status=$?
14151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14152 (exit $ac_status); } &&
14153 { ac_try='test -s conftest.$ac_objext'
14154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14155 (eval $ac_try) 2>&5
14156 ac_status=$?
14157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14158 (exit $ac_status); }; }; then
14159
14160 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014161#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014162_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014163
Martin v. Löwis11437992002-04-12 09:54:03 +000014164
14165cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014166#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014167_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014168
Martin v. Löwis11437992002-04-12 09:54:03 +000014169 echo "$as_me:$LINENO: result: yes" >&5
14170echo "${ECHO_T}yes" >&6
14171
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014172else
Martin v. Löwis11437992002-04-12 09:54:03 +000014173 echo "$as_me: failed program was:" >&5
14174cat conftest.$ac_ext >&5
14175
14176 echo "$as_me:$LINENO: result: no" >&5
14177echo "${ECHO_T}no" >&6
14178 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14179echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14180 cat >conftest.$ac_ext <<_ACEOF
14181#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014182#include "confdefs.h"
14183
14184# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014185
14186#ifdef F77_DUMMY_MAIN
14187# ifdef __cplusplus
14188 extern "C"
14189# endif
14190 int F77_DUMMY_MAIN() { return 1; }
14191#endif
14192int
14193main ()
14194{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014195
14196 char *name;
14197 struct hostent *he;
14198 struct hostent_data data;
14199
14200 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014201
14202 ;
14203 return 0;
14204}
14205_ACEOF
14206rm -f conftest.$ac_objext
14207if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14208 (eval $ac_compile) 2>&5
14209 ac_status=$?
14210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14211 (exit $ac_status); } &&
14212 { ac_try='test -s conftest.$ac_objext'
14213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14214 (eval $ac_try) 2>&5
14215 ac_status=$?
14216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14217 (exit $ac_status); }; }; then
14218
14219 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014220#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014221_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014222
Martin v. Löwis11437992002-04-12 09:54:03 +000014223
14224cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014225#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014226_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014227
Martin v. Löwis11437992002-04-12 09:54:03 +000014228 echo "$as_me:$LINENO: result: yes" >&5
14229echo "${ECHO_T}yes" >&6
14230
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014231else
Martin v. Löwis11437992002-04-12 09:54:03 +000014232 echo "$as_me: failed program was:" >&5
14233cat conftest.$ac_ext >&5
14234
14235 echo "$as_me:$LINENO: result: no" >&5
14236echo "${ECHO_T}no" >&6
14237
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014238fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014239rm -f conftest.$ac_objext conftest.$ac_ext
14240
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014241fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014242rm -f conftest.$ac_objext conftest.$ac_ext
14243
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014244fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014245rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014246 CFLAGS=$OLD_CFLAGS
14247
14248else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014249
Martin v. Löwis11437992002-04-12 09:54:03 +000014250
14251for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014252do
Martin v. Löwis11437992002-04-12 09:54:03 +000014253as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14254echo "$as_me:$LINENO: checking for $ac_func" >&5
14255echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14256if eval "test \"\${$as_ac_var+set}\" = set"; then
14257 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014258else
Martin v. Löwis11437992002-04-12 09:54:03 +000014259 cat >conftest.$ac_ext <<_ACEOF
14260#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014261#include "confdefs.h"
14262/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014263 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014264#include <assert.h>
14265/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014266#ifdef __cplusplus
14267extern "C"
14268#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014269/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014270 builtin and then its argument prototype would still apply. */
14271char $ac_func ();
14272char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014273
Martin v. Löwis11437992002-04-12 09:54:03 +000014274#ifdef F77_DUMMY_MAIN
14275# ifdef __cplusplus
14276 extern "C"
14277# endif
14278 int F77_DUMMY_MAIN() { return 1; }
14279#endif
14280int
14281main ()
14282{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014283/* The GNU C library defines this for functions which it implements
14284 to always fail with ENOSYS. Some functions are actually named
14285 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014286#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014287choke me
14288#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014289f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014290#endif
14291
Martin v. Löwis11437992002-04-12 09:54:03 +000014292 ;
14293 return 0;
14294}
14295_ACEOF
14296rm -f conftest.$ac_objext conftest$ac_exeext
14297if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14298 (eval $ac_link) 2>&5
14299 ac_status=$?
14300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14301 (exit $ac_status); } &&
14302 { ac_try='test -s conftest$ac_exeext'
14303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14304 (eval $ac_try) 2>&5
14305 ac_status=$?
14306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14307 (exit $ac_status); }; }; then
14308 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014309else
Martin v. Löwis11437992002-04-12 09:54:03 +000014310 echo "$as_me: failed program was:" >&5
14311cat conftest.$ac_ext >&5
14312eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014313fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014314rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014315fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014316echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14317echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14318if test `eval echo '${'$as_ac_var'}'` = yes; then
14319 cat >>confdefs.h <<_ACEOF
14320#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14321_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014322
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014323fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014324done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014325
Michael W. Hudson54241132001-12-07 15:38:26 +000014326
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014327fi
14328
Michael W. Hudson54241132001-12-07 15:38:26 +000014329
14330
14331
14332
14333
14334
Guido van Rossum627b2d71993-12-24 10:39:16 +000014335# checks for system services
14336# (none yet)
14337
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014338# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014339echo "$as_me:$LINENO: checking for __fpu_control" >&5
14340echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14341if test "${ac_cv_func___fpu_control+set}" = set; then
14342 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014343else
Martin v. Löwis11437992002-04-12 09:54:03 +000014344 cat >conftest.$ac_ext <<_ACEOF
14345#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014346#include "confdefs.h"
14347/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014348 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014349#include <assert.h>
14350/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014351#ifdef __cplusplus
14352extern "C"
14353#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014354/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014355 builtin and then its argument prototype would still apply. */
14356char __fpu_control ();
14357char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014358
Martin v. Löwis11437992002-04-12 09:54:03 +000014359#ifdef F77_DUMMY_MAIN
14360# ifdef __cplusplus
14361 extern "C"
14362# endif
14363 int F77_DUMMY_MAIN() { return 1; }
14364#endif
14365int
14366main ()
14367{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014368/* The GNU C library defines this for functions which it implements
14369 to always fail with ENOSYS. Some functions are actually named
14370 something starting with __ and the normal name is an alias. */
14371#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14372choke me
14373#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014374f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014375#endif
14376
Martin v. Löwis11437992002-04-12 09:54:03 +000014377 ;
14378 return 0;
14379}
14380_ACEOF
14381rm -f conftest.$ac_objext conftest$ac_exeext
14382if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14383 (eval $ac_link) 2>&5
14384 ac_status=$?
14385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14386 (exit $ac_status); } &&
14387 { ac_try='test -s conftest$ac_exeext'
14388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14389 (eval $ac_try) 2>&5
14390 ac_status=$?
14391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14392 (exit $ac_status); }; }; then
14393 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014394else
Martin v. Löwis11437992002-04-12 09:54:03 +000014395 echo "$as_me: failed program was:" >&5
14396cat conftest.$ac_ext >&5
14397ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014398fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014399rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014400fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014401echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14402echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14403if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014404 :
14405else
Martin v. Löwis11437992002-04-12 09:54:03 +000014406
14407echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14408echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14409if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14410 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014411else
Martin v. Löwis11437992002-04-12 09:54:03 +000014412 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014413LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014414cat >conftest.$ac_ext <<_ACEOF
14415#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014416#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014417
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014418/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014419#ifdef __cplusplus
14420extern "C"
14421#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014422/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014423 builtin and then its argument prototype would still apply. */
14424char __fpu_control ();
14425#ifdef F77_DUMMY_MAIN
14426# ifdef __cplusplus
14427 extern "C"
14428# endif
14429 int F77_DUMMY_MAIN() { return 1; }
14430#endif
14431int
14432main ()
14433{
14434__fpu_control ();
14435 ;
14436 return 0;
14437}
14438_ACEOF
14439rm -f conftest.$ac_objext conftest$ac_exeext
14440if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14441 (eval $ac_link) 2>&5
14442 ac_status=$?
14443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14444 (exit $ac_status); } &&
14445 { ac_try='test -s conftest$ac_exeext'
14446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14447 (eval $ac_try) 2>&5
14448 ac_status=$?
14449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14450 (exit $ac_status); }; }; then
14451 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014452else
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 echo "$as_me: failed program was:" >&5
14454cat conftest.$ac_ext >&5
14455ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014456fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014457rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14458LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014459fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014460echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14461echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14462if test $ac_cv_lib_ieee___fpu_control = yes; then
14463 cat >>confdefs.h <<_ACEOF
14464#define HAVE_LIBIEEE 1
14465_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014466
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014467 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014468
Guido van Rossum627b2d71993-12-24 10:39:16 +000014469fi
14470
Michael W. Hudson54241132001-12-07 15:38:26 +000014471
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014472fi
14473
Michael W. Hudson54241132001-12-07 15:38:26 +000014474
Guido van Rossum7f253911997-05-09 02:42:48 +000014475# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014476echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14477echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14478
Guido van Rossum7f253911997-05-09 02:42:48 +000014479# Check whether --with-fpectl or --without-fpectl was given.
14480if test "${with_fpectl+set}" = set; then
14481 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014482
Guido van Rossum7f253911997-05-09 02:42:48 +000014483if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014484then
14485
14486cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014487#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014488_ACEOF
14489
14490 echo "$as_me:$LINENO: result: yes" >&5
14491echo "${ECHO_T}yes" >&6
14492else echo "$as_me:$LINENO: result: no" >&5
14493echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014494fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014495else
Martin v. Löwis11437992002-04-12 09:54:03 +000014496 echo "$as_me:$LINENO: result: no" >&5
14497echo "${ECHO_T}no" >&6
14498fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014499
Guido van Rossum7f43da71994-08-01 12:15:30 +000014500# check for --with-libm=...
14501
Guido van Rossum563e7081996-09-10 18:20:48 +000014502case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014503Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014504BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014505*) LIBM=-lm
14506esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014507echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14508echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14509
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014510# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014511if test "${with_libm+set}" = set; then
14512 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014513
Guido van Rossum7f253911997-05-09 02:42:48 +000014514if test "$withval" = no
14515then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014516 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14517echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014518elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014519then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014520 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14521echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14522else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14523echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14524 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014525fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014526else
Martin v. Löwis11437992002-04-12 09:54:03 +000014527 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14528echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14529fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014530
14531# check for --with-libc=...
14532
Martin v. Löwis11437992002-04-12 09:54:03 +000014533echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14534echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14535
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014536# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014537if test "${with_libc+set}" = set; then
14538 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014539
Guido van Rossum7f253911997-05-09 02:42:48 +000014540if test "$withval" = no
14541then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014542 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14543echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014544elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014545then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014546 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14547echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14548else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14549echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14550 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014551fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014552else
Martin v. Löwis11437992002-04-12 09:54:03 +000014553 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14554echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14555fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014556
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014557# check for hypot() in math library
14558LIBS_SAVE=$LIBS
14559LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014560
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014561for ac_func in hypot
14562do
Martin v. Löwis11437992002-04-12 09:54:03 +000014563as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14564echo "$as_me:$LINENO: checking for $ac_func" >&5
14565echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14566if eval "test \"\${$as_ac_var+set}\" = set"; then
14567 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014568else
Martin v. Löwis11437992002-04-12 09:54:03 +000014569 cat >conftest.$ac_ext <<_ACEOF
14570#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014571#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014572/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014573 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014574#include <assert.h>
14575/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014576#ifdef __cplusplus
14577extern "C"
14578#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014579/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014580 builtin and then its argument prototype would still apply. */
14581char $ac_func ();
14582char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014583
Martin v. Löwis11437992002-04-12 09:54:03 +000014584#ifdef F77_DUMMY_MAIN
14585# ifdef __cplusplus
14586 extern "C"
14587# endif
14588 int F77_DUMMY_MAIN() { return 1; }
14589#endif
14590int
14591main ()
14592{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014593/* The GNU C library defines this for functions which it implements
14594 to always fail with ENOSYS. Some functions are actually named
14595 something starting with __ and the normal name is an alias. */
14596#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14597choke me
14598#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014599f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014600#endif
14601
Martin v. Löwis11437992002-04-12 09:54:03 +000014602 ;
14603 return 0;
14604}
14605_ACEOF
14606rm -f conftest.$ac_objext conftest$ac_exeext
14607if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14608 (eval $ac_link) 2>&5
14609 ac_status=$?
14610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14611 (exit $ac_status); } &&
14612 { ac_try='test -s conftest$ac_exeext'
14613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14614 (eval $ac_try) 2>&5
14615 ac_status=$?
14616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14617 (exit $ac_status); }; }; then
14618 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014619else
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 echo "$as_me: failed program was:" >&5
14621cat conftest.$ac_ext >&5
14622eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014623fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014624rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014625fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014626echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14627echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14628if test `eval echo '${'$as_ac_var'}'` = yes; then
14629 cat >>confdefs.h <<_ACEOF
14630#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14631_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014632
Michael W. Hudson54241132001-12-07 15:38:26 +000014633else
Martin v. Löwis11437992002-04-12 09:54:03 +000014634 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014635fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014636done
14637
Michael W. Hudson54241132001-12-07 15:38:26 +000014638
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014639LIBS=$LIBS_SAVE
14640
Guido van Rossumad713701997-07-10 22:42:38 +000014641# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014642echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14643echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14644if test "${ac_cv_malloc_zero+set}" = set; then
14645 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014646else
14647 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014648 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014649else
Martin v. Löwis11437992002-04-12 09:54:03 +000014650 cat >conftest.$ac_ext <<_ACEOF
14651#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014652#include "confdefs.h"
14653#include <stdio.h>
14654#ifdef HAVE_STDLIB
14655#include <stdlib.h>
14656#else
14657char *malloc(), *realloc();
14658int *free();
14659#endif
14660main() {
14661 char *p;
14662 p = malloc(0);
14663 if (p == NULL) exit(1);
14664 p = realloc(p, 0);
14665 if (p == NULL) exit(1);
14666 free(p);
14667 exit(0);
14668}
Martin v. Löwis11437992002-04-12 09:54:03 +000014669_ACEOF
14670rm -f conftest$ac_exeext
14671if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14672 (eval $ac_link) 2>&5
14673 ac_status=$?
14674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14675 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14677 (eval $ac_try) 2>&5
14678 ac_status=$?
14679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14680 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014681 ac_cv_malloc_zero=nonnull
14682else
Martin v. Löwis11437992002-04-12 09:54:03 +000014683 echo "$as_me: program exited with status $ac_status" >&5
14684echo "$as_me: failed program was:" >&5
14685cat conftest.$ac_ext >&5
14686( exit $ac_status )
14687ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014688fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014689rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014690fi
Guido van Rossumad713701997-07-10 22:42:38 +000014691fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014692 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014693echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14694echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014695if test "$ac_cv_malloc_zero" = null
14696then
Martin v. Löwis11437992002-04-12 09:54:03 +000014697
14698cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014699#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014700_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014701
14702fi
14703
Guido van Rossumef2255b2000-03-10 22:30:29 +000014704# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014705if test "${ac_cv_header_wchar_h+set}" = set; then
14706 echo "$as_me:$LINENO: checking for wchar.h" >&5
14707echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14708if test "${ac_cv_header_wchar_h+set}" = set; then
14709 echo $ECHO_N "(cached) $ECHO_C" >&6
14710fi
14711echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14712echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014713else
Martin v. Löwis11437992002-04-12 09:54:03 +000014714 # Is the header compilable?
14715echo "$as_me:$LINENO: checking wchar.h usability" >&5
14716echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14717cat >conftest.$ac_ext <<_ACEOF
14718#line $LINENO "configure"
14719#include "confdefs.h"
14720$ac_includes_default
14721#include <wchar.h>
14722_ACEOF
14723rm -f conftest.$ac_objext
14724if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14725 (eval $ac_compile) 2>&5
14726 ac_status=$?
14727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14728 (exit $ac_status); } &&
14729 { ac_try='test -s conftest.$ac_objext'
14730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14731 (eval $ac_try) 2>&5
14732 ac_status=$?
14733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14734 (exit $ac_status); }; }; then
14735 ac_header_compiler=yes
14736else
14737 echo "$as_me: failed program was:" >&5
14738cat conftest.$ac_ext >&5
14739ac_header_compiler=no
14740fi
14741rm -f conftest.$ac_objext conftest.$ac_ext
14742echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14743echo "${ECHO_T}$ac_header_compiler" >&6
14744
14745# Is the header present?
14746echo "$as_me:$LINENO: checking wchar.h presence" >&5
14747echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14748cat >conftest.$ac_ext <<_ACEOF
14749#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014750#include "confdefs.h"
14751#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014752_ACEOF
14753if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14754 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14755 ac_status=$?
14756 egrep -v '^ *\+' conftest.er1 >conftest.err
14757 rm -f conftest.er1
14758 cat conftest.err >&5
14759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14760 (exit $ac_status); } >/dev/null; then
14761 if test -s conftest.err; then
14762 ac_cpp_err=$ac_c_preproc_warn_flag
14763 else
14764 ac_cpp_err=
14765 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014766else
Martin v. Löwis11437992002-04-12 09:54:03 +000014767 ac_cpp_err=yes
14768fi
14769if test -z "$ac_cpp_err"; then
14770 ac_header_preproc=yes
14771else
14772 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014773 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014774 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014775fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014776rm -f conftest.err conftest.$ac_ext
14777echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14778echo "${ECHO_T}$ac_header_preproc" >&6
14779
14780# So? What about this header?
14781case $ac_header_compiler:$ac_header_preproc in
14782 yes:no )
14783 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14784echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14785 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14786echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14787 no:yes )
14788 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14789echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14790 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14791echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14792 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14793echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14794esac
14795echo "$as_me:$LINENO: checking for wchar.h" >&5
14796echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14797if test "${ac_cv_header_wchar_h+set}" = set; then
14798 echo $ECHO_N "(cached) $ECHO_C" >&6
14799else
14800 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014801fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014802echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14803echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14804
14805fi
14806if test $ac_cv_header_wchar_h = yes; then
14807
14808
14809cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014810#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014811_ACEOF
14812
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014813 wchar_h="yes"
14814
Guido van Rossumef2255b2000-03-10 22:30:29 +000014815else
Martin v. Löwis11437992002-04-12 09:54:03 +000014816 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014817
14818fi
14819
Michael W. Hudson54241132001-12-07 15:38:26 +000014820
Martin v. Löwis11437992002-04-12 09:54:03 +000014821
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014822# determine wchar_t size
14823if test "$wchar_h" = yes
14824then
Martin v. Löwis11437992002-04-12 09:54:03 +000014825 echo "$as_me:$LINENO: checking for wchar_t" >&5
14826echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14827if test "${ac_cv_type_wchar_t+set}" = set; then
14828 echo $ECHO_N "(cached) $ECHO_C" >&6
14829else
14830 cat >conftest.$ac_ext <<_ACEOF
14831#line $LINENO "configure"
14832#include "confdefs.h"
14833#include <wchar.h>
14834
14835#ifdef F77_DUMMY_MAIN
14836# ifdef __cplusplus
14837 extern "C"
14838# endif
14839 int F77_DUMMY_MAIN() { return 1; }
14840#endif
14841int
14842main ()
14843{
14844if ((wchar_t *) 0)
14845 return 0;
14846if (sizeof (wchar_t))
14847 return 0;
14848 ;
14849 return 0;
14850}
14851_ACEOF
14852rm -f conftest.$ac_objext
14853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14854 (eval $ac_compile) 2>&5
14855 ac_status=$?
14856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14857 (exit $ac_status); } &&
14858 { ac_try='test -s conftest.$ac_objext'
14859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14860 (eval $ac_try) 2>&5
14861 ac_status=$?
14862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14863 (exit $ac_status); }; }; then
14864 ac_cv_type_wchar_t=yes
14865else
14866 echo "$as_me: failed program was:" >&5
14867cat conftest.$ac_ext >&5
14868ac_cv_type_wchar_t=no
14869fi
14870rm -f conftest.$ac_objext conftest.$ac_ext
14871fi
14872echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14873echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14874
14875echo "$as_me:$LINENO: checking size of wchar_t" >&5
14876echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14877if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14878 echo $ECHO_N "(cached) $ECHO_C" >&6
14879else
14880 if test "$ac_cv_type_wchar_t" = yes; then
14881 # The cast to unsigned long works around a bug in the HP C Compiler
14882 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14883 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14884 # This bug is HP SR number 8606223364.
14885 if test "$cross_compiling" = yes; then
14886 # Depending upon the size, compute the lo and hi bounds.
14887cat >conftest.$ac_ext <<_ACEOF
14888#line $LINENO "configure"
14889#include "confdefs.h"
14890#include <wchar.h>
14891
14892#ifdef F77_DUMMY_MAIN
14893# ifdef __cplusplus
14894 extern "C"
14895# endif
14896 int F77_DUMMY_MAIN() { return 1; }
14897#endif
14898int
14899main ()
14900{
14901static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14902test_array [0] = 0
14903
14904 ;
14905 return 0;
14906}
14907_ACEOF
14908rm -f conftest.$ac_objext
14909if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14910 (eval $ac_compile) 2>&5
14911 ac_status=$?
14912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14913 (exit $ac_status); } &&
14914 { ac_try='test -s conftest.$ac_objext'
14915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14916 (eval $ac_try) 2>&5
14917 ac_status=$?
14918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14919 (exit $ac_status); }; }; then
14920 ac_lo=0 ac_mid=0
14921 while :; do
14922 cat >conftest.$ac_ext <<_ACEOF
14923#line $LINENO "configure"
14924#include "confdefs.h"
14925#include <wchar.h>
14926
14927#ifdef F77_DUMMY_MAIN
14928# ifdef __cplusplus
14929 extern "C"
14930# endif
14931 int F77_DUMMY_MAIN() { return 1; }
14932#endif
14933int
14934main ()
14935{
14936static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14937test_array [0] = 0
14938
14939 ;
14940 return 0;
14941}
14942_ACEOF
14943rm -f conftest.$ac_objext
14944if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14945 (eval $ac_compile) 2>&5
14946 ac_status=$?
14947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14948 (exit $ac_status); } &&
14949 { ac_try='test -s conftest.$ac_objext'
14950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14951 (eval $ac_try) 2>&5
14952 ac_status=$?
14953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14954 (exit $ac_status); }; }; then
14955 ac_hi=$ac_mid; break
14956else
14957 echo "$as_me: failed program was:" >&5
14958cat conftest.$ac_ext >&5
14959ac_lo=`expr $ac_mid + 1`
14960 if test $ac_lo -le $ac_mid; then
14961 ac_lo= ac_hi=
14962 break
14963 fi
14964 ac_mid=`expr 2 '*' $ac_mid + 1`
14965fi
14966rm -f conftest.$ac_objext conftest.$ac_ext
14967 done
14968else
14969 echo "$as_me: failed program was:" >&5
14970cat conftest.$ac_ext >&5
14971cat >conftest.$ac_ext <<_ACEOF
14972#line $LINENO "configure"
14973#include "confdefs.h"
14974#include <wchar.h>
14975
14976#ifdef F77_DUMMY_MAIN
14977# ifdef __cplusplus
14978 extern "C"
14979# endif
14980 int F77_DUMMY_MAIN() { return 1; }
14981#endif
14982int
14983main ()
14984{
14985static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14986test_array [0] = 0
14987
14988 ;
14989 return 0;
14990}
14991_ACEOF
14992rm -f conftest.$ac_objext
14993if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14994 (eval $ac_compile) 2>&5
14995 ac_status=$?
14996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14997 (exit $ac_status); } &&
14998 { ac_try='test -s conftest.$ac_objext'
14999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15000 (eval $ac_try) 2>&5
15001 ac_status=$?
15002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15003 (exit $ac_status); }; }; then
15004 ac_hi=-1 ac_mid=-1
15005 while :; do
15006 cat >conftest.$ac_ext <<_ACEOF
15007#line $LINENO "configure"
15008#include "confdefs.h"
15009#include <wchar.h>
15010
15011#ifdef F77_DUMMY_MAIN
15012# ifdef __cplusplus
15013 extern "C"
15014# endif
15015 int F77_DUMMY_MAIN() { return 1; }
15016#endif
15017int
15018main ()
15019{
15020static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
15021test_array [0] = 0
15022
15023 ;
15024 return 0;
15025}
15026_ACEOF
15027rm -f conftest.$ac_objext
15028if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15029 (eval $ac_compile) 2>&5
15030 ac_status=$?
15031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15032 (exit $ac_status); } &&
15033 { ac_try='test -s conftest.$ac_objext'
15034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15035 (eval $ac_try) 2>&5
15036 ac_status=$?
15037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15038 (exit $ac_status); }; }; then
15039 ac_lo=$ac_mid; break
15040else
15041 echo "$as_me: failed program was:" >&5
15042cat conftest.$ac_ext >&5
15043ac_hi=`expr '(' $ac_mid ')' - 1`
15044 if test $ac_mid -le $ac_hi; then
15045 ac_lo= ac_hi=
15046 break
15047 fi
15048 ac_mid=`expr 2 '*' $ac_mid`
15049fi
15050rm -f conftest.$ac_objext conftest.$ac_ext
15051 done
15052else
15053 echo "$as_me: failed program was:" >&5
15054cat conftest.$ac_ext >&5
15055ac_lo= ac_hi=
15056fi
15057rm -f conftest.$ac_objext conftest.$ac_ext
15058fi
15059rm -f conftest.$ac_objext conftest.$ac_ext
15060# Binary search between lo and hi bounds.
15061while test "x$ac_lo" != "x$ac_hi"; do
15062 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15063 cat >conftest.$ac_ext <<_ACEOF
15064#line $LINENO "configure"
15065#include "confdefs.h"
15066#include <wchar.h>
15067
15068#ifdef F77_DUMMY_MAIN
15069# ifdef __cplusplus
15070 extern "C"
15071# endif
15072 int F77_DUMMY_MAIN() { return 1; }
15073#endif
15074int
15075main ()
15076{
15077static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15078test_array [0] = 0
15079
15080 ;
15081 return 0;
15082}
15083_ACEOF
15084rm -f conftest.$ac_objext
15085if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15086 (eval $ac_compile) 2>&5
15087 ac_status=$?
15088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15089 (exit $ac_status); } &&
15090 { ac_try='test -s conftest.$ac_objext'
15091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15092 (eval $ac_try) 2>&5
15093 ac_status=$?
15094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15095 (exit $ac_status); }; }; then
15096 ac_hi=$ac_mid
15097else
15098 echo "$as_me: failed program was:" >&5
15099cat conftest.$ac_ext >&5
15100ac_lo=`expr '(' $ac_mid ')' + 1`
15101fi
15102rm -f conftest.$ac_objext conftest.$ac_ext
15103done
15104case $ac_lo in
15105?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15106'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15107echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15108 { (exit 1); exit 1; }; } ;;
15109esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015110else
15111 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015112 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15113echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15114 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015115else
Martin v. Löwis11437992002-04-12 09:54:03 +000015116 cat >conftest.$ac_ext <<_ACEOF
15117#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015118#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015119#include <wchar.h>
15120
15121long longval () { return (long) (sizeof (wchar_t)); }
15122unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015123#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015124#include <stdlib.h>
15125#ifdef F77_DUMMY_MAIN
15126# ifdef __cplusplus
15127 extern "C"
15128# endif
15129 int F77_DUMMY_MAIN() { return 1; }
15130#endif
15131int
15132main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015133{
Martin v. Löwis11437992002-04-12 09:54:03 +000015134
15135 FILE *f = fopen ("conftest.val", "w");
15136 if (! f)
15137 exit (1);
15138 if (((long) (sizeof (wchar_t))) < 0)
15139 {
15140 long i = longval ();
15141 if (i != ((long) (sizeof (wchar_t))))
15142 exit (1);
15143 fprintf (f, "%ld\n", i);
15144 }
15145 else
15146 {
15147 unsigned long i = ulongval ();
15148 if (i != ((long) (sizeof (wchar_t))))
15149 exit (1);
15150 fprintf (f, "%lu\n", i);
15151 }
15152 exit (ferror (f) || fclose (f) != 0);
15153
15154 ;
15155 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015156}
Martin v. Löwis11437992002-04-12 09:54:03 +000015157_ACEOF
15158rm -f conftest$ac_exeext
15159if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15160 (eval $ac_link) 2>&5
15161 ac_status=$?
15162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15163 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15165 (eval $ac_try) 2>&5
15166 ac_status=$?
15167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15168 (exit $ac_status); }; }; then
15169 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015170else
Martin v. Löwis11437992002-04-12 09:54:03 +000015171 echo "$as_me: program exited with status $ac_status" >&5
15172echo "$as_me: failed program was:" >&5
15173cat conftest.$ac_ext >&5
15174( exit $ac_status )
15175{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15176echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15177 { (exit 1); exit 1; }; }
15178fi
15179rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15180fi
15181fi
15182rm -f conftest.val
15183else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015184 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015185fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015186fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015187echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15188echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15189cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015190#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015191_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015192
Michael W. Hudson54241132001-12-07 15:38:26 +000015193
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015194fi
15195
Martin v. Löwis11437992002-04-12 09:54:03 +000015196echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15197echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015198# Check whether --enable-unicode or --disable-unicode was given.
15199if test "${enable_unicode+set}" = set; then
15200 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015201
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015202else
15203 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015204fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015205
15206if test $enable_unicode = yes
15207then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015208 # Without any arguments, Py_UNICODE defaults to two-byte mode
15209 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015210fi
15211
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015212
15213
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015214case "$enable_unicode" in
15215ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015216 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015217#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015218_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015219
15220 ;;
15221ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015222 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015223#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015224_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015225
15226 ;;
15227esac
15228
Michael W. Hudson54241132001-12-07 15:38:26 +000015229
Martin v. Löwis11437992002-04-12 09:54:03 +000015230
15231
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015232
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015233if test "$enable_unicode" = "no"
15234then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015235 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015236 echo "$as_me:$LINENO: result: not used" >&5
15237echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015238else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015239 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015240
15241cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015242#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015243_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015244
15245 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15246 then
15247 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015248
Martin v. Löwis11437992002-04-12 09:54:03 +000015249cat >>confdefs.h <<\_ACEOF
15250#define HAVE_USABLE_WCHAR_T 1
15251_ACEOF
15252
15253 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015254#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015255_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015256
15257 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15258 then
15259 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015260 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015261#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015262_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015263
15264 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15265 then
15266 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015267 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015268#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015269_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015270
15271 else
15272 PY_UNICODE_TYPE="no type found"
15273 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015274 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15275echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015276fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015277
15278# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015279echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15280echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15281if test "${ac_cv_c_bigendian+set}" = set; then
15282 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015283else
Martin v. Löwis11437992002-04-12 09:54:03 +000015284 # See if sys/param.h defines the BYTE_ORDER macro.
15285cat >conftest.$ac_ext <<_ACEOF
15286#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015287#include "confdefs.h"
15288#include <sys/types.h>
15289#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015290
Martin v. Löwis11437992002-04-12 09:54:03 +000015291#ifdef F77_DUMMY_MAIN
15292# ifdef __cplusplus
15293 extern "C"
15294# endif
15295 int F77_DUMMY_MAIN() { return 1; }
15296#endif
15297int
15298main ()
15299{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015300#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15301 bogus endian macros
15302#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015303
15304 ;
15305 return 0;
15306}
15307_ACEOF
15308rm -f conftest.$ac_objext
15309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15310 (eval $ac_compile) 2>&5
15311 ac_status=$?
15312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15313 (exit $ac_status); } &&
15314 { ac_try='test -s conftest.$ac_objext'
15315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15316 (eval $ac_try) 2>&5
15317 ac_status=$?
15318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15319 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015320 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015321cat >conftest.$ac_ext <<_ACEOF
15322#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015323#include "confdefs.h"
15324#include <sys/types.h>
15325#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015326
Martin v. Löwis11437992002-04-12 09:54:03 +000015327#ifdef F77_DUMMY_MAIN
15328# ifdef __cplusplus
15329 extern "C"
15330# endif
15331 int F77_DUMMY_MAIN() { return 1; }
15332#endif
15333int
15334main ()
15335{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015336#if BYTE_ORDER != BIG_ENDIAN
15337 not big endian
15338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015339
15340 ;
15341 return 0;
15342}
15343_ACEOF
15344rm -f conftest.$ac_objext
15345if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15346 (eval $ac_compile) 2>&5
15347 ac_status=$?
15348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15349 (exit $ac_status); } &&
15350 { ac_try='test -s conftest.$ac_objext'
15351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15352 (eval $ac_try) 2>&5
15353 ac_status=$?
15354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15355 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015356 ac_cv_c_bigendian=yes
15357else
Martin v. Löwis11437992002-04-12 09:54:03 +000015358 echo "$as_me: failed program was:" >&5
15359cat conftest.$ac_ext >&5
15360ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015361fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015362rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015363else
Martin v. Löwis11437992002-04-12 09:54:03 +000015364 echo "$as_me: failed program was:" >&5
15365cat conftest.$ac_ext >&5
15366# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015367if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015368 # try to guess the endianess by grep'ing values into an object file
15369 ac_cv_c_bigendian=unknown
15370 cat >conftest.$ac_ext <<_ACEOF
15371#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015372#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015373short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15374short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15375void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15376short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15377short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15378void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15379#ifdef F77_DUMMY_MAIN
15380# ifdef __cplusplus
15381 extern "C"
15382# endif
15383 int F77_DUMMY_MAIN() { return 1; }
15384#endif
15385int
15386main ()
15387{
15388 _ascii (); _ebcdic ();
15389 ;
15390 return 0;
15391}
15392_ACEOF
15393rm -f conftest.$ac_objext
15394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15395 (eval $ac_compile) 2>&5
15396 ac_status=$?
15397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15398 (exit $ac_status); } &&
15399 { ac_try='test -s conftest.$ac_objext'
15400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15401 (eval $ac_try) 2>&5
15402 ac_status=$?
15403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15404 (exit $ac_status); }; }; then
15405 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15406 ac_cv_c_bigendian=yes
15407fi
15408if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15409 if test "$ac_cv_c_bigendian" = unknown; then
15410 ac_cv_c_bigendian=no
15411 else
15412 # finding both strings is unlikely to happen, but who knows?
15413 ac_cv_c_bigendian=unknown
15414 fi
15415fi
15416else
15417 echo "$as_me: failed program was:" >&5
15418cat conftest.$ac_ext >&5
15419fi
15420rm -f conftest.$ac_objext conftest.$ac_ext
15421else
15422 cat >conftest.$ac_ext <<_ACEOF
15423#line $LINENO "configure"
15424#include "confdefs.h"
15425int
15426main ()
15427{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015428 /* Are we little or big endian? From Harbison&Steele. */
15429 union
15430 {
15431 long l;
15432 char c[sizeof (long)];
15433 } u;
15434 u.l = 1;
15435 exit (u.c[sizeof (long) - 1] == 1);
15436}
Martin v. Löwis11437992002-04-12 09:54:03 +000015437_ACEOF
15438rm -f conftest$ac_exeext
15439if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15440 (eval $ac_link) 2>&5
15441 ac_status=$?
15442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15443 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15445 (eval $ac_try) 2>&5
15446 ac_status=$?
15447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15448 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015449 ac_cv_c_bigendian=no
15450else
Martin v. Löwis11437992002-04-12 09:54:03 +000015451 echo "$as_me: program exited with status $ac_status" >&5
15452echo "$as_me: failed program was:" >&5
15453cat conftest.$ac_ext >&5
15454( exit $ac_status )
15455ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015456fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015457rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015458fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015459fi
15460rm -f conftest.$ac_objext conftest.$ac_ext
15461fi
15462echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15463echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15464case $ac_cv_c_bigendian in
15465 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015466
Martin v. Löwis11437992002-04-12 09:54:03 +000015467cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015468#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015469_ACEOF
15470 ;;
15471 no)
15472 ;;
15473 *)
15474 { { echo "$as_me:$LINENO: error: unknown endianess
15475presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15476echo "$as_me: error: unknown endianess
15477presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15478 { (exit 1); exit 1; }; } ;;
15479esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015480
Michael W. Hudson54241132001-12-07 15:38:26 +000015481
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015482# Check whether right shifting a negative integer extends the sign bit
15483# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015484echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15485echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15486if test "${ac_cv_rshift_extends_sign+set}" = set; then
15487 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015488else
Martin v. Löwis11437992002-04-12 09:54:03 +000015489
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015490if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015491 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015492else
Martin v. Löwis11437992002-04-12 09:54:03 +000015493 cat >conftest.$ac_ext <<_ACEOF
15494#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015495#include "confdefs.h"
15496
15497int main()
15498{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015499 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015500}
15501
Martin v. Löwis11437992002-04-12 09:54:03 +000015502_ACEOF
15503rm -f conftest$ac_exeext
15504if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15505 (eval $ac_link) 2>&5
15506 ac_status=$?
15507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15508 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15510 (eval $ac_try) 2>&5
15511 ac_status=$?
15512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15513 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015514 ac_cv_rshift_extends_sign=yes
15515else
Martin v. Löwis11437992002-04-12 09:54:03 +000015516 echo "$as_me: program exited with status $ac_status" >&5
15517echo "$as_me: failed program was:" >&5
15518cat conftest.$ac_ext >&5
15519( exit $ac_status )
15520ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015521fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015522rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15523fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015524fi
15525
Martin v. Löwis11437992002-04-12 09:54:03 +000015526echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15527echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015528if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015529then
Martin v. Löwis11437992002-04-12 09:54:03 +000015530
15531cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015532#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015533_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015534
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015535fi
15536
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015537# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015538echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15539echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15540if test "${ac_cv_have_getc_unlocked+set}" = set; then
15541 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015542else
Martin v. Löwis11437992002-04-12 09:54:03 +000015543
15544cat >conftest.$ac_ext <<_ACEOF
15545#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015546#include "confdefs.h"
15547#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015548#ifdef F77_DUMMY_MAIN
15549# ifdef __cplusplus
15550 extern "C"
15551# endif
15552 int F77_DUMMY_MAIN() { return 1; }
15553#endif
15554int
15555main ()
15556{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015557
15558 FILE *f = fopen("/dev/null", "r");
15559 flockfile(f);
15560 getc_unlocked(f);
15561 funlockfile(f);
15562
Martin v. Löwis11437992002-04-12 09:54:03 +000015563 ;
15564 return 0;
15565}
15566_ACEOF
15567rm -f conftest.$ac_objext conftest$ac_exeext
15568if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15569 (eval $ac_link) 2>&5
15570 ac_status=$?
15571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15572 (exit $ac_status); } &&
15573 { ac_try='test -s conftest$ac_exeext'
15574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15575 (eval $ac_try) 2>&5
15576 ac_status=$?
15577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15578 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015579 ac_cv_have_getc_unlocked=yes
15580else
Martin v. Löwis11437992002-04-12 09:54:03 +000015581 echo "$as_me: failed program was:" >&5
15582cat conftest.$ac_ext >&5
15583ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015584fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015585rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015586fi
15587
Martin v. Löwis11437992002-04-12 09:54:03 +000015588echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15589echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015590if test "$ac_cv_have_getc_unlocked" = yes
15591then
Martin v. Löwis11437992002-04-12 09:54:03 +000015592
15593cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015594#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015595_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015596
15597fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015598
Martin v. Löwis0daad592001-09-30 21:09:59 +000015599# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015600echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15601echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15602if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15603 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015604else
Martin v. Löwis11437992002-04-12 09:54:03 +000015605 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015606LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015607cat >conftest.$ac_ext <<_ACEOF
15608#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015609#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015610
Guido van Rossum353ae582001-07-10 16:45:32 +000015611/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015612#ifdef __cplusplus
15613extern "C"
15614#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015615/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015616 builtin and then its argument prototype would still apply. */
15617char rl_pre_input_hook ();
15618#ifdef F77_DUMMY_MAIN
15619# ifdef __cplusplus
15620 extern "C"
15621# endif
15622 int F77_DUMMY_MAIN() { return 1; }
15623#endif
15624int
15625main ()
15626{
15627rl_pre_input_hook ();
15628 ;
15629 return 0;
15630}
15631_ACEOF
15632rm -f conftest.$ac_objext conftest$ac_exeext
15633if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15634 (eval $ac_link) 2>&5
15635 ac_status=$?
15636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15637 (exit $ac_status); } &&
15638 { ac_try='test -s conftest$ac_exeext'
15639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15640 (eval $ac_try) 2>&5
15641 ac_status=$?
15642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15643 (exit $ac_status); }; }; then
15644 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015645else
Martin v. Löwis11437992002-04-12 09:54:03 +000015646 echo "$as_me: failed program was:" >&5
15647cat conftest.$ac_ext >&5
15648ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015649fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015650rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15651LIBS=$ac_check_lib_save_LIBS
15652fi
15653echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15654echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15655if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015656
Martin v. Löwis11437992002-04-12 09:54:03 +000015657cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015658#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015659_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015660
Martin v. Löwis0daad592001-09-30 21:09:59 +000015661fi
15662
Michael W. Hudson54241132001-12-07 15:38:26 +000015663
Martin v. Löwis0daad592001-09-30 21:09:59 +000015664# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015665echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15666echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15667if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15668 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015669else
Martin v. Löwis11437992002-04-12 09:54:03 +000015670 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015671LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015672cat >conftest.$ac_ext <<_ACEOF
15673#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015674#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015675
Martin v. Löwis0daad592001-09-30 21:09:59 +000015676/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015677#ifdef __cplusplus
15678extern "C"
15679#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015680/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015681 builtin and then its argument prototype would still apply. */
15682char rl_completion_matches ();
15683#ifdef F77_DUMMY_MAIN
15684# ifdef __cplusplus
15685 extern "C"
15686# endif
15687 int F77_DUMMY_MAIN() { return 1; }
15688#endif
15689int
15690main ()
15691{
15692rl_completion_matches ();
15693 ;
15694 return 0;
15695}
15696_ACEOF
15697rm -f conftest.$ac_objext conftest$ac_exeext
15698if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15699 (eval $ac_link) 2>&5
15700 ac_status=$?
15701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15702 (exit $ac_status); } &&
15703 { ac_try='test -s conftest$ac_exeext'
15704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15705 (eval $ac_try) 2>&5
15706 ac_status=$?
15707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15708 (exit $ac_status); }; }; then
15709 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015710else
Martin v. Löwis11437992002-04-12 09:54:03 +000015711 echo "$as_me: failed program was:" >&5
15712cat conftest.$ac_ext >&5
15713ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015714fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015715rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15716LIBS=$ac_check_lib_save_LIBS
15717fi
15718echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15719echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15720if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015721
Martin v. Löwis11437992002-04-12 09:54:03 +000015722cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015723#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015724_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015725
Guido van Rossum353ae582001-07-10 16:45:32 +000015726fi
15727
Jack Jansendd19cf82001-12-06 22:36:17 +000015728
Martin v. Löwis11437992002-04-12 09:54:03 +000015729echo "$as_me:$LINENO: checking for broken nice()" >&5
15730echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15731if test "${ac_cv_broken_nice+set}" = set; then
15732 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015733else
Martin v. Löwis11437992002-04-12 09:54:03 +000015734
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015735if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015736 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015737else
Martin v. Löwis11437992002-04-12 09:54:03 +000015738 cat >conftest.$ac_ext <<_ACEOF
15739#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015740#include "confdefs.h"
15741
15742int main()
15743{
15744 int val1 = nice(1);
15745 if (val1 != -1 && val1 == nice(2))
15746 exit(0);
15747 exit(1);
15748}
15749
Martin v. Löwis11437992002-04-12 09:54:03 +000015750_ACEOF
15751rm -f conftest$ac_exeext
15752if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15753 (eval $ac_link) 2>&5
15754 ac_status=$?
15755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15756 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15758 (eval $ac_try) 2>&5
15759 ac_status=$?
15760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15761 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015762 ac_cv_broken_nice=yes
15763else
Martin v. Löwis11437992002-04-12 09:54:03 +000015764 echo "$as_me: program exited with status $ac_status" >&5
15765echo "$as_me: failed program was:" >&5
15766cat conftest.$ac_ext >&5
15767( exit $ac_status )
15768ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015769fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015770rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15771fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015772fi
15773
Martin v. Löwis11437992002-04-12 09:54:03 +000015774echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15775echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015776if test "$ac_cv_broken_nice" = yes
15777then
Martin v. Löwis11437992002-04-12 09:54:03 +000015778
15779cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015780#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015781_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015782
15783fi
15784
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015785# Look for subsecond timestamps in struct stat
15786echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
15787echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
15788if test "${ac_cv_stat_tv_nsec+set}" = set; then
15789 echo $ECHO_N "(cached) $ECHO_C" >&6
15790else
15791 cat >conftest.$ac_ext <<_ACEOF
15792#line $LINENO "configure"
15793#include "confdefs.h"
15794#include <sys/stat.h>
15795#ifdef F77_DUMMY_MAIN
15796# ifdef __cplusplus
15797 extern "C"
15798# endif
15799 int F77_DUMMY_MAIN() { return 1; }
15800#endif
15801int
15802main ()
15803{
15804
15805struct stat st;
15806st.st_mtim.tv_nsec = 1;
15807
15808 ;
15809 return 0;
15810}
15811_ACEOF
15812rm -f conftest.$ac_objext
15813if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15814 (eval $ac_compile) 2>&5
15815 ac_status=$?
15816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15817 (exit $ac_status); } &&
15818 { ac_try='test -s conftest.$ac_objext'
15819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15820 (eval $ac_try) 2>&5
15821 ac_status=$?
15822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15823 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015824 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015825else
15826 echo "$as_me: failed program was:" >&5
15827cat conftest.$ac_ext >&5
15828ac_cv_stat_tv_nsec=no
15829fi
15830rm -f conftest.$ac_objext conftest.$ac_ext
15831fi
15832
15833echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
15834echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
15835if test "$ac_cv_stat_tv_nsec" = yes
15836then
15837
15838cat >>confdefs.h <<\_ACEOF
15839#define HAVE_STAT_TV_NSEC 1
15840_ACEOF
15841
15842fi
15843
Jack Jansen666b1e72001-10-31 12:11:48 +000015844# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015845echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15846echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15847if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15848 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015849else
Martin v. Löwis11437992002-04-12 09:54:03 +000015850 cat >conftest.$ac_ext <<_ACEOF
15851#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015852#include "confdefs.h"
15853#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015854#ifdef F77_DUMMY_MAIN
15855# ifdef __cplusplus
15856 extern "C"
15857# endif
15858 int F77_DUMMY_MAIN() { return 1; }
15859#endif
15860int
15861main ()
15862{
Jack Jansen666b1e72001-10-31 12:11:48 +000015863
15864 int rtn;
15865 rtn = mvwdelch(0,0,0);
15866
Martin v. Löwis11437992002-04-12 09:54:03 +000015867 ;
15868 return 0;
15869}
15870_ACEOF
15871rm -f conftest.$ac_objext
15872if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15873 (eval $ac_compile) 2>&5
15874 ac_status=$?
15875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15876 (exit $ac_status); } &&
15877 { ac_try='test -s conftest.$ac_objext'
15878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15879 (eval $ac_try) 2>&5
15880 ac_status=$?
15881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15882 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015883 ac_cv_mvwdelch_is_expression=yes
15884else
Martin v. Löwis11437992002-04-12 09:54:03 +000015885 echo "$as_me: failed program was:" >&5
15886cat conftest.$ac_ext >&5
15887ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015888fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015889rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015890fi
15891
Martin v. Löwis11437992002-04-12 09:54:03 +000015892echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15893echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015894
15895if test "$ac_cv_mvwdelch_is_expression" = yes
15896then
Martin v. Löwis11437992002-04-12 09:54:03 +000015897
15898cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015899#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015900_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015901
15902fi
15903
Martin v. Löwis11437992002-04-12 09:54:03 +000015904echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15905echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15906if test "${ac_cv_window_has_flags+set}" = set; then
15907 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015908else
Martin v. Löwis11437992002-04-12 09:54:03 +000015909 cat >conftest.$ac_ext <<_ACEOF
15910#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015911#include "confdefs.h"
15912#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015913#ifdef F77_DUMMY_MAIN
15914# ifdef __cplusplus
15915 extern "C"
15916# endif
15917 int F77_DUMMY_MAIN() { return 1; }
15918#endif
15919int
15920main ()
15921{
Jack Jansen666b1e72001-10-31 12:11:48 +000015922
15923 WINDOW *w;
15924 w->_flags = 0;
15925
Martin v. Löwis11437992002-04-12 09:54:03 +000015926 ;
15927 return 0;
15928}
15929_ACEOF
15930rm -f conftest.$ac_objext
15931if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15932 (eval $ac_compile) 2>&5
15933 ac_status=$?
15934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15935 (exit $ac_status); } &&
15936 { ac_try='test -s conftest.$ac_objext'
15937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15938 (eval $ac_try) 2>&5
15939 ac_status=$?
15940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15941 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015942 ac_cv_window_has_flags=yes
15943else
Martin v. Löwis11437992002-04-12 09:54:03 +000015944 echo "$as_me: failed program was:" >&5
15945cat conftest.$ac_ext >&5
15946ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015947fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015948rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015949fi
15950
Martin v. Löwis11437992002-04-12 09:54:03 +000015951echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15952echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015953
Jack Jansen666b1e72001-10-31 12:11:48 +000015954
15955if test "$ac_cv_window_has_flags" = yes
15956then
Martin v. Löwis11437992002-04-12 09:54:03 +000015957
15958cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015959#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015960_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015961
15962fi
15963
Guido van Rossum95713eb2000-05-18 20:53:31 +000015964# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15965# Add sys/socket.h to confdefs.h
15966cat >> confdefs.h <<\EOF
15967#ifdef HAVE_SYS_SOCKET_H
15968#include <sys/socket.h>
15969#endif
15970EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015971echo "$as_me:$LINENO: checking for socklen_t" >&5
15972echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15973if test "${ac_cv_type_socklen_t+set}" = set; then
15974 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015975else
Martin v. Löwis11437992002-04-12 09:54:03 +000015976 cat >conftest.$ac_ext <<_ACEOF
15977#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015978#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015979$ac_includes_default
15980#ifdef F77_DUMMY_MAIN
15981# ifdef __cplusplus
15982 extern "C"
15983# endif
15984 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015986int
15987main ()
15988{
15989if ((socklen_t *) 0)
15990 return 0;
15991if (sizeof (socklen_t))
15992 return 0;
15993 ;
15994 return 0;
15995}
15996_ACEOF
15997rm -f conftest.$ac_objext
15998if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15999 (eval $ac_compile) 2>&5
16000 ac_status=$?
16001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16002 (exit $ac_status); } &&
16003 { ac_try='test -s conftest.$ac_objext'
16004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16005 (eval $ac_try) 2>&5
16006 ac_status=$?
16007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16008 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016009 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000016010else
Martin v. Löwis11437992002-04-12 09:54:03 +000016011 echo "$as_me: failed program was:" >&5
16012cat conftest.$ac_ext >&5
16013ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000016014fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016015rm -f conftest.$ac_objext conftest.$ac_ext
16016fi
16017echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
16018echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
16019if test $ac_cv_type_socklen_t = yes; then
16020 :
16021else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016022
Martin v. Löwis11437992002-04-12 09:54:03 +000016023cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016024#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000016025_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016026
16027fi
16028
Michael W. Hudson54241132001-12-07 15:38:26 +000016029
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016030#AC_MSG_CHECKING(for Modules/Setup)
16031#if test ! -f Modules/Setup ; then
16032# if test ! -d Modules ; then
16033# mkdir Modules
16034# fi
16035# cp "$srcdir/Modules/Setup.dist" Modules/Setup
16036# AC_MSG_RESULT(creating)
16037#else
16038# AC_MSG_RESULT(already exists)
16039#fi
16040
Michael W. Hudson54241132001-12-07 15:38:26 +000016041
16042
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016043for h in `(cd $srcdir;echo Python/thread_*.h)`
16044do
16045 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16046done
16047
Michael W. Hudson54241132001-12-07 15:38:26 +000016048
Jack Jansen0b06be72002-06-21 14:48:38 +000016049SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000016050echo "$as_me:$LINENO: checking for build directories" >&5
16051echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016052for dir in $SRCDIRS; do
16053 if test ! -d $dir; then
16054 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016055 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016056done
Martin v. Löwis11437992002-04-12 09:54:03 +000016057echo "$as_me:$LINENO: result: done" >&5
16058echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000016059
Guido van Rossum627b2d71993-12-24 10:39:16 +000016060# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000016061ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
16062cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016063# This file is a shell script that caches the results of configure
16064# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016065# scripts and configure runs, see configure's option --config-cache.
16066# It is not useful on other systems. If it contains results you don't
16067# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016068#
Martin v. Löwis11437992002-04-12 09:54:03 +000016069# config.status only pays attention to the cache file if you give it
16070# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016071#
Martin v. Löwis11437992002-04-12 09:54:03 +000016072# `ac_cv_env_foo' variables (set or unset) will be overriden when
16073# loading this file, other *unset* `ac_cv_foo' will be assigned the
16074# following values.
16075
16076_ACEOF
16077
Guido van Rossumf78abae1997-01-21 22:02:36 +000016078# The following way of writing the cache mishandles newlines in values,
16079# but we know of no workaround that is simple, portable, and efficient.
16080# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016081# Ultrix sh set writes to stderr and can't be redirected directly,
16082# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000016083{
16084 (set) 2>&1 |
16085 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16086 *ac_space=\ *)
16087 # `set' does not quote correctly, so add quotes (double-quote
16088 # substitution turns \\\\ into \\, and sed turns \\ into \).
16089 sed -n \
16090 "s/'/'\\\\''/g;
16091 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16092 ;;
16093 *)
16094 # `set' quotes correctly as required by POSIX, so do not add quotes.
16095 sed -n \
16096 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16097 ;;
16098 esac;
16099} |
16100 sed '
16101 t clear
16102 : clear
16103 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16104 t end
16105 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16106 : end' >>confcache
16107if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016108 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016109 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16110 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016111 else
16112 echo "not updating unwritable cache $cache_file"
16113 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016114fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016115rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016116
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016117test "x$prefix" = xNONE && prefix=$ac_default_prefix
16118# Let make expand exec_prefix.
16119test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016120
Martin v. Löwis11437992002-04-12 09:54:03 +000016121# VPATH may cause trouble with some makes, so we remove $(srcdir),
16122# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16123# trailing colons and then remove the whole line if VPATH becomes empty
16124# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016125if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016126 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16127s/:*\$(srcdir):*/:/;
16128s/:*\${srcdir}:*/:/;
16129s/:*@srcdir@:*/:/;
16130s/^\([^=]*=[ ]*\):*/\1/;
16131s/:*$//;
16132s/^[^=]*=[ ]*$//;
16133}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016134fi
16135
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016136DEFS=-DHAVE_CONFIG_H
16137
Martin v. Löwis11437992002-04-12 09:54:03 +000016138
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016139: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016140ac_clean_files_save=$ac_clean_files
16141ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16142{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16143echo "$as_me: creating $CONFIG_STATUS" >&6;}
16144cat >$CONFIG_STATUS <<_ACEOF
16145#! $SHELL
16146# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016147# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016148# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016149# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016150
Martin v. Löwis11437992002-04-12 09:54:03 +000016151debug=false
16152SHELL=\${CONFIG_SHELL-$SHELL}
16153_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016154
Martin v. Löwis11437992002-04-12 09:54:03 +000016155cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016156
Martin v. Löwis11437992002-04-12 09:54:03 +000016157## --------------------- ##
16158## M4sh Initialization. ##
16159## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016160
Martin v. Löwis11437992002-04-12 09:54:03 +000016161# Be Bourne compatible
16162if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16163 emulate sh
16164 NULLCMD=:
16165elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16166 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016167fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016168
Martin v. Löwis11437992002-04-12 09:54:03 +000016169# NLS nuisances.
16170# Support unset when possible.
16171if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16172 as_unset=unset
16173else
16174 as_unset=false
16175fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016176
Martin v. Löwis11437992002-04-12 09:54:03 +000016177(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16178 { $as_unset LANG || test "${LANG+set}" != set; } ||
16179 { LANG=C; export LANG; }
16180(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16181 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16182 { LC_ALL=C; export LC_ALL; }
16183(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16184 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16185 { LC_TIME=C; export LC_TIME; }
16186(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16187 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16188 { LC_CTYPE=C; export LC_CTYPE; }
16189(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16190 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16191 { LANGUAGE=C; export LANGUAGE; }
16192(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16193 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16194 { LC_COLLATE=C; export LC_COLLATE; }
16195(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16196 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16197 { LC_NUMERIC=C; export LC_NUMERIC; }
16198(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16199 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16200 { LC_MESSAGES=C; export LC_MESSAGES; }
16201
16202
16203# Name of the executable.
16204as_me=`(basename "$0") 2>/dev/null ||
16205$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16206 X"$0" : 'X\(//\)$' \| \
16207 X"$0" : 'X\(/\)$' \| \
16208 . : '\(.\)' 2>/dev/null ||
16209echo X/"$0" |
16210 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16211 /^X\/\(\/\/\)$/{ s//\1/; q; }
16212 /^X\/\(\/\).*/{ s//\1/; q; }
16213 s/.*/./; q'`
16214
16215# PATH needs CR, and LINENO needs CR and PATH.
16216# Avoid depending upon Character Ranges.
16217as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16218as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16219as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16220as_cr_digits='0123456789'
16221as_cr_alnum=$as_cr_Letters$as_cr_digits
16222
16223# The user is always right.
16224if test "${PATH_SEPARATOR+set}" != set; then
16225 echo "#! /bin/sh" >conftest.sh
16226 echo "exit 0" >>conftest.sh
16227 chmod +x conftest.sh
16228 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16229 PATH_SEPARATOR=';'
16230 else
16231 PATH_SEPARATOR=:
16232 fi
16233 rm -f conftest.sh
16234fi
16235
16236
16237 as_lineno_1=$LINENO
16238 as_lineno_2=$LINENO
16239 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16240 test "x$as_lineno_1" != "x$as_lineno_2" &&
16241 test "x$as_lineno_3" = "x$as_lineno_2" || {
16242 # Find who we are. Look in the path if we contain no path at all
16243 # relative or not.
16244 case $0 in
16245 *[\\/]* ) as_myself=$0 ;;
16246 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16247for as_dir in $PATH
16248do
16249 IFS=$as_save_IFS
16250 test -z "$as_dir" && as_dir=.
16251 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16252done
16253
16254 ;;
16255 esac
16256 # We did not find ourselves, most probably we were run as `sh COMMAND'
16257 # in which case we are not to be found in the path.
16258 if test "x$as_myself" = x; then
16259 as_myself=$0
16260 fi
16261 if test ! -f "$as_myself"; then
16262 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16263echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16264 { (exit 1); exit 1; }; }
16265 fi
16266 case $CONFIG_SHELL in
16267 '')
16268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16269for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16270do
16271 IFS=$as_save_IFS
16272 test -z "$as_dir" && as_dir=.
16273 for as_base in sh bash ksh sh5; do
16274 case $as_dir in
16275 /*)
16276 if ("$as_dir/$as_base" -c '
16277 as_lineno_1=$LINENO
16278 as_lineno_2=$LINENO
16279 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16280 test "x$as_lineno_1" != "x$as_lineno_2" &&
16281 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16282 CONFIG_SHELL=$as_dir/$as_base
16283 export CONFIG_SHELL
16284 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16285 fi;;
16286 esac
16287 done
16288done
16289;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016290 esac
16291
Martin v. Löwis11437992002-04-12 09:54:03 +000016292 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16293 # uniformly replaced by the line number. The first 'sed' inserts a
16294 # line-number line before each line; the second 'sed' does the real
16295 # work. The second script uses 'N' to pair each line-number line
16296 # with the numbered line, and appends trailing '-' during
16297 # substitution so that $LINENO is not a special case at line end.
16298 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16299 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16300 sed '=' <$as_myself |
16301 sed '
16302 N
16303 s,$,-,
16304 : loop
16305 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16306 t loop
16307 s,-$,,
16308 s,^['$as_cr_digits']*\n,,
16309 ' >$as_me.lineno &&
16310 chmod +x $as_me.lineno ||
16311 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16312echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16313 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016314
Martin v. Löwis11437992002-04-12 09:54:03 +000016315 # Don't try to exec as it changes $[0], causing all sort of problems
16316 # (the dirname of $[0] is not the place where we might find the
16317 # original and so on. Autoconf is especially sensible to this).
16318 . ./$as_me.lineno
16319 # Exit status is that of the last command.
16320 exit
16321}
16322
16323
16324case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16325 *c*,-n*) ECHO_N= ECHO_C='
16326' ECHO_T=' ' ;;
16327 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16328 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16329esac
16330
16331if expr a : '\(a\)' >/dev/null 2>&1; then
16332 as_expr=expr
16333else
16334 as_expr=false
16335fi
16336
16337rm -f conf$$ conf$$.exe conf$$.file
16338echo >conf$$.file
16339if ln -s conf$$.file conf$$ 2>/dev/null; then
16340 # We could just check for DJGPP; but this test a) works b) is more generic
16341 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16342 if test -f conf$$.exe; then
16343 # Don't use ln at all; we don't have any links
16344 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016345 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016346 as_ln_s='ln -s'
16347 fi
16348elif ln conf$$.file conf$$ 2>/dev/null; then
16349 as_ln_s=ln
16350else
16351 as_ln_s='cp -p'
16352fi
16353rm -f conf$$ conf$$.exe conf$$.file
16354
16355as_executable_p="test -f"
16356
16357# Sed expression to map a string onto a valid CPP name.
16358as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16359
16360# Sed expression to map a string onto a valid variable name.
16361as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16362
16363
16364# IFS
16365# We need space, tab and new line, in precisely that order.
16366as_nl='
16367'
16368IFS=" $as_nl"
16369
16370# CDPATH.
16371$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16372
16373exec 6>&1
16374
16375# Open the log real soon, to keep \$[0] and so on meaningful, and to
16376# report actual input values of CONFIG_FILES etc. instead of their
16377# values after options handling. Logging --version etc. is OK.
16378exec 5>>config.log
16379{
16380 echo
16381 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16382## Running $as_me. ##
16383_ASBOX
16384} >&5
16385cat >&5 <<_CSEOF
16386
16387This file was extended by $as_me, which was
16388generated by GNU Autoconf 2.53. Invocation command line was
16389
16390 CONFIG_FILES = $CONFIG_FILES
16391 CONFIG_HEADERS = $CONFIG_HEADERS
16392 CONFIG_LINKS = $CONFIG_LINKS
16393 CONFIG_COMMANDS = $CONFIG_COMMANDS
16394 $ $0 $@
16395
16396_CSEOF
16397echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16398echo >&5
16399_ACEOF
16400
16401# Files that config.status was made for.
16402if test -n "$ac_config_files"; then
16403 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16404fi
16405
16406if test -n "$ac_config_headers"; then
16407 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16408fi
16409
16410if test -n "$ac_config_links"; then
16411 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16412fi
16413
16414if test -n "$ac_config_commands"; then
16415 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16416fi
16417
16418cat >>$CONFIG_STATUS <<\_ACEOF
16419
16420ac_cs_usage="\
16421\`$as_me' instantiates files from templates according to the
16422current configuration.
16423
16424Usage: $0 [OPTIONS] [FILE]...
16425
16426 -h, --help print this help, then exit
16427 -V, --version print version number, then exit
16428 -d, --debug don't remove temporary files
16429 --recheck update $as_me by reconfiguring in the same conditions
16430 --file=FILE[:TEMPLATE]
16431 instantiate the configuration file FILE
16432 --header=FILE[:TEMPLATE]
16433 instantiate the configuration header FILE
16434
16435Configuration files:
16436$config_files
16437
16438Configuration headers:
16439$config_headers
16440
16441Report bugs to <bug-autoconf@gnu.org>."
16442_ACEOF
16443
16444cat >>$CONFIG_STATUS <<_ACEOF
16445ac_cs_version="\\
16446config.status
16447configured by $0, generated by GNU Autoconf 2.53,
16448 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16449
16450Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16451Free Software Foundation, Inc.
16452This config.status script is free software; the Free Software Foundation
16453gives unlimited permission to copy, distribute and modify it."
16454srcdir=$srcdir
16455INSTALL="$INSTALL"
16456_ACEOF
16457
16458cat >>$CONFIG_STATUS <<\_ACEOF
16459# If no file are specified by the user, then we need to provide default
16460# value. By we need to know if files were specified by the user.
16461ac_need_defaults=:
16462while test $# != 0
16463do
16464 case $1 in
16465 --*=*)
16466 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16467 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16468 shift
16469 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16470 shift
16471 ;;
16472 -*);;
16473 *) # This is not an option, so the user has probably given explicit
16474 # arguments.
16475 ac_need_defaults=false;;
16476 esac
16477
16478 case $1 in
16479 # Handling of the options.
16480_ACEOF
16481cat >>$CONFIG_STATUS <<_ACEOF
16482 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16483 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16484 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16485_ACEOF
16486cat >>$CONFIG_STATUS <<\_ACEOF
16487 --version | --vers* | -V )
16488 echo "$ac_cs_version"; exit 0 ;;
16489 --he | --h)
16490 # Conflict between --help and --header
16491 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16492Try \`$0 --help' for more information." >&5
16493echo "$as_me: error: ambiguous option: $1
16494Try \`$0 --help' for more information." >&2;}
16495 { (exit 1); exit 1; }; };;
16496 --help | --hel | -h )
16497 echo "$ac_cs_usage"; exit 0 ;;
16498 --debug | --d* | -d )
16499 debug=: ;;
16500 --file | --fil | --fi | --f )
16501 shift
16502 CONFIG_FILES="$CONFIG_FILES $1"
16503 ac_need_defaults=false;;
16504 --header | --heade | --head | --hea )
16505 shift
16506 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16507 ac_need_defaults=false;;
16508
16509 # This is an error.
16510 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16511Try \`$0 --help' for more information." >&5
16512echo "$as_me: error: unrecognized option: $1
16513Try \`$0 --help' for more information." >&2;}
16514 { (exit 1); exit 1; }; } ;;
16515
16516 *) ac_config_targets="$ac_config_targets $1" ;;
16517
16518 esac
16519 shift
16520done
16521
16522_ACEOF
16523
16524
16525
16526
16527
16528cat >>$CONFIG_STATUS <<\_ACEOF
16529for ac_config_target in $ac_config_targets
16530do
16531 case "$ac_config_target" in
16532 # Handling of arguments.
16533 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16534 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16535 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16536 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16537echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16538 { (exit 1); exit 1; }; };;
16539 esac
16540done
16541
16542# If the user did not use the arguments to specify the items to instantiate,
16543# then the envvar interface is used. Set only those that are not.
16544# We use the long form for the default assignment because of an extremely
16545# bizarre bug on SunOS 4.1.3.
16546if $ac_need_defaults; then
16547 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16548 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16549fi
16550
16551# Create a temporary directory, and hook for its removal unless debugging.
16552$debug ||
16553{
16554 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16555 trap '{ (exit 1); exit 1; }' 1 2 13 15
16556}
16557
16558# Create a (secure) tmp directory for tmp files.
16559: ${TMPDIR=/tmp}
16560{
16561 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16562 test -n "$tmp" && test -d "$tmp"
16563} ||
16564{
16565 tmp=$TMPDIR/cs$$-$RANDOM
16566 (umask 077 && mkdir $tmp)
16567} ||
16568{
16569 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16570 { (exit 1); exit 1; }
16571}
16572
16573_ACEOF
16574
16575cat >>$CONFIG_STATUS <<_ACEOF
16576
16577#
16578# CONFIG_FILES section.
16579#
16580
16581# No need to generate the scripts if there are no CONFIG_FILES.
16582# This happens for instance when ./config.status config.h
16583if test -n "\$CONFIG_FILES"; then
16584 # Protect against being on the right side of a sed subst in config.status.
16585 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16586 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16587s,@SHELL@,$SHELL,;t t
16588s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16589s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16590s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16591s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16592s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16593s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16594s,@exec_prefix@,$exec_prefix,;t t
16595s,@prefix@,$prefix,;t t
16596s,@program_transform_name@,$program_transform_name,;t t
16597s,@bindir@,$bindir,;t t
16598s,@sbindir@,$sbindir,;t t
16599s,@libexecdir@,$libexecdir,;t t
16600s,@datadir@,$datadir,;t t
16601s,@sysconfdir@,$sysconfdir,;t t
16602s,@sharedstatedir@,$sharedstatedir,;t t
16603s,@localstatedir@,$localstatedir,;t t
16604s,@libdir@,$libdir,;t t
16605s,@includedir@,$includedir,;t t
16606s,@oldincludedir@,$oldincludedir,;t t
16607s,@infodir@,$infodir,;t t
16608s,@mandir@,$mandir,;t t
16609s,@build_alias@,$build_alias,;t t
16610s,@host_alias@,$host_alias,;t t
16611s,@target_alias@,$target_alias,;t t
16612s,@DEFS@,$DEFS,;t t
16613s,@ECHO_C@,$ECHO_C,;t t
16614s,@ECHO_N@,$ECHO_N,;t t
16615s,@ECHO_T@,$ECHO_T,;t t
16616s,@LIBS@,$LIBS,;t t
16617s,@VERSION@,$VERSION,;t t
16618s,@SOVERSION@,$SOVERSION,;t t
16619s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16620s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16621s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16622s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16623s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16624s,@MACHDEP@,$MACHDEP,;t t
16625s,@SGI_ABI@,$SGI_ABI,;t t
16626s,@CXX@,$CXX,;t t
16627s,@MAINOBJ@,$MAINOBJ,;t t
16628s,@EXEEXT@,$EXEEXT,;t t
16629s,@CC@,$CC,;t t
16630s,@CFLAGS@,$CFLAGS,;t t
16631s,@LDFLAGS@,$LDFLAGS,;t t
16632s,@CPPFLAGS@,$CPPFLAGS,;t t
16633s,@ac_ct_CC@,$ac_ct_CC,;t t
16634s,@OBJEXT@,$OBJEXT,;t t
16635s,@CPP@,$CPP,;t t
16636s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16637s,@LIBRARY@,$LIBRARY,;t t
16638s,@LDLIBRARY@,$LDLIBRARY,;t t
16639s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16640s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16641s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16642s,@INSTSONAME@,$INSTSONAME,;t t
16643s,@RUNSHARED@,$RUNSHARED,;t t
16644s,@LINKCC@,$LINKCC,;t t
16645s,@RANLIB@,$RANLIB,;t t
16646s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16647s,@AR@,$AR,;t t
16648s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16649s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16650s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16651s,@LN@,$LN,;t t
16652s,@OPT@,$OPT,;t t
16653s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16654s,@SO@,$SO,;t t
16655s,@LDSHARED@,$LDSHARED,;t t
16656s,@BLDSHARED@,$BLDSHARED,;t t
16657s,@CCSHARED@,$CCSHARED,;t t
16658s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16659s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016660s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000016661s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16662s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16663s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16664s,@LDLAST@,$LDLAST,;t t
16665s,@THREADOBJ@,$THREADOBJ,;t t
16666s,@DLINCLDIR@,$DLINCLDIR,;t t
16667s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16668s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16669s,@LIBOBJS@,$LIBOBJS,;t t
16670s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16671s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16672s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16673s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16674s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16675s,@LIBM@,$LIBM,;t t
16676s,@LIBC@,$LIBC,;t t
16677s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16678s,@THREADHEADERS@,$THREADHEADERS,;t t
16679s,@SRCDIRS@,$SRCDIRS,;t t
16680CEOF
16681
16682_ACEOF
16683
16684 cat >>$CONFIG_STATUS <<\_ACEOF
16685 # Split the substitutions into bite-sized pieces for seds with
16686 # small command number limits, like on Digital OSF/1 and HP-UX.
16687 ac_max_sed_lines=48
16688 ac_sed_frag=1 # Number of current file.
16689 ac_beg=1 # First line for current file.
16690 ac_end=$ac_max_sed_lines # Line after last line for current file.
16691 ac_more_lines=:
16692 ac_sed_cmds=
16693 while $ac_more_lines; do
16694 if test $ac_beg -gt 1; then
16695 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16696 else
16697 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16698 fi
16699 if test ! -s $tmp/subs.frag; then
16700 ac_more_lines=false
16701 else
16702 # The purpose of the label and of the branching condition is to
16703 # speed up the sed processing (if there are no `@' at all, there
16704 # is no need to browse any of the substitutions).
16705 # These are the two extra sed commands mentioned above.
16706 (echo ':t
16707 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16708 if test -z "$ac_sed_cmds"; then
16709 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16710 else
16711 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16712 fi
16713 ac_sed_frag=`expr $ac_sed_frag + 1`
16714 ac_beg=$ac_end
16715 ac_end=`expr $ac_end + $ac_max_sed_lines`
16716 fi
16717 done
16718 if test -z "$ac_sed_cmds"; then
16719 ac_sed_cmds=cat
16720 fi
16721fi # test -n "$CONFIG_FILES"
16722
16723_ACEOF
16724cat >>$CONFIG_STATUS <<\_ACEOF
16725for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16726 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16727 case $ac_file in
16728 - | *:- | *:-:* ) # input from stdin
16729 cat >$tmp/stdin
16730 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16731 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16732 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16733 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16734 * ) ac_file_in=$ac_file.in ;;
16735 esac
16736
16737 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16738 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16739$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16740 X"$ac_file" : 'X\(//\)[^/]' \| \
16741 X"$ac_file" : 'X\(//\)$' \| \
16742 X"$ac_file" : 'X\(/\)' \| \
16743 . : '\(.\)' 2>/dev/null ||
16744echo X"$ac_file" |
16745 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16746 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16747 /^X\(\/\/\)$/{ s//\1/; q; }
16748 /^X\(\/\).*/{ s//\1/; q; }
16749 s/.*/./; q'`
16750 { case "$ac_dir" in
16751 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16752 *) as_incr_dir=.;;
16753esac
16754as_dummy="$ac_dir"
16755for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16756 case $as_mkdir_dir in
16757 # Skip DOS drivespec
16758 ?:) as_incr_dir=$as_mkdir_dir ;;
16759 *)
16760 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16761 test -d "$as_incr_dir" ||
16762 mkdir "$as_incr_dir" ||
16763 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16764echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16765 { (exit 1); exit 1; }; }
16766 ;;
16767 esac
16768done; }
16769
16770 ac_builddir=.
16771
16772if test "$ac_dir" != .; then
16773 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16774 # A "../" for each directory in $ac_dir_suffix.
16775 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16776else
16777 ac_dir_suffix= ac_top_builddir=
16778fi
16779
16780case $srcdir in
16781 .) # No --srcdir option. We are building in place.
16782 ac_srcdir=.
16783 if test -z "$ac_top_builddir"; then
16784 ac_top_srcdir=.
16785 else
16786 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16787 fi ;;
16788 [\\/]* | ?:[\\/]* ) # Absolute path.
16789 ac_srcdir=$srcdir$ac_dir_suffix;
16790 ac_top_srcdir=$srcdir ;;
16791 *) # Relative path.
16792 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16793 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16794esac
16795# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16796# absolute.
16797ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16798ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16799ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16800ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16801
16802
16803 case $INSTALL in
16804 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16805 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16806 esac
16807
16808 if test x"$ac_file" != x-; then
16809 { echo "$as_me:$LINENO: creating $ac_file" >&5
16810echo "$as_me: creating $ac_file" >&6;}
16811 rm -f "$ac_file"
16812 fi
16813 # Let's still pretend it is `configure' which instantiates (i.e., don't
16814 # use $as_me), people would be surprised to read:
16815 # /* config.h. Generated by config.status. */
16816 if test x"$ac_file" = x-; then
16817 configure_input=
16818 else
16819 configure_input="$ac_file. "
16820 fi
16821 configure_input=$configure_input"Generated from `echo $ac_file_in |
16822 sed 's,.*/,,'` by configure."
16823
16824 # First look for the input files in the build tree, otherwise in the
16825 # src tree.
16826 ac_file_inputs=`IFS=:
16827 for f in $ac_file_in; do
16828 case $f in
16829 -) echo $tmp/stdin ;;
16830 [\\/$]*)
16831 # Absolute (can't be DOS-style, as IFS=:)
16832 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16833echo "$as_me: error: cannot find input file: $f" >&2;}
16834 { (exit 1); exit 1; }; }
16835 echo $f;;
16836 *) # Relative
16837 if test -f "$f"; then
16838 # Build tree
16839 echo $f
16840 elif test -f "$srcdir/$f"; then
16841 # Source tree
16842 echo $srcdir/$f
16843 else
16844 # /dev/null tree
16845 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16846echo "$as_me: error: cannot find input file: $f" >&2;}
16847 { (exit 1); exit 1; }; }
16848 fi;;
16849 esac
16850 done` || { (exit 1); exit 1; }
16851_ACEOF
16852cat >>$CONFIG_STATUS <<_ACEOF
16853 sed "$ac_vpsub
16854$extrasub
16855_ACEOF
16856cat >>$CONFIG_STATUS <<\_ACEOF
16857:t
16858/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16859s,@configure_input@,$configure_input,;t t
16860s,@srcdir@,$ac_srcdir,;t t
16861s,@abs_srcdir@,$ac_abs_srcdir,;t t
16862s,@top_srcdir@,$ac_top_srcdir,;t t
16863s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16864s,@builddir@,$ac_builddir,;t t
16865s,@abs_builddir@,$ac_abs_builddir,;t t
16866s,@top_builddir@,$ac_top_builddir,;t t
16867s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16868s,@INSTALL@,$ac_INSTALL,;t t
16869" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16870 rm -f $tmp/stdin
16871 if test x"$ac_file" != x-; then
16872 mv $tmp/out $ac_file
16873 else
16874 cat $tmp/out
16875 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016876 fi
16877
Martin v. Löwis11437992002-04-12 09:54:03 +000016878done
16879_ACEOF
16880cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016881
Martin v. Löwis11437992002-04-12 09:54:03 +000016882#
16883# CONFIG_HEADER section.
16884#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016885
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016886# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16887# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016888#
16889# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016890ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16891ac_dB='[ ].*$,\1#\2'
16892ac_dC=' '
16893ac_dD=',;t'
16894# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16895ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16896ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016897ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016898ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016899
Martin v. Löwis11437992002-04-12 09:54:03 +000016900for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016901 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016902 case $ac_file in
16903 - | *:- | *:-:* ) # input from stdin
16904 cat >$tmp/stdin
16905 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16906 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16907 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16908 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16909 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016910 esac
16911
Martin v. Löwis11437992002-04-12 09:54:03 +000016912 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16913echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016914
Martin v. Löwis11437992002-04-12 09:54:03 +000016915 # First look for the input files in the build tree, otherwise in the
16916 # src tree.
16917 ac_file_inputs=`IFS=:
16918 for f in $ac_file_in; do
16919 case $f in
16920 -) echo $tmp/stdin ;;
16921 [\\/$]*)
16922 # Absolute (can't be DOS-style, as IFS=:)
16923 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16924echo "$as_me: error: cannot find input file: $f" >&2;}
16925 { (exit 1); exit 1; }; }
16926 echo $f;;
16927 *) # Relative
16928 if test -f "$f"; then
16929 # Build tree
16930 echo $f
16931 elif test -f "$srcdir/$f"; then
16932 # Source tree
16933 echo $srcdir/$f
16934 else
16935 # /dev/null tree
16936 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16937echo "$as_me: error: cannot find input file: $f" >&2;}
16938 { (exit 1); exit 1; }; }
16939 fi;;
16940 esac
16941 done` || { (exit 1); exit 1; }
16942 # Remove the trailing spaces.
16943 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016944
Martin v. Löwis11437992002-04-12 09:54:03 +000016945_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016946
Martin v. Löwis11437992002-04-12 09:54:03 +000016947# Transform confdefs.h into two sed scripts, `conftest.defines' and
16948# `conftest.undefs', that substitutes the proper values into
16949# config.h.in to produce config.h. The first handles `#define'
16950# templates, and the second `#undef' templates.
16951# And first: Protect against being on the right side of a sed subst in
16952# config.status. Protect against being in an unquoted here document
16953# in config.status.
16954rm -f conftest.defines conftest.undefs
16955# Using a here document instead of a string reduces the quoting nightmare.
16956# Putting comments in sed scripts is not portable.
16957#
16958# `end' is used to avoid that the second main sed command (meant for
16959# 0-ary CPP macros) applies to n-ary macro definitions.
16960# See the Autoconf documentation for `clear'.
16961cat >confdef2sed.sed <<\_ACEOF
16962s/[\\&,]/\\&/g
16963s,[\\$`],\\&,g
16964t clear
16965: clear
16966s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16967t end
16968s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16969: end
16970_ACEOF
16971# If some macros were called several times there might be several times
16972# the same #defines, which is useless. Nevertheless, we may not want to
16973# sort them, since we want the *last* AC-DEFINE to be honored.
16974uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16975sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16976rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016977
16978# This sed command replaces #undef with comments. This is necessary, for
16979# example, in the case of _POSIX_SOURCE, which is predefined and required
16980# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016981cat >>conftest.undefs <<\_ACEOF
16982s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16983_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016984
Martin v. Löwis11437992002-04-12 09:54:03 +000016985# Break up conftest.defines because some shells have a limit on the size
16986# of here documents, and old seds have small limits too (100 cmds).
16987echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16988echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16989echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16990echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016991rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016992while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016993do
Martin v. Löwis11437992002-04-12 09:54:03 +000016994 # Write a limited-size here document to $tmp/defines.sed.
16995 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16996 # Speed up: don't consider the non `#define' lines.
16997 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16998 # Work around the forget-to-reset-the-flag bug.
16999 echo 't clr' >>$CONFIG_STATUS
17000 echo ': clr' >>$CONFIG_STATUS
17001 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017002 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017003 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17004 rm -f $tmp/in
17005 mv $tmp/out $tmp/in
17006' >>$CONFIG_STATUS
17007 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17008 rm -f conftest.defines
17009 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000017010done
Martin v. Löwis11437992002-04-12 09:54:03 +000017011rm -f conftest.defines
17012echo ' fi # egrep' >>$CONFIG_STATUS
17013echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017014
Martin v. Löwis11437992002-04-12 09:54:03 +000017015# Break up conftest.undefs because some shells have a limit on the size
17016# of here documents, and old seds have small limits too (100 cmds).
17017echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
17018rm -f conftest.tail
17019while grep . conftest.undefs >/dev/null
17020do
17021 # Write a limited-size here document to $tmp/undefs.sed.
17022 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17023 # Speed up: don't consider the non `#undef'
17024 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
17025 # Work around the forget-to-reset-the-flag bug.
17026 echo 't clr' >>$CONFIG_STATUS
17027 echo ': clr' >>$CONFIG_STATUS
17028 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
17029 echo 'CEOF
17030 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17031 rm -f $tmp/in
17032 mv $tmp/out $tmp/in
17033' >>$CONFIG_STATUS
17034 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17035 rm -f conftest.undefs
17036 mv conftest.tail conftest.undefs
17037done
17038rm -f conftest.undefs
17039
17040cat >>$CONFIG_STATUS <<\_ACEOF
17041 # Let's still pretend it is `configure' which instantiates (i.e., don't
17042 # use $as_me), people would be surprised to read:
17043 # /* config.h. Generated by config.status. */
17044 if test x"$ac_file" = x-; then
17045 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000017046 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017047 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000017048 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017049 cat $tmp/in >>$tmp/config.h
17050 rm -f $tmp/in
17051 if test x"$ac_file" != x-; then
17052 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17053 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17054echo "$as_me: $ac_file is unchanged" >&6;}
17055 else
17056 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17057$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17058 X"$ac_file" : 'X\(//\)[^/]' \| \
17059 X"$ac_file" : 'X\(//\)$' \| \
17060 X"$ac_file" : 'X\(/\)' \| \
17061 . : '\(.\)' 2>/dev/null ||
17062echo X"$ac_file" |
17063 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17064 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17065 /^X\(\/\/\)$/{ s//\1/; q; }
17066 /^X\(\/\).*/{ s//\1/; q; }
17067 s/.*/./; q'`
17068 { case "$ac_dir" in
17069 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17070 *) as_incr_dir=.;;
17071esac
17072as_dummy="$ac_dir"
17073for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17074 case $as_mkdir_dir in
17075 # Skip DOS drivespec
17076 ?:) as_incr_dir=$as_mkdir_dir ;;
17077 *)
17078 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17079 test -d "$as_incr_dir" ||
17080 mkdir "$as_incr_dir" ||
17081 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17082echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17083 { (exit 1); exit 1; }; }
17084 ;;
17085 esac
17086done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017087
Martin v. Löwis11437992002-04-12 09:54:03 +000017088 rm -f $ac_file
17089 mv $tmp/config.h $ac_file
17090 fi
17091 else
17092 cat $tmp/config.h
17093 rm -f $tmp/config.h
17094 fi
17095done
17096_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017097
Martin v. Löwis11437992002-04-12 09:54:03 +000017098cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017099
Martin v. Löwis11437992002-04-12 09:54:03 +000017100{ (exit 0); exit 0; }
17101_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017102chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000017103ac_clean_files=$ac_clean_files_save
17104
17105
17106# configure is writing to config.log, and then calls config.status.
17107# config.status does its own redirection, appending to config.log.
17108# Unfortunately, on DOS this fails, as config.log is still kept open
17109# by configure, so config.status won't be able to write to it; its
17110# output is simply discarded. So we exec the FD to /dev/null,
17111# effectively closing config.log, so it can be properly (re)opened and
17112# appended to by config.status. When coming back to configure, we
17113# need to make the FD available again.
17114if test "$no_create" != yes; then
17115 ac_cs_success=:
17116 exec 5>/dev/null
17117 $SHELL $CONFIG_STATUS || ac_cs_success=false
17118 exec 5>>config.log
17119 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17120 # would make configure fail if this is the last instruction.
17121 $ac_cs_success || { (exit 1); exit 1; }
17122fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017123
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017124
17125echo "creating Setup"
17126if test ! -f Modules/Setup
17127then
17128 cp $srcdir/Modules/Setup.dist Modules/Setup
17129fi
17130
17131echo "creating Setup.local"
17132if test ! -f Modules/Setup.local
17133then
17134 echo "# Edit this file for local setup changes" >Modules/Setup.local
17135fi
17136
17137echo "creating Makefile"
17138$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17139 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017140 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017141mv config.c Modules