blob: 8ae9eab1d4ab10b238981df1971e3bfad79dfcb7 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Jack Jansen0b06be72002-06-21 14:48:38 +00002# From configure.in Revision: 1.325 .
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
846 --with(out)-cycle-gc disable/enable garbage collection
Jack Jansen7b8c7542002-04-14 20:12:41 +0000847 --with(out)-universal-newlines disable/enable foreign newlines
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +0000848 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 --with(out)-pymalloc disable/enable specialized mallocs
850 --with-wctype-functions use wctype.h functions
851 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
852 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking
853 --with-fpectl enable SIGFPE catching
854 --with-libm=STRING math library
855 --with-libc=STRING C library
856
857Some influential environment variables:
858 CC C compiler command
859 CFLAGS C compiler flags
860 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
861 nonstandard directory <lib dir>
862 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
863 headers in a nonstandard directory <include dir>
864 CPP C preprocessor
865
866Use these variables to override the choices made by `configure' or to help
867it to find libraries and programs with nonstandard names/locations.
868
869_ACEOF
870fi
871
872if test "$ac_init_help" = "recursive"; then
873 # If there are subdirs, report their specific --help.
874 ac_popdir=`pwd`
875 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
876 test -d $ac_dir || continue
877 ac_builddir=.
878
879if test "$ac_dir" != .; then
880 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
881 # A "../" for each directory in $ac_dir_suffix.
882 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
883else
884 ac_dir_suffix= ac_top_builddir=
885fi
886
887case $srcdir in
888 .) # No --srcdir option. We are building in place.
889 ac_srcdir=.
890 if test -z "$ac_top_builddir"; then
891 ac_top_srcdir=.
892 else
893 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
894 fi ;;
895 [\\/]* | ?:[\\/]* ) # Absolute path.
896 ac_srcdir=$srcdir$ac_dir_suffix;
897 ac_top_srcdir=$srcdir ;;
898 *) # Relative path.
899 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
900 ac_top_srcdir=$ac_top_builddir$srcdir ;;
901esac
902# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
903# absolute.
904ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
905ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
906ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
907ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
908
909 cd $ac_dir
910 # Check for guested configure; otherwise get Cygnus style configure.
911 if test -f $ac_srcdir/configure.gnu; then
912 echo
913 $SHELL $ac_srcdir/configure.gnu --help=recursive
914 elif test -f $ac_srcdir/configure; then
915 echo
916 $SHELL $ac_srcdir/configure --help=recursive
917 elif test -f $ac_srcdir/configure.ac ||
918 test -f $ac_srcdir/configure.in; then
919 echo
920 $ac_configure --help
921 else
922 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
923 fi
924 cd $ac_popdir
925 done
926fi
927
928test -n "$ac_init_help" && exit 0
929if $ac_init_version; then
930 cat <<\_ACEOF
931
932Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
933Free Software Foundation, Inc.
934This configure script is free software; the Free Software Foundation
935gives unlimited permission to copy, distribute and modify it.
936_ACEOF
937 exit 0
938fi
939exec 5>config.log
940cat >&5 <<_ACEOF
941This file contains any messages produced by compilers while
942running configure, to aid debugging if configure makes a mistake.
943
944It was created by $as_me, which was
945generated by GNU Autoconf 2.53. Invocation command line was
946
947 $ $0 $@
948
949_ACEOF
950{
951cat <<_ASUNAME
952## --------- ##
953## Platform. ##
954## --------- ##
955
956hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
957uname -m = `(uname -m) 2>/dev/null || echo unknown`
958uname -r = `(uname -r) 2>/dev/null || echo unknown`
959uname -s = `(uname -s) 2>/dev/null || echo unknown`
960uname -v = `(uname -v) 2>/dev/null || echo unknown`
961
962/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
963/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
964
965/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
966/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
967/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
968hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
969/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
970/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
971/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
972
973_ASUNAME
974
975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
976for as_dir in $PATH
977do
978 IFS=$as_save_IFS
979 test -z "$as_dir" && as_dir=.
980 echo "PATH: $as_dir"
981done
982
983} >&5
984
985cat >&5 <<_ACEOF
986
987
988## ----------- ##
989## Core tests. ##
990## ----------- ##
991
992_ACEOF
993
994
995# Keep a trace of the command line.
996# Strip out --no-create and --no-recursion so they do not pile up.
997# Also quote any args containing shell meta-characters.
998ac_configure_args=
999ac_sep=
1000for ac_arg
1001do
1002 case $ac_arg in
1003 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1004 | --no-cr | --no-c | -n ) continue ;;
1005 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1006 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1007 continue ;;
1008 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1009 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1010 esac
1011 case " $ac_configure_args " in
1012 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1013 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1014 ac_sep=" " ;;
1015 esac
1016 # Get rid of the leading space.
1017done
1018
1019# When interrupted or exit'd, cleanup temporary files, and complete
1020# config.log. We remove comments because anyway the quotes in there
1021# would cause problems or look ugly.
1022# WARNING: Be sure not to use single quotes in there, as some shells,
1023# such as our DU 5.0 friend, will then `close' the trap.
1024trap 'exit_status=$?
1025 # Save into config.log some information that might help in debugging.
1026 {
1027 echo
1028 cat <<\_ASBOX
1029## ---------------- ##
1030## Cache variables. ##
1031## ---------------- ##
1032_ASBOX
1033 echo
1034 # The following way of writing the cache mishandles newlines in values,
1035{
1036 (set) 2>&1 |
1037 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1038 *ac_space=\ *)
1039 sed -n \
1040 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1041 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1042 ;;
1043 *)
1044 sed -n \
1045 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1046 ;;
1047 esac;
1048}
1049 echo
1050 if test -s confdefs.h; then
1051 cat <<\_ASBOX
1052## ----------- ##
1053## confdefs.h. ##
1054## ----------- ##
1055_ASBOX
1056 echo
1057 sed "/^$/d" confdefs.h
1058 echo
1059 fi
1060 test "$ac_signal" != 0 &&
1061 echo "$as_me: caught signal $ac_signal"
1062 echo "$as_me: exit $exit_status"
1063 } >&5
1064 rm -f core core.* *.core &&
1065 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1066 exit $exit_status
1067 ' 0
1068for ac_signal in 1 2 13 15; do
1069 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1070done
1071ac_signal=0
1072
1073# confdefs.h avoids OS command line length limits that DEFS can exceed.
1074rm -rf conftest* confdefs.h
1075# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1076echo >confdefs.h
1077
1078# Predefined preprocessor variables.
1079
1080cat >>confdefs.h <<_ACEOF
1081#define PACKAGE_NAME "$PACKAGE_NAME"
1082_ACEOF
1083
1084
1085cat >>confdefs.h <<_ACEOF
1086#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1087_ACEOF
1088
1089
1090cat >>confdefs.h <<_ACEOF
1091#define PACKAGE_VERSION "$PACKAGE_VERSION"
1092_ACEOF
1093
1094
1095cat >>confdefs.h <<_ACEOF
1096#define PACKAGE_STRING "$PACKAGE_STRING"
1097_ACEOF
1098
1099
1100cat >>confdefs.h <<_ACEOF
1101#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1102_ACEOF
1103
1104
1105# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001106# Prefer explicitly selected file to automatically selected ones.
1107if test -z "$CONFIG_SITE"; then
1108 if test "x$prefix" != xNONE; then
1109 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1110 else
1111 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1112 fi
1113fi
1114for ac_site_file in $CONFIG_SITE; do
1115 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1117echo "$as_me: loading site script $ac_site_file" >&6;}
1118 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119 . "$ac_site_file"
1120 fi
1121done
1122
1123if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 # Some versions of bash will fail to source /dev/null (special
1125 # files actually), so we avoid doing that.
1126 if test -f "$cache_file"; then
1127 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1128echo "$as_me: loading cache $cache_file" >&6;}
1129 case $cache_file in
1130 [\\/]* | ?:[\\/]* ) . $cache_file;;
1131 *) . ./$cache_file;;
1132 esac
1133 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134else
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1136echo "$as_me: creating cache $cache_file" >&6;}
1137 >$cache_file
1138fi
1139
1140# Check that the precious variables saved in the cache have kept the same
1141# value.
1142ac_cache_corrupted=false
1143for ac_var in `(set) 2>&1 |
1144 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1145 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1146 eval ac_new_set=\$ac_env_${ac_var}_set
1147 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1148 eval ac_new_val="\$ac_env_${ac_var}_value"
1149 case $ac_old_set,$ac_new_set in
1150 set,)
1151 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1152echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1153 ac_cache_corrupted=: ;;
1154 ,set)
1155 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1156echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1157 ac_cache_corrupted=: ;;
1158 ,);;
1159 *)
1160 if test "x$ac_old_val" != "x$ac_new_val"; then
1161 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1162echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1163 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1164echo "$as_me: former value: $ac_old_val" >&2;}
1165 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1166echo "$as_me: current value: $ac_new_val" >&2;}
1167 ac_cache_corrupted=:
1168 fi;;
1169 esac
1170 # Pass precious variables to config.status.
1171 if test "$ac_new_set" = set; then
1172 case $ac_new_val in
1173 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1174 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1175 *) ac_arg=$ac_var=$ac_new_val ;;
1176 esac
1177 case " $ac_configure_args " in
1178 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1179 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1180 esac
1181 fi
1182done
1183if $ac_cache_corrupted; then
1184 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1185echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1186 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1187echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1188 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001189fi
1190
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001192ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001193ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1194ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1195ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196
Guido van Rossum627b2d71993-12-24 10:39:16 +00001197
Michael W. Hudson54241132001-12-07 15:38:26 +00001198
1199
Guido van Rossum627b2d71993-12-24 10:39:16 +00001200
Martin v. Löwis11437992002-04-12 09:54:03 +00001201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214ac_config_headers="$ac_config_headers pyconfig.h"
1215
1216
1217# This is for stuff that absolutely must end up in pyconfig.h.
1218# Please use pyport.h instead, if possible.
1219
1220
1221
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001222# Set VERSION so we only need to edit in one place (i.e., here)
1223
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001224VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001225
Martin v. Löwis1142de32002-03-29 16:28:31 +00001226
1227SOVERSION=1.0
1228
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001229# Arguments passed to configure.
1230
1231CONFIG_ARGS="$ac_configure_args"
1232
Michael W. Hudson54241132001-12-07 15:38:26 +00001233
Jack Jansene578a632001-08-15 01:27:14 +00001234# Check whether --enable-framework or --disable-framework was given.
1235if test "${enable_framework+set}" = set; then
1236 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001237
Jack Jansene578a632001-08-15 01:27:14 +00001238 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001240 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001241 esac
1242 case $enableval in
1243 no)
1244 PYTHONFRAMEWORK=
1245 PYTHONFRAMEWORKDIR=no-framework
1246 PYTHONFRAMEWORKPREFIX=
1247 PYTHONFRAMEWORKINSTALLDIR=
1248 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001249 ;;
1250 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001251 PYTHONFRAMEWORK=Python
1252 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001253 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001254 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1255 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001256 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001257
Guido van Rossum563e7081996-09-10 18:20:48 +00001258else
Martin v. Löwis11437992002-04-12 09:54:03 +00001259
Jack Jansene578a632001-08-15 01:27:14 +00001260 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001261 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001262 PYTHONFRAMEWORKPREFIX=
1263 PYTHONFRAMEWORKINSTALLDIR=
1264 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001265
Martin v. Löwis11437992002-04-12 09:54:03 +00001266fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001267
1268
1269
1270
Jack Jansene578a632001-08-15 01:27:14 +00001271
1272##AC_ARG_WITH(dyld,
1273##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1274##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001275# Set name for machine-dependent library files
1276
Martin v. Löwis11437992002-04-12 09:54:03 +00001277echo "$as_me:$LINENO: checking MACHDEP" >&5
1278echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001279if test -z "$MACHDEP"
1280then
Guido van Rossum563e7081996-09-10 18:20:48 +00001281 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +00001282 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001283 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001284 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001285 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001286 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001287 ac_md_system=`echo $ac_sys_system |
1288 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1289 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001290 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001291 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001292
Guido van Rossum07397971997-04-29 21:49:50 +00001293 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001294 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001295 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001296 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001297 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001298 esac
1299fi
Guido van Rossum91922671997-10-09 20:24:13 +00001300
1301#
1302# SGI compilers allow the specification of the both the ABI and the
1303# ISA on the command line. Depending on the values of these switches,
1304# different and often incompatable code will be generated.
1305#
1306# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1307# thus supply support for various ABI/ISA combinations. The MACHDEP
1308# variable is also adjusted.
1309#
1310
1311if test ! -z "$SGI_ABI"
1312then
1313 CC="cc $SGI_ABI"
1314 LDFLAGS="$SGI_ABI $LDFLAGS"
1315 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1316fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001317echo "$as_me:$LINENO: result: $MACHDEP" >&5
1318echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001319
Guido van Rossum627b2d71993-12-24 10:39:16 +00001320# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001321echo "$as_me:$LINENO: checking for --without-gcc" >&5
1322echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1323
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001324# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001325if test "${with_gcc+set}" = set; then
1326 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001327
Guido van Rossum7f43da71994-08-01 12:15:30 +00001328 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001329 no) CC=cc
1330 without_gcc=yes;;
1331 yes) CC=gcc
1332 without_gcc=no;;
1333 *) CC=$withval
1334 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001335 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001336else
Martin v. Löwis11437992002-04-12 09:54:03 +00001337
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001338 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001339 AIX*) CC=cc_r
1340 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001341 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001342 case $BE_HOST_CPU in
1343 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001344 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001345 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +00001346 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001347 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001348 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001349 ;;
1350 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001351 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001352 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001353 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001354 ;;
1355 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001356 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1357echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1358 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001359 ;;
1360 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001361 AR="\$(srcdir)/Modules/ar_beos"
1362 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001363 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001364 Monterey*)
1365 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001366 without_gcc=;;
1367 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001368 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001369fi;
1370echo "$as_me:$LINENO: result: $without_gcc" >&5
1371echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001372
1373
Guido van Rossum95012191999-12-16 17:50:52 +00001374
Fred Drakea1a84e72001-03-06 05:52:16 +00001375MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001376echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1377echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1378
Guido van Rossum95012191999-12-16 17:50:52 +00001379# Check whether --with-cxx or --without-cxx was given.
1380if test "${with_cxx+set}" = set; then
1381 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001382
Martin v. Löwis22352952000-12-13 17:37:02 +00001383 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001384 case $withval in
1385 no) CXX=
1386 with_cxx=no;;
1387 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001388 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001389 with_cxx=$withval;;
1390 esac
1391else
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
Guido van Rossum95012191999-12-16 17:50:52 +00001393 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001394 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001395
Martin v. Löwis11437992002-04-12 09:54:03 +00001396fi;
1397echo "$as_me:$LINENO: result: $with_cxx" >&5
1398echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001399
1400if test "$with_cxx" = "yes"
1401then
Martin v. Löwis11437992002-04-12 09:54:03 +00001402 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1403echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1404 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001405fi
1406
1407
1408
1409
Martin v. Löwis11437992002-04-12 09:54:03 +00001410if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001411then
1412 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1413do
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 # 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 +00001415set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001416echo "$as_me:$LINENO: checking for $ac_word" >&5
1417echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1418if test "${ac_cv_prog_CXX+set}" = set; then
1419 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001420else
1421 if test -n "$CXX"; then
1422 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1423else
Martin v. Löwis11437992002-04-12 09:54:03 +00001424as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1425for as_dir in $PATH
1426do
1427 IFS=$as_save_IFS
1428 test -z "$as_dir" && as_dir=.
1429 for ac_exec_ext in '' $ac_executable_extensions; do
1430 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1431 ac_cv_prog_CXX="$ac_prog"
1432 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1433 break 2
1434 fi
1435done
1436done
1437
Martin v. Löwis22352952000-12-13 17:37:02 +00001438fi
1439fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001440CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001441if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001442 echo "$as_me:$LINENO: result: $CXX" >&5
1443echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001444else
Martin v. Löwis11437992002-04-12 09:54:03 +00001445 echo "$as_me:$LINENO: result: no" >&5
1446echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001447fi
1448
Martin v. Löwis11437992002-04-12 09:54:03 +00001449 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001450done
1451test -n "$CXX" || CXX="notfound"
1452
1453 if test "$CXX" = "notfound"
1454 then
1455 CXX=
1456 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001458ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001459ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1460ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1461ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1462 cat >conftest.$ac_ext <<_ACEOF
1463#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001464#include "confdefs.h"
1465
Martin v. Löwis11437992002-04-12 09:54:03 +00001466#ifdef F77_DUMMY_MAIN
1467# ifdef __cplusplus
1468 extern "C"
1469# endif
1470 int F77_DUMMY_MAIN() { return 1; }
1471#endif
1472int
1473main ()
1474{
Michael W. Hudson54241132001-12-07 15:38:26 +00001475
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 ;
1477 return 0;
1478}
1479_ACEOF
1480ac_clean_files_save=$ac_clean_files
1481ac_clean_files="$ac_clean_files a.out a.exe"
1482# Try to create an executable without -o first, disregard a.out.
1483# It will help us diagnose broken compilers, and finding out an intuition
1484# of exeext.
1485echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1486echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1487ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1488if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1489 (eval $ac_link_default) 2>&5
1490 ac_status=$?
1491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1492 (exit $ac_status); }; then
1493 # Find the output, starting from the most likely. This scheme is
1494# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1495# resort.
1496
1497# Be careful to initialize this variable, since it used to be cached.
1498# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1499ac_cv_exeext=
1500for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1501 ls a.out conftest 2>/dev/null;
1502 ls a.* conftest.* 2>/dev/null`; do
1503 case $ac_file in
1504 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1505 a.out ) # We found the default executable, but exeext='' is most
1506 # certainly right.
1507 break;;
1508 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1509 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1510 export ac_cv_exeext
1511 break;;
1512 * ) break;;
1513 esac
1514done
1515else
1516 echo "$as_me: failed program was:" >&5
1517cat conftest.$ac_ext >&5
1518{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1519echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1520 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001521fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001522
1523ac_exeext=$ac_cv_exeext
1524echo "$as_me:$LINENO: result: $ac_file" >&5
1525echo "${ECHO_T}$ac_file" >&6
1526
1527# Check the compiler produces executables we can run. If not, either
1528# the compiler is broken, or we cross compile.
1529echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1530echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1531# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1532# If not cross compiling, check that we can run a simple program.
1533if test "$cross_compiling" != yes; then
1534 if { ac_try='./$ac_file'
1535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1536 (eval $ac_try) 2>&5
1537 ac_status=$?
1538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1539 (exit $ac_status); }; }; then
1540 cross_compiling=no
1541 else
1542 if test "$cross_compiling" = maybe; then
1543 cross_compiling=yes
1544 else
1545 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1546If you meant to cross compile, use \`--host'." >&5
1547echo "$as_me: error: cannot run C++ compiled programs.
1548If you meant to cross compile, use \`--host'." >&2;}
1549 { (exit 1); exit 1; }; }
1550 fi
1551 fi
1552fi
1553echo "$as_me:$LINENO: result: yes" >&5
1554echo "${ECHO_T}yes" >&6
1555
1556rm -f a.out a.exe conftest$ac_cv_exeext
1557ac_clean_files=$ac_clean_files_save
1558# Check the compiler produces executables we can run. If not, either
1559# the compiler is broken, or we cross compile.
1560echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1561echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1562echo "$as_me:$LINENO: result: $cross_compiling" >&5
1563echo "${ECHO_T}$cross_compiling" >&6
1564
1565echo "$as_me:$LINENO: checking for suffix of executables" >&5
1566echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1567if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1568 (eval $ac_link) 2>&5
1569 ac_status=$?
1570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1571 (exit $ac_status); }; then
1572 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1573# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1574# work properly (i.e., refer to `conftest.exe'), while it won't with
1575# `rm'.
1576for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1577 case $ac_file in
1578 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1579 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1580 export ac_cv_exeext
1581 break;;
1582 * ) break;;
1583 esac
1584done
1585else
1586 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1587echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1588 { (exit 1); exit 1; }; }
1589fi
1590
1591rm -f conftest$ac_cv_exeext
1592echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1593echo "${ECHO_T}$ac_cv_exeext" >&6
1594
1595rm -f conftest.$ac_ext
1596EXEEXT=$ac_cv_exeext
1597ac_exeext=$EXEEXT
1598
1599 ac_ext=c
1600ac_cpp='$CPP $CPPFLAGS'
1601ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1602ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1603ac_compiler_gnu=$ac_cv_c_compiler_gnu
1604
1605
Martin v. Löwis22352952000-12-13 17:37:02 +00001606
1607 fi
1608fi
1609
Guido van Rossum8b131c51995-03-09 14:10:13 +00001610# If the user switches compilers, we can't believe the cache
1611if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1612then
Martin v. Löwis11437992002-04-12 09:54:03 +00001613 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1614(it is also a good idea to do 'make clean' before compiling)" >&5
1615echo "$as_me: error: cached CC is different -- throw away $cache_file
1616(it is also a good idea to do 'make clean' before compiling)" >&2;}
1617 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001618fi
1619
Martin v. Löwis11437992002-04-12 09:54:03 +00001620ac_ext=c
1621ac_cpp='$CPP $CPPFLAGS'
1622ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1623ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1624ac_compiler_gnu=$ac_cv_c_compiler_gnu
1625if test -n "$ac_tool_prefix"; then
1626 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1627set dummy ${ac_tool_prefix}gcc; ac_word=$2
1628echo "$as_me:$LINENO: checking for $ac_word" >&5
1629echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1630if test "${ac_cv_prog_CC+set}" = set; then
1631 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001632else
1633 if test -n "$CC"; then
1634 ac_cv_prog_CC="$CC" # Let the user override the test.
1635else
Martin v. Löwis11437992002-04-12 09:54:03 +00001636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1637for as_dir in $PATH
1638do
1639 IFS=$as_save_IFS
1640 test -z "$as_dir" && as_dir=.
1641 for ac_exec_ext in '' $ac_executable_extensions; do
1642 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1643 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1644 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1645 break 2
1646 fi
1647done
1648done
1649
Jack Jansendd19cf82001-12-06 22:36:17 +00001650fi
1651fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001652CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001653if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001654 echo "$as_me:$LINENO: result: $CC" >&5
1655echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001656else
Martin v. Löwis11437992002-04-12 09:54:03 +00001657 echo "$as_me:$LINENO: result: no" >&5
1658echo "${ECHO_T}no" >&6
1659fi
1660
1661fi
1662if test -z "$ac_cv_prog_CC"; then
1663 ac_ct_CC=$CC
1664 # Extract the first word of "gcc", so it can be a program name with args.
1665set dummy gcc; ac_word=$2
1666echo "$as_me:$LINENO: checking for $ac_word" >&5
1667echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1668if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1669 echo $ECHO_N "(cached) $ECHO_C" >&6
1670else
1671 if test -n "$ac_ct_CC"; then
1672 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1673else
1674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1675for as_dir in $PATH
1676do
1677 IFS=$as_save_IFS
1678 test -z "$as_dir" && as_dir=.
1679 for ac_exec_ext in '' $ac_executable_extensions; do
1680 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1681 ac_cv_prog_ac_ct_CC="gcc"
1682 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1683 break 2
1684 fi
1685done
1686done
1687
1688fi
1689fi
1690ac_ct_CC=$ac_cv_prog_ac_ct_CC
1691if test -n "$ac_ct_CC"; then
1692 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1693echo "${ECHO_T}$ac_ct_CC" >&6
1694else
1695 echo "$as_me:$LINENO: result: no" >&5
1696echo "${ECHO_T}no" >&6
1697fi
1698
1699 CC=$ac_ct_CC
1700else
1701 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001702fi
1703
Jack Jansendd19cf82001-12-06 22:36:17 +00001704if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001705 if test -n "$ac_tool_prefix"; then
1706 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1707set dummy ${ac_tool_prefix}cc; ac_word=$2
1708echo "$as_me:$LINENO: checking for $ac_word" >&5
1709echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1710if test "${ac_cv_prog_CC+set}" = set; then
1711 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001712else
1713 if test -n "$CC"; then
1714 ac_cv_prog_CC="$CC" # Let the user override the test.
1715else
Martin v. Löwis11437992002-04-12 09:54:03 +00001716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1717for as_dir in $PATH
1718do
1719 IFS=$as_save_IFS
1720 test -z "$as_dir" && as_dir=.
1721 for ac_exec_ext in '' $ac_executable_extensions; do
1722 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1723 ac_cv_prog_CC="${ac_tool_prefix}cc"
1724 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1725 break 2
1726 fi
1727done
1728done
1729
1730fi
1731fi
1732CC=$ac_cv_prog_CC
1733if test -n "$CC"; then
1734 echo "$as_me:$LINENO: result: $CC" >&5
1735echo "${ECHO_T}$CC" >&6
1736else
1737 echo "$as_me:$LINENO: result: no" >&5
1738echo "${ECHO_T}no" >&6
1739fi
1740
1741fi
1742if test -z "$ac_cv_prog_CC"; then
1743 ac_ct_CC=$CC
1744 # Extract the first word of "cc", so it can be a program name with args.
1745set dummy cc; ac_word=$2
1746echo "$as_me:$LINENO: checking for $ac_word" >&5
1747echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1748if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1749 echo $ECHO_N "(cached) $ECHO_C" >&6
1750else
1751 if test -n "$ac_ct_CC"; then
1752 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1753else
1754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1755for as_dir in $PATH
1756do
1757 IFS=$as_save_IFS
1758 test -z "$as_dir" && as_dir=.
1759 for ac_exec_ext in '' $ac_executable_extensions; do
1760 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1761 ac_cv_prog_ac_ct_CC="cc"
1762 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1763 break 2
1764 fi
1765done
1766done
1767
1768fi
1769fi
1770ac_ct_CC=$ac_cv_prog_ac_ct_CC
1771if test -n "$ac_ct_CC"; then
1772 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1773echo "${ECHO_T}$ac_ct_CC" >&6
1774else
1775 echo "$as_me:$LINENO: result: no" >&5
1776echo "${ECHO_T}no" >&6
1777fi
1778
1779 CC=$ac_ct_CC
1780else
1781 CC="$ac_cv_prog_CC"
1782fi
1783
1784fi
1785if test -z "$CC"; then
1786 # Extract the first word of "cc", so it can be a program name with args.
1787set dummy cc; ac_word=$2
1788echo "$as_me:$LINENO: checking for $ac_word" >&5
1789echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1790if test "${ac_cv_prog_CC+set}" = set; then
1791 echo $ECHO_N "(cached) $ECHO_C" >&6
1792else
1793 if test -n "$CC"; then
1794 ac_cv_prog_CC="$CC" # Let the user override the test.
1795else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001796 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1798for as_dir in $PATH
1799do
1800 IFS=$as_save_IFS
1801 test -z "$as_dir" && as_dir=.
1802 for ac_exec_ext in '' $ac_executable_extensions; do
1803 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1804 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1805 ac_prog_rejected=yes
1806 continue
1807 fi
1808 ac_cv_prog_CC="cc"
1809 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1810 break 2
1811 fi
1812done
1813done
1814
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001815if test $ac_prog_rejected = yes; then
1816 # We found a bogon in the path, so make sure we never use it.
1817 set dummy $ac_cv_prog_CC
1818 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001819 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001820 # We chose a different compiler from the bogus one.
1821 # However, it has the same basename, so the bogon will be chosen
1822 # first if we set CC to just the basename; use the full file name.
1823 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001824 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001825 shift
1826 ac_cv_prog_CC="$@"
1827 fi
1828fi
1829fi
1830fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001831CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001832if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001833 echo "$as_me:$LINENO: result: $CC" >&5
1834echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001835else
Martin v. Löwis11437992002-04-12 09:54:03 +00001836 echo "$as_me:$LINENO: result: no" >&5
1837echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001838fi
1839
Martin v. Löwis11437992002-04-12 09:54:03 +00001840fi
1841if test -z "$CC"; then
1842 if test -n "$ac_tool_prefix"; then
1843 for ac_prog in cl
1844 do
1845 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1846set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1847echo "$as_me:$LINENO: checking for $ac_word" >&5
1848echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1849if test "${ac_cv_prog_CC+set}" = set; then
1850 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001851else
1852 if test -n "$CC"; then
1853 ac_cv_prog_CC="$CC" # Let the user override the test.
1854else
Martin v. Löwis11437992002-04-12 09:54:03 +00001855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1856for as_dir in $PATH
1857do
1858 IFS=$as_save_IFS
1859 test -z "$as_dir" && as_dir=.
1860 for ac_exec_ext in '' $ac_executable_extensions; do
1861 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1862 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1863 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1864 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001865 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001866done
1867done
1868
1869fi
1870fi
1871CC=$ac_cv_prog_CC
1872if test -n "$CC"; then
1873 echo "$as_me:$LINENO: result: $CC" >&5
1874echo "${ECHO_T}$CC" >&6
1875else
1876 echo "$as_me:$LINENO: result: no" >&5
1877echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001878fi
1879
Martin v. Löwis11437992002-04-12 09:54:03 +00001880 test -n "$CC" && break
1881 done
1882fi
1883if test -z "$CC"; then
1884 ac_ct_CC=$CC
1885 for ac_prog in cl
1886do
1887 # Extract the first word of "$ac_prog", so it can be a program name with args.
1888set dummy $ac_prog; ac_word=$2
1889echo "$as_me:$LINENO: checking for $ac_word" >&5
1890echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1891if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1892 echo $ECHO_N "(cached) $ECHO_C" >&6
1893else
1894 if test -n "$ac_ct_CC"; then
1895 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1896else
1897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1898for as_dir in $PATH
1899do
1900 IFS=$as_save_IFS
1901 test -z "$as_dir" && as_dir=.
1902 for ac_exec_ext in '' $ac_executable_extensions; do
1903 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1904 ac_cv_prog_ac_ct_CC="$ac_prog"
1905 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1906 break 2
1907 fi
1908done
1909done
Jack Jansendd19cf82001-12-06 22:36:17 +00001910
Martin v. Löwis11437992002-04-12 09:54:03 +00001911fi
1912fi
1913ac_ct_CC=$ac_cv_prog_ac_ct_CC
1914if test -n "$ac_ct_CC"; then
1915 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1916echo "${ECHO_T}$ac_ct_CC" >&6
1917else
1918 echo "$as_me:$LINENO: result: no" >&5
1919echo "${ECHO_T}no" >&6
1920fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001921
Martin v. Löwis11437992002-04-12 09:54:03 +00001922 test -n "$ac_ct_CC" && break
1923done
Michael W. Hudson54241132001-12-07 15:38:26 +00001924
Martin v. Löwis11437992002-04-12 09:54:03 +00001925 CC=$ac_ct_CC
1926fi
1927
1928fi
1929
1930
1931test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1932echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1933 { (exit 1); exit 1; }; }
1934
1935# Provide some information about the compiler.
1936echo "$as_me:$LINENO:" \
1937 "checking for C compiler version" >&5
1938ac_compiler=`set X $ac_compile; echo $2`
1939{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1940 (eval $ac_compiler --version </dev/null >&5) 2>&5
1941 ac_status=$?
1942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1943 (exit $ac_status); }
1944{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1945 (eval $ac_compiler -v </dev/null >&5) 2>&5
1946 ac_status=$?
1947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1948 (exit $ac_status); }
1949{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1950 (eval $ac_compiler -V </dev/null >&5) 2>&5
1951 ac_status=$?
1952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1953 (exit $ac_status); }
1954
1955cat >conftest.$ac_ext <<_ACEOF
1956#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001957#include "confdefs.h"
1958
Martin v. Löwis11437992002-04-12 09:54:03 +00001959#ifdef F77_DUMMY_MAIN
1960# ifdef __cplusplus
1961 extern "C"
1962# endif
1963 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001965int
1966main ()
1967{
1968
1969 ;
1970 return 0;
1971}
1972_ACEOF
1973ac_clean_files_save=$ac_clean_files
1974ac_clean_files="$ac_clean_files a.out a.exe"
1975# Try to create an executable without -o first, disregard a.out.
1976# It will help us diagnose broken compilers, and finding out an intuition
1977# of exeext.
1978echo "$as_me:$LINENO: checking for C compiler default output" >&5
1979echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1980ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1981if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1982 (eval $ac_link_default) 2>&5
1983 ac_status=$?
1984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1985 (exit $ac_status); }; then
1986 # Find the output, starting from the most likely. This scheme is
1987# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1988# resort.
1989
1990# Be careful to initialize this variable, since it used to be cached.
1991# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1992ac_cv_exeext=
1993for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1994 ls a.out conftest 2>/dev/null;
1995 ls a.* conftest.* 2>/dev/null`; do
1996 case $ac_file in
1997 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1998 a.out ) # We found the default executable, but exeext='' is most
1999 # certainly right.
2000 break;;
2001 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2002 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2003 export ac_cv_exeext
2004 break;;
2005 * ) break;;
2006 esac
2007done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002008else
Martin v. Löwis11437992002-04-12 09:54:03 +00002009 echo "$as_me: failed program was:" >&5
2010cat conftest.$ac_ext >&5
2011{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2012echo "$as_me: error: C compiler cannot create executables" >&2;}
2013 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002014fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002015
Martin v. Löwis11437992002-04-12 09:54:03 +00002016ac_exeext=$ac_cv_exeext
2017echo "$as_me:$LINENO: result: $ac_file" >&5
2018echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002019
Martin v. Löwis11437992002-04-12 09:54:03 +00002020# Check the compiler produces executables we can run. If not, either
2021# the compiler is broken, or we cross compile.
2022echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2023echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2024# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2025# If not cross compiling, check that we can run a simple program.
2026if test "$cross_compiling" != yes; then
2027 if { ac_try='./$ac_file'
2028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2029 (eval $ac_try) 2>&5
2030 ac_status=$?
2031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2032 (exit $ac_status); }; }; then
2033 cross_compiling=no
2034 else
2035 if test "$cross_compiling" = maybe; then
2036 cross_compiling=yes
2037 else
2038 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2039If you meant to cross compile, use \`--host'." >&5
2040echo "$as_me: error: cannot run C compiled programs.
2041If you meant to cross compile, use \`--host'." >&2;}
2042 { (exit 1); exit 1; }; }
2043 fi
2044 fi
2045fi
2046echo "$as_me:$LINENO: result: yes" >&5
2047echo "${ECHO_T}yes" >&6
2048
2049rm -f a.out a.exe conftest$ac_cv_exeext
2050ac_clean_files=$ac_clean_files_save
2051# Check the compiler produces executables we can run. If not, either
2052# the compiler is broken, or we cross compile.
2053echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2054echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2055echo "$as_me:$LINENO: result: $cross_compiling" >&5
2056echo "${ECHO_T}$cross_compiling" >&6
2057
2058echo "$as_me:$LINENO: checking for suffix of executables" >&5
2059echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2060if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2061 (eval $ac_link) 2>&5
2062 ac_status=$?
2063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2064 (exit $ac_status); }; then
2065 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2066# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2067# work properly (i.e., refer to `conftest.exe'), while it won't with
2068# `rm'.
2069for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2070 case $ac_file in
2071 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2072 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2073 export ac_cv_exeext
2074 break;;
2075 * ) break;;
2076 esac
2077done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002078else
Martin v. Löwis11437992002-04-12 09:54:03 +00002079 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2080echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2081 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002082fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002083
Martin v. Löwis11437992002-04-12 09:54:03 +00002084rm -f conftest$ac_cv_exeext
2085echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2086echo "${ECHO_T}$ac_cv_exeext" >&6
2087
2088rm -f conftest.$ac_ext
2089EXEEXT=$ac_cv_exeext
2090ac_exeext=$EXEEXT
2091echo "$as_me:$LINENO: checking for suffix of object files" >&5
2092echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2093if test "${ac_cv_objext+set}" = set; then
2094 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002095else
Martin v. Löwis11437992002-04-12 09:54:03 +00002096 cat >conftest.$ac_ext <<_ACEOF
2097#line $LINENO "configure"
2098#include "confdefs.h"
2099
2100#ifdef F77_DUMMY_MAIN
2101# ifdef __cplusplus
2102 extern "C"
2103# endif
2104 int F77_DUMMY_MAIN() { return 1; }
2105#endif
2106int
2107main ()
2108{
2109
2110 ;
2111 return 0;
2112}
2113_ACEOF
2114rm -f conftest.o conftest.obj
2115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2116 (eval $ac_compile) 2>&5
2117 ac_status=$?
2118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2119 (exit $ac_status); }; then
2120 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2121 case $ac_file in
2122 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2123 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2124 break;;
2125 esac
2126done
2127else
2128 echo "$as_me: failed program was:" >&5
2129cat conftest.$ac_ext >&5
2130{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2131echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2132 { (exit 1); exit 1; }; }
2133fi
2134
2135rm -f conftest.$ac_cv_objext conftest.$ac_ext
2136fi
2137echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2138echo "${ECHO_T}$ac_cv_objext" >&6
2139OBJEXT=$ac_cv_objext
2140ac_objext=$OBJEXT
2141echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2142echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2143if test "${ac_cv_c_compiler_gnu+set}" = set; then
2144 echo $ECHO_N "(cached) $ECHO_C" >&6
2145else
2146 cat >conftest.$ac_ext <<_ACEOF
2147#line $LINENO "configure"
2148#include "confdefs.h"
2149
2150#ifdef F77_DUMMY_MAIN
2151# ifdef __cplusplus
2152 extern "C"
2153# endif
2154 int F77_DUMMY_MAIN() { return 1; }
2155#endif
2156int
2157main ()
2158{
2159#ifndef __GNUC__
2160 choke me
2161#endif
2162
2163 ;
2164 return 0;
2165}
2166_ACEOF
2167rm -f conftest.$ac_objext
2168if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2169 (eval $ac_compile) 2>&5
2170 ac_status=$?
2171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2172 (exit $ac_status); } &&
2173 { ac_try='test -s conftest.$ac_objext'
2174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2175 (eval $ac_try) 2>&5
2176 ac_status=$?
2177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2178 (exit $ac_status); }; }; then
2179 ac_compiler_gnu=yes
2180else
2181 echo "$as_me: failed program was:" >&5
2182cat conftest.$ac_ext >&5
2183ac_compiler_gnu=no
2184fi
2185rm -f conftest.$ac_objext conftest.$ac_ext
2186ac_cv_c_compiler_gnu=$ac_compiler_gnu
2187
2188fi
2189echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2190echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2191GCC=`test $ac_compiler_gnu = yes && echo yes`
2192ac_test_CFLAGS=${CFLAGS+set}
2193ac_save_CFLAGS=$CFLAGS
2194CFLAGS="-g"
2195echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2196echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2197if test "${ac_cv_prog_cc_g+set}" = set; then
2198 echo $ECHO_N "(cached) $ECHO_C" >&6
2199else
2200 cat >conftest.$ac_ext <<_ACEOF
2201#line $LINENO "configure"
2202#include "confdefs.h"
2203
2204#ifdef F77_DUMMY_MAIN
2205# ifdef __cplusplus
2206 extern "C"
2207# endif
2208 int F77_DUMMY_MAIN() { return 1; }
2209#endif
2210int
2211main ()
2212{
2213
2214 ;
2215 return 0;
2216}
2217_ACEOF
2218rm -f conftest.$ac_objext
2219if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2220 (eval $ac_compile) 2>&5
2221 ac_status=$?
2222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2223 (exit $ac_status); } &&
2224 { ac_try='test -s conftest.$ac_objext'
2225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2226 (eval $ac_try) 2>&5
2227 ac_status=$?
2228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2229 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002230 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002231else
Martin v. Löwis11437992002-04-12 09:54:03 +00002232 echo "$as_me: failed program was:" >&5
2233cat conftest.$ac_ext >&5
2234ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002235fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002236rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002237fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002238echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2239echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002240if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002241 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002242elif test $ac_cv_prog_cc_g = yes; then
2243 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002244 CFLAGS="-g -O2"
2245 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002246 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002247 fi
2248else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002249 if test "$GCC" = yes; then
2250 CFLAGS="-O2"
2251 else
2252 CFLAGS=
2253 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002254fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002255# Some people use a C++ compiler to compile C. Since we use `exit',
2256# in C++ we need to declare it. In case someone uses the same compiler
2257# for both compiling C and C++ we need to have the C++ compiler decide
2258# the declaration of exit, since it's the most demanding environment.
2259cat >conftest.$ac_ext <<_ACEOF
2260#ifndef __cplusplus
2261 choke me
2262#endif
2263_ACEOF
2264rm -f conftest.$ac_objext
2265if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2266 (eval $ac_compile) 2>&5
2267 ac_status=$?
2268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2269 (exit $ac_status); } &&
2270 { ac_try='test -s conftest.$ac_objext'
2271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2272 (eval $ac_try) 2>&5
2273 ac_status=$?
2274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2275 (exit $ac_status); }; }; then
2276 for ac_declaration in \
2277 ''\
2278 '#include <stdlib.h>' \
2279 'extern "C" void std::exit (int) throw (); using std::exit;' \
2280 'extern "C" void std::exit (int); using std::exit;' \
2281 'extern "C" void exit (int) throw ();' \
2282 'extern "C" void exit (int);' \
2283 'void exit (int);'
2284do
2285 cat >conftest.$ac_ext <<_ACEOF
2286#line $LINENO "configure"
2287#include "confdefs.h"
2288#include <stdlib.h>
2289$ac_declaration
2290#ifdef F77_DUMMY_MAIN
2291# ifdef __cplusplus
2292 extern "C"
2293# endif
2294 int F77_DUMMY_MAIN() { return 1; }
2295#endif
2296int
2297main ()
2298{
2299exit (42);
2300 ;
2301 return 0;
2302}
2303_ACEOF
2304rm -f conftest.$ac_objext
2305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2306 (eval $ac_compile) 2>&5
2307 ac_status=$?
2308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2309 (exit $ac_status); } &&
2310 { ac_try='test -s conftest.$ac_objext'
2311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2312 (eval $ac_try) 2>&5
2313 ac_status=$?
2314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2315 (exit $ac_status); }; }; then
2316 :
2317else
2318 echo "$as_me: failed program was:" >&5
2319cat conftest.$ac_ext >&5
2320continue
2321fi
2322rm -f conftest.$ac_objext conftest.$ac_ext
2323 cat >conftest.$ac_ext <<_ACEOF
2324#line $LINENO "configure"
2325#include "confdefs.h"
2326$ac_declaration
2327#ifdef F77_DUMMY_MAIN
2328# ifdef __cplusplus
2329 extern "C"
2330# endif
2331 int F77_DUMMY_MAIN() { return 1; }
2332#endif
2333int
2334main ()
2335{
2336exit (42);
2337 ;
2338 return 0;
2339}
2340_ACEOF
2341rm -f conftest.$ac_objext
2342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2343 (eval $ac_compile) 2>&5
2344 ac_status=$?
2345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2346 (exit $ac_status); } &&
2347 { ac_try='test -s conftest.$ac_objext'
2348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2349 (eval $ac_try) 2>&5
2350 ac_status=$?
2351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2352 (exit $ac_status); }; }; then
2353 break
2354else
2355 echo "$as_me: failed program was:" >&5
2356cat conftest.$ac_ext >&5
2357fi
2358rm -f conftest.$ac_objext conftest.$ac_ext
2359done
2360rm -f conftest*
2361if test -n "$ac_declaration"; then
2362 echo '#ifdef __cplusplus' >>confdefs.h
2363 echo $ac_declaration >>confdefs.h
2364 echo '#endif' >>confdefs.h
2365fi
2366
2367else
2368 echo "$as_me: failed program was:" >&5
2369cat conftest.$ac_ext >&5
2370fi
2371rm -f conftest.$ac_objext conftest.$ac_ext
2372ac_ext=c
2373ac_cpp='$CPP $CPPFLAGS'
2374ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2375ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2376ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002377
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002378
2379# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002380
2381ac_ext=c
2382ac_cpp='$CPP $CPPFLAGS'
2383ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2384ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2385ac_compiler_gnu=$ac_cv_c_compiler_gnu
2386echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2387echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002388# On Suns, sometimes $CPP names a directory.
2389if test -n "$CPP" && test -d "$CPP"; then
2390 CPP=
2391fi
2392if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002393 if test "${ac_cv_prog_CPP+set}" = set; then
2394 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002395else
Martin v. Löwis11437992002-04-12 09:54:03 +00002396 # Double quotes because CPP needs to be expanded
2397 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2398 do
2399 ac_preproc_ok=false
2400for ac_c_preproc_warn_flag in '' yes
2401do
2402 # Use a header file that comes with gcc, so configuring glibc
2403 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002404 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002405 # not just through cpp. "Syntax error" is here to catch this case.
2406 cat >conftest.$ac_ext <<_ACEOF
2407#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002408#include "confdefs.h"
2409#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002410 Syntax error
2411_ACEOF
2412if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2413 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2414 ac_status=$?
2415 egrep -v '^ *\+' conftest.er1 >conftest.err
2416 rm -f conftest.er1
2417 cat conftest.err >&5
2418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2419 (exit $ac_status); } >/dev/null; then
2420 if test -s conftest.err; then
2421 ac_cpp_err=$ac_c_preproc_warn_flag
2422 else
2423 ac_cpp_err=
2424 fi
2425else
2426 ac_cpp_err=yes
2427fi
2428if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002429 :
2430else
Martin v. Löwis11437992002-04-12 09:54:03 +00002431 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002432 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002433 # Broken: fails on valid input.
2434continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002435fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002436rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002437
Martin v. Löwis11437992002-04-12 09:54:03 +00002438 # OK, works on sane cases. Now check whether non-existent headers
2439 # can be detected and how.
2440 cat >conftest.$ac_ext <<_ACEOF
2441#line $LINENO "configure"
2442#include "confdefs.h"
2443#include <ac_nonexistent.h>
2444_ACEOF
2445if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2446 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2447 ac_status=$?
2448 egrep -v '^ *\+' conftest.er1 >conftest.err
2449 rm -f conftest.er1
2450 cat conftest.err >&5
2451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2452 (exit $ac_status); } >/dev/null; then
2453 if test -s conftest.err; then
2454 ac_cpp_err=$ac_c_preproc_warn_flag
2455 else
2456 ac_cpp_err=
2457 fi
2458else
2459 ac_cpp_err=yes
2460fi
2461if test -z "$ac_cpp_err"; then
2462 # Broken: success on invalid input.
2463continue
2464else
2465 echo "$as_me: failed program was:" >&5
2466 cat conftest.$ac_ext >&5
2467 # Passes both tests.
2468ac_preproc_ok=:
2469break
2470fi
2471rm -f conftest.err conftest.$ac_ext
2472
2473done
2474# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2475rm -f conftest.err conftest.$ac_ext
2476if $ac_preproc_ok; then
2477 break
2478fi
2479
2480 done
2481 ac_cv_prog_CPP=$CPP
2482
2483fi
2484 CPP=$ac_cv_prog_CPP
2485else
2486 ac_cv_prog_CPP=$CPP
2487fi
2488echo "$as_me:$LINENO: result: $CPP" >&5
2489echo "${ECHO_T}$CPP" >&6
2490ac_preproc_ok=false
2491for ac_c_preproc_warn_flag in '' yes
2492do
2493 # Use a header file that comes with gcc, so configuring glibc
2494 # with a fresh cross-compiler works.
2495 # On the NeXT, cc -E runs the code through the compiler's parser,
2496 # not just through cpp. "Syntax error" is here to catch this case.
2497 cat >conftest.$ac_ext <<_ACEOF
2498#line $LINENO "configure"
2499#include "confdefs.h"
2500#include <assert.h>
2501 Syntax error
2502_ACEOF
2503if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2504 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2505 ac_status=$?
2506 egrep -v '^ *\+' conftest.er1 >conftest.err
2507 rm -f conftest.er1
2508 cat conftest.err >&5
2509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2510 (exit $ac_status); } >/dev/null; then
2511 if test -s conftest.err; then
2512 ac_cpp_err=$ac_c_preproc_warn_flag
2513 else
2514 ac_cpp_err=
2515 fi
2516else
2517 ac_cpp_err=yes
2518fi
2519if test -z "$ac_cpp_err"; then
2520 :
2521else
2522 echo "$as_me: failed program was:" >&5
2523 cat conftest.$ac_ext >&5
2524 # Broken: fails on valid input.
2525continue
2526fi
2527rm -f conftest.err conftest.$ac_ext
2528
2529 # OK, works on sane cases. Now check whether non-existent headers
2530 # can be detected and how.
2531 cat >conftest.$ac_ext <<_ACEOF
2532#line $LINENO "configure"
2533#include "confdefs.h"
2534#include <ac_nonexistent.h>
2535_ACEOF
2536if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2537 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2538 ac_status=$?
2539 egrep -v '^ *\+' conftest.er1 >conftest.err
2540 rm -f conftest.er1
2541 cat conftest.err >&5
2542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2543 (exit $ac_status); } >/dev/null; then
2544 if test -s conftest.err; then
2545 ac_cpp_err=$ac_c_preproc_warn_flag
2546 else
2547 ac_cpp_err=
2548 fi
2549else
2550 ac_cpp_err=yes
2551fi
2552if test -z "$ac_cpp_err"; then
2553 # Broken: success on invalid input.
2554continue
2555else
2556 echo "$as_me: failed program was:" >&5
2557 cat conftest.$ac_ext >&5
2558 # Passes both tests.
2559ac_preproc_ok=:
2560break
2561fi
2562rm -f conftest.err conftest.$ac_ext
2563
2564done
2565# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2566rm -f conftest.err conftest.$ac_ext
2567if $ac_preproc_ok; then
2568 :
2569else
2570 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2571echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2572 { (exit 1); exit 1; }; }
2573fi
2574
2575ac_ext=c
2576ac_cpp='$CPP $CPPFLAGS'
2577ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2578ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2579ac_compiler_gnu=$ac_cv_c_compiler_gnu
2580
2581
2582
2583echo "$as_me:$LINENO: checking for AIX" >&5
2584echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2585cat >conftest.$ac_ext <<_ACEOF
2586#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002587#include "confdefs.h"
2588#ifdef _AIX
2589 yes
2590#endif
2591
Martin v. Löwis11437992002-04-12 09:54:03 +00002592_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002593if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2594 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 echo "$as_me:$LINENO: result: yes" >&5
2596echo "${ECHO_T}yes" >&6
2597cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002598#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002599_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002600
2601else
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 echo "$as_me:$LINENO: result: no" >&5
2603echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002604fi
2605rm -f conftest*
2606
Michael W. Hudson54241132001-12-07 15:38:26 +00002607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2609echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2610if test "${ac_cv_header_stdc+set}" = set; then
2611 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002612else
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 cat >conftest.$ac_ext <<_ACEOF
2614#line $LINENO "configure"
2615#include "confdefs.h"
2616#include <stdlib.h>
2617#include <stdarg.h>
2618#include <string.h>
2619#include <float.h>
2620
2621_ACEOF
2622if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2623 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2624 ac_status=$?
2625 egrep -v '^ *\+' conftest.er1 >conftest.err
2626 rm -f conftest.er1
2627 cat conftest.err >&5
2628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2629 (exit $ac_status); } >/dev/null; then
2630 if test -s conftest.err; then
2631 ac_cpp_err=$ac_c_preproc_warn_flag
2632 else
2633 ac_cpp_err=
2634 fi
2635else
2636 ac_cpp_err=yes
2637fi
2638if test -z "$ac_cpp_err"; then
2639 ac_cv_header_stdc=yes
2640else
2641 echo "$as_me: failed program was:" >&5
2642 cat conftest.$ac_ext >&5
2643 ac_cv_header_stdc=no
2644fi
2645rm -f conftest.err conftest.$ac_ext
2646
2647if test $ac_cv_header_stdc = yes; then
2648 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2649 cat >conftest.$ac_ext <<_ACEOF
2650#line $LINENO "configure"
2651#include "confdefs.h"
2652#include <string.h>
2653
2654_ACEOF
2655if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2656 egrep "memchr" >/dev/null 2>&1; then
2657 :
2658else
2659 ac_cv_header_stdc=no
2660fi
2661rm -f conftest*
2662
2663fi
2664
2665if test $ac_cv_header_stdc = yes; then
2666 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2667 cat >conftest.$ac_ext <<_ACEOF
2668#line $LINENO "configure"
2669#include "confdefs.h"
2670#include <stdlib.h>
2671
2672_ACEOF
2673if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2674 egrep "free" >/dev/null 2>&1; then
2675 :
2676else
2677 ac_cv_header_stdc=no
2678fi
2679rm -f conftest*
2680
2681fi
2682
2683if test $ac_cv_header_stdc = yes; then
2684 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2685 if test "$cross_compiling" = yes; then
2686 :
2687else
2688 cat >conftest.$ac_ext <<_ACEOF
2689#line $LINENO "configure"
2690#include "confdefs.h"
2691#include <ctype.h>
2692#if ((' ' & 0x0FF) == 0x020)
2693# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2694# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2695#else
2696# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2697 || ('j' <= (c) && (c) <= 'r') \
2698 || ('s' <= (c) && (c) <= 'z'))
2699# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2700#endif
2701
2702#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2703int
2704main ()
2705{
2706 int i;
2707 for (i = 0; i < 256; i++)
2708 if (XOR (islower (i), ISLOWER (i))
2709 || toupper (i) != TOUPPER (i))
2710 exit(2);
2711 exit (0);
2712}
2713_ACEOF
2714rm -f conftest$ac_exeext
2715if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2716 (eval $ac_link) 2>&5
2717 ac_status=$?
2718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2719 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2721 (eval $ac_try) 2>&5
2722 ac_status=$?
2723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2724 (exit $ac_status); }; }; then
2725 :
2726else
2727 echo "$as_me: program exited with status $ac_status" >&5
2728echo "$as_me: failed program was:" >&5
2729cat conftest.$ac_ext >&5
2730( exit $ac_status )
2731ac_cv_header_stdc=no
2732fi
2733rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2734fi
2735fi
2736fi
2737echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2738echo "${ECHO_T}$ac_cv_header_stdc" >&6
2739if test $ac_cv_header_stdc = yes; then
2740
2741cat >>confdefs.h <<\_ACEOF
2742#define STDC_HEADERS 1
2743_ACEOF
2744
2745fi
2746
2747# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2758 inttypes.h stdint.h unistd.h
2759do
2760as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2761echo "$as_me:$LINENO: checking for $ac_header" >&5
2762echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2763if eval "test \"\${$as_ac_Header+set}\" = set"; then
2764 echo $ECHO_N "(cached) $ECHO_C" >&6
2765else
2766 cat >conftest.$ac_ext <<_ACEOF
2767#line $LINENO "configure"
2768#include "confdefs.h"
2769$ac_includes_default
2770
2771#include <$ac_header>
2772_ACEOF
2773rm -f conftest.$ac_objext
2774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2775 (eval $ac_compile) 2>&5
2776 ac_status=$?
2777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2778 (exit $ac_status); } &&
2779 { ac_try='test -s conftest.$ac_objext'
2780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2781 (eval $ac_try) 2>&5
2782 ac_status=$?
2783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2784 (exit $ac_status); }; }; then
2785 eval "$as_ac_Header=yes"
2786else
2787 echo "$as_me: failed program was:" >&5
2788cat conftest.$ac_ext >&5
2789eval "$as_ac_Header=no"
2790fi
2791rm -f conftest.$ac_objext conftest.$ac_ext
2792fi
2793echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2794echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2795if test `eval echo '${'$as_ac_Header'}'` = yes; then
2796 cat >>confdefs.h <<_ACEOF
2797#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2798_ACEOF
2799
2800fi
2801
2802done
2803
2804
2805if test "${ac_cv_header_minix_config_h+set}" = set; then
2806 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2807echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2808if test "${ac_cv_header_minix_config_h+set}" = set; then
2809 echo $ECHO_N "(cached) $ECHO_C" >&6
2810fi
2811echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2812echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2813else
2814 # Is the header compilable?
2815echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2816echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2817cat >conftest.$ac_ext <<_ACEOF
2818#line $LINENO "configure"
2819#include "confdefs.h"
2820$ac_includes_default
2821#include <minix/config.h>
2822_ACEOF
2823rm -f conftest.$ac_objext
2824if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2825 (eval $ac_compile) 2>&5
2826 ac_status=$?
2827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2828 (exit $ac_status); } &&
2829 { ac_try='test -s conftest.$ac_objext'
2830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2831 (eval $ac_try) 2>&5
2832 ac_status=$?
2833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2834 (exit $ac_status); }; }; then
2835 ac_header_compiler=yes
2836else
2837 echo "$as_me: failed program was:" >&5
2838cat conftest.$ac_ext >&5
2839ac_header_compiler=no
2840fi
2841rm -f conftest.$ac_objext conftest.$ac_ext
2842echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2843echo "${ECHO_T}$ac_header_compiler" >&6
2844
2845# Is the header present?
2846echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2847echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2848cat >conftest.$ac_ext <<_ACEOF
2849#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002850#include "confdefs.h"
2851#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002852_ACEOF
2853if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2854 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2855 ac_status=$?
2856 egrep -v '^ *\+' conftest.er1 >conftest.err
2857 rm -f conftest.er1
2858 cat conftest.err >&5
2859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2860 (exit $ac_status); } >/dev/null; then
2861 if test -s conftest.err; then
2862 ac_cpp_err=$ac_c_preproc_warn_flag
2863 else
2864 ac_cpp_err=
2865 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002866else
Martin v. Löwis11437992002-04-12 09:54:03 +00002867 ac_cpp_err=yes
2868fi
2869if test -z "$ac_cpp_err"; then
2870 ac_header_preproc=yes
2871else
2872 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002873 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002874 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002875fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002876rm -f conftest.err conftest.$ac_ext
2877echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2878echo "${ECHO_T}$ac_header_preproc" >&6
2879
2880# So? What about this header?
2881case $ac_header_compiler:$ac_header_preproc in
2882 yes:no )
2883 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2884echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2885 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2886echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2887 no:yes )
2888 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2889echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2890 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2891echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2892 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2893echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2894esac
2895echo "$as_me:$LINENO: checking for minix/config.h" >&5
2896echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2897if test "${ac_cv_header_minix_config_h+set}" = set; then
2898 echo $ECHO_N "(cached) $ECHO_C" >&6
2899else
2900 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002901fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002902echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2903echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2904
2905fi
2906if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002907 MINIX=yes
2908else
Martin v. Löwis11437992002-04-12 09:54:03 +00002909 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002910fi
2911
Martin v. Löwis11437992002-04-12 09:54:03 +00002912
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002913if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002914
2915cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002916#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002917_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002918
Martin v. Löwis11437992002-04-12 09:54:03 +00002919
2920cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002921#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002922_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002923
Martin v. Löwis11437992002-04-12 09:54:03 +00002924
2925cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002926#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002927_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002928
2929fi
2930
2931
Michael W. Hudson54241132001-12-07 15:38:26 +00002932
Martin v. Löwis11437992002-04-12 09:54:03 +00002933echo "$as_me:$LINENO: checking for --with-suffix" >&5
2934echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002935
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002936# Check whether --with-suffix or --without-suffix was given.
2937if test "${with_suffix+set}" = set; then
2938 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002939
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002940 case $withval in
2941 no) EXEEXT=;;
2942 yes) EXEEXT=.exe;;
2943 *) EXEEXT=$withval;;
2944 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002945fi;
2946echo "$as_me:$LINENO: result: $EXEEXT" >&5
2947echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002948
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002949# Test whether we're running on a non-case-sensitive system, in which
2950# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002951
Martin v. Löwis11437992002-04-12 09:54:03 +00002952echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
2953echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen0b06be72002-06-21 14:48:38 +00002954if test -d "${srcdir}/python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002955then
Martin v. Löwis11437992002-04-12 09:54:03 +00002956 echo "$as_me:$LINENO: result: yes" >&5
2957echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002958 BUILDEXEEXT=.exe
2959else
Martin v. Löwis11437992002-04-12 09:54:03 +00002960 echo "$as_me:$LINENO: result: no" >&5
2961echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002962 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002963fi
Guido van Rossumff555e32000-09-22 15:38:21 +00002964
Guido van Rossumdd997f71998-10-07 19:58:26 +00002965case $MACHDEP in
2966bsdos*)
2967 case $CC in
2968 gcc) CC="$CC -D_HAVE_BSDI";;
2969 esac;;
2970esac
2971
Guido van Rossum24b1e751997-08-21 02:29:16 +00002972case $ac_sys_system in
2973hp*|HP*)
2974 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00002975 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002976 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002977Monterey*)
2978 case $CC in
2979 cc) CC="$CC -Wl,-Bexport";;
2980 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002981SunOS*)
2982 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00002983
2984cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002985#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002986_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002987
2988 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002989esac
2990
Michael W. Hudson54241132001-12-07 15:38:26 +00002991
2992
Martin v. Löwis11437992002-04-12 09:54:03 +00002993echo "$as_me:$LINENO: checking LIBRARY" >&5
2994echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002995if test -z "$LIBRARY"
2996then
2997 LIBRARY='libpython$(VERSION).a'
2998fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002999echo "$as_me:$LINENO: result: $LIBRARY" >&5
3000echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003001
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003002# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003003# name of the library into which to insert object files). BLDLIBRARY is also
3004# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3005# is blank as the main program is not linked directly against LDLIBRARY.
3006# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3007# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3008# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3009# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003010#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003011# RUNSHARED is used to run shared python without installed libraries
3012#
3013# INSTSONAME is the name of the shared library that will be use to install
3014# on the system - some systems like version suffix, others don't
3015
3016
Michael W. Hudson54241132001-12-07 15:38:26 +00003017
3018
3019
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003020
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003021LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003022BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003023INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003024DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003025LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003026RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003027
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003028# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003029# If CXX is set, and if it is needed to link a main function that was
3030# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3031# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003032# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003033# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003034
Martin v. Löwis11437992002-04-12 09:54:03 +00003035echo "$as_me:$LINENO: checking LINKCC" >&5
3036echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003037if test -z "$LINKCC"
3038then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003039 if test -z "$CXX"; then
3040 LINKCC="\$(PURIFY) \$(CC)"
3041 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003042 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003043 $CXX -c conftest.$ac_ext 2>&5
3044 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3045 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3046 then
3047 LINKCC="\$(PURIFY) \$(CC)"
3048 else
3049 LINKCC="\$(PURIFY) \$(CXX)"
3050 fi
3051 rm -fr conftest*
3052 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003053 case $ac_sys_system in
3054 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003055 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003056 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003057 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003058 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003059 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003060 esac
3061fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003062echo "$as_me:$LINENO: result: $LINKCC" >&5
3063echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003064
Martin v. Löwis11437992002-04-12 09:54:03 +00003065echo "$as_me:$LINENO: checking for --enable-shared" >&5
3066echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003067# Check whether --enable-shared or --disable-shared was given.
3068if test "${enable_shared+set}" = set; then
3069 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003070
Martin v. Löwis11437992002-04-12 09:54:03 +00003071fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003072
3073if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003074then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003075 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003076 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003077 enable_shared="yes";;
3078 *)
3079 enable_shared="no";;
3080 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003081fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003082echo "$as_me:$LINENO: result: $enable_shared" >&5
3083echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003084
3085
Martin v. Löwis11437992002-04-12 09:54:03 +00003086echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3087echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003088
Guido van Rossumb8552162001-09-05 14:58:11 +00003089# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3090# library that we build, but we do not want to link against it (we
3091# will find it with a -framework option). For this reason there is an
3092# extra variable BLDLIBRARY against which Python and the extension
3093# modules are linked, BLDLIBRARY. This is normally the same as
3094# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003095if test "$enable_framework"
3096then
3097 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3098 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3099 BLDLIBRARY=''
3100else
3101 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003102fi
Jack Jansene578a632001-08-15 01:27:14 +00003103
Martin v. Löwis1142de32002-03-29 16:28:31 +00003104# Other platforms follow
3105if test $enable_shared = "yes"; then
3106 case $ac_sys_system in
3107 BeOS*)
3108 LDLIBRARY='libpython$(VERSION).so'
3109 ;;
3110 CYGWIN*)
3111 LDLIBRARY='libpython$(VERSION).dll.a'
3112 DLLLIBRARY='libpython$(VERSION).dll'
3113 ;;
3114 SunOS*)
3115 LDLIBRARY='libpython$(VERSION).so'
3116 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3117 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3118 ;;
3119 Linux*)
3120 LDLIBRARY='libpython$(VERSION).so'
3121 BLDLIBRARY='-L. -lpython$(VERSION)'
3122 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3123 INSTSONAME="$LDLIBRARY".$SOVERSION
3124 ;;
3125 hp*|HP*)
3126 LDLIBRARY='libpython$(VERSION).sl'
3127 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3128 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3129 ;;
3130 OSF*)
3131 LDLIBRARY='libpython$(VERSION).so'
3132 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3133 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3134 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003135 atheos*)
3136 LDLIBRARY='libpython$(VERSION).so'
3137 BLDLIBRARY='-L. -lpython$(VERSION)'
3138 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3139 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003140 esac
3141 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3142 case $MACHDEP in
3143 dguxR4)
3144 LDLIBRARY='libpython$(VERSION).so'
3145 OPT="$OPT -pic"
3146 ;;
3147 esac
3148fi
3149
Martin v. Löwis11437992002-04-12 09:54:03 +00003150echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3151echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003152
Martin v. Löwis11437992002-04-12 09:54:03 +00003153if test -n "$ac_tool_prefix"; then
3154 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3155set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3156echo "$as_me:$LINENO: checking for $ac_word" >&5
3157echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3158if test "${ac_cv_prog_RANLIB+set}" = set; then
3159 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003160else
3161 if test -n "$RANLIB"; then
3162 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3163else
Martin v. Löwis11437992002-04-12 09:54:03 +00003164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3165for as_dir in $PATH
3166do
3167 IFS=$as_save_IFS
3168 test -z "$as_dir" && as_dir=.
3169 for ac_exec_ext in '' $ac_executable_extensions; do
3170 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3171 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3172 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3173 break 2
3174 fi
3175done
3176done
3177
Guido van Rossum627b2d71993-12-24 10:39:16 +00003178fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003179fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003180RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003181if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003182 echo "$as_me:$LINENO: result: $RANLIB" >&5
3183echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003184else
Martin v. Löwis11437992002-04-12 09:54:03 +00003185 echo "$as_me:$LINENO: result: no" >&5
3186echo "${ECHO_T}no" >&6
3187fi
3188
3189fi
3190if test -z "$ac_cv_prog_RANLIB"; then
3191 ac_ct_RANLIB=$RANLIB
3192 # Extract the first word of "ranlib", so it can be a program name with args.
3193set dummy ranlib; ac_word=$2
3194echo "$as_me:$LINENO: checking for $ac_word" >&5
3195echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3196if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3197 echo $ECHO_N "(cached) $ECHO_C" >&6
3198else
3199 if test -n "$ac_ct_RANLIB"; then
3200 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3201else
3202as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3203for as_dir in $PATH
3204do
3205 IFS=$as_save_IFS
3206 test -z "$as_dir" && as_dir=.
3207 for ac_exec_ext in '' $ac_executable_extensions; do
3208 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3209 ac_cv_prog_ac_ct_RANLIB="ranlib"
3210 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3211 break 2
3212 fi
3213done
3214done
3215
3216 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3217fi
3218fi
3219ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3220if test -n "$ac_ct_RANLIB"; then
3221 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3222echo "${ECHO_T}$ac_ct_RANLIB" >&6
3223else
3224 echo "$as_me:$LINENO: result: no" >&5
3225echo "${ECHO_T}no" >&6
3226fi
3227
3228 RANLIB=$ac_ct_RANLIB
3229else
3230 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003231fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003232
3233
Guido van Rossum7f43da71994-08-01 12:15:30 +00003234for ac_prog in ar aal
3235do
Martin v. Löwis11437992002-04-12 09:54:03 +00003236 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003237set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003238echo "$as_me:$LINENO: checking for $ac_word" >&5
3239echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3240if test "${ac_cv_prog_AR+set}" = set; then
3241 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003242else
3243 if test -n "$AR"; then
3244 ac_cv_prog_AR="$AR" # Let the user override the test.
3245else
Martin v. Löwis11437992002-04-12 09:54:03 +00003246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3247for as_dir in $PATH
3248do
3249 IFS=$as_save_IFS
3250 test -z "$as_dir" && as_dir=.
3251 for ac_exec_ext in '' $ac_executable_extensions; do
3252 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3253 ac_cv_prog_AR="$ac_prog"
3254 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3255 break 2
3256 fi
3257done
3258done
3259
Guido van Rossum7f43da71994-08-01 12:15:30 +00003260fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003261fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003262AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003263if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003264 echo "$as_me:$LINENO: result: $AR" >&5
3265echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003266else
Martin v. Löwis11437992002-04-12 09:54:03 +00003267 echo "$as_me:$LINENO: result: no" >&5
3268echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003269fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003270
Martin v. Löwis11437992002-04-12 09:54:03 +00003271 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003272done
3273test -n "$AR" || AR="ar"
3274
Michael W. Hudson54241132001-12-07 15:38:26 +00003275
Neil Schemenauera42c8272001-03-31 00:01:55 +00003276case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003277bsdos*|hp*|HP*)
3278 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003279 if test -z "$INSTALL"
3280 then
3281 INSTALL="${srcdir}/install-sh -c"
3282 fi
3283esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003284ac_aux_dir=
3285for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3286 if test -f $ac_dir/install-sh; then
3287 ac_aux_dir=$ac_dir
3288 ac_install_sh="$ac_aux_dir/install-sh -c"
3289 break
3290 elif test -f $ac_dir/install.sh; then
3291 ac_aux_dir=$ac_dir
3292 ac_install_sh="$ac_aux_dir/install.sh -c"
3293 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003294 elif test -f $ac_dir/shtool; then
3295 ac_aux_dir=$ac_dir
3296 ac_install_sh="$ac_aux_dir/shtool install -c"
3297 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003298 fi
3299done
3300if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003301 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3302echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3303 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003304fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003305ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3306ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3307ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003308
3309# Find a good install program. We prefer a C program (faster),
3310# so one script is as good as another. But avoid the broken or
3311# incompatible versions:
3312# SysV /etc/install, /usr/sbin/install
3313# SunOS /usr/etc/install
3314# IRIX /sbin/install
3315# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003316# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003317# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3318# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3319# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3320# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003321echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3322echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003323if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003324if test "${ac_cv_path_install+set}" = set; then
3325 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003326else
Martin v. Löwis11437992002-04-12 09:54:03 +00003327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3328for as_dir in $PATH
3329do
3330 IFS=$as_save_IFS
3331 test -z "$as_dir" && as_dir=.
3332 # Account for people who put trailing slashes in PATH elements.
3333case $as_dir/ in
3334 ./ | .// | /cC/* | \
3335 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3336 /usr/ucb/* ) ;;
3337 *)
3338 # OSF1 and SCO ODT 3.0 have their own names for install.
3339 # Don't use installbsd from OSF since it installs stuff as root
3340 # by default.
3341 for ac_prog in ginstall scoinst install; do
3342 for ac_exec_ext in '' $ac_executable_extensions; do
3343 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3344 if test $ac_prog = install &&
3345 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3346 # AIX install. It has an incompatible calling convention.
3347 :
3348 elif test $ac_prog = install &&
3349 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3350 # program-specific install script used by HP pwplus--don't use.
3351 :
3352 else
3353 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3354 break 3
3355 fi
3356 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003357 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003358 done
3359 ;;
3360esac
3361done
3362
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003363
3364fi
3365 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003367 else
3368 # As a last resort, use the slow shell script. We don't cache a
3369 # path for INSTALL within a source directory, because that will
3370 # break other packages using the cache if that directory is
3371 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003372 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003373 fi
3374fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003375echo "$as_me:$LINENO: result: $INSTALL" >&5
3376echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003377
3378# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3379# It thinks the first close brace ends the variable substitution.
3380test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3381
Martin v. Löwis11437992002-04-12 09:54:03 +00003382test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003383
3384test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3385
Michael W. Hudson54241132001-12-07 15:38:26 +00003386
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003387# Not every filesystem supports hard links
3388
3389if test -z "$LN" ; then
3390 case $ac_sys_system in
3391 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003392 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003393 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003394 *) LN=ln;;
3395 esac
3396fi
3397
Fred Drake109d9862001-07-11 06:27:56 +00003398# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003399echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3400echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3401
Fred Drake109d9862001-07-11 06:27:56 +00003402# Check whether --with-pydebug or --without-pydebug was given.
3403if test "${with_pydebug+set}" = set; then
3404 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003405
Fred Drake109d9862001-07-11 06:27:56 +00003406if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003407then
3408
3409cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003410#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003411_ACEOF
3412
3413 echo "$as_me:$LINENO: result: yes" >&5
3414echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003415 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003416else echo "$as_me:$LINENO: result: no" >&5
3417echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003418fi
3419else
Martin v. Löwis11437992002-04-12 09:54:03 +00003420 echo "$as_me:$LINENO: result: no" >&5
3421echo "${ECHO_T}no" >&6
3422fi;
Fred Drake109d9862001-07-11 06:27:56 +00003423
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003424# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003425
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003426if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003427then
Guido van Rossumedca74a1997-07-18 23:29:40 +00003428 case $GCC in
3429 yes)
3430 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003431 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003432 if test "$Py_DEBUG" = 'true' ; then
3433 # Optimization messes up debuggers, so turn it off for
3434 # debug builds.
3435 OPT="-g -Wall -Wstrict-prototypes"
3436 else
3437 OPT="-g -O3 -Wall -Wstrict-prototypes"
3438 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003439 *)
Fred Drake109d9862001-07-11 06:27:56 +00003440 OPT="-O3 -Wall -Wstrict-prototypes";;
3441 esac
3442 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003443 *)
3444 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003445 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003446 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
3447 *)
3448 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003449 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003450 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003451 case $ac_sys_system in
3452 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003453 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003454 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003455fi
3456
Fred Drakee1ceaa02001-12-04 20:55:47 +00003457if test "$Py_DEBUG" = 'true'; then
3458 :
3459else
3460 OPT="-DNDEBUG $OPT"
3461fi
3462
Trent Mick635f6fb2000-08-23 21:33:05 +00003463# The current (beta) Monterey compiler dies with optimizations
3464case $ac_sys_system in
3465Monterey*) OPT="";;
3466esac
3467
Guido van Rossum563e7081996-09-10 18:20:48 +00003468if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003469then
3470 OPT="$OPT $ac_arch_flags"
3471fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003472
Martin v. Löwis11437992002-04-12 09:54:03 +00003473echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3474echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3475if test "${ac_cv_opt_olimit_ok+set}" = set; then
3476 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003477else
3478 ac_save_cc="$CC"
3479CC="$CC -OPT:Olimit=0"
3480if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003481 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003482else
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 cat >conftest.$ac_ext <<_ACEOF
3484#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003485#include "confdefs.h"
3486int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003487_ACEOF
3488rm -f conftest$ac_exeext
3489if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3490 (eval $ac_link) 2>&5
3491 ac_status=$?
3492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3493 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3495 (eval $ac_try) 2>&5
3496 ac_status=$?
3497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3498 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003499 ac_cv_opt_olimit_ok=yes
3500else
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 echo "$as_me: program exited with status $ac_status" >&5
3502echo "$as_me: failed program was:" >&5
3503cat conftest.$ac_ext >&5
3504( exit $ac_status )
3505ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003506fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003507rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003508fi
Guido van Rossum91922671997-10-09 20:24:13 +00003509CC="$ac_save_cc"
3510fi
3511
Martin v. Löwis11437992002-04-12 09:54:03 +00003512echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3513echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003514if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003515 case $ac_sys_system in
3516 Darwin*) OPT="$OPT" ;;
3517 *) OPT="$OPT -OPT:Olimit=0";;
3518 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003519else
Martin v. Löwis11437992002-04-12 09:54:03 +00003520 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3521echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3522 if test "${ac_cv_olimit_ok+set}" = set; then
3523 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003524else
3525 ac_save_cc="$CC"
3526 CC="$CC -Olimit 1500"
3527 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003528 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003529else
Martin v. Löwis11437992002-04-12 09:54:03 +00003530 cat >conftest.$ac_ext <<_ACEOF
3531#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003532#include "confdefs.h"
3533int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003534_ACEOF
3535rm -f conftest$ac_exeext
3536if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3537 (eval $ac_link) 2>&5
3538 ac_status=$?
3539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3540 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3542 (eval $ac_try) 2>&5
3543 ac_status=$?
3544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3545 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003546 ac_cv_olimit_ok=yes
3547else
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 echo "$as_me: program exited with status $ac_status" >&5
3549echo "$as_me: failed program was:" >&5
3550cat conftest.$ac_ext >&5
3551( exit $ac_status )
3552ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003554rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003555fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003556 CC="$ac_save_cc"
3557fi
3558
Martin v. Löwis11437992002-04-12 09:54:03 +00003559 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3560echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003561 if test $ac_cv_olimit_ok = yes; then
3562 OPT="$OPT -Olimit 1500"
3563 fi
3564fi
3565
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003566# On some compilers, pthreads are available without further options
3567# (e.g. MacOS X). On some of these systems, the compiler will not
3568# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3569# So we have to see first whether pthreads are available without
3570# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003571echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3572echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3573if test "${ac_cv_pthread_is_default+set}" = set; then
3574 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003575else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003576 if test "$cross_compiling" = yes; then
3577 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003578else
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 cat >conftest.$ac_ext <<_ACEOF
3580#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003581#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003582
Martin v. Löwis130fb172001-07-19 11:00:41 +00003583#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003584
3585void* routine(void* p){return NULL;}
3586
3587int main(){
3588 pthread_t p;
3589 if(pthread_create(&p,NULL,routine,NULL)!=0)
3590 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003591 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003592 return 0;
3593}
3594
Martin v. Löwis11437992002-04-12 09:54:03 +00003595_ACEOF
3596rm -f conftest$ac_exeext
3597if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3598 (eval $ac_link) 2>&5
3599 ac_status=$?
3600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3601 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3603 (eval $ac_try) 2>&5
3604 ac_status=$?
3605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3606 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003607 ac_cv_pthread_is_default=yes
3608else
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 echo "$as_me: program exited with status $ac_status" >&5
3610echo "$as_me: failed program was:" >&5
3611cat conftest.$ac_ext >&5
3612( exit $ac_status )
3613ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003614fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003615rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003616fi
3617
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003618fi
3619
Martin v. Löwis11437992002-04-12 09:54:03 +00003620echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3621echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003622
Michael W. Hudson54241132001-12-07 15:38:26 +00003623
Martin v. Löwis11437992002-04-12 09:54:03 +00003624if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003625then
3626 ac_cv_kpthread=no
3627else
3628# -Kpthread, if available, provides the right #defines
3629# and linker options to make pthread_create available
3630# Some compilers won't report that they do not support -Kpthread,
3631# so we need to run a program to see whether it really made the
3632# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003633echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3634echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3635if test "${ac_cv_kpthread+set}" = set; then
3636 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003637else
3638 ac_save_cc="$CC"
3639CC="$CC -Kpthread"
3640if test "$cross_compiling" = yes; then
3641 ac_cv_kpthread=no
3642else
Martin v. Löwis11437992002-04-12 09:54:03 +00003643 cat >conftest.$ac_ext <<_ACEOF
3644#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003645#include "confdefs.h"
3646
3647#include <pthread.h>
3648
3649void* routine(void* p){return NULL;}
3650
3651int main(){
3652 pthread_t p;
3653 if(pthread_create(&p,NULL,routine,NULL)!=0)
3654 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003655 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003656 return 0;
3657}
3658
Martin v. Löwis11437992002-04-12 09:54:03 +00003659_ACEOF
3660rm -f conftest$ac_exeext
3661if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3662 (eval $ac_link) 2>&5
3663 ac_status=$?
3664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3665 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3667 (eval $ac_try) 2>&5
3668 ac_status=$?
3669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3670 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003671 ac_cv_kpthread=yes
3672else
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 echo "$as_me: program exited with status $ac_status" >&5
3674echo "$as_me: failed program was:" >&5
3675cat conftest.$ac_ext >&5
3676( exit $ac_status )
3677ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003678fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003679rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003680fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003681CC="$ac_save_cc"
3682fi
3683
Martin v. Löwis11437992002-04-12 09:54:03 +00003684echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3685echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003686fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003687
Michael W. Hudson54241132001-12-07 15:38:26 +00003688
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003689# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003690echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3691echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3692if test "${ac_cv_header_stdc+set}" = set; then
3693 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003694else
Martin v. Löwis11437992002-04-12 09:54:03 +00003695 cat >conftest.$ac_ext <<_ACEOF
3696#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003697#include "confdefs.h"
3698#include <stdlib.h>
3699#include <stdarg.h>
3700#include <string.h>
3701#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003702
3703_ACEOF
3704if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3705 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3706 ac_status=$?
3707 egrep -v '^ *\+' conftest.er1 >conftest.err
3708 rm -f conftest.er1
3709 cat conftest.err >&5
3710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3711 (exit $ac_status); } >/dev/null; then
3712 if test -s conftest.err; then
3713 ac_cpp_err=$ac_c_preproc_warn_flag
3714 else
3715 ac_cpp_err=
3716 fi
3717else
3718 ac_cpp_err=yes
3719fi
3720if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003721 ac_cv_header_stdc=yes
3722else
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003724 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003725 ac_cv_header_stdc=no
3726fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003727rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003728
3729if test $ac_cv_header_stdc = yes; then
3730 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 cat >conftest.$ac_ext <<_ACEOF
3732#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003733#include "confdefs.h"
3734#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003735
3736_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003737if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3738 egrep "memchr" >/dev/null 2>&1; then
3739 :
3740else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003741 ac_cv_header_stdc=no
3742fi
3743rm -f conftest*
3744
3745fi
3746
3747if test $ac_cv_header_stdc = yes; then
3748 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 cat >conftest.$ac_ext <<_ACEOF
3750#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003751#include "confdefs.h"
3752#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003753
3754_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003755if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3756 egrep "free" >/dev/null 2>&1; then
3757 :
3758else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003759 ac_cv_header_stdc=no
3760fi
3761rm -f conftest*
3762
3763fi
3764
3765if test $ac_cv_header_stdc = yes; then
3766 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003768 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003769else
Martin v. Löwis11437992002-04-12 09:54:03 +00003770 cat >conftest.$ac_ext <<_ACEOF
3771#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003772#include "confdefs.h"
3773#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003774#if ((' ' & 0x0FF) == 0x020)
3775# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3776# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3777#else
3778# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3779 || ('j' <= (c) && (c) <= 'r') \
3780 || ('s' <= (c) && (c) <= 'z'))
3781# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3782#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003783
Martin v. Löwis11437992002-04-12 09:54:03 +00003784#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3785int
3786main ()
3787{
3788 int i;
3789 for (i = 0; i < 256; i++)
3790 if (XOR (islower (i), ISLOWER (i))
3791 || toupper (i) != TOUPPER (i))
3792 exit(2);
3793 exit (0);
3794}
3795_ACEOF
3796rm -f conftest$ac_exeext
3797if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3798 (eval $ac_link) 2>&5
3799 ac_status=$?
3800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3801 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3803 (eval $ac_try) 2>&5
3804 ac_status=$?
3805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3806 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003807 :
3808else
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 echo "$as_me: program exited with status $ac_status" >&5
3810echo "$as_me: failed program was:" >&5
3811cat conftest.$ac_ext >&5
3812( exit $ac_status )
3813ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003814fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003815rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003816fi
3817fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003818fi
3819echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3820echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003821if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003822
3823cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003824#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003825_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003826
3827fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003828
Martin v. Löwis11437992002-04-12 09:54:03 +00003829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
Martin v. Löwis11437992002-04-12 09:54:03 +00003868for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003869libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003870signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003871sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003872sys/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 +00003873sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003874ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003875do
Martin v. Löwis11437992002-04-12 09:54:03 +00003876as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3877if eval "test \"\${$as_ac_Header+set}\" = set"; then
3878 echo "$as_me:$LINENO: checking for $ac_header" >&5
3879echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3880if eval "test \"\${$as_ac_Header+set}\" = set"; then
3881 echo $ECHO_N "(cached) $ECHO_C" >&6
3882fi
3883echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3884echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003885else
Martin v. Löwis11437992002-04-12 09:54:03 +00003886 # Is the header compilable?
3887echo "$as_me:$LINENO: checking $ac_header usability" >&5
3888echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3889cat >conftest.$ac_ext <<_ACEOF
3890#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003891#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003892$ac_includes_default
3893#include <$ac_header>
3894_ACEOF
3895rm -f conftest.$ac_objext
3896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3897 (eval $ac_compile) 2>&5
3898 ac_status=$?
3899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3900 (exit $ac_status); } &&
3901 { ac_try='test -s conftest.$ac_objext'
3902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3903 (eval $ac_try) 2>&5
3904 ac_status=$?
3905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3906 (exit $ac_status); }; }; then
3907 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003908else
Martin v. Löwis11437992002-04-12 09:54:03 +00003909 echo "$as_me: failed program was:" >&5
3910cat conftest.$ac_ext >&5
3911ac_header_compiler=no
3912fi
3913rm -f conftest.$ac_objext conftest.$ac_ext
3914echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3915echo "${ECHO_T}$ac_header_compiler" >&6
3916
3917# Is the header present?
3918echo "$as_me:$LINENO: checking $ac_header presence" >&5
3919echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3920cat >conftest.$ac_ext <<_ACEOF
3921#line $LINENO "configure"
3922#include "confdefs.h"
3923#include <$ac_header>
3924_ACEOF
3925if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3926 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3927 ac_status=$?
3928 egrep -v '^ *\+' conftest.er1 >conftest.err
3929 rm -f conftest.er1
3930 cat conftest.err >&5
3931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3932 (exit $ac_status); } >/dev/null; then
3933 if test -s conftest.err; then
3934 ac_cpp_err=$ac_c_preproc_warn_flag
3935 else
3936 ac_cpp_err=
3937 fi
3938else
3939 ac_cpp_err=yes
3940fi
3941if test -z "$ac_cpp_err"; then
3942 ac_header_preproc=yes
3943else
3944 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003945 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003946 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003947fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003948rm -f conftest.err conftest.$ac_ext
3949echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3950echo "${ECHO_T}$ac_header_preproc" >&6
3951
3952# So? What about this header?
3953case $ac_header_compiler:$ac_header_preproc in
3954 yes:no )
3955 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3956echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3957 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3958echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3959 no:yes )
3960 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3961echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3962 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3963echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3964 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3965echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3966esac
3967echo "$as_me:$LINENO: checking for $ac_header" >&5
3968echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3969if eval "test \"\${$as_ac_Header+set}\" = set"; then
3970 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003971else
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003973fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003974echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3975echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3976
3977fi
3978if test `eval echo '${'$as_ac_Header'}'` = yes; then
3979 cat >>confdefs.h <<_ACEOF
3980#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3981_ACEOF
3982
3983fi
3984
Guido van Rossum627b2d71993-12-24 10:39:16 +00003985done
3986
Martin v. Löwis11437992002-04-12 09:54:03 +00003987
3988
3989
3990
3991
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003992ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003993for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3994 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3995echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3996echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3997if eval "test \"\${$as_ac_Header+set}\" = set"; then
3998 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003999else
Martin v. Löwis11437992002-04-12 09:54:03 +00004000 cat >conftest.$ac_ext <<_ACEOF
4001#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004002#include "confdefs.h"
4003#include <sys/types.h>
4004#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004005
4006#ifdef F77_DUMMY_MAIN
4007# ifdef __cplusplus
4008 extern "C"
4009# endif
4010 int F77_DUMMY_MAIN() { return 1; }
4011#endif
4012int
4013main ()
4014{
4015if ((DIR *) 0)
4016return 0;
4017 ;
4018 return 0;
4019}
4020_ACEOF
4021rm -f conftest.$ac_objext
4022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4023 (eval $ac_compile) 2>&5
4024 ac_status=$?
4025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4026 (exit $ac_status); } &&
4027 { ac_try='test -s conftest.$ac_objext'
4028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4029 (eval $ac_try) 2>&5
4030 ac_status=$?
4031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4032 (exit $ac_status); }; }; then
4033 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004034else
Martin v. Löwis11437992002-04-12 09:54:03 +00004035 echo "$as_me: failed program was:" >&5
4036cat conftest.$ac_ext >&5
4037eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004038fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004039rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004040fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004041echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4042echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4043if test `eval echo '${'$as_ac_Header'}'` = yes; then
4044 cat >>confdefs.h <<_ACEOF
4045#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4046_ACEOF
4047
4048ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004049fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004050
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004051done
4052# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4053if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004054 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4055echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4056if test "${ac_cv_search_opendir+set}" = set; then
4057 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058else
Martin v. Löwis11437992002-04-12 09:54:03 +00004059 ac_func_search_save_LIBS=$LIBS
4060ac_cv_search_opendir=no
4061cat >conftest.$ac_ext <<_ACEOF
4062#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004063#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004064
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004065/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004066#ifdef __cplusplus
4067extern "C"
4068#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004069/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004070 builtin and then its argument prototype would still apply. */
4071char opendir ();
4072#ifdef F77_DUMMY_MAIN
4073# ifdef __cplusplus
4074 extern "C"
4075# endif
4076 int F77_DUMMY_MAIN() { return 1; }
4077#endif
4078int
4079main ()
4080{
4081opendir ();
4082 ;
4083 return 0;
4084}
4085_ACEOF
4086rm -f conftest.$ac_objext conftest$ac_exeext
4087if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4088 (eval $ac_link) 2>&5
4089 ac_status=$?
4090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4091 (exit $ac_status); } &&
4092 { ac_try='test -s conftest$ac_exeext'
4093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4094 (eval $ac_try) 2>&5
4095 ac_status=$?
4096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4097 (exit $ac_status); }; }; then
4098 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004099else
Martin v. Löwis11437992002-04-12 09:54:03 +00004100 echo "$as_me: failed program was:" >&5
4101cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004102fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004103rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4104if test "$ac_cv_search_opendir" = no; then
4105 for ac_lib in dir; do
4106 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4107 cat >conftest.$ac_ext <<_ACEOF
4108#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004109#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004110
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004111/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004112#ifdef __cplusplus
4113extern "C"
4114#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004115/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004116 builtin and then its argument prototype would still apply. */
4117char opendir ();
4118#ifdef F77_DUMMY_MAIN
4119# ifdef __cplusplus
4120 extern "C"
4121# endif
4122 int F77_DUMMY_MAIN() { return 1; }
4123#endif
4124int
4125main ()
4126{
4127opendir ();
4128 ;
4129 return 0;
4130}
4131_ACEOF
4132rm -f conftest.$ac_objext conftest$ac_exeext
4133if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4134 (eval $ac_link) 2>&5
4135 ac_status=$?
4136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4137 (exit $ac_status); } &&
4138 { ac_try='test -s conftest$ac_exeext'
4139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4140 (eval $ac_try) 2>&5
4141 ac_status=$?
4142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4143 (exit $ac_status); }; }; then
4144 ac_cv_search_opendir="-l$ac_lib"
4145break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004146else
Martin v. Löwis11437992002-04-12 09:54:03 +00004147 echo "$as_me: failed program was:" >&5
4148cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004150rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4151 done
4152fi
4153LIBS=$ac_func_search_save_LIBS
4154fi
4155echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4156echo "${ECHO_T}$ac_cv_search_opendir" >&6
4157if test "$ac_cv_search_opendir" != no; then
4158 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004159
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004160fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004161
Michael W. Hudson54241132001-12-07 15:38:26 +00004162else
Martin v. Löwis11437992002-04-12 09:54:03 +00004163 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4164echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4165if test "${ac_cv_search_opendir+set}" = set; then
4166 echo $ECHO_N "(cached) $ECHO_C" >&6
4167else
4168 ac_func_search_save_LIBS=$LIBS
4169ac_cv_search_opendir=no
4170cat >conftest.$ac_ext <<_ACEOF
4171#line $LINENO "configure"
4172#include "confdefs.h"
4173
4174/* Override any gcc2 internal prototype to avoid an error. */
4175#ifdef __cplusplus
4176extern "C"
4177#endif
4178/* We use char because int might match the return type of a gcc2
4179 builtin and then its argument prototype would still apply. */
4180char opendir ();
4181#ifdef F77_DUMMY_MAIN
4182# ifdef __cplusplus
4183 extern "C"
4184# endif
4185 int F77_DUMMY_MAIN() { return 1; }
4186#endif
4187int
4188main ()
4189{
4190opendir ();
4191 ;
4192 return 0;
4193}
4194_ACEOF
4195rm -f conftest.$ac_objext conftest$ac_exeext
4196if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4197 (eval $ac_link) 2>&5
4198 ac_status=$?
4199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4200 (exit $ac_status); } &&
4201 { ac_try='test -s conftest$ac_exeext'
4202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4203 (eval $ac_try) 2>&5
4204 ac_status=$?
4205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4206 (exit $ac_status); }; }; then
4207 ac_cv_search_opendir="none required"
4208else
4209 echo "$as_me: failed program was:" >&5
4210cat conftest.$ac_ext >&5
4211fi
4212rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4213if test "$ac_cv_search_opendir" = no; then
4214 for ac_lib in x; do
4215 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4216 cat >conftest.$ac_ext <<_ACEOF
4217#line $LINENO "configure"
4218#include "confdefs.h"
4219
4220/* Override any gcc2 internal prototype to avoid an error. */
4221#ifdef __cplusplus
4222extern "C"
4223#endif
4224/* We use char because int might match the return type of a gcc2
4225 builtin and then its argument prototype would still apply. */
4226char opendir ();
4227#ifdef F77_DUMMY_MAIN
4228# ifdef __cplusplus
4229 extern "C"
4230# endif
4231 int F77_DUMMY_MAIN() { return 1; }
4232#endif
4233int
4234main ()
4235{
4236opendir ();
4237 ;
4238 return 0;
4239}
4240_ACEOF
4241rm -f conftest.$ac_objext conftest$ac_exeext
4242if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4243 (eval $ac_link) 2>&5
4244 ac_status=$?
4245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4246 (exit $ac_status); } &&
4247 { ac_try='test -s conftest$ac_exeext'
4248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4249 (eval $ac_try) 2>&5
4250 ac_status=$?
4251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4252 (exit $ac_status); }; }; then
4253 ac_cv_search_opendir="-l$ac_lib"
4254break
4255else
4256 echo "$as_me: failed program was:" >&5
4257cat conftest.$ac_ext >&5
4258fi
4259rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4260 done
4261fi
4262LIBS=$ac_func_search_save_LIBS
4263fi
4264echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4265echo "${ECHO_T}$ac_cv_search_opendir" >&6
4266if test "$ac_cv_search_opendir" != no; then
4267 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4268
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004269fi
4270
4271fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004272
Michael W. Hudson54241132001-12-07 15:38:26 +00004273
Guido van Rossum627b2d71993-12-24 10:39:16 +00004274# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004275was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004276echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4277echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4278cat >conftest.$ac_ext <<_ACEOF
4279#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004280#include "confdefs.h"
4281#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004282
4283_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004284if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4285 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004286 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004287else
Martin v. Löwis11437992002-04-12 09:54:03 +00004288
4289
4290cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004291#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004292_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004293
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004294
Guido van Rossum627b2d71993-12-24 10:39:16 +00004295fi
4296rm -f conftest*
4297
Martin v. Löwis11437992002-04-12 09:54:03 +00004298echo "$as_me:$LINENO: result: $was_it_defined" >&5
4299echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004300
Guido van Rossum810cc512001-09-09 23:51:39 +00004301# Two defines needed to enable largefile support on various platforms
4302# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004303
Martin v. Löwis11437992002-04-12 09:54:03 +00004304cat >>confdefs.h <<\_ACEOF
4305#define _LARGEFILE_SOURCE 1
4306_ACEOF
4307
4308
4309cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004310#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004311_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004312
Michael W. Hudson54241132001-12-07 15:38:26 +00004313
Guido van Rossum84e7b241996-08-19 21:59:00 +00004314# Add some code to confdefs.h so that the test for off_t works on SCO
4315cat >> confdefs.h <<\EOF
4316#if defined(SCO_DS)
4317#undef _OFF_T
4318#endif
4319EOF
4320
Guido van Rossumef2255b2000-03-10 22:30:29 +00004321# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004322echo "$as_me:$LINENO: checking for mode_t" >&5
4323echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4324if test "${ac_cv_type_mode_t+set}" = set; then
4325 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004326else
Martin v. Löwis11437992002-04-12 09:54:03 +00004327 cat >conftest.$ac_ext <<_ACEOF
4328#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004329#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004330$ac_includes_default
4331#ifdef F77_DUMMY_MAIN
4332# ifdef __cplusplus
4333 extern "C"
4334# endif
4335 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004336#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004337int
4338main ()
4339{
4340if ((mode_t *) 0)
4341 return 0;
4342if (sizeof (mode_t))
4343 return 0;
4344 ;
4345 return 0;
4346}
4347_ACEOF
4348rm -f conftest.$ac_objext
4349if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4350 (eval $ac_compile) 2>&5
4351 ac_status=$?
4352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4353 (exit $ac_status); } &&
4354 { ac_try='test -s conftest.$ac_objext'
4355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4356 (eval $ac_try) 2>&5
4357 ac_status=$?
4358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4359 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004360 ac_cv_type_mode_t=yes
4361else
Martin v. Löwis11437992002-04-12 09:54:03 +00004362 echo "$as_me: failed program was:" >&5
4363cat conftest.$ac_ext >&5
4364ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004365fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004366rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004367fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004368echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4369echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4370if test $ac_cv_type_mode_t = yes; then
4371 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004372else
Martin v. Löwis11437992002-04-12 09:54:03 +00004373
4374cat >>confdefs.h <<_ACEOF
4375#define mode_t int
4376_ACEOF
4377
4378fi
4379
4380echo "$as_me:$LINENO: checking for off_t" >&5
4381echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4382if test "${ac_cv_type_off_t+set}" = set; then
4383 echo $ECHO_N "(cached) $ECHO_C" >&6
4384else
4385 cat >conftest.$ac_ext <<_ACEOF
4386#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004387#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004388$ac_includes_default
4389#ifdef F77_DUMMY_MAIN
4390# ifdef __cplusplus
4391 extern "C"
4392# endif
4393 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004395int
4396main ()
4397{
4398if ((off_t *) 0)
4399 return 0;
4400if (sizeof (off_t))
4401 return 0;
4402 ;
4403 return 0;
4404}
4405_ACEOF
4406rm -f conftest.$ac_objext
4407if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4408 (eval $ac_compile) 2>&5
4409 ac_status=$?
4410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4411 (exit $ac_status); } &&
4412 { ac_try='test -s conftest.$ac_objext'
4413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4414 (eval $ac_try) 2>&5
4415 ac_status=$?
4416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4417 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004418 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004419else
Martin v. Löwis11437992002-04-12 09:54:03 +00004420 echo "$as_me: failed program was:" >&5
4421cat conftest.$ac_ext >&5
4422ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004423fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004424rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004425fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004426echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4427echo "${ECHO_T}$ac_cv_type_off_t" >&6
4428if test $ac_cv_type_off_t = yes; then
4429 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004430else
Martin v. Löwis11437992002-04-12 09:54:03 +00004431
4432cat >>confdefs.h <<_ACEOF
4433#define off_t long
4434_ACEOF
4435
4436fi
4437
4438echo "$as_me:$LINENO: checking for pid_t" >&5
4439echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4440if test "${ac_cv_type_pid_t+set}" = set; then
4441 echo $ECHO_N "(cached) $ECHO_C" >&6
4442else
4443 cat >conftest.$ac_ext <<_ACEOF
4444#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004445#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004446$ac_includes_default
4447#ifdef F77_DUMMY_MAIN
4448# ifdef __cplusplus
4449 extern "C"
4450# endif
4451 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004452#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004453int
4454main ()
4455{
4456if ((pid_t *) 0)
4457 return 0;
4458if (sizeof (pid_t))
4459 return 0;
4460 ;
4461 return 0;
4462}
4463_ACEOF
4464rm -f conftest.$ac_objext
4465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4466 (eval $ac_compile) 2>&5
4467 ac_status=$?
4468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4469 (exit $ac_status); } &&
4470 { ac_try='test -s conftest.$ac_objext'
4471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4472 (eval $ac_try) 2>&5
4473 ac_status=$?
4474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4475 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004476 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004477else
Martin v. Löwis11437992002-04-12 09:54:03 +00004478 echo "$as_me: failed program was:" >&5
4479cat conftest.$ac_ext >&5
4480ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004481fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004482rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004483fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004484echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4485echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4486if test $ac_cv_type_pid_t = yes; then
4487 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004488else
Martin v. Löwis11437992002-04-12 09:54:03 +00004489
4490cat >>confdefs.h <<_ACEOF
4491#define pid_t int
4492_ACEOF
4493
4494fi
4495
4496echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4497echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4498if test "${ac_cv_type_signal+set}" = set; then
4499 echo $ECHO_N "(cached) $ECHO_C" >&6
4500else
4501 cat >conftest.$ac_ext <<_ACEOF
4502#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004503#include "confdefs.h"
4504#include <sys/types.h>
4505#include <signal.h>
4506#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004507# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004508#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004509#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004510extern "C" void (*signal (int, void (*)(int)))(int);
4511#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004512void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004513#endif
4514
Martin v. Löwis11437992002-04-12 09:54:03 +00004515#ifdef F77_DUMMY_MAIN
4516# ifdef __cplusplus
4517 extern "C"
4518# endif
4519 int F77_DUMMY_MAIN() { return 1; }
4520#endif
4521int
4522main ()
4523{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004524int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004525 ;
4526 return 0;
4527}
4528_ACEOF
4529rm -f conftest.$ac_objext
4530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4531 (eval $ac_compile) 2>&5
4532 ac_status=$?
4533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4534 (exit $ac_status); } &&
4535 { ac_try='test -s conftest.$ac_objext'
4536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4537 (eval $ac_try) 2>&5
4538 ac_status=$?
4539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4540 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004541 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004542else
Martin v. Löwis11437992002-04-12 09:54:03 +00004543 echo "$as_me: failed program was:" >&5
4544cat conftest.$ac_ext >&5
4545ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004546fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004547rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004548fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004549echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4550echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004551
Martin v. Löwis11437992002-04-12 09:54:03 +00004552cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004553#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004554_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004555
Michael W. Hudson54241132001-12-07 15:38:26 +00004556
Martin v. Löwis11437992002-04-12 09:54:03 +00004557echo "$as_me:$LINENO: checking for size_t" >&5
4558echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4559if test "${ac_cv_type_size_t+set}" = set; then
4560 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004561else
Martin v. Löwis11437992002-04-12 09:54:03 +00004562 cat >conftest.$ac_ext <<_ACEOF
4563#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004564#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004565$ac_includes_default
4566#ifdef F77_DUMMY_MAIN
4567# ifdef __cplusplus
4568 extern "C"
4569# endif
4570 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004571#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004572int
4573main ()
4574{
4575if ((size_t *) 0)
4576 return 0;
4577if (sizeof (size_t))
4578 return 0;
4579 ;
4580 return 0;
4581}
4582_ACEOF
4583rm -f conftest.$ac_objext
4584if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4585 (eval $ac_compile) 2>&5
4586 ac_status=$?
4587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4588 (exit $ac_status); } &&
4589 { ac_try='test -s conftest.$ac_objext'
4590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4591 (eval $ac_try) 2>&5
4592 ac_status=$?
4593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4594 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004595 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004596else
Martin v. Löwis11437992002-04-12 09:54:03 +00004597 echo "$as_me: failed program was:" >&5
4598cat conftest.$ac_ext >&5
4599ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004600fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004601rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004603echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4604echo "${ECHO_T}$ac_cv_type_size_t" >&6
4605if test $ac_cv_type_size_t = yes; then
4606 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004607else
Martin v. Löwis11437992002-04-12 09:54:03 +00004608
4609cat >>confdefs.h <<_ACEOF
4610#define size_t unsigned
4611_ACEOF
4612
4613fi
4614
4615echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4616echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4617if test "${ac_cv_type_uid_t+set}" = set; then
4618 echo $ECHO_N "(cached) $ECHO_C" >&6
4619else
4620 cat >conftest.$ac_ext <<_ACEOF
4621#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004622#include "confdefs.h"
4623#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004624
4625_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004626if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4627 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004628 ac_cv_type_uid_t=yes
4629else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004630 ac_cv_type_uid_t=no
4631fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004632rm -f conftest*
4633
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004634fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004635echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4636echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004637if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004638
Martin v. Löwis11437992002-04-12 09:54:03 +00004639cat >>confdefs.h <<\_ACEOF
4640#define uid_t int
4641_ACEOF
4642
4643
4644cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004645#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004646_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004647
4648fi
4649
Jack Jansendd19cf82001-12-06 22:36:17 +00004650
Michael W. Hudson54241132001-12-07 15:38:26 +00004651# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004652echo "$as_me:$LINENO: checking for int" >&5
4653echo $ECHO_N "checking for int... $ECHO_C" >&6
4654if test "${ac_cv_type_int+set}" = set; then
4655 echo $ECHO_N "(cached) $ECHO_C" >&6
4656else
4657 cat >conftest.$ac_ext <<_ACEOF
4658#line $LINENO "configure"
4659#include "confdefs.h"
4660$ac_includes_default
4661#ifdef F77_DUMMY_MAIN
4662# ifdef __cplusplus
4663 extern "C"
4664# endif
4665 int F77_DUMMY_MAIN() { return 1; }
4666#endif
4667int
4668main ()
4669{
4670if ((int *) 0)
4671 return 0;
4672if (sizeof (int))
4673 return 0;
4674 ;
4675 return 0;
4676}
4677_ACEOF
4678rm -f conftest.$ac_objext
4679if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4680 (eval $ac_compile) 2>&5
4681 ac_status=$?
4682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4683 (exit $ac_status); } &&
4684 { ac_try='test -s conftest.$ac_objext'
4685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4686 (eval $ac_try) 2>&5
4687 ac_status=$?
4688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4689 (exit $ac_status); }; }; then
4690 ac_cv_type_int=yes
4691else
4692 echo "$as_me: failed program was:" >&5
4693cat conftest.$ac_ext >&5
4694ac_cv_type_int=no
4695fi
4696rm -f conftest.$ac_objext conftest.$ac_ext
4697fi
4698echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4699echo "${ECHO_T}$ac_cv_type_int" >&6
4700
4701echo "$as_me:$LINENO: checking size of int" >&5
4702echo $ECHO_N "checking size of int... $ECHO_C" >&6
4703if test "${ac_cv_sizeof_int+set}" = set; then
4704 echo $ECHO_N "(cached) $ECHO_C" >&6
4705else
4706 if test "$ac_cv_type_int" = yes; then
4707 # The cast to unsigned long works around a bug in the HP C Compiler
4708 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4709 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4710 # This bug is HP SR number 8606223364.
4711 if test "$cross_compiling" = yes; then
4712 # Depending upon the size, compute the lo and hi bounds.
4713cat >conftest.$ac_ext <<_ACEOF
4714#line $LINENO "configure"
4715#include "confdefs.h"
4716$ac_includes_default
4717#ifdef F77_DUMMY_MAIN
4718# ifdef __cplusplus
4719 extern "C"
4720# endif
4721 int F77_DUMMY_MAIN() { return 1; }
4722#endif
4723int
4724main ()
4725{
4726static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4727test_array [0] = 0
4728
4729 ;
4730 return 0;
4731}
4732_ACEOF
4733rm -f conftest.$ac_objext
4734if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4735 (eval $ac_compile) 2>&5
4736 ac_status=$?
4737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4738 (exit $ac_status); } &&
4739 { ac_try='test -s conftest.$ac_objext'
4740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4741 (eval $ac_try) 2>&5
4742 ac_status=$?
4743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4744 (exit $ac_status); }; }; then
4745 ac_lo=0 ac_mid=0
4746 while :; do
4747 cat >conftest.$ac_ext <<_ACEOF
4748#line $LINENO "configure"
4749#include "confdefs.h"
4750$ac_includes_default
4751#ifdef F77_DUMMY_MAIN
4752# ifdef __cplusplus
4753 extern "C"
4754# endif
4755 int F77_DUMMY_MAIN() { return 1; }
4756#endif
4757int
4758main ()
4759{
4760static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4761test_array [0] = 0
4762
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
4779 ac_hi=$ac_mid; break
4780else
4781 echo "$as_me: failed program was:" >&5
4782cat conftest.$ac_ext >&5
4783ac_lo=`expr $ac_mid + 1`
4784 if test $ac_lo -le $ac_mid; then
4785 ac_lo= ac_hi=
4786 break
4787 fi
4788 ac_mid=`expr 2 '*' $ac_mid + 1`
4789fi
4790rm -f conftest.$ac_objext conftest.$ac_ext
4791 done
4792else
4793 echo "$as_me: failed program was:" >&5
4794cat conftest.$ac_ext >&5
4795cat >conftest.$ac_ext <<_ACEOF
4796#line $LINENO "configure"
4797#include "confdefs.h"
4798$ac_includes_default
4799#ifdef F77_DUMMY_MAIN
4800# ifdef __cplusplus
4801 extern "C"
4802# endif
4803 int F77_DUMMY_MAIN() { return 1; }
4804#endif
4805int
4806main ()
4807{
4808static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4809test_array [0] = 0
4810
4811 ;
4812 return 0;
4813}
4814_ACEOF
4815rm -f conftest.$ac_objext
4816if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4817 (eval $ac_compile) 2>&5
4818 ac_status=$?
4819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4820 (exit $ac_status); } &&
4821 { ac_try='test -s conftest.$ac_objext'
4822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4823 (eval $ac_try) 2>&5
4824 ac_status=$?
4825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4826 (exit $ac_status); }; }; then
4827 ac_hi=-1 ac_mid=-1
4828 while :; do
4829 cat >conftest.$ac_ext <<_ACEOF
4830#line $LINENO "configure"
4831#include "confdefs.h"
4832$ac_includes_default
4833#ifdef F77_DUMMY_MAIN
4834# ifdef __cplusplus
4835 extern "C"
4836# endif
4837 int F77_DUMMY_MAIN() { return 1; }
4838#endif
4839int
4840main ()
4841{
4842static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4843test_array [0] = 0
4844
4845 ;
4846 return 0;
4847}
4848_ACEOF
4849rm -f conftest.$ac_objext
4850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4851 (eval $ac_compile) 2>&5
4852 ac_status=$?
4853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4854 (exit $ac_status); } &&
4855 { ac_try='test -s conftest.$ac_objext'
4856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4857 (eval $ac_try) 2>&5
4858 ac_status=$?
4859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4860 (exit $ac_status); }; }; then
4861 ac_lo=$ac_mid; break
4862else
4863 echo "$as_me: failed program was:" >&5
4864cat conftest.$ac_ext >&5
4865ac_hi=`expr '(' $ac_mid ')' - 1`
4866 if test $ac_mid -le $ac_hi; then
4867 ac_lo= ac_hi=
4868 break
4869 fi
4870 ac_mid=`expr 2 '*' $ac_mid`
4871fi
4872rm -f conftest.$ac_objext conftest.$ac_ext
4873 done
4874else
4875 echo "$as_me: failed program was:" >&5
4876cat conftest.$ac_ext >&5
4877ac_lo= ac_hi=
4878fi
4879rm -f conftest.$ac_objext conftest.$ac_ext
4880fi
4881rm -f conftest.$ac_objext conftest.$ac_ext
4882# Binary search between lo and hi bounds.
4883while test "x$ac_lo" != "x$ac_hi"; do
4884 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4885 cat >conftest.$ac_ext <<_ACEOF
4886#line $LINENO "configure"
4887#include "confdefs.h"
4888$ac_includes_default
4889#ifdef F77_DUMMY_MAIN
4890# ifdef __cplusplus
4891 extern "C"
4892# endif
4893 int F77_DUMMY_MAIN() { return 1; }
4894#endif
4895int
4896main ()
4897{
4898static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4899test_array [0] = 0
4900
4901 ;
4902 return 0;
4903}
4904_ACEOF
4905rm -f conftest.$ac_objext
4906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4907 (eval $ac_compile) 2>&5
4908 ac_status=$?
4909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4910 (exit $ac_status); } &&
4911 { ac_try='test -s conftest.$ac_objext'
4912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4913 (eval $ac_try) 2>&5
4914 ac_status=$?
4915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4916 (exit $ac_status); }; }; then
4917 ac_hi=$ac_mid
4918else
4919 echo "$as_me: failed program was:" >&5
4920cat conftest.$ac_ext >&5
4921ac_lo=`expr '(' $ac_mid ')' + 1`
4922fi
4923rm -f conftest.$ac_objext conftest.$ac_ext
4924done
4925case $ac_lo in
4926?*) ac_cv_sizeof_int=$ac_lo;;
4927'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4928echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4929 { (exit 1); exit 1; }; } ;;
4930esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004931else
4932 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004933 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
4934echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4935 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004936else
Martin v. Löwis11437992002-04-12 09:54:03 +00004937 cat >conftest.$ac_ext <<_ACEOF
4938#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004939#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004940$ac_includes_default
4941long longval () { return (long) (sizeof (int)); }
4942unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00004943#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004944#include <stdlib.h>
4945#ifdef F77_DUMMY_MAIN
4946# ifdef __cplusplus
4947 extern "C"
4948# endif
4949 int F77_DUMMY_MAIN() { return 1; }
4950#endif
4951int
4952main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004953{
Martin v. Löwis11437992002-04-12 09:54:03 +00004954
4955 FILE *f = fopen ("conftest.val", "w");
4956 if (! f)
4957 exit (1);
4958 if (((long) (sizeof (int))) < 0)
4959 {
4960 long i = longval ();
4961 if (i != ((long) (sizeof (int))))
4962 exit (1);
4963 fprintf (f, "%ld\n", i);
4964 }
4965 else
4966 {
4967 unsigned long i = ulongval ();
4968 if (i != ((long) (sizeof (int))))
4969 exit (1);
4970 fprintf (f, "%lu\n", i);
4971 }
4972 exit (ferror (f) || fclose (f) != 0);
4973
4974 ;
4975 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004976}
Martin v. Löwis11437992002-04-12 09:54:03 +00004977_ACEOF
4978rm -f conftest$ac_exeext
4979if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4980 (eval $ac_link) 2>&5
4981 ac_status=$?
4982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4983 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4985 (eval $ac_try) 2>&5
4986 ac_status=$?
4987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4988 (exit $ac_status); }; }; then
4989 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004990else
Martin v. Löwis11437992002-04-12 09:54:03 +00004991 echo "$as_me: program exited with status $ac_status" >&5
4992echo "$as_me: failed program was:" >&5
4993cat conftest.$ac_ext >&5
4994( exit $ac_status )
4995{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4996echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4997 { (exit 1); exit 1; }; }
4998fi
4999rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5000fi
5001fi
5002rm -f conftest.val
5003else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005004 ac_cv_sizeof_int=0
5005fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005006fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005007echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5008echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5009cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005010#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005011_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005012
5013
Martin v. Löwis11437992002-04-12 09:54:03 +00005014echo "$as_me:$LINENO: checking for long" >&5
5015echo $ECHO_N "checking for long... $ECHO_C" >&6
5016if test "${ac_cv_type_long+set}" = set; then
5017 echo $ECHO_N "(cached) $ECHO_C" >&6
5018else
5019 cat >conftest.$ac_ext <<_ACEOF
5020#line $LINENO "configure"
5021#include "confdefs.h"
5022$ac_includes_default
5023#ifdef F77_DUMMY_MAIN
5024# ifdef __cplusplus
5025 extern "C"
5026# endif
5027 int F77_DUMMY_MAIN() { return 1; }
5028#endif
5029int
5030main ()
5031{
5032if ((long *) 0)
5033 return 0;
5034if (sizeof (long))
5035 return 0;
5036 ;
5037 return 0;
5038}
5039_ACEOF
5040rm -f conftest.$ac_objext
5041if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5042 (eval $ac_compile) 2>&5
5043 ac_status=$?
5044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5045 (exit $ac_status); } &&
5046 { ac_try='test -s conftest.$ac_objext'
5047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5048 (eval $ac_try) 2>&5
5049 ac_status=$?
5050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5051 (exit $ac_status); }; }; then
5052 ac_cv_type_long=yes
5053else
5054 echo "$as_me: failed program was:" >&5
5055cat conftest.$ac_ext >&5
5056ac_cv_type_long=no
5057fi
5058rm -f conftest.$ac_objext conftest.$ac_ext
5059fi
5060echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5061echo "${ECHO_T}$ac_cv_type_long" >&6
5062
5063echo "$as_me:$LINENO: checking size of long" >&5
5064echo $ECHO_N "checking size of long... $ECHO_C" >&6
5065if test "${ac_cv_sizeof_long+set}" = set; then
5066 echo $ECHO_N "(cached) $ECHO_C" >&6
5067else
5068 if test "$ac_cv_type_long" = yes; then
5069 # The cast to unsigned long works around a bug in the HP C Compiler
5070 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5071 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5072 # This bug is HP SR number 8606223364.
5073 if test "$cross_compiling" = yes; then
5074 # Depending upon the size, compute the lo and hi bounds.
5075cat >conftest.$ac_ext <<_ACEOF
5076#line $LINENO "configure"
5077#include "confdefs.h"
5078$ac_includes_default
5079#ifdef F77_DUMMY_MAIN
5080# ifdef __cplusplus
5081 extern "C"
5082# endif
5083 int F77_DUMMY_MAIN() { return 1; }
5084#endif
5085int
5086main ()
5087{
5088static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5089test_array [0] = 0
5090
5091 ;
5092 return 0;
5093}
5094_ACEOF
5095rm -f conftest.$ac_objext
5096if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5097 (eval $ac_compile) 2>&5
5098 ac_status=$?
5099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5100 (exit $ac_status); } &&
5101 { ac_try='test -s conftest.$ac_objext'
5102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5103 (eval $ac_try) 2>&5
5104 ac_status=$?
5105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5106 (exit $ac_status); }; }; then
5107 ac_lo=0 ac_mid=0
5108 while :; do
5109 cat >conftest.$ac_ext <<_ACEOF
5110#line $LINENO "configure"
5111#include "confdefs.h"
5112$ac_includes_default
5113#ifdef F77_DUMMY_MAIN
5114# ifdef __cplusplus
5115 extern "C"
5116# endif
5117 int F77_DUMMY_MAIN() { return 1; }
5118#endif
5119int
5120main ()
5121{
5122static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5123test_array [0] = 0
5124
5125 ;
5126 return 0;
5127}
5128_ACEOF
5129rm -f conftest.$ac_objext
5130if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5131 (eval $ac_compile) 2>&5
5132 ac_status=$?
5133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5134 (exit $ac_status); } &&
5135 { ac_try='test -s conftest.$ac_objext'
5136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5137 (eval $ac_try) 2>&5
5138 ac_status=$?
5139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5140 (exit $ac_status); }; }; then
5141 ac_hi=$ac_mid; break
5142else
5143 echo "$as_me: failed program was:" >&5
5144cat conftest.$ac_ext >&5
5145ac_lo=`expr $ac_mid + 1`
5146 if test $ac_lo -le $ac_mid; then
5147 ac_lo= ac_hi=
5148 break
5149 fi
5150 ac_mid=`expr 2 '*' $ac_mid + 1`
5151fi
5152rm -f conftest.$ac_objext conftest.$ac_ext
5153 done
5154else
5155 echo "$as_me: failed program was:" >&5
5156cat conftest.$ac_ext >&5
5157cat >conftest.$ac_ext <<_ACEOF
5158#line $LINENO "configure"
5159#include "confdefs.h"
5160$ac_includes_default
5161#ifdef F77_DUMMY_MAIN
5162# ifdef __cplusplus
5163 extern "C"
5164# endif
5165 int F77_DUMMY_MAIN() { return 1; }
5166#endif
5167int
5168main ()
5169{
5170static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5171test_array [0] = 0
5172
5173 ;
5174 return 0;
5175}
5176_ACEOF
5177rm -f conftest.$ac_objext
5178if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5179 (eval $ac_compile) 2>&5
5180 ac_status=$?
5181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5182 (exit $ac_status); } &&
5183 { ac_try='test -s conftest.$ac_objext'
5184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5185 (eval $ac_try) 2>&5
5186 ac_status=$?
5187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5188 (exit $ac_status); }; }; then
5189 ac_hi=-1 ac_mid=-1
5190 while :; do
5191 cat >conftest.$ac_ext <<_ACEOF
5192#line $LINENO "configure"
5193#include "confdefs.h"
5194$ac_includes_default
5195#ifdef F77_DUMMY_MAIN
5196# ifdef __cplusplus
5197 extern "C"
5198# endif
5199 int F77_DUMMY_MAIN() { return 1; }
5200#endif
5201int
5202main ()
5203{
5204static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5205test_array [0] = 0
5206
5207 ;
5208 return 0;
5209}
5210_ACEOF
5211rm -f conftest.$ac_objext
5212if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5213 (eval $ac_compile) 2>&5
5214 ac_status=$?
5215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5216 (exit $ac_status); } &&
5217 { ac_try='test -s conftest.$ac_objext'
5218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5219 (eval $ac_try) 2>&5
5220 ac_status=$?
5221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5222 (exit $ac_status); }; }; then
5223 ac_lo=$ac_mid; break
5224else
5225 echo "$as_me: failed program was:" >&5
5226cat conftest.$ac_ext >&5
5227ac_hi=`expr '(' $ac_mid ')' - 1`
5228 if test $ac_mid -le $ac_hi; then
5229 ac_lo= ac_hi=
5230 break
5231 fi
5232 ac_mid=`expr 2 '*' $ac_mid`
5233fi
5234rm -f conftest.$ac_objext conftest.$ac_ext
5235 done
5236else
5237 echo "$as_me: failed program was:" >&5
5238cat conftest.$ac_ext >&5
5239ac_lo= ac_hi=
5240fi
5241rm -f conftest.$ac_objext conftest.$ac_ext
5242fi
5243rm -f conftest.$ac_objext conftest.$ac_ext
5244# Binary search between lo and hi bounds.
5245while test "x$ac_lo" != "x$ac_hi"; do
5246 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5247 cat >conftest.$ac_ext <<_ACEOF
5248#line $LINENO "configure"
5249#include "confdefs.h"
5250$ac_includes_default
5251#ifdef F77_DUMMY_MAIN
5252# ifdef __cplusplus
5253 extern "C"
5254# endif
5255 int F77_DUMMY_MAIN() { return 1; }
5256#endif
5257int
5258main ()
5259{
5260static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5261test_array [0] = 0
5262
5263 ;
5264 return 0;
5265}
5266_ACEOF
5267rm -f conftest.$ac_objext
5268if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5269 (eval $ac_compile) 2>&5
5270 ac_status=$?
5271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5272 (exit $ac_status); } &&
5273 { ac_try='test -s conftest.$ac_objext'
5274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5275 (eval $ac_try) 2>&5
5276 ac_status=$?
5277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5278 (exit $ac_status); }; }; then
5279 ac_hi=$ac_mid
5280else
5281 echo "$as_me: failed program was:" >&5
5282cat conftest.$ac_ext >&5
5283ac_lo=`expr '(' $ac_mid ')' + 1`
5284fi
5285rm -f conftest.$ac_objext conftest.$ac_ext
5286done
5287case $ac_lo in
5288?*) ac_cv_sizeof_long=$ac_lo;;
5289'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5290echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5291 { (exit 1); exit 1; }; } ;;
5292esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005293else
5294 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005295 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5296echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5297 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005298else
Martin v. Löwis11437992002-04-12 09:54:03 +00005299 cat >conftest.$ac_ext <<_ACEOF
5300#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005301#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005302$ac_includes_default
5303long longval () { return (long) (sizeof (long)); }
5304unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005305#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005306#include <stdlib.h>
5307#ifdef F77_DUMMY_MAIN
5308# ifdef __cplusplus
5309 extern "C"
5310# endif
5311 int F77_DUMMY_MAIN() { return 1; }
5312#endif
5313int
5314main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005315{
Martin v. Löwis11437992002-04-12 09:54:03 +00005316
5317 FILE *f = fopen ("conftest.val", "w");
5318 if (! f)
5319 exit (1);
5320 if (((long) (sizeof (long))) < 0)
5321 {
5322 long i = longval ();
5323 if (i != ((long) (sizeof (long))))
5324 exit (1);
5325 fprintf (f, "%ld\n", i);
5326 }
5327 else
5328 {
5329 unsigned long i = ulongval ();
5330 if (i != ((long) (sizeof (long))))
5331 exit (1);
5332 fprintf (f, "%lu\n", i);
5333 }
5334 exit (ferror (f) || fclose (f) != 0);
5335
5336 ;
5337 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005338}
Martin v. Löwis11437992002-04-12 09:54:03 +00005339_ACEOF
5340rm -f conftest$ac_exeext
5341if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5342 (eval $ac_link) 2>&5
5343 ac_status=$?
5344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5345 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5347 (eval $ac_try) 2>&5
5348 ac_status=$?
5349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5350 (exit $ac_status); }; }; then
5351 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005352else
Martin v. Löwis11437992002-04-12 09:54:03 +00005353 echo "$as_me: program exited with status $ac_status" >&5
5354echo "$as_me: failed program was:" >&5
5355cat conftest.$ac_ext >&5
5356( exit $ac_status )
5357{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5358echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5359 { (exit 1); exit 1; }; }
5360fi
5361rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5362fi
5363fi
5364rm -f conftest.val
5365else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005366 ac_cv_sizeof_long=0
5367fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005368fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005369echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5370echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5371cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005372#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005373_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005374
5375
Martin v. Löwis11437992002-04-12 09:54:03 +00005376echo "$as_me:$LINENO: checking for void *" >&5
5377echo $ECHO_N "checking for void *... $ECHO_C" >&6
5378if test "${ac_cv_type_void_p+set}" = set; then
5379 echo $ECHO_N "(cached) $ECHO_C" >&6
5380else
5381 cat >conftest.$ac_ext <<_ACEOF
5382#line $LINENO "configure"
5383#include "confdefs.h"
5384$ac_includes_default
5385#ifdef F77_DUMMY_MAIN
5386# ifdef __cplusplus
5387 extern "C"
5388# endif
5389 int F77_DUMMY_MAIN() { return 1; }
5390#endif
5391int
5392main ()
5393{
5394if ((void * *) 0)
5395 return 0;
5396if (sizeof (void *))
5397 return 0;
5398 ;
5399 return 0;
5400}
5401_ACEOF
5402rm -f conftest.$ac_objext
5403if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5404 (eval $ac_compile) 2>&5
5405 ac_status=$?
5406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5407 (exit $ac_status); } &&
5408 { ac_try='test -s conftest.$ac_objext'
5409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5410 (eval $ac_try) 2>&5
5411 ac_status=$?
5412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5413 (exit $ac_status); }; }; then
5414 ac_cv_type_void_p=yes
5415else
5416 echo "$as_me: failed program was:" >&5
5417cat conftest.$ac_ext >&5
5418ac_cv_type_void_p=no
5419fi
5420rm -f conftest.$ac_objext conftest.$ac_ext
5421fi
5422echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5423echo "${ECHO_T}$ac_cv_type_void_p" >&6
5424
5425echo "$as_me:$LINENO: checking size of void *" >&5
5426echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5427if test "${ac_cv_sizeof_void_p+set}" = set; then
5428 echo $ECHO_N "(cached) $ECHO_C" >&6
5429else
5430 if test "$ac_cv_type_void_p" = yes; then
5431 # The cast to unsigned long works around a bug in the HP C Compiler
5432 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5433 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5434 # This bug is HP SR number 8606223364.
5435 if test "$cross_compiling" = yes; then
5436 # Depending upon the size, compute the lo and hi bounds.
5437cat >conftest.$ac_ext <<_ACEOF
5438#line $LINENO "configure"
5439#include "confdefs.h"
5440$ac_includes_default
5441#ifdef F77_DUMMY_MAIN
5442# ifdef __cplusplus
5443 extern "C"
5444# endif
5445 int F77_DUMMY_MAIN() { return 1; }
5446#endif
5447int
5448main ()
5449{
5450static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5451test_array [0] = 0
5452
5453 ;
5454 return 0;
5455}
5456_ACEOF
5457rm -f conftest.$ac_objext
5458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5459 (eval $ac_compile) 2>&5
5460 ac_status=$?
5461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5462 (exit $ac_status); } &&
5463 { ac_try='test -s conftest.$ac_objext'
5464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5465 (eval $ac_try) 2>&5
5466 ac_status=$?
5467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5468 (exit $ac_status); }; }; then
5469 ac_lo=0 ac_mid=0
5470 while :; do
5471 cat >conftest.$ac_ext <<_ACEOF
5472#line $LINENO "configure"
5473#include "confdefs.h"
5474$ac_includes_default
5475#ifdef F77_DUMMY_MAIN
5476# ifdef __cplusplus
5477 extern "C"
5478# endif
5479 int F77_DUMMY_MAIN() { return 1; }
5480#endif
5481int
5482main ()
5483{
5484static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5485test_array [0] = 0
5486
5487 ;
5488 return 0;
5489}
5490_ACEOF
5491rm -f conftest.$ac_objext
5492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5493 (eval $ac_compile) 2>&5
5494 ac_status=$?
5495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5496 (exit $ac_status); } &&
5497 { ac_try='test -s conftest.$ac_objext'
5498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5499 (eval $ac_try) 2>&5
5500 ac_status=$?
5501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5502 (exit $ac_status); }; }; then
5503 ac_hi=$ac_mid; break
5504else
5505 echo "$as_me: failed program was:" >&5
5506cat conftest.$ac_ext >&5
5507ac_lo=`expr $ac_mid + 1`
5508 if test $ac_lo -le $ac_mid; then
5509 ac_lo= ac_hi=
5510 break
5511 fi
5512 ac_mid=`expr 2 '*' $ac_mid + 1`
5513fi
5514rm -f conftest.$ac_objext conftest.$ac_ext
5515 done
5516else
5517 echo "$as_me: failed program was:" >&5
5518cat conftest.$ac_ext >&5
5519cat >conftest.$ac_ext <<_ACEOF
5520#line $LINENO "configure"
5521#include "confdefs.h"
5522$ac_includes_default
5523#ifdef F77_DUMMY_MAIN
5524# ifdef __cplusplus
5525 extern "C"
5526# endif
5527 int F77_DUMMY_MAIN() { return 1; }
5528#endif
5529int
5530main ()
5531{
5532static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5533test_array [0] = 0
5534
5535 ;
5536 return 0;
5537}
5538_ACEOF
5539rm -f conftest.$ac_objext
5540if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5541 (eval $ac_compile) 2>&5
5542 ac_status=$?
5543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5544 (exit $ac_status); } &&
5545 { ac_try='test -s conftest.$ac_objext'
5546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5547 (eval $ac_try) 2>&5
5548 ac_status=$?
5549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5550 (exit $ac_status); }; }; then
5551 ac_hi=-1 ac_mid=-1
5552 while :; do
5553 cat >conftest.$ac_ext <<_ACEOF
5554#line $LINENO "configure"
5555#include "confdefs.h"
5556$ac_includes_default
5557#ifdef F77_DUMMY_MAIN
5558# ifdef __cplusplus
5559 extern "C"
5560# endif
5561 int F77_DUMMY_MAIN() { return 1; }
5562#endif
5563int
5564main ()
5565{
5566static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5567test_array [0] = 0
5568
5569 ;
5570 return 0;
5571}
5572_ACEOF
5573rm -f conftest.$ac_objext
5574if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5575 (eval $ac_compile) 2>&5
5576 ac_status=$?
5577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5578 (exit $ac_status); } &&
5579 { ac_try='test -s conftest.$ac_objext'
5580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5581 (eval $ac_try) 2>&5
5582 ac_status=$?
5583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5584 (exit $ac_status); }; }; then
5585 ac_lo=$ac_mid; break
5586else
5587 echo "$as_me: failed program was:" >&5
5588cat conftest.$ac_ext >&5
5589ac_hi=`expr '(' $ac_mid ')' - 1`
5590 if test $ac_mid -le $ac_hi; then
5591 ac_lo= ac_hi=
5592 break
5593 fi
5594 ac_mid=`expr 2 '*' $ac_mid`
5595fi
5596rm -f conftest.$ac_objext conftest.$ac_ext
5597 done
5598else
5599 echo "$as_me: failed program was:" >&5
5600cat conftest.$ac_ext >&5
5601ac_lo= ac_hi=
5602fi
5603rm -f conftest.$ac_objext conftest.$ac_ext
5604fi
5605rm -f conftest.$ac_objext conftest.$ac_ext
5606# Binary search between lo and hi bounds.
5607while test "x$ac_lo" != "x$ac_hi"; do
5608 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5609 cat >conftest.$ac_ext <<_ACEOF
5610#line $LINENO "configure"
5611#include "confdefs.h"
5612$ac_includes_default
5613#ifdef F77_DUMMY_MAIN
5614# ifdef __cplusplus
5615 extern "C"
5616# endif
5617 int F77_DUMMY_MAIN() { return 1; }
5618#endif
5619int
5620main ()
5621{
5622static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5623test_array [0] = 0
5624
5625 ;
5626 return 0;
5627}
5628_ACEOF
5629rm -f conftest.$ac_objext
5630if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5631 (eval $ac_compile) 2>&5
5632 ac_status=$?
5633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5634 (exit $ac_status); } &&
5635 { ac_try='test -s conftest.$ac_objext'
5636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5637 (eval $ac_try) 2>&5
5638 ac_status=$?
5639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5640 (exit $ac_status); }; }; then
5641 ac_hi=$ac_mid
5642else
5643 echo "$as_me: failed program was:" >&5
5644cat conftest.$ac_ext >&5
5645ac_lo=`expr '(' $ac_mid ')' + 1`
5646fi
5647rm -f conftest.$ac_objext conftest.$ac_ext
5648done
5649case $ac_lo in
5650?*) ac_cv_sizeof_void_p=$ac_lo;;
5651'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5652echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5653 { (exit 1); exit 1; }; } ;;
5654esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005655else
5656 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005657 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5658echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5659 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005660else
Martin v. Löwis11437992002-04-12 09:54:03 +00005661 cat >conftest.$ac_ext <<_ACEOF
5662#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005663#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005664$ac_includes_default
5665long longval () { return (long) (sizeof (void *)); }
5666unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005667#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005668#include <stdlib.h>
5669#ifdef F77_DUMMY_MAIN
5670# ifdef __cplusplus
5671 extern "C"
5672# endif
5673 int F77_DUMMY_MAIN() { return 1; }
5674#endif
5675int
5676main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005677{
Martin v. Löwis11437992002-04-12 09:54:03 +00005678
5679 FILE *f = fopen ("conftest.val", "w");
5680 if (! f)
5681 exit (1);
5682 if (((long) (sizeof (void *))) < 0)
5683 {
5684 long i = longval ();
5685 if (i != ((long) (sizeof (void *))))
5686 exit (1);
5687 fprintf (f, "%ld\n", i);
5688 }
5689 else
5690 {
5691 unsigned long i = ulongval ();
5692 if (i != ((long) (sizeof (void *))))
5693 exit (1);
5694 fprintf (f, "%lu\n", i);
5695 }
5696 exit (ferror (f) || fclose (f) != 0);
5697
5698 ;
5699 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005700}
Martin v. Löwis11437992002-04-12 09:54:03 +00005701_ACEOF
5702rm -f conftest$ac_exeext
5703if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5704 (eval $ac_link) 2>&5
5705 ac_status=$?
5706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5707 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5709 (eval $ac_try) 2>&5
5710 ac_status=$?
5711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5712 (exit $ac_status); }; }; then
5713 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005714else
Martin v. Löwis11437992002-04-12 09:54:03 +00005715 echo "$as_me: program exited with status $ac_status" >&5
5716echo "$as_me: failed program was:" >&5
5717cat conftest.$ac_ext >&5
5718( exit $ac_status )
5719{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5720echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5721 { (exit 1); exit 1; }; }
5722fi
5723rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5724fi
5725fi
5726rm -f conftest.val
5727else
Guido van Rossumad678af1998-10-02 14:42:15 +00005728 ac_cv_sizeof_void_p=0
5729fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005730fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005731echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5732echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5733cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005734#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005735_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005736
5737
Martin v. Löwis11437992002-04-12 09:54:03 +00005738echo "$as_me:$LINENO: checking for char" >&5
5739echo $ECHO_N "checking for char... $ECHO_C" >&6
5740if test "${ac_cv_type_char+set}" = set; then
5741 echo $ECHO_N "(cached) $ECHO_C" >&6
5742else
5743 cat >conftest.$ac_ext <<_ACEOF
5744#line $LINENO "configure"
5745#include "confdefs.h"
5746$ac_includes_default
5747#ifdef F77_DUMMY_MAIN
5748# ifdef __cplusplus
5749 extern "C"
5750# endif
5751 int F77_DUMMY_MAIN() { return 1; }
5752#endif
5753int
5754main ()
5755{
5756if ((char *) 0)
5757 return 0;
5758if (sizeof (char))
5759 return 0;
5760 ;
5761 return 0;
5762}
5763_ACEOF
5764rm -f conftest.$ac_objext
5765if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5766 (eval $ac_compile) 2>&5
5767 ac_status=$?
5768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5769 (exit $ac_status); } &&
5770 { ac_try='test -s conftest.$ac_objext'
5771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5772 (eval $ac_try) 2>&5
5773 ac_status=$?
5774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5775 (exit $ac_status); }; }; then
5776 ac_cv_type_char=yes
5777else
5778 echo "$as_me: failed program was:" >&5
5779cat conftest.$ac_ext >&5
5780ac_cv_type_char=no
5781fi
5782rm -f conftest.$ac_objext conftest.$ac_ext
5783fi
5784echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5785echo "${ECHO_T}$ac_cv_type_char" >&6
5786
5787echo "$as_me:$LINENO: checking size of char" >&5
5788echo $ECHO_N "checking size of char... $ECHO_C" >&6
5789if test "${ac_cv_sizeof_char+set}" = set; then
5790 echo $ECHO_N "(cached) $ECHO_C" >&6
5791else
5792 if test "$ac_cv_type_char" = yes; then
5793 # The cast to unsigned long works around a bug in the HP C Compiler
5794 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5795 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5796 # This bug is HP SR number 8606223364.
5797 if test "$cross_compiling" = yes; then
5798 # Depending upon the size, compute the lo and hi bounds.
5799cat >conftest.$ac_ext <<_ACEOF
5800#line $LINENO "configure"
5801#include "confdefs.h"
5802$ac_includes_default
5803#ifdef F77_DUMMY_MAIN
5804# ifdef __cplusplus
5805 extern "C"
5806# endif
5807 int F77_DUMMY_MAIN() { return 1; }
5808#endif
5809int
5810main ()
5811{
5812static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5813test_array [0] = 0
5814
5815 ;
5816 return 0;
5817}
5818_ACEOF
5819rm -f conftest.$ac_objext
5820if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5821 (eval $ac_compile) 2>&5
5822 ac_status=$?
5823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5824 (exit $ac_status); } &&
5825 { ac_try='test -s conftest.$ac_objext'
5826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5827 (eval $ac_try) 2>&5
5828 ac_status=$?
5829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5830 (exit $ac_status); }; }; then
5831 ac_lo=0 ac_mid=0
5832 while :; do
5833 cat >conftest.$ac_ext <<_ACEOF
5834#line $LINENO "configure"
5835#include "confdefs.h"
5836$ac_includes_default
5837#ifdef F77_DUMMY_MAIN
5838# ifdef __cplusplus
5839 extern "C"
5840# endif
5841 int F77_DUMMY_MAIN() { return 1; }
5842#endif
5843int
5844main ()
5845{
5846static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5847test_array [0] = 0
5848
5849 ;
5850 return 0;
5851}
5852_ACEOF
5853rm -f conftest.$ac_objext
5854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5855 (eval $ac_compile) 2>&5
5856 ac_status=$?
5857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5858 (exit $ac_status); } &&
5859 { ac_try='test -s conftest.$ac_objext'
5860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5861 (eval $ac_try) 2>&5
5862 ac_status=$?
5863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5864 (exit $ac_status); }; }; then
5865 ac_hi=$ac_mid; break
5866else
5867 echo "$as_me: failed program was:" >&5
5868cat conftest.$ac_ext >&5
5869ac_lo=`expr $ac_mid + 1`
5870 if test $ac_lo -le $ac_mid; then
5871 ac_lo= ac_hi=
5872 break
5873 fi
5874 ac_mid=`expr 2 '*' $ac_mid + 1`
5875fi
5876rm -f conftest.$ac_objext conftest.$ac_ext
5877 done
5878else
5879 echo "$as_me: failed program was:" >&5
5880cat conftest.$ac_ext >&5
5881cat >conftest.$ac_ext <<_ACEOF
5882#line $LINENO "configure"
5883#include "confdefs.h"
5884$ac_includes_default
5885#ifdef F77_DUMMY_MAIN
5886# ifdef __cplusplus
5887 extern "C"
5888# endif
5889 int F77_DUMMY_MAIN() { return 1; }
5890#endif
5891int
5892main ()
5893{
5894static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
5895test_array [0] = 0
5896
5897 ;
5898 return 0;
5899}
5900_ACEOF
5901rm -f conftest.$ac_objext
5902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5903 (eval $ac_compile) 2>&5
5904 ac_status=$?
5905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5906 (exit $ac_status); } &&
5907 { ac_try='test -s conftest.$ac_objext'
5908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5909 (eval $ac_try) 2>&5
5910 ac_status=$?
5911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5912 (exit $ac_status); }; }; then
5913 ac_hi=-1 ac_mid=-1
5914 while :; do
5915 cat >conftest.$ac_ext <<_ACEOF
5916#line $LINENO "configure"
5917#include "confdefs.h"
5918$ac_includes_default
5919#ifdef F77_DUMMY_MAIN
5920# ifdef __cplusplus
5921 extern "C"
5922# endif
5923 int F77_DUMMY_MAIN() { return 1; }
5924#endif
5925int
5926main ()
5927{
5928static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
5929test_array [0] = 0
5930
5931 ;
5932 return 0;
5933}
5934_ACEOF
5935rm -f conftest.$ac_objext
5936if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5937 (eval $ac_compile) 2>&5
5938 ac_status=$?
5939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5940 (exit $ac_status); } &&
5941 { ac_try='test -s conftest.$ac_objext'
5942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5943 (eval $ac_try) 2>&5
5944 ac_status=$?
5945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5946 (exit $ac_status); }; }; then
5947 ac_lo=$ac_mid; break
5948else
5949 echo "$as_me: failed program was:" >&5
5950cat conftest.$ac_ext >&5
5951ac_hi=`expr '(' $ac_mid ')' - 1`
5952 if test $ac_mid -le $ac_hi; then
5953 ac_lo= ac_hi=
5954 break
5955 fi
5956 ac_mid=`expr 2 '*' $ac_mid`
5957fi
5958rm -f conftest.$ac_objext conftest.$ac_ext
5959 done
5960else
5961 echo "$as_me: failed program was:" >&5
5962cat conftest.$ac_ext >&5
5963ac_lo= ac_hi=
5964fi
5965rm -f conftest.$ac_objext conftest.$ac_ext
5966fi
5967rm -f conftest.$ac_objext conftest.$ac_ext
5968# Binary search between lo and hi bounds.
5969while test "x$ac_lo" != "x$ac_hi"; do
5970 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5971 cat >conftest.$ac_ext <<_ACEOF
5972#line $LINENO "configure"
5973#include "confdefs.h"
5974$ac_includes_default
5975#ifdef F77_DUMMY_MAIN
5976# ifdef __cplusplus
5977 extern "C"
5978# endif
5979 int F77_DUMMY_MAIN() { return 1; }
5980#endif
5981int
5982main ()
5983{
5984static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5985test_array [0] = 0
5986
5987 ;
5988 return 0;
5989}
5990_ACEOF
5991rm -f conftest.$ac_objext
5992if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5993 (eval $ac_compile) 2>&5
5994 ac_status=$?
5995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5996 (exit $ac_status); } &&
5997 { ac_try='test -s conftest.$ac_objext'
5998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5999 (eval $ac_try) 2>&5
6000 ac_status=$?
6001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6002 (exit $ac_status); }; }; then
6003 ac_hi=$ac_mid
6004else
6005 echo "$as_me: failed program was:" >&5
6006cat conftest.$ac_ext >&5
6007ac_lo=`expr '(' $ac_mid ')' + 1`
6008fi
6009rm -f conftest.$ac_objext conftest.$ac_ext
6010done
6011case $ac_lo in
6012?*) ac_cv_sizeof_char=$ac_lo;;
6013'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6014echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6015 { (exit 1); exit 1; }; } ;;
6016esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006017else
6018 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006019 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6020echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6021 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006022else
Martin v. Löwis11437992002-04-12 09:54:03 +00006023 cat >conftest.$ac_ext <<_ACEOF
6024#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006025#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006026$ac_includes_default
6027long longval () { return (long) (sizeof (char)); }
6028unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006029#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006030#include <stdlib.h>
6031#ifdef F77_DUMMY_MAIN
6032# ifdef __cplusplus
6033 extern "C"
6034# endif
6035 int F77_DUMMY_MAIN() { return 1; }
6036#endif
6037int
6038main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006039{
Martin v. Löwis11437992002-04-12 09:54:03 +00006040
6041 FILE *f = fopen ("conftest.val", "w");
6042 if (! f)
6043 exit (1);
6044 if (((long) (sizeof (char))) < 0)
6045 {
6046 long i = longval ();
6047 if (i != ((long) (sizeof (char))))
6048 exit (1);
6049 fprintf (f, "%ld\n", i);
6050 }
6051 else
6052 {
6053 unsigned long i = ulongval ();
6054 if (i != ((long) (sizeof (char))))
6055 exit (1);
6056 fprintf (f, "%lu\n", i);
6057 }
6058 exit (ferror (f) || fclose (f) != 0);
6059
6060 ;
6061 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006062}
Martin v. Löwis11437992002-04-12 09:54:03 +00006063_ACEOF
6064rm -f conftest$ac_exeext
6065if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6066 (eval $ac_link) 2>&5
6067 ac_status=$?
6068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6069 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6071 (eval $ac_try) 2>&5
6072 ac_status=$?
6073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6074 (exit $ac_status); }; }; then
6075 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006076else
Martin v. Löwis11437992002-04-12 09:54:03 +00006077 echo "$as_me: program exited with status $ac_status" >&5
6078echo "$as_me: failed program was:" >&5
6079cat conftest.$ac_ext >&5
6080( exit $ac_status )
6081{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6082echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6083 { (exit 1); exit 1; }; }
6084fi
6085rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6086fi
6087fi
6088rm -f conftest.val
6089else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006090 ac_cv_sizeof_char=0
6091fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006092fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006093echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6094echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6095cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006096#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006097_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006098
6099
Martin v. Löwis11437992002-04-12 09:54:03 +00006100echo "$as_me:$LINENO: checking for short" >&5
6101echo $ECHO_N "checking for short... $ECHO_C" >&6
6102if test "${ac_cv_type_short+set}" = set; then
6103 echo $ECHO_N "(cached) $ECHO_C" >&6
6104else
6105 cat >conftest.$ac_ext <<_ACEOF
6106#line $LINENO "configure"
6107#include "confdefs.h"
6108$ac_includes_default
6109#ifdef F77_DUMMY_MAIN
6110# ifdef __cplusplus
6111 extern "C"
6112# endif
6113 int F77_DUMMY_MAIN() { return 1; }
6114#endif
6115int
6116main ()
6117{
6118if ((short *) 0)
6119 return 0;
6120if (sizeof (short))
6121 return 0;
6122 ;
6123 return 0;
6124}
6125_ACEOF
6126rm -f conftest.$ac_objext
6127if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6128 (eval $ac_compile) 2>&5
6129 ac_status=$?
6130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6131 (exit $ac_status); } &&
6132 { ac_try='test -s conftest.$ac_objext'
6133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6134 (eval $ac_try) 2>&5
6135 ac_status=$?
6136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6137 (exit $ac_status); }; }; then
6138 ac_cv_type_short=yes
6139else
6140 echo "$as_me: failed program was:" >&5
6141cat conftest.$ac_ext >&5
6142ac_cv_type_short=no
6143fi
6144rm -f conftest.$ac_objext conftest.$ac_ext
6145fi
6146echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6147echo "${ECHO_T}$ac_cv_type_short" >&6
6148
6149echo "$as_me:$LINENO: checking size of short" >&5
6150echo $ECHO_N "checking size of short... $ECHO_C" >&6
6151if test "${ac_cv_sizeof_short+set}" = set; then
6152 echo $ECHO_N "(cached) $ECHO_C" >&6
6153else
6154 if test "$ac_cv_type_short" = yes; then
6155 # The cast to unsigned long works around a bug in the HP C Compiler
6156 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6157 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6158 # This bug is HP SR number 8606223364.
6159 if test "$cross_compiling" = yes; then
6160 # Depending upon the size, compute the lo and hi bounds.
6161cat >conftest.$ac_ext <<_ACEOF
6162#line $LINENO "configure"
6163#include "confdefs.h"
6164$ac_includes_default
6165#ifdef F77_DUMMY_MAIN
6166# ifdef __cplusplus
6167 extern "C"
6168# endif
6169 int F77_DUMMY_MAIN() { return 1; }
6170#endif
6171int
6172main ()
6173{
6174static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6175test_array [0] = 0
6176
6177 ;
6178 return 0;
6179}
6180_ACEOF
6181rm -f conftest.$ac_objext
6182if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6183 (eval $ac_compile) 2>&5
6184 ac_status=$?
6185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6186 (exit $ac_status); } &&
6187 { ac_try='test -s conftest.$ac_objext'
6188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6189 (eval $ac_try) 2>&5
6190 ac_status=$?
6191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6192 (exit $ac_status); }; }; then
6193 ac_lo=0 ac_mid=0
6194 while :; do
6195 cat >conftest.$ac_ext <<_ACEOF
6196#line $LINENO "configure"
6197#include "confdefs.h"
6198$ac_includes_default
6199#ifdef F77_DUMMY_MAIN
6200# ifdef __cplusplus
6201 extern "C"
6202# endif
6203 int F77_DUMMY_MAIN() { return 1; }
6204#endif
6205int
6206main ()
6207{
6208static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6209test_array [0] = 0
6210
6211 ;
6212 return 0;
6213}
6214_ACEOF
6215rm -f conftest.$ac_objext
6216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6217 (eval $ac_compile) 2>&5
6218 ac_status=$?
6219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6220 (exit $ac_status); } &&
6221 { ac_try='test -s conftest.$ac_objext'
6222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6223 (eval $ac_try) 2>&5
6224 ac_status=$?
6225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6226 (exit $ac_status); }; }; then
6227 ac_hi=$ac_mid; break
6228else
6229 echo "$as_me: failed program was:" >&5
6230cat conftest.$ac_ext >&5
6231ac_lo=`expr $ac_mid + 1`
6232 if test $ac_lo -le $ac_mid; then
6233 ac_lo= ac_hi=
6234 break
6235 fi
6236 ac_mid=`expr 2 '*' $ac_mid + 1`
6237fi
6238rm -f conftest.$ac_objext conftest.$ac_ext
6239 done
6240else
6241 echo "$as_me: failed program was:" >&5
6242cat conftest.$ac_ext >&5
6243cat >conftest.$ac_ext <<_ACEOF
6244#line $LINENO "configure"
6245#include "confdefs.h"
6246$ac_includes_default
6247#ifdef F77_DUMMY_MAIN
6248# ifdef __cplusplus
6249 extern "C"
6250# endif
6251 int F77_DUMMY_MAIN() { return 1; }
6252#endif
6253int
6254main ()
6255{
6256static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6257test_array [0] = 0
6258
6259 ;
6260 return 0;
6261}
6262_ACEOF
6263rm -f conftest.$ac_objext
6264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6265 (eval $ac_compile) 2>&5
6266 ac_status=$?
6267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6268 (exit $ac_status); } &&
6269 { ac_try='test -s conftest.$ac_objext'
6270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6271 (eval $ac_try) 2>&5
6272 ac_status=$?
6273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6274 (exit $ac_status); }; }; then
6275 ac_hi=-1 ac_mid=-1
6276 while :; do
6277 cat >conftest.$ac_ext <<_ACEOF
6278#line $LINENO "configure"
6279#include "confdefs.h"
6280$ac_includes_default
6281#ifdef F77_DUMMY_MAIN
6282# ifdef __cplusplus
6283 extern "C"
6284# endif
6285 int F77_DUMMY_MAIN() { return 1; }
6286#endif
6287int
6288main ()
6289{
6290static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6291test_array [0] = 0
6292
6293 ;
6294 return 0;
6295}
6296_ACEOF
6297rm -f conftest.$ac_objext
6298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6299 (eval $ac_compile) 2>&5
6300 ac_status=$?
6301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6302 (exit $ac_status); } &&
6303 { ac_try='test -s conftest.$ac_objext'
6304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6305 (eval $ac_try) 2>&5
6306 ac_status=$?
6307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6308 (exit $ac_status); }; }; then
6309 ac_lo=$ac_mid; break
6310else
6311 echo "$as_me: failed program was:" >&5
6312cat conftest.$ac_ext >&5
6313ac_hi=`expr '(' $ac_mid ')' - 1`
6314 if test $ac_mid -le $ac_hi; then
6315 ac_lo= ac_hi=
6316 break
6317 fi
6318 ac_mid=`expr 2 '*' $ac_mid`
6319fi
6320rm -f conftest.$ac_objext conftest.$ac_ext
6321 done
6322else
6323 echo "$as_me: failed program was:" >&5
6324cat conftest.$ac_ext >&5
6325ac_lo= ac_hi=
6326fi
6327rm -f conftest.$ac_objext conftest.$ac_ext
6328fi
6329rm -f conftest.$ac_objext conftest.$ac_ext
6330# Binary search between lo and hi bounds.
6331while test "x$ac_lo" != "x$ac_hi"; do
6332 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6333 cat >conftest.$ac_ext <<_ACEOF
6334#line $LINENO "configure"
6335#include "confdefs.h"
6336$ac_includes_default
6337#ifdef F77_DUMMY_MAIN
6338# ifdef __cplusplus
6339 extern "C"
6340# endif
6341 int F77_DUMMY_MAIN() { return 1; }
6342#endif
6343int
6344main ()
6345{
6346static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6347test_array [0] = 0
6348
6349 ;
6350 return 0;
6351}
6352_ACEOF
6353rm -f conftest.$ac_objext
6354if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6355 (eval $ac_compile) 2>&5
6356 ac_status=$?
6357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6358 (exit $ac_status); } &&
6359 { ac_try='test -s conftest.$ac_objext'
6360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6361 (eval $ac_try) 2>&5
6362 ac_status=$?
6363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6364 (exit $ac_status); }; }; then
6365 ac_hi=$ac_mid
6366else
6367 echo "$as_me: failed program was:" >&5
6368cat conftest.$ac_ext >&5
6369ac_lo=`expr '(' $ac_mid ')' + 1`
6370fi
6371rm -f conftest.$ac_objext conftest.$ac_ext
6372done
6373case $ac_lo in
6374?*) ac_cv_sizeof_short=$ac_lo;;
6375'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6376echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6377 { (exit 1); exit 1; }; } ;;
6378esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006379else
6380 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006381 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6382echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6383 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006384else
Martin v. Löwis11437992002-04-12 09:54:03 +00006385 cat >conftest.$ac_ext <<_ACEOF
6386#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006387#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006388$ac_includes_default
6389long longval () { return (long) (sizeof (short)); }
6390unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006391#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006392#include <stdlib.h>
6393#ifdef F77_DUMMY_MAIN
6394# ifdef __cplusplus
6395 extern "C"
6396# endif
6397 int F77_DUMMY_MAIN() { return 1; }
6398#endif
6399int
6400main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006401{
Martin v. Löwis11437992002-04-12 09:54:03 +00006402
6403 FILE *f = fopen ("conftest.val", "w");
6404 if (! f)
6405 exit (1);
6406 if (((long) (sizeof (short))) < 0)
6407 {
6408 long i = longval ();
6409 if (i != ((long) (sizeof (short))))
6410 exit (1);
6411 fprintf (f, "%ld\n", i);
6412 }
6413 else
6414 {
6415 unsigned long i = ulongval ();
6416 if (i != ((long) (sizeof (short))))
6417 exit (1);
6418 fprintf (f, "%lu\n", i);
6419 }
6420 exit (ferror (f) || fclose (f) != 0);
6421
6422 ;
6423 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006424}
Martin v. Löwis11437992002-04-12 09:54:03 +00006425_ACEOF
6426rm -f conftest$ac_exeext
6427if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6428 (eval $ac_link) 2>&5
6429 ac_status=$?
6430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6431 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6433 (eval $ac_try) 2>&5
6434 ac_status=$?
6435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6436 (exit $ac_status); }; }; then
6437 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006438else
Martin v. Löwis11437992002-04-12 09:54:03 +00006439 echo "$as_me: program exited with status $ac_status" >&5
6440echo "$as_me: failed program was:" >&5
6441cat conftest.$ac_ext >&5
6442( exit $ac_status )
6443{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6444echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6445 { (exit 1); exit 1; }; }
6446fi
6447rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6448fi
6449fi
6450rm -f conftest.val
6451else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006452 ac_cv_sizeof_short=0
6453fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006454fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006455echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6456echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6457cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006458#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006459_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006460
6461
Martin v. Löwis11437992002-04-12 09:54:03 +00006462echo "$as_me:$LINENO: checking for float" >&5
6463echo $ECHO_N "checking for float... $ECHO_C" >&6
6464if test "${ac_cv_type_float+set}" = set; then
6465 echo $ECHO_N "(cached) $ECHO_C" >&6
6466else
6467 cat >conftest.$ac_ext <<_ACEOF
6468#line $LINENO "configure"
6469#include "confdefs.h"
6470$ac_includes_default
6471#ifdef F77_DUMMY_MAIN
6472# ifdef __cplusplus
6473 extern "C"
6474# endif
6475 int F77_DUMMY_MAIN() { return 1; }
6476#endif
6477int
6478main ()
6479{
6480if ((float *) 0)
6481 return 0;
6482if (sizeof (float))
6483 return 0;
6484 ;
6485 return 0;
6486}
6487_ACEOF
6488rm -f conftest.$ac_objext
6489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6490 (eval $ac_compile) 2>&5
6491 ac_status=$?
6492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6493 (exit $ac_status); } &&
6494 { ac_try='test -s conftest.$ac_objext'
6495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6496 (eval $ac_try) 2>&5
6497 ac_status=$?
6498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6499 (exit $ac_status); }; }; then
6500 ac_cv_type_float=yes
6501else
6502 echo "$as_me: failed program was:" >&5
6503cat conftest.$ac_ext >&5
6504ac_cv_type_float=no
6505fi
6506rm -f conftest.$ac_objext conftest.$ac_ext
6507fi
6508echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6509echo "${ECHO_T}$ac_cv_type_float" >&6
6510
6511echo "$as_me:$LINENO: checking size of float" >&5
6512echo $ECHO_N "checking size of float... $ECHO_C" >&6
6513if test "${ac_cv_sizeof_float+set}" = set; then
6514 echo $ECHO_N "(cached) $ECHO_C" >&6
6515else
6516 if test "$ac_cv_type_float" = yes; then
6517 # The cast to unsigned long works around a bug in the HP C Compiler
6518 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6519 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6520 # This bug is HP SR number 8606223364.
6521 if test "$cross_compiling" = yes; then
6522 # Depending upon the size, compute the lo and hi bounds.
6523cat >conftest.$ac_ext <<_ACEOF
6524#line $LINENO "configure"
6525#include "confdefs.h"
6526$ac_includes_default
6527#ifdef F77_DUMMY_MAIN
6528# ifdef __cplusplus
6529 extern "C"
6530# endif
6531 int F77_DUMMY_MAIN() { return 1; }
6532#endif
6533int
6534main ()
6535{
6536static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6537test_array [0] = 0
6538
6539 ;
6540 return 0;
6541}
6542_ACEOF
6543rm -f conftest.$ac_objext
6544if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6545 (eval $ac_compile) 2>&5
6546 ac_status=$?
6547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6548 (exit $ac_status); } &&
6549 { ac_try='test -s conftest.$ac_objext'
6550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6551 (eval $ac_try) 2>&5
6552 ac_status=$?
6553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6554 (exit $ac_status); }; }; then
6555 ac_lo=0 ac_mid=0
6556 while :; do
6557 cat >conftest.$ac_ext <<_ACEOF
6558#line $LINENO "configure"
6559#include "confdefs.h"
6560$ac_includes_default
6561#ifdef F77_DUMMY_MAIN
6562# ifdef __cplusplus
6563 extern "C"
6564# endif
6565 int F77_DUMMY_MAIN() { return 1; }
6566#endif
6567int
6568main ()
6569{
6570static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6571test_array [0] = 0
6572
6573 ;
6574 return 0;
6575}
6576_ACEOF
6577rm -f conftest.$ac_objext
6578if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6579 (eval $ac_compile) 2>&5
6580 ac_status=$?
6581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6582 (exit $ac_status); } &&
6583 { ac_try='test -s conftest.$ac_objext'
6584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6585 (eval $ac_try) 2>&5
6586 ac_status=$?
6587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6588 (exit $ac_status); }; }; then
6589 ac_hi=$ac_mid; break
6590else
6591 echo "$as_me: failed program was:" >&5
6592cat conftest.$ac_ext >&5
6593ac_lo=`expr $ac_mid + 1`
6594 if test $ac_lo -le $ac_mid; then
6595 ac_lo= ac_hi=
6596 break
6597 fi
6598 ac_mid=`expr 2 '*' $ac_mid + 1`
6599fi
6600rm -f conftest.$ac_objext conftest.$ac_ext
6601 done
6602else
6603 echo "$as_me: failed program was:" >&5
6604cat conftest.$ac_ext >&5
6605cat >conftest.$ac_ext <<_ACEOF
6606#line $LINENO "configure"
6607#include "confdefs.h"
6608$ac_includes_default
6609#ifdef F77_DUMMY_MAIN
6610# ifdef __cplusplus
6611 extern "C"
6612# endif
6613 int F77_DUMMY_MAIN() { return 1; }
6614#endif
6615int
6616main ()
6617{
6618static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6619test_array [0] = 0
6620
6621 ;
6622 return 0;
6623}
6624_ACEOF
6625rm -f conftest.$ac_objext
6626if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6627 (eval $ac_compile) 2>&5
6628 ac_status=$?
6629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6630 (exit $ac_status); } &&
6631 { ac_try='test -s conftest.$ac_objext'
6632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6633 (eval $ac_try) 2>&5
6634 ac_status=$?
6635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6636 (exit $ac_status); }; }; then
6637 ac_hi=-1 ac_mid=-1
6638 while :; do
6639 cat >conftest.$ac_ext <<_ACEOF
6640#line $LINENO "configure"
6641#include "confdefs.h"
6642$ac_includes_default
6643#ifdef F77_DUMMY_MAIN
6644# ifdef __cplusplus
6645 extern "C"
6646# endif
6647 int F77_DUMMY_MAIN() { return 1; }
6648#endif
6649int
6650main ()
6651{
6652static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6653test_array [0] = 0
6654
6655 ;
6656 return 0;
6657}
6658_ACEOF
6659rm -f conftest.$ac_objext
6660if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6661 (eval $ac_compile) 2>&5
6662 ac_status=$?
6663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6664 (exit $ac_status); } &&
6665 { ac_try='test -s conftest.$ac_objext'
6666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6667 (eval $ac_try) 2>&5
6668 ac_status=$?
6669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6670 (exit $ac_status); }; }; then
6671 ac_lo=$ac_mid; break
6672else
6673 echo "$as_me: failed program was:" >&5
6674cat conftest.$ac_ext >&5
6675ac_hi=`expr '(' $ac_mid ')' - 1`
6676 if test $ac_mid -le $ac_hi; then
6677 ac_lo= ac_hi=
6678 break
6679 fi
6680 ac_mid=`expr 2 '*' $ac_mid`
6681fi
6682rm -f conftest.$ac_objext conftest.$ac_ext
6683 done
6684else
6685 echo "$as_me: failed program was:" >&5
6686cat conftest.$ac_ext >&5
6687ac_lo= ac_hi=
6688fi
6689rm -f conftest.$ac_objext conftest.$ac_ext
6690fi
6691rm -f conftest.$ac_objext conftest.$ac_ext
6692# Binary search between lo and hi bounds.
6693while test "x$ac_lo" != "x$ac_hi"; do
6694 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6695 cat >conftest.$ac_ext <<_ACEOF
6696#line $LINENO "configure"
6697#include "confdefs.h"
6698$ac_includes_default
6699#ifdef F77_DUMMY_MAIN
6700# ifdef __cplusplus
6701 extern "C"
6702# endif
6703 int F77_DUMMY_MAIN() { return 1; }
6704#endif
6705int
6706main ()
6707{
6708static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6709test_array [0] = 0
6710
6711 ;
6712 return 0;
6713}
6714_ACEOF
6715rm -f conftest.$ac_objext
6716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6717 (eval $ac_compile) 2>&5
6718 ac_status=$?
6719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6720 (exit $ac_status); } &&
6721 { ac_try='test -s conftest.$ac_objext'
6722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6723 (eval $ac_try) 2>&5
6724 ac_status=$?
6725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6726 (exit $ac_status); }; }; then
6727 ac_hi=$ac_mid
6728else
6729 echo "$as_me: failed program was:" >&5
6730cat conftest.$ac_ext >&5
6731ac_lo=`expr '(' $ac_mid ')' + 1`
6732fi
6733rm -f conftest.$ac_objext conftest.$ac_ext
6734done
6735case $ac_lo in
6736?*) ac_cv_sizeof_float=$ac_lo;;
6737'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6738echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6739 { (exit 1); exit 1; }; } ;;
6740esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006741else
6742 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006743 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6744echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6745 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006746else
Martin v. Löwis11437992002-04-12 09:54:03 +00006747 cat >conftest.$ac_ext <<_ACEOF
6748#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006749#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006750$ac_includes_default
6751long longval () { return (long) (sizeof (float)); }
6752unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006753#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006754#include <stdlib.h>
6755#ifdef F77_DUMMY_MAIN
6756# ifdef __cplusplus
6757 extern "C"
6758# endif
6759 int F77_DUMMY_MAIN() { return 1; }
6760#endif
6761int
6762main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006763{
Martin v. Löwis11437992002-04-12 09:54:03 +00006764
6765 FILE *f = fopen ("conftest.val", "w");
6766 if (! f)
6767 exit (1);
6768 if (((long) (sizeof (float))) < 0)
6769 {
6770 long i = longval ();
6771 if (i != ((long) (sizeof (float))))
6772 exit (1);
6773 fprintf (f, "%ld\n", i);
6774 }
6775 else
6776 {
6777 unsigned long i = ulongval ();
6778 if (i != ((long) (sizeof (float))))
6779 exit (1);
6780 fprintf (f, "%lu\n", i);
6781 }
6782 exit (ferror (f) || fclose (f) != 0);
6783
6784 ;
6785 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006786}
Martin v. Löwis11437992002-04-12 09:54:03 +00006787_ACEOF
6788rm -f conftest$ac_exeext
6789if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6790 (eval $ac_link) 2>&5
6791 ac_status=$?
6792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6793 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6795 (eval $ac_try) 2>&5
6796 ac_status=$?
6797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6798 (exit $ac_status); }; }; then
6799 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006800else
Martin v. Löwis11437992002-04-12 09:54:03 +00006801 echo "$as_me: program exited with status $ac_status" >&5
6802echo "$as_me: failed program was:" >&5
6803cat conftest.$ac_ext >&5
6804( exit $ac_status )
6805{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6806echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6807 { (exit 1); exit 1; }; }
6808fi
6809rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6810fi
6811fi
6812rm -f conftest.val
6813else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006814 ac_cv_sizeof_float=0
6815fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006816fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006817echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6818echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6819cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006820#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006821_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006822
6823
Martin v. Löwis11437992002-04-12 09:54:03 +00006824echo "$as_me:$LINENO: checking for double" >&5
6825echo $ECHO_N "checking for double... $ECHO_C" >&6
6826if test "${ac_cv_type_double+set}" = set; then
6827 echo $ECHO_N "(cached) $ECHO_C" >&6
6828else
6829 cat >conftest.$ac_ext <<_ACEOF
6830#line $LINENO "configure"
6831#include "confdefs.h"
6832$ac_includes_default
6833#ifdef F77_DUMMY_MAIN
6834# ifdef __cplusplus
6835 extern "C"
6836# endif
6837 int F77_DUMMY_MAIN() { return 1; }
6838#endif
6839int
6840main ()
6841{
6842if ((double *) 0)
6843 return 0;
6844if (sizeof (double))
6845 return 0;
6846 ;
6847 return 0;
6848}
6849_ACEOF
6850rm -f conftest.$ac_objext
6851if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6852 (eval $ac_compile) 2>&5
6853 ac_status=$?
6854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6855 (exit $ac_status); } &&
6856 { ac_try='test -s conftest.$ac_objext'
6857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6858 (eval $ac_try) 2>&5
6859 ac_status=$?
6860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6861 (exit $ac_status); }; }; then
6862 ac_cv_type_double=yes
6863else
6864 echo "$as_me: failed program was:" >&5
6865cat conftest.$ac_ext >&5
6866ac_cv_type_double=no
6867fi
6868rm -f conftest.$ac_objext conftest.$ac_ext
6869fi
6870echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6871echo "${ECHO_T}$ac_cv_type_double" >&6
6872
6873echo "$as_me:$LINENO: checking size of double" >&5
6874echo $ECHO_N "checking size of double... $ECHO_C" >&6
6875if test "${ac_cv_sizeof_double+set}" = set; then
6876 echo $ECHO_N "(cached) $ECHO_C" >&6
6877else
6878 if test "$ac_cv_type_double" = yes; then
6879 # The cast to unsigned long works around a bug in the HP C Compiler
6880 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6881 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6882 # This bug is HP SR number 8606223364.
6883 if test "$cross_compiling" = yes; then
6884 # Depending upon the size, compute the lo and hi bounds.
6885cat >conftest.$ac_ext <<_ACEOF
6886#line $LINENO "configure"
6887#include "confdefs.h"
6888$ac_includes_default
6889#ifdef F77_DUMMY_MAIN
6890# ifdef __cplusplus
6891 extern "C"
6892# endif
6893 int F77_DUMMY_MAIN() { return 1; }
6894#endif
6895int
6896main ()
6897{
6898static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
6899test_array [0] = 0
6900
6901 ;
6902 return 0;
6903}
6904_ACEOF
6905rm -f conftest.$ac_objext
6906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6907 (eval $ac_compile) 2>&5
6908 ac_status=$?
6909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6910 (exit $ac_status); } &&
6911 { ac_try='test -s conftest.$ac_objext'
6912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6913 (eval $ac_try) 2>&5
6914 ac_status=$?
6915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6916 (exit $ac_status); }; }; then
6917 ac_lo=0 ac_mid=0
6918 while :; do
6919 cat >conftest.$ac_ext <<_ACEOF
6920#line $LINENO "configure"
6921#include "confdefs.h"
6922$ac_includes_default
6923#ifdef F77_DUMMY_MAIN
6924# ifdef __cplusplus
6925 extern "C"
6926# endif
6927 int F77_DUMMY_MAIN() { return 1; }
6928#endif
6929int
6930main ()
6931{
6932static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
6933test_array [0] = 0
6934
6935 ;
6936 return 0;
6937}
6938_ACEOF
6939rm -f conftest.$ac_objext
6940if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6941 (eval $ac_compile) 2>&5
6942 ac_status=$?
6943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6944 (exit $ac_status); } &&
6945 { ac_try='test -s conftest.$ac_objext'
6946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6947 (eval $ac_try) 2>&5
6948 ac_status=$?
6949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6950 (exit $ac_status); }; }; then
6951 ac_hi=$ac_mid; break
6952else
6953 echo "$as_me: failed program was:" >&5
6954cat conftest.$ac_ext >&5
6955ac_lo=`expr $ac_mid + 1`
6956 if test $ac_lo -le $ac_mid; then
6957 ac_lo= ac_hi=
6958 break
6959 fi
6960 ac_mid=`expr 2 '*' $ac_mid + 1`
6961fi
6962rm -f conftest.$ac_objext conftest.$ac_ext
6963 done
6964else
6965 echo "$as_me: failed program was:" >&5
6966cat conftest.$ac_ext >&5
6967cat >conftest.$ac_ext <<_ACEOF
6968#line $LINENO "configure"
6969#include "confdefs.h"
6970$ac_includes_default
6971#ifdef F77_DUMMY_MAIN
6972# ifdef __cplusplus
6973 extern "C"
6974# endif
6975 int F77_DUMMY_MAIN() { return 1; }
6976#endif
6977int
6978main ()
6979{
6980static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
6981test_array [0] = 0
6982
6983 ;
6984 return 0;
6985}
6986_ACEOF
6987rm -f conftest.$ac_objext
6988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6989 (eval $ac_compile) 2>&5
6990 ac_status=$?
6991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6992 (exit $ac_status); } &&
6993 { ac_try='test -s conftest.$ac_objext'
6994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6995 (eval $ac_try) 2>&5
6996 ac_status=$?
6997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6998 (exit $ac_status); }; }; then
6999 ac_hi=-1 ac_mid=-1
7000 while :; do
7001 cat >conftest.$ac_ext <<_ACEOF
7002#line $LINENO "configure"
7003#include "confdefs.h"
7004$ac_includes_default
7005#ifdef F77_DUMMY_MAIN
7006# ifdef __cplusplus
7007 extern "C"
7008# endif
7009 int F77_DUMMY_MAIN() { return 1; }
7010#endif
7011int
7012main ()
7013{
7014static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7015test_array [0] = 0
7016
7017 ;
7018 return 0;
7019}
7020_ACEOF
7021rm -f conftest.$ac_objext
7022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7023 (eval $ac_compile) 2>&5
7024 ac_status=$?
7025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7026 (exit $ac_status); } &&
7027 { ac_try='test -s conftest.$ac_objext'
7028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7029 (eval $ac_try) 2>&5
7030 ac_status=$?
7031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7032 (exit $ac_status); }; }; then
7033 ac_lo=$ac_mid; break
7034else
7035 echo "$as_me: failed program was:" >&5
7036cat conftest.$ac_ext >&5
7037ac_hi=`expr '(' $ac_mid ')' - 1`
7038 if test $ac_mid -le $ac_hi; then
7039 ac_lo= ac_hi=
7040 break
7041 fi
7042 ac_mid=`expr 2 '*' $ac_mid`
7043fi
7044rm -f conftest.$ac_objext conftest.$ac_ext
7045 done
7046else
7047 echo "$as_me: failed program was:" >&5
7048cat conftest.$ac_ext >&5
7049ac_lo= ac_hi=
7050fi
7051rm -f conftest.$ac_objext conftest.$ac_ext
7052fi
7053rm -f conftest.$ac_objext conftest.$ac_ext
7054# Binary search between lo and hi bounds.
7055while test "x$ac_lo" != "x$ac_hi"; do
7056 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7057 cat >conftest.$ac_ext <<_ACEOF
7058#line $LINENO "configure"
7059#include "confdefs.h"
7060$ac_includes_default
7061#ifdef F77_DUMMY_MAIN
7062# ifdef __cplusplus
7063 extern "C"
7064# endif
7065 int F77_DUMMY_MAIN() { return 1; }
7066#endif
7067int
7068main ()
7069{
7070static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7071test_array [0] = 0
7072
7073 ;
7074 return 0;
7075}
7076_ACEOF
7077rm -f conftest.$ac_objext
7078if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7079 (eval $ac_compile) 2>&5
7080 ac_status=$?
7081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7082 (exit $ac_status); } &&
7083 { ac_try='test -s conftest.$ac_objext'
7084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7085 (eval $ac_try) 2>&5
7086 ac_status=$?
7087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7088 (exit $ac_status); }; }; then
7089 ac_hi=$ac_mid
7090else
7091 echo "$as_me: failed program was:" >&5
7092cat conftest.$ac_ext >&5
7093ac_lo=`expr '(' $ac_mid ')' + 1`
7094fi
7095rm -f conftest.$ac_objext conftest.$ac_ext
7096done
7097case $ac_lo in
7098?*) ac_cv_sizeof_double=$ac_lo;;
7099'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7100echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7101 { (exit 1); exit 1; }; } ;;
7102esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007103else
7104 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007105 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7106echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7107 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007108else
Martin v. Löwis11437992002-04-12 09:54:03 +00007109 cat >conftest.$ac_ext <<_ACEOF
7110#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007111#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007112$ac_includes_default
7113long longval () { return (long) (sizeof (double)); }
7114unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007115#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007116#include <stdlib.h>
7117#ifdef F77_DUMMY_MAIN
7118# ifdef __cplusplus
7119 extern "C"
7120# endif
7121 int F77_DUMMY_MAIN() { return 1; }
7122#endif
7123int
7124main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007125{
Martin v. Löwis11437992002-04-12 09:54:03 +00007126
7127 FILE *f = fopen ("conftest.val", "w");
7128 if (! f)
7129 exit (1);
7130 if (((long) (sizeof (double))) < 0)
7131 {
7132 long i = longval ();
7133 if (i != ((long) (sizeof (double))))
7134 exit (1);
7135 fprintf (f, "%ld\n", i);
7136 }
7137 else
7138 {
7139 unsigned long i = ulongval ();
7140 if (i != ((long) (sizeof (double))))
7141 exit (1);
7142 fprintf (f, "%lu\n", i);
7143 }
7144 exit (ferror (f) || fclose (f) != 0);
7145
7146 ;
7147 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007148}
Martin v. Löwis11437992002-04-12 09:54:03 +00007149_ACEOF
7150rm -f conftest$ac_exeext
7151if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7152 (eval $ac_link) 2>&5
7153 ac_status=$?
7154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7155 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7157 (eval $ac_try) 2>&5
7158 ac_status=$?
7159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7160 (exit $ac_status); }; }; then
7161 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007162else
Martin v. Löwis11437992002-04-12 09:54:03 +00007163 echo "$as_me: program exited with status $ac_status" >&5
7164echo "$as_me: failed program was:" >&5
7165cat conftest.$ac_ext >&5
7166( exit $ac_status )
7167{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7168echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7169 { (exit 1); exit 1; }; }
7170fi
7171rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7172fi
7173fi
7174rm -f conftest.val
7175else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007176 ac_cv_sizeof_double=0
7177fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007178fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007179echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7180echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7181cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007182#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007183_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007184
7185
Martin v. Löwis11437992002-04-12 09:54:03 +00007186echo "$as_me:$LINENO: checking for fpos_t" >&5
7187echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7188if test "${ac_cv_type_fpos_t+set}" = set; then
7189 echo $ECHO_N "(cached) $ECHO_C" >&6
7190else
7191 cat >conftest.$ac_ext <<_ACEOF
7192#line $LINENO "configure"
7193#include "confdefs.h"
7194$ac_includes_default
7195#ifdef F77_DUMMY_MAIN
7196# ifdef __cplusplus
7197 extern "C"
7198# endif
7199 int F77_DUMMY_MAIN() { return 1; }
7200#endif
7201int
7202main ()
7203{
7204if ((fpos_t *) 0)
7205 return 0;
7206if (sizeof (fpos_t))
7207 return 0;
7208 ;
7209 return 0;
7210}
7211_ACEOF
7212rm -f conftest.$ac_objext
7213if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7214 (eval $ac_compile) 2>&5
7215 ac_status=$?
7216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7217 (exit $ac_status); } &&
7218 { ac_try='test -s conftest.$ac_objext'
7219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7220 (eval $ac_try) 2>&5
7221 ac_status=$?
7222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7223 (exit $ac_status); }; }; then
7224 ac_cv_type_fpos_t=yes
7225else
7226 echo "$as_me: failed program was:" >&5
7227cat conftest.$ac_ext >&5
7228ac_cv_type_fpos_t=no
7229fi
7230rm -f conftest.$ac_objext conftest.$ac_ext
7231fi
7232echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7233echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7234
7235echo "$as_me:$LINENO: checking size of fpos_t" >&5
7236echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7237if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7238 echo $ECHO_N "(cached) $ECHO_C" >&6
7239else
7240 if test "$ac_cv_type_fpos_t" = yes; then
7241 # The cast to unsigned long works around a bug in the HP C Compiler
7242 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7243 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7244 # This bug is HP SR number 8606223364.
7245 if test "$cross_compiling" = yes; then
7246 # Depending upon the size, compute the lo and hi bounds.
7247cat >conftest.$ac_ext <<_ACEOF
7248#line $LINENO "configure"
7249#include "confdefs.h"
7250$ac_includes_default
7251#ifdef F77_DUMMY_MAIN
7252# ifdef __cplusplus
7253 extern "C"
7254# endif
7255 int F77_DUMMY_MAIN() { return 1; }
7256#endif
7257int
7258main ()
7259{
7260static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7261test_array [0] = 0
7262
7263 ;
7264 return 0;
7265}
7266_ACEOF
7267rm -f conftest.$ac_objext
7268if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7269 (eval $ac_compile) 2>&5
7270 ac_status=$?
7271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7272 (exit $ac_status); } &&
7273 { ac_try='test -s conftest.$ac_objext'
7274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7275 (eval $ac_try) 2>&5
7276 ac_status=$?
7277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7278 (exit $ac_status); }; }; then
7279 ac_lo=0 ac_mid=0
7280 while :; do
7281 cat >conftest.$ac_ext <<_ACEOF
7282#line $LINENO "configure"
7283#include "confdefs.h"
7284$ac_includes_default
7285#ifdef F77_DUMMY_MAIN
7286# ifdef __cplusplus
7287 extern "C"
7288# endif
7289 int F77_DUMMY_MAIN() { return 1; }
7290#endif
7291int
7292main ()
7293{
7294static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7295test_array [0] = 0
7296
7297 ;
7298 return 0;
7299}
7300_ACEOF
7301rm -f conftest.$ac_objext
7302if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7303 (eval $ac_compile) 2>&5
7304 ac_status=$?
7305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7306 (exit $ac_status); } &&
7307 { ac_try='test -s conftest.$ac_objext'
7308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7309 (eval $ac_try) 2>&5
7310 ac_status=$?
7311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7312 (exit $ac_status); }; }; then
7313 ac_hi=$ac_mid; break
7314else
7315 echo "$as_me: failed program was:" >&5
7316cat conftest.$ac_ext >&5
7317ac_lo=`expr $ac_mid + 1`
7318 if test $ac_lo -le $ac_mid; then
7319 ac_lo= ac_hi=
7320 break
7321 fi
7322 ac_mid=`expr 2 '*' $ac_mid + 1`
7323fi
7324rm -f conftest.$ac_objext conftest.$ac_ext
7325 done
7326else
7327 echo "$as_me: failed program was:" >&5
7328cat conftest.$ac_ext >&5
7329cat >conftest.$ac_ext <<_ACEOF
7330#line $LINENO "configure"
7331#include "confdefs.h"
7332$ac_includes_default
7333#ifdef F77_DUMMY_MAIN
7334# ifdef __cplusplus
7335 extern "C"
7336# endif
7337 int F77_DUMMY_MAIN() { return 1; }
7338#endif
7339int
7340main ()
7341{
7342static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7343test_array [0] = 0
7344
7345 ;
7346 return 0;
7347}
7348_ACEOF
7349rm -f conftest.$ac_objext
7350if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7351 (eval $ac_compile) 2>&5
7352 ac_status=$?
7353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7354 (exit $ac_status); } &&
7355 { ac_try='test -s conftest.$ac_objext'
7356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7357 (eval $ac_try) 2>&5
7358 ac_status=$?
7359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7360 (exit $ac_status); }; }; then
7361 ac_hi=-1 ac_mid=-1
7362 while :; do
7363 cat >conftest.$ac_ext <<_ACEOF
7364#line $LINENO "configure"
7365#include "confdefs.h"
7366$ac_includes_default
7367#ifdef F77_DUMMY_MAIN
7368# ifdef __cplusplus
7369 extern "C"
7370# endif
7371 int F77_DUMMY_MAIN() { return 1; }
7372#endif
7373int
7374main ()
7375{
7376static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7377test_array [0] = 0
7378
7379 ;
7380 return 0;
7381}
7382_ACEOF
7383rm -f conftest.$ac_objext
7384if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7385 (eval $ac_compile) 2>&5
7386 ac_status=$?
7387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7388 (exit $ac_status); } &&
7389 { ac_try='test -s conftest.$ac_objext'
7390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7391 (eval $ac_try) 2>&5
7392 ac_status=$?
7393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7394 (exit $ac_status); }; }; then
7395 ac_lo=$ac_mid; break
7396else
7397 echo "$as_me: failed program was:" >&5
7398cat conftest.$ac_ext >&5
7399ac_hi=`expr '(' $ac_mid ')' - 1`
7400 if test $ac_mid -le $ac_hi; then
7401 ac_lo= ac_hi=
7402 break
7403 fi
7404 ac_mid=`expr 2 '*' $ac_mid`
7405fi
7406rm -f conftest.$ac_objext conftest.$ac_ext
7407 done
7408else
7409 echo "$as_me: failed program was:" >&5
7410cat conftest.$ac_ext >&5
7411ac_lo= ac_hi=
7412fi
7413rm -f conftest.$ac_objext conftest.$ac_ext
7414fi
7415rm -f conftest.$ac_objext conftest.$ac_ext
7416# Binary search between lo and hi bounds.
7417while test "x$ac_lo" != "x$ac_hi"; do
7418 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7419 cat >conftest.$ac_ext <<_ACEOF
7420#line $LINENO "configure"
7421#include "confdefs.h"
7422$ac_includes_default
7423#ifdef F77_DUMMY_MAIN
7424# ifdef __cplusplus
7425 extern "C"
7426# endif
7427 int F77_DUMMY_MAIN() { return 1; }
7428#endif
7429int
7430main ()
7431{
7432static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7433test_array [0] = 0
7434
7435 ;
7436 return 0;
7437}
7438_ACEOF
7439rm -f conftest.$ac_objext
7440if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7441 (eval $ac_compile) 2>&5
7442 ac_status=$?
7443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7444 (exit $ac_status); } &&
7445 { ac_try='test -s conftest.$ac_objext'
7446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7447 (eval $ac_try) 2>&5
7448 ac_status=$?
7449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7450 (exit $ac_status); }; }; then
7451 ac_hi=$ac_mid
7452else
7453 echo "$as_me: failed program was:" >&5
7454cat conftest.$ac_ext >&5
7455ac_lo=`expr '(' $ac_mid ')' + 1`
7456fi
7457rm -f conftest.$ac_objext conftest.$ac_ext
7458done
7459case $ac_lo in
7460?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7461'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7462echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7463 { (exit 1); exit 1; }; } ;;
7464esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007465else
7466 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007467 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7468echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7469 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007470else
Martin v. Löwis11437992002-04-12 09:54:03 +00007471 cat >conftest.$ac_ext <<_ACEOF
7472#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007473#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007474$ac_includes_default
7475long longval () { return (long) (sizeof (fpos_t)); }
7476unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007477#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007478#include <stdlib.h>
7479#ifdef F77_DUMMY_MAIN
7480# ifdef __cplusplus
7481 extern "C"
7482# endif
7483 int F77_DUMMY_MAIN() { return 1; }
7484#endif
7485int
7486main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007487{
Martin v. Löwis11437992002-04-12 09:54:03 +00007488
7489 FILE *f = fopen ("conftest.val", "w");
7490 if (! f)
7491 exit (1);
7492 if (((long) (sizeof (fpos_t))) < 0)
7493 {
7494 long i = longval ();
7495 if (i != ((long) (sizeof (fpos_t))))
7496 exit (1);
7497 fprintf (f, "%ld\n", i);
7498 }
7499 else
7500 {
7501 unsigned long i = ulongval ();
7502 if (i != ((long) (sizeof (fpos_t))))
7503 exit (1);
7504 fprintf (f, "%lu\n", i);
7505 }
7506 exit (ferror (f) || fclose (f) != 0);
7507
7508 ;
7509 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007510}
Martin v. Löwis11437992002-04-12 09:54:03 +00007511_ACEOF
7512rm -f conftest$ac_exeext
7513if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7514 (eval $ac_link) 2>&5
7515 ac_status=$?
7516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7517 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7519 (eval $ac_try) 2>&5
7520 ac_status=$?
7521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7522 (exit $ac_status); }; }; then
7523 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007524else
Martin v. Löwis11437992002-04-12 09:54:03 +00007525 echo "$as_me: program exited with status $ac_status" >&5
7526echo "$as_me: failed program was:" >&5
7527cat conftest.$ac_ext >&5
7528( exit $ac_status )
7529{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7530echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7531 { (exit 1); exit 1; }; }
7532fi
7533rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7534fi
7535fi
7536rm -f conftest.val
7537else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007538 ac_cv_sizeof_fpos_t=0
7539fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007540fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007541echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7542echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7543cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007544#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007545_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007546
Michael W. Hudson54241132001-12-07 15:38:26 +00007547
7548
Martin v. Löwis11437992002-04-12 09:54:03 +00007549echo "$as_me:$LINENO: checking for long long support" >&5
7550echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007551have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007552cat >conftest.$ac_ext <<_ACEOF
7553#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007554#include "confdefs.h"
7555
Martin v. Löwis11437992002-04-12 09:54:03 +00007556#ifdef F77_DUMMY_MAIN
7557# ifdef __cplusplus
7558 extern "C"
7559# endif
7560 int F77_DUMMY_MAIN() { return 1; }
7561#endif
7562int
7563main ()
7564{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007565long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007566 ;
7567 return 0;
7568}
7569_ACEOF
7570rm -f conftest.$ac_objext
7571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7572 (eval $ac_compile) 2>&5
7573 ac_status=$?
7574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7575 (exit $ac_status); } &&
7576 { ac_try='test -s conftest.$ac_objext'
7577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7578 (eval $ac_try) 2>&5
7579 ac_status=$?
7580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7581 (exit $ac_status); }; }; then
7582
7583
7584cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007585#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007586_ACEOF
7587
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007588 have_long_long=yes
7589
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007590else
Martin v. Löwis11437992002-04-12 09:54:03 +00007591 echo "$as_me: failed program was:" >&5
7592cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007593fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007594rm -f conftest.$ac_objext conftest.$ac_ext
7595echo "$as_me:$LINENO: result: $have_long_long" >&5
7596echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007597if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007598echo "$as_me:$LINENO: checking for long long" >&5
7599echo $ECHO_N "checking for long long... $ECHO_C" >&6
7600if test "${ac_cv_type_long_long+set}" = set; then
7601 echo $ECHO_N "(cached) $ECHO_C" >&6
7602else
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{
7616if ((long long *) 0)
7617 return 0;
7618if (sizeof (long long))
7619 return 0;
7620 ;
7621 return 0;
7622}
7623_ACEOF
7624rm -f conftest.$ac_objext
7625if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7626 (eval $ac_compile) 2>&5
7627 ac_status=$?
7628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7629 (exit $ac_status); } &&
7630 { ac_try='test -s conftest.$ac_objext'
7631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7632 (eval $ac_try) 2>&5
7633 ac_status=$?
7634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7635 (exit $ac_status); }; }; then
7636 ac_cv_type_long_long=yes
7637else
7638 echo "$as_me: failed program was:" >&5
7639cat conftest.$ac_ext >&5
7640ac_cv_type_long_long=no
7641fi
7642rm -f conftest.$ac_objext conftest.$ac_ext
7643fi
7644echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7645echo "${ECHO_T}$ac_cv_type_long_long" >&6
7646
7647echo "$as_me:$LINENO: checking size of long long" >&5
7648echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7649if test "${ac_cv_sizeof_long_long+set}" = set; then
7650 echo $ECHO_N "(cached) $ECHO_C" >&6
7651else
7652 if test "$ac_cv_type_long_long" = yes; then
7653 # The cast to unsigned long works around a bug in the HP C Compiler
7654 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7655 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7656 # This bug is HP SR number 8606223364.
7657 if test "$cross_compiling" = yes; then
7658 # Depending upon the size, compute the lo and hi bounds.
7659cat >conftest.$ac_ext <<_ACEOF
7660#line $LINENO "configure"
7661#include "confdefs.h"
7662$ac_includes_default
7663#ifdef F77_DUMMY_MAIN
7664# ifdef __cplusplus
7665 extern "C"
7666# endif
7667 int F77_DUMMY_MAIN() { return 1; }
7668#endif
7669int
7670main ()
7671{
7672static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7673test_array [0] = 0
7674
7675 ;
7676 return 0;
7677}
7678_ACEOF
7679rm -f conftest.$ac_objext
7680if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7681 (eval $ac_compile) 2>&5
7682 ac_status=$?
7683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7684 (exit $ac_status); } &&
7685 { ac_try='test -s conftest.$ac_objext'
7686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7687 (eval $ac_try) 2>&5
7688 ac_status=$?
7689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7690 (exit $ac_status); }; }; then
7691 ac_lo=0 ac_mid=0
7692 while :; do
7693 cat >conftest.$ac_ext <<_ACEOF
7694#line $LINENO "configure"
7695#include "confdefs.h"
7696$ac_includes_default
7697#ifdef F77_DUMMY_MAIN
7698# ifdef __cplusplus
7699 extern "C"
7700# endif
7701 int F77_DUMMY_MAIN() { return 1; }
7702#endif
7703int
7704main ()
7705{
7706static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7707test_array [0] = 0
7708
7709 ;
7710 return 0;
7711}
7712_ACEOF
7713rm -f conftest.$ac_objext
7714if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7715 (eval $ac_compile) 2>&5
7716 ac_status=$?
7717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7718 (exit $ac_status); } &&
7719 { ac_try='test -s conftest.$ac_objext'
7720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7721 (eval $ac_try) 2>&5
7722 ac_status=$?
7723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7724 (exit $ac_status); }; }; then
7725 ac_hi=$ac_mid; break
7726else
7727 echo "$as_me: failed program was:" >&5
7728cat conftest.$ac_ext >&5
7729ac_lo=`expr $ac_mid + 1`
7730 if test $ac_lo -le $ac_mid; then
7731 ac_lo= ac_hi=
7732 break
7733 fi
7734 ac_mid=`expr 2 '*' $ac_mid + 1`
7735fi
7736rm -f conftest.$ac_objext conftest.$ac_ext
7737 done
7738else
7739 echo "$as_me: failed program was:" >&5
7740cat conftest.$ac_ext >&5
7741cat >conftest.$ac_ext <<_ACEOF
7742#line $LINENO "configure"
7743#include "confdefs.h"
7744$ac_includes_default
7745#ifdef F77_DUMMY_MAIN
7746# ifdef __cplusplus
7747 extern "C"
7748# endif
7749 int F77_DUMMY_MAIN() { return 1; }
7750#endif
7751int
7752main ()
7753{
7754static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7755test_array [0] = 0
7756
7757 ;
7758 return 0;
7759}
7760_ACEOF
7761rm -f conftest.$ac_objext
7762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7763 (eval $ac_compile) 2>&5
7764 ac_status=$?
7765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7766 (exit $ac_status); } &&
7767 { ac_try='test -s conftest.$ac_objext'
7768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7769 (eval $ac_try) 2>&5
7770 ac_status=$?
7771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7772 (exit $ac_status); }; }; then
7773 ac_hi=-1 ac_mid=-1
7774 while :; do
7775 cat >conftest.$ac_ext <<_ACEOF
7776#line $LINENO "configure"
7777#include "confdefs.h"
7778$ac_includes_default
7779#ifdef F77_DUMMY_MAIN
7780# ifdef __cplusplus
7781 extern "C"
7782# endif
7783 int F77_DUMMY_MAIN() { return 1; }
7784#endif
7785int
7786main ()
7787{
7788static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7789test_array [0] = 0
7790
7791 ;
7792 return 0;
7793}
7794_ACEOF
7795rm -f conftest.$ac_objext
7796if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7797 (eval $ac_compile) 2>&5
7798 ac_status=$?
7799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7800 (exit $ac_status); } &&
7801 { ac_try='test -s conftest.$ac_objext'
7802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7803 (eval $ac_try) 2>&5
7804 ac_status=$?
7805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7806 (exit $ac_status); }; }; then
7807 ac_lo=$ac_mid; break
7808else
7809 echo "$as_me: failed program was:" >&5
7810cat conftest.$ac_ext >&5
7811ac_hi=`expr '(' $ac_mid ')' - 1`
7812 if test $ac_mid -le $ac_hi; then
7813 ac_lo= ac_hi=
7814 break
7815 fi
7816 ac_mid=`expr 2 '*' $ac_mid`
7817fi
7818rm -f conftest.$ac_objext conftest.$ac_ext
7819 done
7820else
7821 echo "$as_me: failed program was:" >&5
7822cat conftest.$ac_ext >&5
7823ac_lo= ac_hi=
7824fi
7825rm -f conftest.$ac_objext conftest.$ac_ext
7826fi
7827rm -f conftest.$ac_objext conftest.$ac_ext
7828# Binary search between lo and hi bounds.
7829while test "x$ac_lo" != "x$ac_hi"; do
7830 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7831 cat >conftest.$ac_ext <<_ACEOF
7832#line $LINENO "configure"
7833#include "confdefs.h"
7834$ac_includes_default
7835#ifdef F77_DUMMY_MAIN
7836# ifdef __cplusplus
7837 extern "C"
7838# endif
7839 int F77_DUMMY_MAIN() { return 1; }
7840#endif
7841int
7842main ()
7843{
7844static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7845test_array [0] = 0
7846
7847 ;
7848 return 0;
7849}
7850_ACEOF
7851rm -f conftest.$ac_objext
7852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7853 (eval $ac_compile) 2>&5
7854 ac_status=$?
7855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7856 (exit $ac_status); } &&
7857 { ac_try='test -s conftest.$ac_objext'
7858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7859 (eval $ac_try) 2>&5
7860 ac_status=$?
7861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7862 (exit $ac_status); }; }; then
7863 ac_hi=$ac_mid
7864else
7865 echo "$as_me: failed program was:" >&5
7866cat conftest.$ac_ext >&5
7867ac_lo=`expr '(' $ac_mid ')' + 1`
7868fi
7869rm -f conftest.$ac_objext conftest.$ac_ext
7870done
7871case $ac_lo in
7872?*) ac_cv_sizeof_long_long=$ac_lo;;
7873'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7874echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7875 { (exit 1); exit 1; }; } ;;
7876esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007877else
7878 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007879 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7880echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7881 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007882else
Martin v. Löwis11437992002-04-12 09:54:03 +00007883 cat >conftest.$ac_ext <<_ACEOF
7884#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007885#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007886$ac_includes_default
7887long longval () { return (long) (sizeof (long long)); }
7888unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007889#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007890#include <stdlib.h>
7891#ifdef F77_DUMMY_MAIN
7892# ifdef __cplusplus
7893 extern "C"
7894# endif
7895 int F77_DUMMY_MAIN() { return 1; }
7896#endif
7897int
7898main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007899{
Martin v. Löwis11437992002-04-12 09:54:03 +00007900
7901 FILE *f = fopen ("conftest.val", "w");
7902 if (! f)
7903 exit (1);
7904 if (((long) (sizeof (long long))) < 0)
7905 {
7906 long i = longval ();
7907 if (i != ((long) (sizeof (long long))))
7908 exit (1);
7909 fprintf (f, "%ld\n", i);
7910 }
7911 else
7912 {
7913 unsigned long i = ulongval ();
7914 if (i != ((long) (sizeof (long long))))
7915 exit (1);
7916 fprintf (f, "%lu\n", i);
7917 }
7918 exit (ferror (f) || fclose (f) != 0);
7919
7920 ;
7921 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007922}
Martin v. Löwis11437992002-04-12 09:54:03 +00007923_ACEOF
7924rm -f conftest$ac_exeext
7925if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7926 (eval $ac_link) 2>&5
7927 ac_status=$?
7928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7929 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7931 (eval $ac_try) 2>&5
7932 ac_status=$?
7933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7934 (exit $ac_status); }; }; then
7935 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007936else
Martin v. Löwis11437992002-04-12 09:54:03 +00007937 echo "$as_me: program exited with status $ac_status" >&5
7938echo "$as_me: failed program was:" >&5
7939cat conftest.$ac_ext >&5
7940( exit $ac_status )
7941{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7942echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7943 { (exit 1); exit 1; }; }
7944fi
7945rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7946fi
7947fi
7948rm -f conftest.val
7949else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007950 ac_cv_sizeof_long_long=0
7951fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007952fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007953echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
7954echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
7955cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007956#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007957_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007958
Michael W. Hudson54241132001-12-07 15:38:26 +00007959
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007960fi
7961
Martin v. Löwis11437992002-04-12 09:54:03 +00007962echo "$as_me:$LINENO: checking for uintptr_t support" >&5
7963echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007964have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007965cat >conftest.$ac_ext <<_ACEOF
7966#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007967#include "confdefs.h"
7968
Martin v. Löwis11437992002-04-12 09:54:03 +00007969#ifdef F77_DUMMY_MAIN
7970# ifdef __cplusplus
7971 extern "C"
7972# endif
7973 int F77_DUMMY_MAIN() { return 1; }
7974#endif
7975int
7976main ()
7977{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007978uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007979 ;
7980 return 0;
7981}
7982_ACEOF
7983rm -f conftest.$ac_objext
7984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7985 (eval $ac_compile) 2>&5
7986 ac_status=$?
7987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7988 (exit $ac_status); } &&
7989 { ac_try='test -s conftest.$ac_objext'
7990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7991 (eval $ac_try) 2>&5
7992 ac_status=$?
7993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7994 (exit $ac_status); }; }; then
7995
7996
7997cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007998#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007999_ACEOF
8000
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008001 have_uintptr_t=yes
8002
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008003else
Martin v. Löwis11437992002-04-12 09:54:03 +00008004 echo "$as_me: failed program was:" >&5
8005cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008006fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008007rm -f conftest.$ac_objext conftest.$ac_ext
8008echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8009echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008010if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008011echo "$as_me:$LINENO: checking for uintptr_t" >&5
8012echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8013if test "${ac_cv_type_uintptr_t+set}" = set; then
8014 echo $ECHO_N "(cached) $ECHO_C" >&6
8015else
8016 cat >conftest.$ac_ext <<_ACEOF
8017#line $LINENO "configure"
8018#include "confdefs.h"
8019$ac_includes_default
8020#ifdef F77_DUMMY_MAIN
8021# ifdef __cplusplus
8022 extern "C"
8023# endif
8024 int F77_DUMMY_MAIN() { return 1; }
8025#endif
8026int
8027main ()
8028{
8029if ((uintptr_t *) 0)
8030 return 0;
8031if (sizeof (uintptr_t))
8032 return 0;
8033 ;
8034 return 0;
8035}
8036_ACEOF
8037rm -f conftest.$ac_objext
8038if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8039 (eval $ac_compile) 2>&5
8040 ac_status=$?
8041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8042 (exit $ac_status); } &&
8043 { ac_try='test -s conftest.$ac_objext'
8044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8045 (eval $ac_try) 2>&5
8046 ac_status=$?
8047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8048 (exit $ac_status); }; }; then
8049 ac_cv_type_uintptr_t=yes
8050else
8051 echo "$as_me: failed program was:" >&5
8052cat conftest.$ac_ext >&5
8053ac_cv_type_uintptr_t=no
8054fi
8055rm -f conftest.$ac_objext conftest.$ac_ext
8056fi
8057echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8058echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8059
8060echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8061echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8062if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8063 echo $ECHO_N "(cached) $ECHO_C" >&6
8064else
8065 if test "$ac_cv_type_uintptr_t" = yes; then
8066 # The cast to unsigned long works around a bug in the HP C Compiler
8067 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8068 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8069 # This bug is HP SR number 8606223364.
8070 if test "$cross_compiling" = yes; then
8071 # Depending upon the size, compute the lo and hi bounds.
8072cat >conftest.$ac_ext <<_ACEOF
8073#line $LINENO "configure"
8074#include "confdefs.h"
8075$ac_includes_default
8076#ifdef F77_DUMMY_MAIN
8077# ifdef __cplusplus
8078 extern "C"
8079# endif
8080 int F77_DUMMY_MAIN() { return 1; }
8081#endif
8082int
8083main ()
8084{
8085static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8086test_array [0] = 0
8087
8088 ;
8089 return 0;
8090}
8091_ACEOF
8092rm -f conftest.$ac_objext
8093if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8094 (eval $ac_compile) 2>&5
8095 ac_status=$?
8096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8097 (exit $ac_status); } &&
8098 { ac_try='test -s conftest.$ac_objext'
8099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8100 (eval $ac_try) 2>&5
8101 ac_status=$?
8102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8103 (exit $ac_status); }; }; then
8104 ac_lo=0 ac_mid=0
8105 while :; do
8106 cat >conftest.$ac_ext <<_ACEOF
8107#line $LINENO "configure"
8108#include "confdefs.h"
8109$ac_includes_default
8110#ifdef F77_DUMMY_MAIN
8111# ifdef __cplusplus
8112 extern "C"
8113# endif
8114 int F77_DUMMY_MAIN() { return 1; }
8115#endif
8116int
8117main ()
8118{
8119static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8120test_array [0] = 0
8121
8122 ;
8123 return 0;
8124}
8125_ACEOF
8126rm -f conftest.$ac_objext
8127if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8128 (eval $ac_compile) 2>&5
8129 ac_status=$?
8130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8131 (exit $ac_status); } &&
8132 { ac_try='test -s conftest.$ac_objext'
8133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8134 (eval $ac_try) 2>&5
8135 ac_status=$?
8136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8137 (exit $ac_status); }; }; then
8138 ac_hi=$ac_mid; break
8139else
8140 echo "$as_me: failed program was:" >&5
8141cat conftest.$ac_ext >&5
8142ac_lo=`expr $ac_mid + 1`
8143 if test $ac_lo -le $ac_mid; then
8144 ac_lo= ac_hi=
8145 break
8146 fi
8147 ac_mid=`expr 2 '*' $ac_mid + 1`
8148fi
8149rm -f conftest.$ac_objext conftest.$ac_ext
8150 done
8151else
8152 echo "$as_me: failed program was:" >&5
8153cat conftest.$ac_ext >&5
8154cat >conftest.$ac_ext <<_ACEOF
8155#line $LINENO "configure"
8156#include "confdefs.h"
8157$ac_includes_default
8158#ifdef F77_DUMMY_MAIN
8159# ifdef __cplusplus
8160 extern "C"
8161# endif
8162 int F77_DUMMY_MAIN() { return 1; }
8163#endif
8164int
8165main ()
8166{
8167static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8168test_array [0] = 0
8169
8170 ;
8171 return 0;
8172}
8173_ACEOF
8174rm -f conftest.$ac_objext
8175if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8176 (eval $ac_compile) 2>&5
8177 ac_status=$?
8178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8179 (exit $ac_status); } &&
8180 { ac_try='test -s conftest.$ac_objext'
8181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8182 (eval $ac_try) 2>&5
8183 ac_status=$?
8184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8185 (exit $ac_status); }; }; then
8186 ac_hi=-1 ac_mid=-1
8187 while :; do
8188 cat >conftest.$ac_ext <<_ACEOF
8189#line $LINENO "configure"
8190#include "confdefs.h"
8191$ac_includes_default
8192#ifdef F77_DUMMY_MAIN
8193# ifdef __cplusplus
8194 extern "C"
8195# endif
8196 int F77_DUMMY_MAIN() { return 1; }
8197#endif
8198int
8199main ()
8200{
8201static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8202test_array [0] = 0
8203
8204 ;
8205 return 0;
8206}
8207_ACEOF
8208rm -f conftest.$ac_objext
8209if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8210 (eval $ac_compile) 2>&5
8211 ac_status=$?
8212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8213 (exit $ac_status); } &&
8214 { ac_try='test -s conftest.$ac_objext'
8215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8216 (eval $ac_try) 2>&5
8217 ac_status=$?
8218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8219 (exit $ac_status); }; }; then
8220 ac_lo=$ac_mid; break
8221else
8222 echo "$as_me: failed program was:" >&5
8223cat conftest.$ac_ext >&5
8224ac_hi=`expr '(' $ac_mid ')' - 1`
8225 if test $ac_mid -le $ac_hi; then
8226 ac_lo= ac_hi=
8227 break
8228 fi
8229 ac_mid=`expr 2 '*' $ac_mid`
8230fi
8231rm -f conftest.$ac_objext conftest.$ac_ext
8232 done
8233else
8234 echo "$as_me: failed program was:" >&5
8235cat conftest.$ac_ext >&5
8236ac_lo= ac_hi=
8237fi
8238rm -f conftest.$ac_objext conftest.$ac_ext
8239fi
8240rm -f conftest.$ac_objext conftest.$ac_ext
8241# Binary search between lo and hi bounds.
8242while test "x$ac_lo" != "x$ac_hi"; do
8243 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8244 cat >conftest.$ac_ext <<_ACEOF
8245#line $LINENO "configure"
8246#include "confdefs.h"
8247$ac_includes_default
8248#ifdef F77_DUMMY_MAIN
8249# ifdef __cplusplus
8250 extern "C"
8251# endif
8252 int F77_DUMMY_MAIN() { return 1; }
8253#endif
8254int
8255main ()
8256{
8257static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8258test_array [0] = 0
8259
8260 ;
8261 return 0;
8262}
8263_ACEOF
8264rm -f conftest.$ac_objext
8265if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8266 (eval $ac_compile) 2>&5
8267 ac_status=$?
8268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8269 (exit $ac_status); } &&
8270 { ac_try='test -s conftest.$ac_objext'
8271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8272 (eval $ac_try) 2>&5
8273 ac_status=$?
8274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8275 (exit $ac_status); }; }; then
8276 ac_hi=$ac_mid
8277else
8278 echo "$as_me: failed program was:" >&5
8279cat conftest.$ac_ext >&5
8280ac_lo=`expr '(' $ac_mid ')' + 1`
8281fi
8282rm -f conftest.$ac_objext conftest.$ac_ext
8283done
8284case $ac_lo in
8285?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8286'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8287echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8288 { (exit 1); exit 1; }; } ;;
8289esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008290else
8291 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008292 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8293echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8294 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008295else
Martin v. Löwis11437992002-04-12 09:54:03 +00008296 cat >conftest.$ac_ext <<_ACEOF
8297#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008298#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008299$ac_includes_default
8300long longval () { return (long) (sizeof (uintptr_t)); }
8301unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008302#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008303#include <stdlib.h>
8304#ifdef F77_DUMMY_MAIN
8305# ifdef __cplusplus
8306 extern "C"
8307# endif
8308 int F77_DUMMY_MAIN() { return 1; }
8309#endif
8310int
8311main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008312{
Martin v. Löwis11437992002-04-12 09:54:03 +00008313
8314 FILE *f = fopen ("conftest.val", "w");
8315 if (! f)
8316 exit (1);
8317 if (((long) (sizeof (uintptr_t))) < 0)
8318 {
8319 long i = longval ();
8320 if (i != ((long) (sizeof (uintptr_t))))
8321 exit (1);
8322 fprintf (f, "%ld\n", i);
8323 }
8324 else
8325 {
8326 unsigned long i = ulongval ();
8327 if (i != ((long) (sizeof (uintptr_t))))
8328 exit (1);
8329 fprintf (f, "%lu\n", i);
8330 }
8331 exit (ferror (f) || fclose (f) != 0);
8332
8333 ;
8334 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008335}
Martin v. Löwis11437992002-04-12 09:54:03 +00008336_ACEOF
8337rm -f conftest$ac_exeext
8338if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8339 (eval $ac_link) 2>&5
8340 ac_status=$?
8341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8342 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8344 (eval $ac_try) 2>&5
8345 ac_status=$?
8346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8347 (exit $ac_status); }; }; then
8348 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008349else
Martin v. Löwis11437992002-04-12 09:54:03 +00008350 echo "$as_me: program exited with status $ac_status" >&5
8351echo "$as_me: failed program was:" >&5
8352cat conftest.$ac_ext >&5
8353( exit $ac_status )
8354{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8355echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8356 { (exit 1); exit 1; }; }
8357fi
8358rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8359fi
8360fi
8361rm -f conftest.val
8362else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008363 ac_cv_sizeof_uintptr_t=0
8364fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008365fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008366echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8367echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8368cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008369#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008370_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008371
Michael W. Hudson54241132001-12-07 15:38:26 +00008372
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008373fi
8374
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008375# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008376echo "$as_me:$LINENO: checking size of off_t" >&5
8377echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8378if test "${ac_cv_sizeof_off_t+set}" = set; then
8379 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008380else
8381 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008382 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008383else
Martin v. Löwis11437992002-04-12 09:54:03 +00008384 cat >conftest.$ac_ext <<_ACEOF
8385#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008386#include "confdefs.h"
8387#include <stdio.h>
8388#include <sys/types.h>
8389main()
8390{
8391 FILE *f=fopen("conftestval", "w");
8392 if (!f) exit(1);
8393 fprintf(f, "%d\n", sizeof(off_t));
8394 exit(0);
8395}
Martin v. Löwis11437992002-04-12 09:54:03 +00008396_ACEOF
8397rm -f conftest$ac_exeext
8398if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8399 (eval $ac_link) 2>&5
8400 ac_status=$?
8401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8402 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8404 (eval $ac_try) 2>&5
8405 ac_status=$?
8406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8407 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008408 ac_cv_sizeof_off_t=`cat conftestval`
8409else
Martin v. Löwis11437992002-04-12 09:54:03 +00008410 echo "$as_me: program exited with status $ac_status" >&5
8411echo "$as_me: failed program was:" >&5
8412cat conftest.$ac_ext >&5
8413( exit $ac_status )
8414ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008415fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008416rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008417fi
8418
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008419fi
8420
Martin v. Löwis11437992002-04-12 09:54:03 +00008421echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8422echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8423
8424cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008425#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008426_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008427
Michael W. Hudson54241132001-12-07 15:38:26 +00008428
Martin v. Löwis11437992002-04-12 09:54:03 +00008429echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8430echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008431if test "$have_long_long" = yes -a \
8432 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8433 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008434
Martin v. Löwis11437992002-04-12 09:54:03 +00008435cat >>confdefs.h <<\_ACEOF
8436#define HAVE_LARGEFILE_SUPPORT 1
8437_ACEOF
8438
8439 echo "$as_me:$LINENO: result: yes" >&5
8440echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008441else
Martin v. Löwis11437992002-04-12 09:54:03 +00008442 echo "$as_me:$LINENO: result: no" >&5
8443echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008444fi
8445
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008446# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008447echo "$as_me:$LINENO: checking size of time_t" >&5
8448echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8449if test "${ac_cv_sizeof_time_t+set}" = set; then
8450 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008451else
8452 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008453 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008454else
Martin v. Löwis11437992002-04-12 09:54:03 +00008455 cat >conftest.$ac_ext <<_ACEOF
8456#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008457#include "confdefs.h"
8458#include <stdio.h>
8459#include <time.h>
8460main()
8461{
8462 FILE *f=fopen("conftestval", "w");
8463 if (!f) exit(1);
8464 fprintf(f, "%d\n", sizeof(time_t));
8465 exit(0);
8466}
Martin v. Löwis11437992002-04-12 09:54:03 +00008467_ACEOF
8468rm -f conftest$ac_exeext
8469if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8470 (eval $ac_link) 2>&5
8471 ac_status=$?
8472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8473 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8475 (eval $ac_try) 2>&5
8476 ac_status=$?
8477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8478 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008479 ac_cv_sizeof_time_t=`cat conftestval`
8480else
Martin v. Löwis11437992002-04-12 09:54:03 +00008481 echo "$as_me: program exited with status $ac_status" >&5
8482echo "$as_me: failed program was:" >&5
8483cat conftest.$ac_ext >&5
8484( exit $ac_status )
8485ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008486fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008487rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008488fi
8489
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008490fi
8491
Martin v. Löwis11437992002-04-12 09:54:03 +00008492echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8493echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8494
8495cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008496#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008497_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008498
Michael W. Hudson54241132001-12-07 15:38:26 +00008499
8500
Trent Mick635f6fb2000-08-23 21:33:05 +00008501# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008502ac_save_cc="$CC"
8503if test "$ac_cv_kpthread" = "yes"
8504then CC="$CC -Kpthread"
8505fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008506echo "$as_me:$LINENO: checking for pthread_t" >&5
8507echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008508have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008509cat >conftest.$ac_ext <<_ACEOF
8510#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008511#include "confdefs.h"
8512#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008513#ifdef F77_DUMMY_MAIN
8514# ifdef __cplusplus
8515 extern "C"
8516# endif
8517 int F77_DUMMY_MAIN() { return 1; }
8518#endif
8519int
8520main ()
8521{
Guido van Rossum12580492000-09-24 16:47:19 +00008522pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008523 ;
8524 return 0;
8525}
8526_ACEOF
8527rm -f conftest.$ac_objext
8528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8529 (eval $ac_compile) 2>&5
8530 ac_status=$?
8531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8532 (exit $ac_status); } &&
8533 { ac_try='test -s conftest.$ac_objext'
8534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8535 (eval $ac_try) 2>&5
8536 ac_status=$?
8537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8538 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008539 have_pthread_t=yes
8540else
Martin v. Löwis11437992002-04-12 09:54:03 +00008541 echo "$as_me: failed program was:" >&5
8542cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008543fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008544rm -f conftest.$ac_objext conftest.$ac_ext
8545echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8546echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008547if test "$have_pthread_t" = yes ; then
8548 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008549 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8550echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8551 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8552 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008553else
8554 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008555 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008556else
Martin v. Löwis11437992002-04-12 09:54:03 +00008557 cat >conftest.$ac_ext <<_ACEOF
8558#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008559#include "confdefs.h"
8560#include <stdio.h>
8561 #include <pthread.h>
8562 main()
8563 {
8564 FILE *f=fopen("conftestval", "w");
8565 if (!f) exit(1);
8566 fprintf(f, "%d\n", sizeof(pthread_t));
8567 exit(0);
8568 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008569_ACEOF
8570rm -f conftest$ac_exeext
8571if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8572 (eval $ac_link) 2>&5
8573 ac_status=$?
8574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8575 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8577 (eval $ac_try) 2>&5
8578 ac_status=$?
8579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8580 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008581 ac_cv_sizeof_pthread_t=`cat conftestval`
8582else
Martin v. Löwis11437992002-04-12 09:54:03 +00008583 echo "$as_me: program exited with status $ac_status" >&5
8584echo "$as_me: failed program was:" >&5
8585cat conftest.$ac_ext >&5
8586( exit $ac_status )
8587ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008588fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008589rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008590fi
8591
Trent Mick635f6fb2000-08-23 21:33:05 +00008592fi
8593
Martin v. Löwis11437992002-04-12 09:54:03 +00008594 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8595echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8596
8597cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008598#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008599_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008600
8601fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008602CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008603
Martin v. Löwis11437992002-04-12 09:54:03 +00008604echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8605echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008606# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8607if test "${enable_toolbox_glue+set}" = set; then
8608 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008609
Martin v. Löwis11437992002-04-12 09:54:03 +00008610fi;
Jack Jansene578a632001-08-15 01:27:14 +00008611
8612if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008613then
Jack Jansene578a632001-08-15 01:27:14 +00008614 case $ac_sys_system/$ac_sys_release in
8615 Darwin/*)
8616 enable_toolbox_glue="yes";;
8617 *)
8618 enable_toolbox_glue="no";;
8619 esac
8620fi
8621case "$enable_toolbox_glue" in
8622yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008623 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008624 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008625 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008626
8627cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008628#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008629_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008630
8631 ;;
8632*)
8633 extra_frameworks=""
8634 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008635 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008636 ;;
8637esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008638echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8639echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008640
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008641
8642case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008643 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008644 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008645 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
8646 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008647 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8648 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008649 Darwin/*)
8650 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008651 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
8652 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008653 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8654 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008655esac
8656
Martin v. Löwis11437992002-04-12 09:54:03 +00008657echo "$as_me:$LINENO: checking for --enable-framework" >&5
8658echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008659if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008660then
Jack Jansenca06bc62001-08-03 15:32:23 +00008661 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008662 # -U __environ is needed since bundles don't have access
8663 # to crt0 when built but will always be linked against it
Martin v. Löwis11437992002-04-12 09:54:03 +00008664 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008665 # in the build location.
Martin v. Löwis11437992002-04-12 09:54:03 +00008666
Jack Jansena3891ea2001-09-07 14:25:12 +00008667 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008668 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
8669 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00008670 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008671
Martin v. Löwis11437992002-04-12 09:54:03 +00008672cat >>confdefs.h <<\_ACEOF
8673#define WITH_NEXT_FRAMEWORK 1
8674_ACEOF
8675
8676 echo "$as_me:$LINENO: result: yes" >&5
8677echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008678else
Martin v. Löwis11437992002-04-12 09:54:03 +00008679 echo "$as_me:$LINENO: result: no" >&5
8680echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008681fi
8682
Martin v. Löwis11437992002-04-12 09:54:03 +00008683echo "$as_me:$LINENO: checking for dyld" >&5
8684echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008685case $ac_sys_system/$ac_sys_release in
8686 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008687
Martin v. Löwis11437992002-04-12 09:54:03 +00008688cat >>confdefs.h <<\_ACEOF
8689#define WITH_DYLD 1
8690_ACEOF
8691
8692 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8693echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008694 ;;
8695 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 echo "$as_me:$LINENO: result: no" >&5
8697echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008698 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008699esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008700
Guido van Rossum0a516c91994-09-12 10:58:40 +00008701# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008702
Michael W. Hudson54241132001-12-07 15:38:26 +00008703
8704
8705
8706
Guido van Rossum0a516c91994-09-12 10:58:40 +00008707# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008708# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008709echo "$as_me:$LINENO: checking SO" >&5
8710echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008711if test -z "$SO"
8712then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008713 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008714 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008715 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008716 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008717 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008718fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008719echo "$as_me:$LINENO: result: $SO" >&5
8720echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008721# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008722# -- "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 +00008723# (Shared libraries in this instance are shared modules to be loaded into
8724# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008725echo "$as_me:$LINENO: checking LDSHARED" >&5
8726echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008727if test -z "$LDSHARED"
8728then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008729 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008730 AIX*)
8731 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008732 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008733 ;;
8734 BeOS*)
8735 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008736 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008737 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008738 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008739 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008740 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008741 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00008742 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008743 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008744 else LDSHARED="$(CC) -G";
Greg Ward57c9a662000-05-26 12:22:54 +00008745 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008746 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008747 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8748 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008749 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008750 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8751 if test "$enable_framework" ; then
8752 # Link against the framework. All externals should be defined.
8753 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8754 else
8755 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008756 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008757 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008758 Darwin/*)
8759 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8760 if test "$enable_framework" ; then
8761 # Link against the framework. All externals should be defined.
8762 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8763 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008764 # No framework, use the Python app as bundle-loader
8765 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8766 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008767 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008768 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008769 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008770 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008771 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008772 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008773 then
8774 LDSHARED="cc -shared ${LDFLAGS}"
8775 else
8776 LDSHARED="ld -Bshareable ${LDFLAGS}"
8777 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008778 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008779 if test "$GCC" = "yes"
8780 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008781 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008782 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008783 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008784 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008785 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008786 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008787 *) LDSHARED="ld";;
8788 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008789fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008790echo "$as_me:$LINENO: result: $LDSHARED" >&5
8791echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008792BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008793# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008794# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008795echo "$as_me:$LINENO: checking CCSHARED" >&5
8796echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008797if test -z "$CCSHARED"
8798then
Guido van Rossum07397971997-04-29 21:49:50 +00008799 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008800 SunOS*) if test "$GCC" = yes;
8801 then CCSHARED="-fPIC";
8802 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008803 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008804 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008805 else CCSHARED="+z";
8806 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008807 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008808 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008809 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008810 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008811 if test "$GCC" = "yes"
8812 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008813 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008814 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008815 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008816 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008817 IRIX*/6*) case $CC in
8818 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008819 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008820 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008821 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008822 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008823 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008824fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008825echo "$as_me:$LINENO: result: $CCSHARED" >&5
8826echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008827# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008828# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008829echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8830echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008831if test -z "$LINKFORSHARED"
8832then
Guido van Rossum07397971997-04-29 21:49:50 +00008833 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008834 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008835 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008836 LINKFORSHARED="-Wl,-E -Wl,+s";;
8837# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008838 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008839 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008840 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008841 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008842 # -u __dummy makes the linker aware of the objc runtime
8843 # in System.framework; otherwise, __objcInit (referenced in
8844 # crt1.o) gets erroneously defined as common, which breaks dynamic
8845 # loading of any modules which reference it in System.framework.
8846 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8847 # not used by the core itself but which needs to be in the core so
8848 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008849 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008850 if test "$enable_framework"
8851 then
8852 LINKFORSHARED="$LINKFORSHARED -framework Python"
8853 fi
8854 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008855 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008856 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008857 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008859 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8860 then
8861 LINKFORSHARED="-Wl,--export-dynamic"
8862 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008863 SunOS/5*) case $CC in
8864 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008865 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008866 then
8867 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008868 fi;;
8869 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008870 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008871fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008872echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8873echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008874
Michael W. Hudson54241132001-12-07 15:38:26 +00008875
Martin v. Löwis11437992002-04-12 09:54:03 +00008876echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8877echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008878if test ! "$LIBRARY" = "$LDLIBRARY"
8879then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008880 case $ac_sys_system in
8881 CYGWIN*)
8882 # Cygwin needs CCSHARED when building extension DLLs
8883 # but not when building the interpreter DLL.
8884 CFLAGSFORSHARED='';;
8885 *)
8886 CFLAGSFORSHARED='$(CCSHARED)'
8887 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008888fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008889echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
8890echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008891
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008892# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8893# library (with --enable-shared).
8894# For platforms on which shared libraries are not allowed to have unresolved
8895# symbols, this must be set to $(LIBS) (expanded by make).
8896
8897echo "$as_me:$LINENO: checking SHLIBS" >&5
8898echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
8899case "$ac_sys_system" in
8900 atheos*)
8901 SHLIBS='$(LIBS)';;
8902 *)
8903 SHLIBS='';;
8904esac
8905echo "$as_me:$LINENO: result: $SHLIBS" >&5
8906echo "${ECHO_T}$SHLIBS" >&6
8907
8908
Guido van Rossum627b2d71993-12-24 10:39:16 +00008909# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00008910
8911echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8912echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8913if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8914 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008915else
Martin v. Löwis11437992002-04-12 09:54:03 +00008916 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008917LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008918cat >conftest.$ac_ext <<_ACEOF
8919#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008920#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008921
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008922/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008923#ifdef __cplusplus
8924extern "C"
8925#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008926/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008927 builtin and then its argument prototype would still apply. */
8928char dlopen ();
8929#ifdef F77_DUMMY_MAIN
8930# ifdef __cplusplus
8931 extern "C"
8932# endif
8933 int F77_DUMMY_MAIN() { return 1; }
8934#endif
8935int
8936main ()
8937{
8938dlopen ();
8939 ;
8940 return 0;
8941}
8942_ACEOF
8943rm -f conftest.$ac_objext conftest$ac_exeext
8944if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8945 (eval $ac_link) 2>&5
8946 ac_status=$?
8947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8948 (exit $ac_status); } &&
8949 { ac_try='test -s conftest$ac_exeext'
8950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8951 (eval $ac_try) 2>&5
8952 ac_status=$?
8953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8954 (exit $ac_status); }; }; then
8955 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008956else
Martin v. Löwis11437992002-04-12 09:54:03 +00008957 echo "$as_me: failed program was:" >&5
8958cat conftest.$ac_ext >&5
8959ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008960fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008961rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8962LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008963fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008964echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8965echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8966if test $ac_cv_lib_dl_dlopen = yes; then
8967 cat >>confdefs.h <<_ACEOF
8968#define HAVE_LIBDL 1
8969_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008970
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008971 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008972
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008973fi
8974 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00008975
8976echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8977echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8978if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8979 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008980else
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008982LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008983cat >conftest.$ac_ext <<_ACEOF
8984#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008985#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008986
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008987/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008988#ifdef __cplusplus
8989extern "C"
8990#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008991/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008992 builtin and then its argument prototype would still apply. */
8993char shl_load ();
8994#ifdef F77_DUMMY_MAIN
8995# ifdef __cplusplus
8996 extern "C"
8997# endif
8998 int F77_DUMMY_MAIN() { return 1; }
8999#endif
9000int
9001main ()
9002{
9003shl_load ();
9004 ;
9005 return 0;
9006}
9007_ACEOF
9008rm -f conftest.$ac_objext conftest$ac_exeext
9009if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9010 (eval $ac_link) 2>&5
9011 ac_status=$?
9012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9013 (exit $ac_status); } &&
9014 { ac_try='test -s conftest$ac_exeext'
9015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9016 (eval $ac_try) 2>&5
9017 ac_status=$?
9018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9019 (exit $ac_status); }; }; then
9020 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009021else
Martin v. Löwis11437992002-04-12 09:54:03 +00009022 echo "$as_me: failed program was:" >&5
9023cat conftest.$ac_ext >&5
9024ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009025fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009026rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9027LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009028fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009029echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9030echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9031if test $ac_cv_lib_dld_shl_load = yes; then
9032 cat >>confdefs.h <<_ACEOF
9033#define HAVE_LIBDLD 1
9034_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009035
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009036 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009038fi
9039 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009040
9041echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9042echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9043if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9044 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009045else
Martin v. Löwis11437992002-04-12 09:54:03 +00009046 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009047LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009048cat >conftest.$ac_ext <<_ACEOF
9049#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009050#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009051
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009052/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009053#ifdef __cplusplus
9054extern "C"
9055#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009056/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 builtin and then its argument prototype would still apply. */
9058char sem_init ();
9059#ifdef F77_DUMMY_MAIN
9060# ifdef __cplusplus
9061 extern "C"
9062# endif
9063 int F77_DUMMY_MAIN() { return 1; }
9064#endif
9065int
9066main ()
9067{
9068sem_init ();
9069 ;
9070 return 0;
9071}
9072_ACEOF
9073rm -f conftest.$ac_objext conftest$ac_exeext
9074if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9075 (eval $ac_link) 2>&5
9076 ac_status=$?
9077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9078 (exit $ac_status); } &&
9079 { ac_try='test -s conftest$ac_exeext'
9080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9081 (eval $ac_try) 2>&5
9082 ac_status=$?
9083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9084 (exit $ac_status); }; }; then
9085 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009086else
Martin v. Löwis11437992002-04-12 09:54:03 +00009087 echo "$as_me: failed program was:" >&5
9088cat conftest.$ac_ext >&5
9089ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009090fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009091rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9092LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009093fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009094echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9095echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9096if test $ac_cv_lib_rt_sem_init = yes; then
9097 cat >>confdefs.h <<_ACEOF
9098#define HAVE_LIBRT 1
9099_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009100
9101 LIBS="-lrt $LIBS"
9102
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009103fi
9104 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009105
9106# checks for system dependent C++ extensions support
9107case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009108 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9109echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9110 cat >conftest.$ac_ext <<_ACEOF
9111#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009112#include "confdefs.h"
9113#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009114#ifdef F77_DUMMY_MAIN
9115# ifdef __cplusplus
9116 extern "C"
9117# endif
9118 int F77_DUMMY_MAIN() { return 1; }
9119#endif
9120int
9121main ()
9122{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009123loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 ;
9125 return 0;
9126}
9127_ACEOF
9128rm -f conftest.$ac_objext conftest$ac_exeext
9129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9130 (eval $ac_link) 2>&5
9131 ac_status=$?
9132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9133 (exit $ac_status); } &&
9134 { ac_try='test -s conftest$ac_exeext'
9135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9136 (eval $ac_try) 2>&5
9137 ac_status=$?
9138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9139 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009140
Martin v. Löwis11437992002-04-12 09:54:03 +00009141cat >>confdefs.h <<\_ACEOF
9142#define AIX_GENUINE_CPLUSPLUS 1
9143_ACEOF
9144
9145 echo "$as_me:$LINENO: result: yes" >&5
9146echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009147else
Martin v. Löwis11437992002-04-12 09:54:03 +00009148 echo "$as_me: failed program was:" >&5
9149cat conftest.$ac_ext >&5
9150echo "$as_me:$LINENO: result: no" >&5
9151echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009152fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009153rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009154 *) ;;
9155esac
9156
Guido van Rossum70c7f481998-03-26 18:44:10 +00009157# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9158# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009159# BeOS' sockets are stashed in libnet.
9160case "$ac_sys_system" in
9161IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009162*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009163echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9164echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9165if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9166 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009167else
Martin v. Löwis11437992002-04-12 09:54:03 +00009168 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009169LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009170cat >conftest.$ac_ext <<_ACEOF
9171#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009172#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009173
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009174/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009175#ifdef __cplusplus
9176extern "C"
9177#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009178/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009179 builtin and then its argument prototype would still apply. */
9180char t_open ();
9181#ifdef F77_DUMMY_MAIN
9182# ifdef __cplusplus
9183 extern "C"
9184# endif
9185 int F77_DUMMY_MAIN() { return 1; }
9186#endif
9187int
9188main ()
9189{
9190t_open ();
9191 ;
9192 return 0;
9193}
9194_ACEOF
9195rm -f conftest.$ac_objext conftest$ac_exeext
9196if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9197 (eval $ac_link) 2>&5
9198 ac_status=$?
9199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9200 (exit $ac_status); } &&
9201 { ac_try='test -s conftest$ac_exeext'
9202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9203 (eval $ac_try) 2>&5
9204 ac_status=$?
9205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9206 (exit $ac_status); }; }; then
9207 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009208else
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 echo "$as_me: failed program was:" >&5
9210cat conftest.$ac_ext >&5
9211ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009212fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009213rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9214LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009215fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009216echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9217echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9218if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009219 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009220fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009221 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009222echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9223echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9224if test "${ac_cv_lib_socket_socket+set}" = set; then
9225 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009226else
Martin v. Löwis11437992002-04-12 09:54:03 +00009227 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009228LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009229cat >conftest.$ac_ext <<_ACEOF
9230#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009231#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009232
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009233/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009234#ifdef __cplusplus
9235extern "C"
9236#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009237/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 builtin and then its argument prototype would still apply. */
9239char socket ();
9240#ifdef F77_DUMMY_MAIN
9241# ifdef __cplusplus
9242 extern "C"
9243# endif
9244 int F77_DUMMY_MAIN() { return 1; }
9245#endif
9246int
9247main ()
9248{
9249socket ();
9250 ;
9251 return 0;
9252}
9253_ACEOF
9254rm -f conftest.$ac_objext conftest$ac_exeext
9255if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9256 (eval $ac_link) 2>&5
9257 ac_status=$?
9258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9259 (exit $ac_status); } &&
9260 { ac_try='test -s conftest$ac_exeext'
9261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9262 (eval $ac_try) 2>&5
9263 ac_status=$?
9264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9265 (exit $ac_status); }; }; then
9266 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009267else
Martin v. Löwis11437992002-04-12 09:54:03 +00009268 echo "$as_me: failed program was:" >&5
9269cat conftest.$ac_ext >&5
9270ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009271fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009272rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9273LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009274fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009275echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9276echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9277if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009278 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009279fi
9280 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009281;;
9282esac
9283case "$ac_sys_system" in
9284BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009285echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9286echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9287if test "${ac_cv_lib_net_socket+set}" = set; then
9288 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009289else
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009291LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009292cat >conftest.$ac_ext <<_ACEOF
9293#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009294#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009295
Guido van Rossumad678af1998-10-02 14:42:15 +00009296/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009297#ifdef __cplusplus
9298extern "C"
9299#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009300/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009301 builtin and then its argument prototype would still apply. */
9302char socket ();
9303#ifdef F77_DUMMY_MAIN
9304# ifdef __cplusplus
9305 extern "C"
9306# endif
9307 int F77_DUMMY_MAIN() { return 1; }
9308#endif
9309int
9310main ()
9311{
9312socket ();
9313 ;
9314 return 0;
9315}
9316_ACEOF
9317rm -f conftest.$ac_objext conftest$ac_exeext
9318if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9319 (eval $ac_link) 2>&5
9320 ac_status=$?
9321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9322 (exit $ac_status); } &&
9323 { ac_try='test -s conftest$ac_exeext'
9324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9325 (eval $ac_try) 2>&5
9326 ac_status=$?
9327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9328 (exit $ac_status); }; }; then
9329 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009330else
Martin v. Löwis11437992002-04-12 09:54:03 +00009331 echo "$as_me: failed program was:" >&5
9332cat conftest.$ac_ext >&5
9333ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009334fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009335rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9336LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009337fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009338echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9339echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9340if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009341 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009342fi
9343 # BeOS
9344;;
9345esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009346
Martin v. Löwis11437992002-04-12 09:54:03 +00009347echo "$as_me:$LINENO: checking for --with-libs" >&5
9348echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9349
Guido van Rossuma68acba1996-07-31 17:36:39 +00009350# Check whether --with-libs or --without-libs was given.
9351if test "${with_libs+set}" = set; then
9352 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009353
9354echo "$as_me:$LINENO: result: $withval" >&5
9355echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009356LIBS="$withval $LIBS"
9357
9358else
Martin v. Löwis11437992002-04-12 09:54:03 +00009359 echo "$as_me:$LINENO: result: no" >&5
9360echo "${ECHO_T}no" >&6
9361fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009362
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009363# Determine if signalmodule should be used.
9364
9365
Martin v. Löwis11437992002-04-12 09:54:03 +00009366echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9367echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9368
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009369# Check whether --with-signal-module or --without-signal-module was given.
9370if test "${with_signal_module+set}" = set; then
9371 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009372
Martin v. Löwis11437992002-04-12 09:54:03 +00009373fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009374
9375if test -z "$with_signal_module"
9376then with_signal_module="yes"
9377fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009378echo "$as_me:$LINENO: result: $with_signal_module" >&5
9379echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009380
9381if test "${with_signal_module}" = "yes"; then
9382 USE_SIGNAL_MODULE=""
9383 SIGNAL_OBJS=""
9384else
9385 USE_SIGNAL_MODULE="#"
9386 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9387fi
9388
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009389# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009390
Barry Warsawc0d24d82000-06-29 16:12:00 +00009391USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009392
Martin v. Löwis11437992002-04-12 09:54:03 +00009393echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9394echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9395
Guido van Rossumec2f0731997-01-22 20:54:01 +00009396
9397# Check whether --with-dec-threads or --without-dec-threads was given.
9398if test "${with_dec_threads+set}" = set; then
9399 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009400
9401echo "$as_me:$LINENO: result: $withval" >&5
9402echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009403LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009404if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009405 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009406fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009407else
Martin v. Löwis11437992002-04-12 09:54:03 +00009408 echo "$as_me:$LINENO: result: no" >&5
9409echo "${ECHO_T}no" >&6
9410fi;
9411
9412# Templates for things AC_DEFINEd more than once.
9413# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009414
9415
Martin v. Löwis11437992002-04-12 09:54:03 +00009416
9417
9418
9419
9420
9421echo "$as_me:$LINENO: checking for --with-threads" >&5
9422echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9423
Guido van Rossumec2f0731997-01-22 20:54:01 +00009424# Check whether --with-threads or --without-threads was given.
9425if test "${with_threads+set}" = set; then
9426 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009427
Martin v. Löwis11437992002-04-12 09:54:03 +00009428fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009429
Barry Warsawc0d24d82000-06-29 16:12:00 +00009430# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009431
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009432# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009433if test "${with_thread+set}" = set; then
9434 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009435
Martin v. Löwis11437992002-04-12 09:54:03 +00009436with_threads=$with_thread
9437fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +00009438
9439if test -z "$with_threads"
9440then with_threads="yes"
9441fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009442echo "$as_me:$LINENO: result: $with_threads" >&5
9443echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +00009444
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009445
Barry Warsawc0d24d82000-06-29 16:12:00 +00009446if test "$with_threads" = "no"
9447then
9448 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009449elif test "$ac_cv_pthread_is_default" = yes
9450then
Martin v. Löwis11437992002-04-12 09:54:03 +00009451 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009452#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009453_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009454
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009455 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009456 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009457#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009458_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009459
9460 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009461 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009462elif test "$ac_cv_kpthread" = "yes"
9463then
9464 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009465 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009466#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009467_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009468
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009469 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009470 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009471else
9472 if test ! -z "$with_threads" -a -d "$with_threads"
9473 then LDFLAGS="$LDFLAGS -L$with_threads"
9474 fi
9475 if test ! -z "$withval" -a -d "$withval"
9476 then LDFLAGS="$LDFLAGS -L$withval"
9477 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009478
9479 # According to the POSIX spec, a pthreads implementation must
9480 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9482echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9483 cat >conftest.$ac_ext <<_ACEOF
9484#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009485#include "confdefs.h"
9486#include <unistd.h>
9487 #ifdef _POSIX_THREADS
9488 yes
9489 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009490
9491_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9493 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009494 unistd_defines_pthreads=yes
9495else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009496 unistd_defines_pthreads=no
9497fi
9498rm -f conftest*
9499
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9501echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009502
Martin v. Löwis11437992002-04-12 09:54:03 +00009503 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009504#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009505_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009506
Martin v. Löwis11437992002-04-12 09:54:03 +00009507 if test "${ac_cv_header_cthreads_h+set}" = set; then
9508 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9509echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9510if test "${ac_cv_header_cthreads_h+set}" = set; then
9511 echo $ECHO_N "(cached) $ECHO_C" >&6
9512fi
9513echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9514echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009515else
Martin v. Löwis11437992002-04-12 09:54:03 +00009516 # Is the header compilable?
9517echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9518echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9519cat >conftest.$ac_ext <<_ACEOF
9520#line $LINENO "configure"
9521#include "confdefs.h"
9522$ac_includes_default
9523#include <cthreads.h>
9524_ACEOF
9525rm -f conftest.$ac_objext
9526if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9527 (eval $ac_compile) 2>&5
9528 ac_status=$?
9529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9530 (exit $ac_status); } &&
9531 { ac_try='test -s conftest.$ac_objext'
9532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9533 (eval $ac_try) 2>&5
9534 ac_status=$?
9535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9536 (exit $ac_status); }; }; then
9537 ac_header_compiler=yes
9538else
9539 echo "$as_me: failed program was:" >&5
9540cat conftest.$ac_ext >&5
9541ac_header_compiler=no
9542fi
9543rm -f conftest.$ac_objext conftest.$ac_ext
9544echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9545echo "${ECHO_T}$ac_header_compiler" >&6
9546
9547# Is the header present?
9548echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9549echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9550cat >conftest.$ac_ext <<_ACEOF
9551#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009552#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009553#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009554_ACEOF
9555if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9556 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9557 ac_status=$?
9558 egrep -v '^ *\+' conftest.er1 >conftest.err
9559 rm -f conftest.er1
9560 cat conftest.err >&5
9561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9562 (exit $ac_status); } >/dev/null; then
9563 if test -s conftest.err; then
9564 ac_cpp_err=$ac_c_preproc_warn_flag
9565 else
9566 ac_cpp_err=
9567 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009568else
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ac_cpp_err=yes
9570fi
9571if test -z "$ac_cpp_err"; then
9572 ac_header_preproc=yes
9573else
9574 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009575 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009577fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009578rm -f conftest.err conftest.$ac_ext
9579echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9580echo "${ECHO_T}$ac_header_preproc" >&6
9581
9582# So? What about this header?
9583case $ac_header_compiler:$ac_header_preproc in
9584 yes:no )
9585 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9586echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9587 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9588echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9589 no:yes )
9590 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9591echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9592 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9593echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9594 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9595echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9596esac
9597echo "$as_me:$LINENO: checking for cthreads.h" >&5
9598echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9599if test "${ac_cv_header_cthreads_h+set}" = set; then
9600 echo $ECHO_N "(cached) $ECHO_C" >&6
9601else
9602 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009603fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009604echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9605echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9606
9607fi
9608if test $ac_cv_header_cthreads_h = yes; then
9609 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009610#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009611_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009612
Martin v. Löwis11437992002-04-12 09:54:03 +00009613 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009614#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009615_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009616
Martin v. Löwis11437992002-04-12 09:54:03 +00009617
9618cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009619#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009620_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009621
9622 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009623 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009624else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009625
Martin v. Löwis11437992002-04-12 09:54:03 +00009626 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9627 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9628echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9629if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9630 echo $ECHO_N "(cached) $ECHO_C" >&6
9631fi
9632echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9633echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009634else
Martin v. Löwis11437992002-04-12 09:54:03 +00009635 # Is the header compilable?
9636echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9637echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9638cat >conftest.$ac_ext <<_ACEOF
9639#line $LINENO "configure"
9640#include "confdefs.h"
9641$ac_includes_default
9642#include <mach/cthreads.h>
9643_ACEOF
9644rm -f conftest.$ac_objext
9645if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9646 (eval $ac_compile) 2>&5
9647 ac_status=$?
9648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9649 (exit $ac_status); } &&
9650 { ac_try='test -s conftest.$ac_objext'
9651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9652 (eval $ac_try) 2>&5
9653 ac_status=$?
9654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9655 (exit $ac_status); }; }; then
9656 ac_header_compiler=yes
9657else
9658 echo "$as_me: failed program was:" >&5
9659cat conftest.$ac_ext >&5
9660ac_header_compiler=no
9661fi
9662rm -f conftest.$ac_objext conftest.$ac_ext
9663echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9664echo "${ECHO_T}$ac_header_compiler" >&6
9665
9666# Is the header present?
9667echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9668echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9669cat >conftest.$ac_ext <<_ACEOF
9670#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009671#include "confdefs.h"
9672#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009673_ACEOF
9674if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9675 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9676 ac_status=$?
9677 egrep -v '^ *\+' conftest.er1 >conftest.err
9678 rm -f conftest.er1
9679 cat conftest.err >&5
9680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9681 (exit $ac_status); } >/dev/null; then
9682 if test -s conftest.err; then
9683 ac_cpp_err=$ac_c_preproc_warn_flag
9684 else
9685 ac_cpp_err=
9686 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009687else
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 ac_cpp_err=yes
9689fi
9690if test -z "$ac_cpp_err"; then
9691 ac_header_preproc=yes
9692else
9693 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009694 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009696fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009697rm -f conftest.err conftest.$ac_ext
9698echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9699echo "${ECHO_T}$ac_header_preproc" >&6
9700
9701# So? What about this header?
9702case $ac_header_compiler:$ac_header_preproc in
9703 yes:no )
9704 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9705echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9706 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9707echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9708 no:yes )
9709 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9710echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9711 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9712echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9713 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9714echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9715esac
9716echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9717echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9718if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9719 echo $ECHO_N "(cached) $ECHO_C" >&6
9720else
9721 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009722fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009723echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9724echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9725
9726fi
9727if test $ac_cv_header_mach_cthreads_h = yes; then
9728 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009729#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009730_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009731
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009733#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009734_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009735
Martin v. Löwis11437992002-04-12 09:54:03 +00009736
9737cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009738#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009739_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009740
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009741 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009742else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009743
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 echo "$as_me:$LINENO: checking for --with-pth" >&5
9745echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9746
9747# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009748if test "${with_pth+set}" = set; then
9749 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009750
Martin v. Löwis11437992002-04-12 09:54:03 +00009751 echo "$as_me:$LINENO: result: $withval" >&5
9752echo "${ECHO_T}$withval" >&6
9753 cat >>confdefs.h <<\_ACEOF
9754#define WITH_THREAD 1
9755_ACEOF
9756
9757
9758cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009759#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009760_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009761
Martin v. Löwis130fb172001-07-19 11:00:41 +00009762 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009763 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009764else
Martin v. Löwis11437992002-04-12 09:54:03 +00009765
9766 echo "$as_me:$LINENO: result: no" >&5
9767echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009768
9769 # Just looking for pthread_create in libpthread is not enough:
9770 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9771 # So we really have to include pthread.h, and then link.
9772 _libs=$LIBS
9773 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009774 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9775echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9776 cat >conftest.$ac_ext <<_ACEOF
9777#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009778#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009779#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009780
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009781void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009782#ifdef F77_DUMMY_MAIN
9783# ifdef __cplusplus
9784 extern "C"
9785# endif
9786 int F77_DUMMY_MAIN() { return 1; }
9787#endif
9788int
9789main ()
9790{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009791
9792pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 ;
9794 return 0;
9795}
9796_ACEOF
9797rm -f conftest.$ac_objext conftest$ac_exeext
9798if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9799 (eval $ac_link) 2>&5
9800 ac_status=$?
9801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9802 (exit $ac_status); } &&
9803 { ac_try='test -s conftest$ac_exeext'
9804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9805 (eval $ac_try) 2>&5
9806 ac_status=$?
9807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9808 (exit $ac_status); }; }; then
9809
9810 echo "$as_me:$LINENO: result: yes" >&5
9811echo "${ECHO_T}yes" >&6
9812 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009813#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009814_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009815
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009816 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009817 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009818else
Martin v. Löwis11437992002-04-12 09:54:03 +00009819 echo "$as_me: failed program was:" >&5
9820cat conftest.$ac_ext >&5
9821
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009822 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009823 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9824echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9825if test "${ac_cv_func_pthread_detach+set}" = set; then
9826 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009827else
Martin v. Löwis11437992002-04-12 09:54:03 +00009828 cat >conftest.$ac_ext <<_ACEOF
9829#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009830#include "confdefs.h"
9831/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009832 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009833#include <assert.h>
9834/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009835#ifdef __cplusplus
9836extern "C"
9837#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009838/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009839 builtin and then its argument prototype would still apply. */
9840char pthread_detach ();
9841char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009842
Martin v. Löwis11437992002-04-12 09:54:03 +00009843#ifdef F77_DUMMY_MAIN
9844# ifdef __cplusplus
9845 extern "C"
9846# endif
9847 int F77_DUMMY_MAIN() { return 1; }
9848#endif
9849int
9850main ()
9851{
Guido van Rossumad678af1998-10-02 14:42:15 +00009852/* The GNU C library defines this for functions which it implements
9853 to always fail with ENOSYS. Some functions are actually named
9854 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009855#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009856choke me
9857#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009858f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009859#endif
9860
Martin v. Löwis11437992002-04-12 09:54:03 +00009861 ;
9862 return 0;
9863}
9864_ACEOF
9865rm -f conftest.$ac_objext conftest$ac_exeext
9866if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9867 (eval $ac_link) 2>&5
9868 ac_status=$?
9869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9870 (exit $ac_status); } &&
9871 { ac_try='test -s conftest$ac_exeext'
9872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9873 (eval $ac_try) 2>&5
9874 ac_status=$?
9875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9876 (exit $ac_status); }; }; then
9877 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009878else
Martin v. Löwis11437992002-04-12 09:54:03 +00009879 echo "$as_me: failed program was:" >&5
9880cat conftest.$ac_ext >&5
9881ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009882fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009883rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009884fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009885echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9886echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9887if test $ac_cv_func_pthread_detach = yes; then
9888 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009889#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009890_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009891
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009892 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009893 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009894else
Guido van Rossumad678af1998-10-02 14:42:15 +00009895
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009896 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9897 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9898echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9899if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9900 echo $ECHO_N "(cached) $ECHO_C" >&6
9901fi
9902echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
9903echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
9904else
9905 # Is the header compilable?
9906echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
9907echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
9908cat >conftest.$ac_ext <<_ACEOF
9909#line $LINENO "configure"
9910#include "confdefs.h"
9911$ac_includes_default
9912#include <atheos/threads.h>
9913_ACEOF
9914rm -f conftest.$ac_objext
9915if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9916 (eval $ac_compile) 2>&5
9917 ac_status=$?
9918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9919 (exit $ac_status); } &&
9920 { ac_try='test -s conftest.$ac_objext'
9921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9922 (eval $ac_try) 2>&5
9923 ac_status=$?
9924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9925 (exit $ac_status); }; }; then
9926 ac_header_compiler=yes
9927else
9928 echo "$as_me: failed program was:" >&5
9929cat conftest.$ac_ext >&5
9930ac_header_compiler=no
9931fi
9932rm -f conftest.$ac_objext conftest.$ac_ext
9933echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9934echo "${ECHO_T}$ac_header_compiler" >&6
9935
9936# Is the header present?
9937echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
9938echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
9939cat >conftest.$ac_ext <<_ACEOF
9940#line $LINENO "configure"
9941#include "confdefs.h"
9942#include <atheos/threads.h>
9943_ACEOF
9944if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9945 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9946 ac_status=$?
9947 egrep -v '^ *\+' conftest.er1 >conftest.err
9948 rm -f conftest.er1
9949 cat conftest.err >&5
9950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9951 (exit $ac_status); } >/dev/null; then
9952 if test -s conftest.err; then
9953 ac_cpp_err=$ac_c_preproc_warn_flag
9954 else
9955 ac_cpp_err=
9956 fi
9957else
9958 ac_cpp_err=yes
9959fi
9960if test -z "$ac_cpp_err"; then
9961 ac_header_preproc=yes
9962else
9963 echo "$as_me: failed program was:" >&5
9964 cat conftest.$ac_ext >&5
9965 ac_header_preproc=no
9966fi
9967rm -f conftest.err conftest.$ac_ext
9968echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9969echo "${ECHO_T}$ac_header_preproc" >&6
9970
9971# So? What about this header?
9972case $ac_header_compiler:$ac_header_preproc in
9973 yes:no )
9974 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9975echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9976 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9977echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9978 no:yes )
9979 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
9980echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
9981 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
9982echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
9983 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9984echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9985esac
9986echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9987echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9988if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9989 echo $ECHO_N "(cached) $ECHO_C" >&6
9990else
9991 ac_cv_header_atheos_threads_h=$ac_header_preproc
9992fi
9993echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
9994echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
9995
9996fi
9997if test $ac_cv_header_atheos_threads_h = yes; then
9998 cat >>confdefs.h <<\_ACEOF
9999#define WITH_THREAD 1
10000_ACEOF
10001
10002
10003cat >>confdefs.h <<\_ACEOF
10004#define ATHEOS_THREADS 1
10005_ACEOF
10006
10007 THREADOBJ="Python/thread.o"
10008else
10009
Martin v. Löwis11437992002-04-12 09:54:03 +000010010 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10011 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10012echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10013if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10014 echo $ECHO_N "(cached) $ECHO_C" >&6
10015fi
10016echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10017echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010018else
Martin v. Löwis11437992002-04-12 09:54:03 +000010019 # Is the header compilable?
10020echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10021echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10022cat >conftest.$ac_ext <<_ACEOF
10023#line $LINENO "configure"
10024#include "confdefs.h"
10025$ac_includes_default
10026#include <kernel/OS.h>
10027_ACEOF
10028rm -f conftest.$ac_objext
10029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10030 (eval $ac_compile) 2>&5
10031 ac_status=$?
10032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10033 (exit $ac_status); } &&
10034 { ac_try='test -s conftest.$ac_objext'
10035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10036 (eval $ac_try) 2>&5
10037 ac_status=$?
10038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10039 (exit $ac_status); }; }; then
10040 ac_header_compiler=yes
10041else
10042 echo "$as_me: failed program was:" >&5
10043cat conftest.$ac_ext >&5
10044ac_header_compiler=no
10045fi
10046rm -f conftest.$ac_objext conftest.$ac_ext
10047echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10048echo "${ECHO_T}$ac_header_compiler" >&6
10049
10050# Is the header present?
10051echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10052echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10053cat >conftest.$ac_ext <<_ACEOF
10054#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010055#include "confdefs.h"
10056#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010057_ACEOF
10058if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10059 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10060 ac_status=$?
10061 egrep -v '^ *\+' conftest.er1 >conftest.err
10062 rm -f conftest.er1
10063 cat conftest.err >&5
10064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10065 (exit $ac_status); } >/dev/null; then
10066 if test -s conftest.err; then
10067 ac_cpp_err=$ac_c_preproc_warn_flag
10068 else
10069 ac_cpp_err=
10070 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010071else
Martin v. Löwis11437992002-04-12 09:54:03 +000010072 ac_cpp_err=yes
10073fi
10074if test -z "$ac_cpp_err"; then
10075 ac_header_preproc=yes
10076else
10077 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010078 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010079 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010080fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010081rm -f conftest.err conftest.$ac_ext
10082echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10083echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010084
Martin v. Löwis11437992002-04-12 09:54:03 +000010085# So? What about this header?
10086case $ac_header_compiler:$ac_header_preproc in
10087 yes:no )
10088 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10089echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10090 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10091echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10092 no:yes )
10093 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10094echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10095 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10096echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10097 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10098echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10099esac
10100echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10101echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10102if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10103 echo $ECHO_N "(cached) $ECHO_C" >&6
10104else
10105 ac_cv_header_kernel_OS_h=$ac_header_preproc
10106fi
10107echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10108echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10109
10110fi
10111if test $ac_cv_header_kernel_OS_h = yes; then
10112 cat >>confdefs.h <<\_ACEOF
10113#define WITH_THREAD 1
10114_ACEOF
10115
10116
10117cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010118#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010119_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010120
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010121 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010122else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010123
Martin v. Löwis11437992002-04-12 09:54:03 +000010124 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10125echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10126if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10127 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010128else
Martin v. Löwis11437992002-04-12 09:54:03 +000010129 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010130LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010131cat >conftest.$ac_ext <<_ACEOF
10132#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010133#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010134
Greg Steinadf63d62000-07-05 10:38:09 +000010135/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010136#ifdef __cplusplus
10137extern "C"
10138#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010139/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010140 builtin and then its argument prototype would still apply. */
10141char pthread_create ();
10142#ifdef F77_DUMMY_MAIN
10143# ifdef __cplusplus
10144 extern "C"
10145# endif
10146 int F77_DUMMY_MAIN() { return 1; }
10147#endif
10148int
10149main ()
10150{
10151pthread_create ();
10152 ;
10153 return 0;
10154}
10155_ACEOF
10156rm -f conftest.$ac_objext conftest$ac_exeext
10157if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10158 (eval $ac_link) 2>&5
10159 ac_status=$?
10160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10161 (exit $ac_status); } &&
10162 { ac_try='test -s conftest$ac_exeext'
10163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10164 (eval $ac_try) 2>&5
10165 ac_status=$?
10166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10167 (exit $ac_status); }; }; then
10168 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010169else
Martin v. Löwis11437992002-04-12 09:54:03 +000010170 echo "$as_me: failed program was:" >&5
10171cat conftest.$ac_ext >&5
10172ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010173fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010174rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10175LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010176fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010177echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10178echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10179if test $ac_cv_lib_pthreads_pthread_create = yes; then
10180 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010181#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010182_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010183
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010184 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010185 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010186 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010187else
Greg Steinadf63d62000-07-05 10:38:09 +000010188
Martin v. Löwis11437992002-04-12 09:54:03 +000010189 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10190echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10191if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10192 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010193else
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010195LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010196cat >conftest.$ac_ext <<_ACEOF
10197#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010198#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010199
Guido van Rossum49545951997-12-02 19:28:29 +000010200/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010201#ifdef __cplusplus
10202extern "C"
10203#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010204/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010205 builtin and then its argument prototype would still apply. */
10206char pthread_create ();
10207#ifdef F77_DUMMY_MAIN
10208# ifdef __cplusplus
10209 extern "C"
10210# endif
10211 int F77_DUMMY_MAIN() { return 1; }
10212#endif
10213int
10214main ()
10215{
10216pthread_create ();
10217 ;
10218 return 0;
10219}
10220_ACEOF
10221rm -f conftest.$ac_objext conftest$ac_exeext
10222if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10223 (eval $ac_link) 2>&5
10224 ac_status=$?
10225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10226 (exit $ac_status); } &&
10227 { ac_try='test -s conftest$ac_exeext'
10228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10229 (eval $ac_try) 2>&5
10230 ac_status=$?
10231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10232 (exit $ac_status); }; }; then
10233 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010234else
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 echo "$as_me: failed program was:" >&5
10236cat conftest.$ac_ext >&5
10237ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010238fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010239rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10240LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010241fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010242echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10243echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10244if test $ac_cv_lib_c_r_pthread_create = yes; then
10245 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010246#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010247_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010248
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010249 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010250 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010251 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010252else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010253
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10255echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10256if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10257 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010258else
Martin v. Löwis11437992002-04-12 09:54:03 +000010259 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010260LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010261cat >conftest.$ac_ext <<_ACEOF
10262#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010263#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010264
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010265/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010266#ifdef __cplusplus
10267extern "C"
10268#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010269/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010270 builtin and then its argument prototype would still apply. */
10271char __d6_pthread_create ();
10272#ifdef F77_DUMMY_MAIN
10273# ifdef __cplusplus
10274 extern "C"
10275# endif
10276 int F77_DUMMY_MAIN() { return 1; }
10277#endif
10278int
10279main ()
10280{
10281__d6_pthread_create ();
10282 ;
10283 return 0;
10284}
10285_ACEOF
10286rm -f conftest.$ac_objext conftest$ac_exeext
10287if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10288 (eval $ac_link) 2>&5
10289 ac_status=$?
10290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10291 (exit $ac_status); } &&
10292 { ac_try='test -s conftest$ac_exeext'
10293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10294 (eval $ac_try) 2>&5
10295 ac_status=$?
10296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10297 (exit $ac_status); }; }; then
10298 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010299else
Martin v. Löwis11437992002-04-12 09:54:03 +000010300 echo "$as_me: failed program was:" >&5
10301cat conftest.$ac_ext >&5
10302ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010303fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010304rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10305LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010306fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010307echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10308echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10309if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10310 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010311#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010312_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010313
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010314 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010315 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010316 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010317else
Guido van Rossum49545951997-12-02 19:28:29 +000010318
Martin v. Löwis11437992002-04-12 09:54:03 +000010319 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10320echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10321if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010323else
Martin v. Löwis11437992002-04-12 09:54:03 +000010324 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010325LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010326cat >conftest.$ac_ext <<_ACEOF
10327#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010328#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010329
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010330/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010331#ifdef __cplusplus
10332extern "C"
10333#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010334/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010335 builtin and then its argument prototype would still apply. */
10336char __pthread_create_system ();
10337#ifdef F77_DUMMY_MAIN
10338# ifdef __cplusplus
10339 extern "C"
10340# endif
10341 int F77_DUMMY_MAIN() { return 1; }
10342#endif
10343int
10344main ()
10345{
10346__pthread_create_system ();
10347 ;
10348 return 0;
10349}
10350_ACEOF
10351rm -f conftest.$ac_objext conftest$ac_exeext
10352if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10353 (eval $ac_link) 2>&5
10354 ac_status=$?
10355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10356 (exit $ac_status); } &&
10357 { ac_try='test -s conftest$ac_exeext'
10358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10359 (eval $ac_try) 2>&5
10360 ac_status=$?
10361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10362 (exit $ac_status); }; }; then
10363 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010364else
Martin v. Löwis11437992002-04-12 09:54:03 +000010365 echo "$as_me: failed program was:" >&5
10366cat conftest.$ac_ext >&5
10367ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010368fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010369rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10370LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010371fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010372echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10373echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10374if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10375 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010376#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010377_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010378
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010379 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010380 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010381 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010382else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010383
Martin v. Löwis11437992002-04-12 09:54:03 +000010384 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10385echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10386if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10387 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010388else
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010390LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010391cat >conftest.$ac_ext <<_ACEOF
10392#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010393#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010394
Guido van Rossumb93a8621998-05-07 13:27:32 +000010395/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010396#ifdef __cplusplus
10397extern "C"
10398#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010399/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010400 builtin and then its argument prototype would still apply. */
10401char pthread_create ();
10402#ifdef F77_DUMMY_MAIN
10403# ifdef __cplusplus
10404 extern "C"
10405# endif
10406 int F77_DUMMY_MAIN() { return 1; }
10407#endif
10408int
10409main ()
10410{
10411pthread_create ();
10412 ;
10413 return 0;
10414}
10415_ACEOF
10416rm -f conftest.$ac_objext conftest$ac_exeext
10417if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10418 (eval $ac_link) 2>&5
10419 ac_status=$?
10420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10421 (exit $ac_status); } &&
10422 { ac_try='test -s conftest$ac_exeext'
10423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10424 (eval $ac_try) 2>&5
10425 ac_status=$?
10426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10427 (exit $ac_status); }; }; then
10428 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010429else
Martin v. Löwis11437992002-04-12 09:54:03 +000010430 echo "$as_me: failed program was:" >&5
10431cat conftest.$ac_ext >&5
10432ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010433fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010434rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10435LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010436fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010437echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10438echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10439if test $ac_cv_lib_cma_pthread_create = yes; then
10440 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010441#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010442_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010443
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010444 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010445 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010446 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010447else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010448
Martin v. Löwis130fb172001-07-19 11:00:41 +000010449 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010450fi
10451
Guido van Rossum627b2d71993-12-24 10:39:16 +000010452
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010453fi
10454
Guido van Rossum0be3e491997-05-22 20:33:33 +000010455fi
10456
Guido van Rossum49545951997-12-02 19:28:29 +000010457fi
10458
Guido van Rossumb93a8621998-05-07 13:27:32 +000010459fi
10460
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010461fi
10462
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010463
Michael W. Hudson54241132001-12-07 15:38:26 +000010464fi
10465
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010466
10467fi
10468
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010469fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010470rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10471fi;
10472fi
10473
10474
10475fi
10476
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010477
Michael W. Hudson54241132001-12-07 15:38:26 +000010478
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010479 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010480 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010481
10482cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010483#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010484_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010485
10486 fi
10487
Martin v. Löwis11437992002-04-12 09:54:03 +000010488 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10489echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10490 if test "${ac_cv_pthread_system_supported+set}" = set; then
10491 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010492else
10493 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010494 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010495else
Martin v. Löwis11437992002-04-12 09:54:03 +000010496 cat >conftest.$ac_ext <<_ACEOF
10497#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010498#include "confdefs.h"
10499#include <pthread.h>
10500 void *foo(void *parm) {
10501 return NULL;
10502 }
10503 main() {
10504 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010505 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010506 if (pthread_attr_init(&attr)) exit(-1);
10507 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010508 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010509 exit(0);
10510 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010511_ACEOF
10512rm -f conftest$ac_exeext
10513if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10514 (eval $ac_link) 2>&5
10515 ac_status=$?
10516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10517 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10519 (eval $ac_try) 2>&5
10520 ac_status=$?
10521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10522 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010523 ac_cv_pthread_system_supported=yes
10524else
Martin v. Löwis11437992002-04-12 09:54:03 +000010525 echo "$as_me: program exited with status $ac_status" >&5
10526echo "$as_me: failed program was:" >&5
10527cat conftest.$ac_ext >&5
10528( exit $ac_status )
10529ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010530fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010531rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010532fi
10533
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010534fi
10535
Martin v. Löwis11437992002-04-12 09:54:03 +000010536 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10537echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010538 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010539
10540cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010541#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010542_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010543
10544 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010545
10546for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010547do
Martin v. Löwis11437992002-04-12 09:54:03 +000010548as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10549echo "$as_me:$LINENO: checking for $ac_func" >&5
10550echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10551if eval "test \"\${$as_ac_var+set}\" = set"; then
10552 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010553else
Martin v. Löwis11437992002-04-12 09:54:03 +000010554 cat >conftest.$ac_ext <<_ACEOF
10555#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010556#include "confdefs.h"
10557/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010558 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010559#include <assert.h>
10560/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010561#ifdef __cplusplus
10562extern "C"
10563#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010564/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010565 builtin and then its argument prototype would still apply. */
10566char $ac_func ();
10567char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010568
Martin v. Löwis11437992002-04-12 09:54:03 +000010569#ifdef F77_DUMMY_MAIN
10570# ifdef __cplusplus
10571 extern "C"
10572# endif
10573 int F77_DUMMY_MAIN() { return 1; }
10574#endif
10575int
10576main ()
10577{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010578/* The GNU C library defines this for functions which it implements
10579 to always fail with ENOSYS. Some functions are actually named
10580 something starting with __ and the normal name is an alias. */
10581#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10582choke me
10583#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010584f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010585#endif
10586
Martin v. Löwis11437992002-04-12 09:54:03 +000010587 ;
10588 return 0;
10589}
10590_ACEOF
10591rm -f conftest.$ac_objext conftest$ac_exeext
10592if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10593 (eval $ac_link) 2>&5
10594 ac_status=$?
10595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10596 (exit $ac_status); } &&
10597 { ac_try='test -s conftest$ac_exeext'
10598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10599 (eval $ac_try) 2>&5
10600 ac_status=$?
10601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10602 (exit $ac_status); }; }; then
10603 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010604else
Martin v. Löwis11437992002-04-12 09:54:03 +000010605 echo "$as_me: failed program was:" >&5
10606cat conftest.$ac_ext >&5
10607eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010608fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010609rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010610fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010611echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10612echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10613if test `eval echo '${'$as_ac_var'}'` = yes; then
10614 cat >>confdefs.h <<_ACEOF
10615#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10616_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010617
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010618fi
10619done
10620
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010621 fi
10622
Martin v. Löwis11437992002-04-12 09:54:03 +000010623 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10624echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10625if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10626 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010627else
Martin v. Löwis11437992002-04-12 09:54:03 +000010628 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010629LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010630cat >conftest.$ac_ext <<_ACEOF
10631#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010632#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010633
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010634/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010635#ifdef __cplusplus
10636extern "C"
10637#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010638/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010639 builtin and then its argument prototype would still apply. */
10640char usconfig ();
10641#ifdef F77_DUMMY_MAIN
10642# ifdef __cplusplus
10643 extern "C"
10644# endif
10645 int F77_DUMMY_MAIN() { return 1; }
10646#endif
10647int
10648main ()
10649{
10650usconfig ();
10651 ;
10652 return 0;
10653}
10654_ACEOF
10655rm -f conftest.$ac_objext conftest$ac_exeext
10656if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10657 (eval $ac_link) 2>&5
10658 ac_status=$?
10659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10660 (exit $ac_status); } &&
10661 { ac_try='test -s conftest$ac_exeext'
10662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10663 (eval $ac_try) 2>&5
10664 ac_status=$?
10665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10666 (exit $ac_status); }; }; then
10667 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010668else
Martin v. Löwis11437992002-04-12 09:54:03 +000010669 echo "$as_me: failed program was:" >&5
10670cat conftest.$ac_ext >&5
10671ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010672fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010673rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10674LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010676echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10677echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10678if test $ac_cv_lib_mpc_usconfig = yes; then
10679 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010680#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010681_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010682
Martin v. Löwis130fb172001-07-19 11:00:41 +000010683 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010684 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010685 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010686fi
10687
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010688
Martin v. Löwis11437992002-04-12 09:54:03 +000010689 if test $posix_threads != "yes"; then
10690 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10691echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10692if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10693 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010694else
Martin v. Löwis11437992002-04-12 09:54:03 +000010695 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010696LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010697cat >conftest.$ac_ext <<_ACEOF
10698#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010699#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010700
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010701/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010702#ifdef __cplusplus
10703extern "C"
10704#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010705/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010706 builtin and then its argument prototype would still apply. */
10707char thr_create ();
10708#ifdef F77_DUMMY_MAIN
10709# ifdef __cplusplus
10710 extern "C"
10711# endif
10712 int F77_DUMMY_MAIN() { return 1; }
10713#endif
10714int
10715main ()
10716{
10717thr_create ();
10718 ;
10719 return 0;
10720}
10721_ACEOF
10722rm -f conftest.$ac_objext conftest$ac_exeext
10723if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10724 (eval $ac_link) 2>&5
10725 ac_status=$?
10726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10727 (exit $ac_status); } &&
10728 { ac_try='test -s conftest$ac_exeext'
10729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10730 (eval $ac_try) 2>&5
10731 ac_status=$?
10732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10733 (exit $ac_status); }; }; then
10734 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010735else
Martin v. Löwis11437992002-04-12 09:54:03 +000010736 echo "$as_me: failed program was:" >&5
10737cat conftest.$ac_ext >&5
10738ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010739fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010740rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10741LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010742fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010743echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10744echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10745if test $ac_cv_lib_thread_thr_create = yes; then
10746 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010747#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010748_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010749
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010750 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010751 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010752 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010753fi
10754
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010755 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010756
Martin v. Löwis130fb172001-07-19 11:00:41 +000010757 if test "$USE_THREAD_MODULE" != "#"
10758 then
10759 # If the above checks didn't disable threads, (at least) OSF1
10760 # needs this '-threads' argument during linking.
10761 case $ac_sys_system in
10762 OSF1) LDLAST=-threads;;
10763 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010764 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010765fi
10766
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010767# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010768
10769
10770echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10771echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010772# Check whether --enable-ipv6 or --disable-ipv6 was given.
10773if test "${enable_ipv6+set}" = set; then
10774 enableval="$enable_ipv6"
10775 case "$enableval" in
10776 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010777 echo "$as_me:$LINENO: result: no" >&5
10778echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779 ipv6=no
10780 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010781 *) echo "$as_me:$LINENO: result: yes" >&5
10782echo "${ECHO_T}yes" >&6
10783 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010784#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010785_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010786
10787 ipv6=yes
10788 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010789 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010790else
Martin v. Löwis11437992002-04-12 09:54:03 +000010791
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010793 echo "$as_me:$LINENO: result: no" >&5
10794echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795 ipv6=no
10796
10797else
Martin v. Löwis11437992002-04-12 09:54:03 +000010798 cat >conftest.$ac_ext <<_ACEOF
10799#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800#include "confdefs.h"
10801 /* AF_INET6 available check */
10802#include <sys/types.h>
10803#include <sys/socket.h>
10804main()
10805{
10806 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10807 exit(1);
10808 else
10809 exit(0);
10810}
10811
Martin v. Löwis11437992002-04-12 09:54:03 +000010812_ACEOF
10813rm -f conftest$ac_exeext
10814if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10815 (eval $ac_link) 2>&5
10816 ac_status=$?
10817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10818 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10820 (eval $ac_try) 2>&5
10821 ac_status=$?
10822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10823 (exit $ac_status); }; }; then
10824 echo "$as_me:$LINENO: result: yes" >&5
10825echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010826 ipv6=yes
10827else
Martin v. Löwis11437992002-04-12 09:54:03 +000010828 echo "$as_me: program exited with status $ac_status" >&5
10829echo "$as_me: failed program was:" >&5
10830cat conftest.$ac_ext >&5
10831( exit $ac_status )
10832echo "$as_me:$LINENO: result: no" >&5
10833echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010834 ipv6=no
10835fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010836rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010837fi
10838
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010839if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010840 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10841echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10842 cat >conftest.$ac_ext <<_ACEOF
10843#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010844#include "confdefs.h"
10845#include <sys/types.h>
10846#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010847#ifdef F77_DUMMY_MAIN
10848# ifdef __cplusplus
10849 extern "C"
10850# endif
10851 int F77_DUMMY_MAIN() { return 1; }
10852#endif
10853int
10854main ()
10855{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010856struct sockaddr_in6 x;
10857x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010858 ;
10859 return 0;
10860}
10861_ACEOF
10862rm -f conftest.$ac_objext
10863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10864 (eval $ac_compile) 2>&5
10865 ac_status=$?
10866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10867 (exit $ac_status); } &&
10868 { ac_try='test -s conftest.$ac_objext'
10869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10870 (eval $ac_try) 2>&5
10871 ac_status=$?
10872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10873 (exit $ac_status); }; }; then
10874 echo "$as_me:$LINENO: result: yes" >&5
10875echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010876 ipv6=yes
10877else
Martin v. Löwis11437992002-04-12 09:54:03 +000010878 echo "$as_me: failed program was:" >&5
10879cat conftest.$ac_ext >&5
10880echo "$as_me:$LINENO: result: no" >&5
10881echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010882 ipv6=no
10883fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010884rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010885fi
10886
10887if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010888 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010889#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010890_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010891
10892fi
10893
Martin v. Löwis11437992002-04-12 09:54:03 +000010894fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010895
10896ipv6type=unknown
10897ipv6lib=none
10898ipv6trylibc=no
10899
10900if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010901 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
10902echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000010903 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10904 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010905 case $i in
10906 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000010907 cat >conftest.$ac_ext <<_ACEOF
10908#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010909#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010910
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911#include <netinet/in.h>
10912#ifdef IPV6_INRIA_VERSION
10913yes
10914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010915_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010916if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10917 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010918 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010919fi
10920rm -f conftest*
10921
10922 ;;
10923 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000010924 cat >conftest.$ac_ext <<_ACEOF
10925#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010926#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010927
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928#include <netinet/in.h>
10929#ifdef __KAME__
10930yes
10931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010932_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10934 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010935 ipv6type=$i;
10936 ipv6lib=inet6
10937 ipv6libdir=/usr/local/v6/lib
10938 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010939fi
10940rm -f conftest*
10941
10942 ;;
10943 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000010944 cat >conftest.$ac_ext <<_ACEOF
10945#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010946#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010947
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010948#include <features.h>
10949#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10950yes
10951#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010952_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010953if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10954 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010955 ipv6type=$i;
10956 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010957fi
10958rm -f conftest*
10959
10960 ;;
10961 linux-inet6)
10962 if test -d /usr/inet6; then
10963 ipv6type=$i
10964 ipv6lib=inet6
10965 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010966 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010967 fi
10968 ;;
10969 solaris)
10970 if test -f /etc/netconfig; then
10971 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
10972 ipv6type=$i
10973 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010974 fi
10975 fi
10976 ;;
10977 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000010978 cat >conftest.$ac_ext <<_ACEOF
10979#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010980#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010981
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010982#include <sys/param.h>
10983#ifdef _TOSHIBA_INET6
10984yes
10985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010986_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010987if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10988 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010989 ipv6type=$i;
10990 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010991 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010992fi
10993rm -f conftest*
10994
10995 ;;
10996 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000010997 cat >conftest.$ac_ext <<_ACEOF
10998#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010999#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011000
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011001#include </usr/local/v6/include/sys/v6config.h>
11002#ifdef __V6D__
11003yes
11004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011005_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11007 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011008 ipv6type=$i;
11009 ipv6lib=v6;
11010 ipv6libdir=/usr/local/v6/lib;
11011 OPT="-I/usr/local/v6/include $OPT"
11012fi
11013rm -f conftest*
11014
11015 ;;
11016 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011017 cat >conftest.$ac_ext <<_ACEOF
11018#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011019#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011020
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011021#include <sys/param.h>
11022#ifdef _ZETA_MINAMI_INET6
11023yes
11024#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011025_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11027 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011028 ipv6type=$i;
11029 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011030 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011031fi
11032rm -f conftest*
11033
11034 ;;
11035 esac
11036 if test "$ipv6type" != "unknown"; then
11037 break
11038 fi
11039 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011040 echo "$as_me:$LINENO: result: $ipv6type" >&5
11041echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011042fi
11043
11044if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11045 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11046 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11047 echo "using lib$ipv6lib"
11048 else
11049 if test $ipv6trylibc = "yes"; then
11050 echo "using libc"
11051 else
11052 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11053 echo "You need to fetch lib$ipv6lib.a from appropriate"
11054 echo 'ipv6 kit and compile beforehand.'
11055 exit 1
11056 fi
11057 fi
11058fi
11059
Barry Warsawef82cd72000-06-30 16:21:01 +000011060# Check for GC support
Martin v. Löwis11437992002-04-12 09:54:03 +000011061echo "$as_me:$LINENO: checking for --with-cycle-gc" >&5
11062echo $ECHO_N "checking for --with-cycle-gc... $ECHO_C" >&6
11063
Barry Warsawef82cd72000-06-30 16:21:01 +000011064# Check whether --with-cycle-gc or --without-cycle-gc was given.
11065if test "${with_cycle_gc+set}" = set; then
11066 withval="$with_cycle_gc"
Barry Warsawef82cd72000-06-30 16:21:01 +000011067
Martin v. Löwis11437992002-04-12 09:54:03 +000011068fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011069
11070if test -z "$with_cycle_gc"
11071then with_cycle_gc="yes"
11072fi
Neil Schemenauercf229462001-08-29 23:58:47 +000011073if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +000011074then
Martin v. Löwis11437992002-04-12 09:54:03 +000011075
11076cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011077#define WITH_CYCLE_GC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011078_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011079
11080fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011081echo "$as_me:$LINENO: result: $with_cycle_gc" >&5
11082echo "${ECHO_T}$with_cycle_gc" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011083
Jack Jansen7b8c7542002-04-14 20:12:41 +000011084# Check for universal newline support
11085echo "$as_me:$LINENO: checking for --with-universal-newline" >&5
11086echo $ECHO_N "checking for --with-universal-newline... $ECHO_C" >&6
11087
11088# Check whether --with-universal-newlines or --without-universal-newlines was given.
11089if test "${with_universal_newlines+set}" = set; then
11090 withval="$with_universal_newlines"
11091
11092fi;
11093
11094if test -z "$with_universal_newlines"
11095then with_universal_newlines="yes"
11096fi
11097if test "$with_universal_newlines" != "no"
11098then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011099
11100cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011101#define WITH_UNIVERSAL_NEWLINES 1
11102_ACEOF
11103
11104fi
11105echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11106echo "${ECHO_T}$with_universal_newlines" >&6
11107
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011108# Check for --with-doc-strings
11109echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11110echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11111
11112# Check whether --with-doc-strings or --without-doc-strings was given.
11113if test "${with_doc_strings+set}" = set; then
11114 withval="$with_doc_strings"
11115
11116fi;
11117
11118if test -z "$with_doc_strings"
11119then with_doc_strings="yes"
11120fi
11121if test "$with_doc_strings" != "no"
11122then
11123
11124cat >>confdefs.h <<\_ACEOF
11125#define WITH_DOC_STRINGS 1
11126_ACEOF
11127
11128fi
11129echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11130echo "${ECHO_T}$with_doc_strings" >&6
11131
Neil Schemenauera35c6882001-02-27 04:45:05 +000011132# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011133echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11134echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11135
Neil Schemenauera35c6882001-02-27 04:45:05 +000011136# Check whether --with-pymalloc or --without-pymalloc was given.
11137if test "${with_pymalloc+set}" = set; then
11138 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011139
Martin v. Löwis11437992002-04-12 09:54:03 +000011140fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011141
Neil Schemenauer16c22972002-03-22 15:34:49 +000011142if test -z "$with_pymalloc"
11143then with_pymalloc="yes"
11144fi
11145if test "$with_pymalloc" != "no"
11146then
Martin v. Löwis11437992002-04-12 09:54:03 +000011147
11148cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011149#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011150_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011151
11152fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011153echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11154echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011155
Barry Warsawef82cd72000-06-30 16:21:01 +000011156# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011157echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11158echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11159
Barry Warsawef82cd72000-06-30 16:21:01 +000011160# Check whether --with-wctype-functions or --without-wctype-functions was given.
11161if test "${with_wctype_functions+set}" = set; then
11162 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011163
Barry Warsawef82cd72000-06-30 16:21:01 +000011164if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011165then
11166
11167cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011168#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011169_ACEOF
11170
11171 echo "$as_me:$LINENO: result: yes" >&5
11172echo "${ECHO_T}yes" >&6
11173else echo "$as_me:$LINENO: result: no" >&5
11174echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011175fi
11176else
Martin v. Löwis11437992002-04-12 09:54:03 +000011177 echo "$as_me:$LINENO: result: no" >&5
11178echo "${ECHO_T}no" >&6
11179fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011181# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011182
Guido van Rossum98935bf2001-09-05 19:13:16 +000011183DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011184
Martin v. Löwis11437992002-04-12 09:54:03 +000011185echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11186echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11187
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011188# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011189if test "${with_sgi_dl+set}" = set; then
11190 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011191
11192echo "$as_me:$LINENO: result: $withval" >&5
11193echo "${ECHO_T}$withval" >&6
11194
11195cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011196#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011197_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011198
Guido van Rossume97ee181999-12-20 21:27:22 +000011199DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011200dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011201if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011202then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011203else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11204echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11205 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011206fi
11207DLINCLDIR=${dldir}
11208LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011209else
Martin v. Löwis11437992002-04-12 09:54:03 +000011210 echo "$as_me:$LINENO: result: no" >&5
11211echo "${ECHO_T}no" >&6
11212fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011213
Martin v. Löwis11437992002-04-12 09:54:03 +000011214echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11215echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011216
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011217# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011218if test "${with_dl_dld+set}" = set; then
11219 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011220
11221echo "$as_me:$LINENO: result: $withval" >&5
11222echo "${ECHO_T}$withval" >&6
11223
11224cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011225#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011226_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011227
Guido van Rossume97ee181999-12-20 21:27:22 +000011228DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011229dldir=`echo "$withval" | sed 's/,.*//'`
11230dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011231if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011232then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011233else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11234echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11235 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011236fi
11237DLINCLDIR=${dldir}
11238LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011239else
Martin v. Löwis11437992002-04-12 09:54:03 +000011240 echo "$as_me:$LINENO: result: no" >&5
11241echo "${ECHO_T}no" >&6
11242fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011243
Guido van Rossume97ee181999-12-20 21:27:22 +000011244# the dlopen() function means we might want to use dynload_shlib.o. some
11245# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011246
Thomas Wouters3a584202000-08-05 23:28:51 +000011247for ac_func in dlopen
11248do
Martin v. Löwis11437992002-04-12 09:54:03 +000011249as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11250echo "$as_me:$LINENO: checking for $ac_func" >&5
11251echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11252if eval "test \"\${$as_ac_var+set}\" = set"; then
11253 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011254else
Martin v. Löwis11437992002-04-12 09:54:03 +000011255 cat >conftest.$ac_ext <<_ACEOF
11256#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011257#include "confdefs.h"
11258/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011259 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011260#include <assert.h>
11261/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011262#ifdef __cplusplus
11263extern "C"
11264#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011265/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011266 builtin and then its argument prototype would still apply. */
11267char $ac_func ();
11268char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011269
Martin v. Löwis11437992002-04-12 09:54:03 +000011270#ifdef F77_DUMMY_MAIN
11271# ifdef __cplusplus
11272 extern "C"
11273# endif
11274 int F77_DUMMY_MAIN() { return 1; }
11275#endif
11276int
11277main ()
11278{
Guido van Rossume97ee181999-12-20 21:27:22 +000011279/* The GNU C library defines this for functions which it implements
11280 to always fail with ENOSYS. Some functions are actually named
11281 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011282#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011283choke me
11284#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011285f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011286#endif
11287
Martin v. Löwis11437992002-04-12 09:54:03 +000011288 ;
11289 return 0;
11290}
11291_ACEOF
11292rm -f conftest.$ac_objext conftest$ac_exeext
11293if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11294 (eval $ac_link) 2>&5
11295 ac_status=$?
11296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11297 (exit $ac_status); } &&
11298 { ac_try='test -s conftest$ac_exeext'
11299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11300 (eval $ac_try) 2>&5
11301 ac_status=$?
11302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11303 (exit $ac_status); }; }; then
11304 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011305else
Martin v. Löwis11437992002-04-12 09:54:03 +000011306 echo "$as_me: failed program was:" >&5
11307cat conftest.$ac_ext >&5
11308eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011309fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011310rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011311fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011312echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11313echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11314if test `eval echo '${'$as_ac_var'}'` = yes; then
11315 cat >>confdefs.h <<_ACEOF
11316#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11317_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011318
Guido van Rossume97ee181999-12-20 21:27:22 +000011319fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011320done
Guido van Rossume97ee181999-12-20 21:27:22 +000011321
Michael W. Hudson54241132001-12-07 15:38:26 +000011322
Guido van Rossume97ee181999-12-20 21:27:22 +000011323# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11324# loading of modules.
11325
Martin v. Löwis11437992002-04-12 09:54:03 +000011326echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11327echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011328if test -z "$DYNLOADFILE"
11329then
11330 case $ac_sys_system/$ac_sys_release in
11331 AIX*) DYNLOADFILE="dynload_aix.o";;
11332 BeOS*) DYNLOADFILE="dynload_beos.o";;
11333 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011334 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011335 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011336 *)
11337 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11338 # out any dynamic loading
11339 if test "$ac_cv_func_dlopen" = yes
11340 then DYNLOADFILE="dynload_shlib.o"
11341 else DYNLOADFILE="dynload_stub.o"
11342 fi
11343 ;;
11344 esac
11345fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011346echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11347echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011348if test "$DYNLOADFILE" != "dynload_stub.o"
11349then
Martin v. Löwis11437992002-04-12 09:54:03 +000011350
11351cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011352#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011353_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011354
11355fi
11356
Neil Schemenauer4e425612001-06-19 15:44:15 +000011357# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11358
Michael W. Hudson54241132001-12-07 15:38:26 +000011359
Martin v. Löwis11437992002-04-12 09:54:03 +000011360echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11361echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011362if test -z "$MACHDEP_OBJS"
11363then
Jack Jansene578a632001-08-15 01:27:14 +000011364 MACHDEP_OBJS=$extra_machdep_objs
11365else
11366 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011367fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011368echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11369echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011370
Guido van Rossum627b2d71993-12-24 10:39:16 +000011371# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011445
Fred Drake6b3cc522002-04-15 19:20:27 +000011446
Jack Jansen0b06be72002-06-21 14:48:38 +000011447
Martin v. Löwis244edc82001-10-04 22:44:26 +000011448for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011449 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011450 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011451 hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +000011452 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011453 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011454 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011455 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011456 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011457 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011458 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011459do
Martin v. Löwis11437992002-04-12 09:54:03 +000011460as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11461echo "$as_me:$LINENO: checking for $ac_func" >&5
11462echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11463if eval "test \"\${$as_ac_var+set}\" = set"; then
11464 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011465else
Martin v. Löwis11437992002-04-12 09:54:03 +000011466 cat >conftest.$ac_ext <<_ACEOF
11467#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011468#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011469/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011470 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011471#include <assert.h>
11472/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011473#ifdef __cplusplus
11474extern "C"
11475#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011476/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011477 builtin and then its argument prototype would still apply. */
11478char $ac_func ();
11479char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011480
Martin v. Löwis11437992002-04-12 09:54:03 +000011481#ifdef F77_DUMMY_MAIN
11482# ifdef __cplusplus
11483 extern "C"
11484# endif
11485 int F77_DUMMY_MAIN() { return 1; }
11486#endif
11487int
11488main ()
11489{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011490/* The GNU C library defines this for functions which it implements
11491 to always fail with ENOSYS. Some functions are actually named
11492 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011493#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011494choke me
11495#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011496f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011497#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011498
Martin v. Löwis11437992002-04-12 09:54:03 +000011499 ;
11500 return 0;
11501}
11502_ACEOF
11503rm -f conftest.$ac_objext conftest$ac_exeext
11504if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11505 (eval $ac_link) 2>&5
11506 ac_status=$?
11507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11508 (exit $ac_status); } &&
11509 { ac_try='test -s conftest$ac_exeext'
11510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11511 (eval $ac_try) 2>&5
11512 ac_status=$?
11513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11514 (exit $ac_status); }; }; then
11515 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011516else
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 echo "$as_me: failed program was:" >&5
11518cat conftest.$ac_ext >&5
11519eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011520fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011521rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011522fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011523echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11524echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11525if test `eval echo '${'$as_ac_var'}'` = yes; then
11526 cat >>confdefs.h <<_ACEOF
11527#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11528_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011529
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011530fi
11531done
11532
Michael W. Hudson54241132001-12-07 15:38:26 +000011533
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011534# check for openpty and forkpty
11535
Martin v. Löwis11437992002-04-12 09:54:03 +000011536
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011537for ac_func in openpty
11538do
Martin v. Löwis11437992002-04-12 09:54:03 +000011539as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11540echo "$as_me:$LINENO: checking for $ac_func" >&5
11541echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11542if eval "test \"\${$as_ac_var+set}\" = set"; then
11543 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011544else
Martin v. Löwis11437992002-04-12 09:54:03 +000011545 cat >conftest.$ac_ext <<_ACEOF
11546#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011547#include "confdefs.h"
11548/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011549 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011550#include <assert.h>
11551/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011552#ifdef __cplusplus
11553extern "C"
11554#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011555/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011556 builtin and then its argument prototype would still apply. */
11557char $ac_func ();
11558char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011559
Martin v. Löwis11437992002-04-12 09:54:03 +000011560#ifdef F77_DUMMY_MAIN
11561# ifdef __cplusplus
11562 extern "C"
11563# endif
11564 int F77_DUMMY_MAIN() { return 1; }
11565#endif
11566int
11567main ()
11568{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011569/* The GNU C library defines this for functions which it implements
11570 to always fail with ENOSYS. Some functions are actually named
11571 something starting with __ and the normal name is an alias. */
11572#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11573choke me
11574#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011575f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011576#endif
11577
Martin v. Löwis11437992002-04-12 09:54:03 +000011578 ;
11579 return 0;
11580}
11581_ACEOF
11582rm -f conftest.$ac_objext conftest$ac_exeext
11583if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11584 (eval $ac_link) 2>&5
11585 ac_status=$?
11586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11587 (exit $ac_status); } &&
11588 { ac_try='test -s conftest$ac_exeext'
11589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11590 (eval $ac_try) 2>&5
11591 ac_status=$?
11592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11593 (exit $ac_status); }; }; then
11594 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011595else
Martin v. Löwis11437992002-04-12 09:54:03 +000011596 echo "$as_me: failed program was:" >&5
11597cat conftest.$ac_ext >&5
11598eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011599fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011600rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011601fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011602echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11603echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11604if test `eval echo '${'$as_ac_var'}'` = yes; then
11605 cat >>confdefs.h <<_ACEOF
11606#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11607_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011608
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011609else
Martin v. Löwis11437992002-04-12 09:54:03 +000011610 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11611echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11612if test "${ac_cv_lib_util_openpty+set}" = set; then
11613 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011614else
Martin v. Löwis11437992002-04-12 09:54:03 +000011615 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011616LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011617cat >conftest.$ac_ext <<_ACEOF
11618#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011619#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011620
Fred Drake8cef4cf2000-06-28 16:40:38 +000011621/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011622#ifdef __cplusplus
11623extern "C"
11624#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011625/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011626 builtin and then its argument prototype would still apply. */
11627char openpty ();
11628#ifdef F77_DUMMY_MAIN
11629# ifdef __cplusplus
11630 extern "C"
11631# endif
11632 int F77_DUMMY_MAIN() { return 1; }
11633#endif
11634int
11635main ()
11636{
11637openpty ();
11638 ;
11639 return 0;
11640}
11641_ACEOF
11642rm -f conftest.$ac_objext conftest$ac_exeext
11643if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11644 (eval $ac_link) 2>&5
11645 ac_status=$?
11646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11647 (exit $ac_status); } &&
11648 { ac_try='test -s conftest$ac_exeext'
11649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11650 (eval $ac_try) 2>&5
11651 ac_status=$?
11652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11653 (exit $ac_status); }; }; then
11654 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011655else
Martin v. Löwis11437992002-04-12 09:54:03 +000011656 echo "$as_me: failed program was:" >&5
11657cat conftest.$ac_ext >&5
11658ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011659fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011660rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11661LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011662fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011663echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11664echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11665if test $ac_cv_lib_util_openpty = yes; then
11666 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011667#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011668_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011669 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011670fi
11671
11672fi
11673done
11674
Martin v. Löwis11437992002-04-12 09:54:03 +000011675
Fred Drake8cef4cf2000-06-28 16:40:38 +000011676for ac_func in forkpty
11677do
Martin v. Löwis11437992002-04-12 09:54:03 +000011678as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11679echo "$as_me:$LINENO: checking for $ac_func" >&5
11680echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11681if eval "test \"\${$as_ac_var+set}\" = set"; then
11682 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011683else
Martin v. Löwis11437992002-04-12 09:54:03 +000011684 cat >conftest.$ac_ext <<_ACEOF
11685#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011686#include "confdefs.h"
11687/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011688 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011689#include <assert.h>
11690/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011691#ifdef __cplusplus
11692extern "C"
11693#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011694/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011695 builtin and then its argument prototype would still apply. */
11696char $ac_func ();
11697char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011698
Martin v. Löwis11437992002-04-12 09:54:03 +000011699#ifdef F77_DUMMY_MAIN
11700# ifdef __cplusplus
11701 extern "C"
11702# endif
11703 int F77_DUMMY_MAIN() { return 1; }
11704#endif
11705int
11706main ()
11707{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011708/* The GNU C library defines this for functions which it implements
11709 to always fail with ENOSYS. Some functions are actually named
11710 something starting with __ and the normal name is an alias. */
11711#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11712choke me
11713#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011714f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011715#endif
11716
Martin v. Löwis11437992002-04-12 09:54:03 +000011717 ;
11718 return 0;
11719}
11720_ACEOF
11721rm -f conftest.$ac_objext conftest$ac_exeext
11722if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11723 (eval $ac_link) 2>&5
11724 ac_status=$?
11725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11726 (exit $ac_status); } &&
11727 { ac_try='test -s conftest$ac_exeext'
11728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11729 (eval $ac_try) 2>&5
11730 ac_status=$?
11731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11732 (exit $ac_status); }; }; then
11733 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011734else
Martin v. Löwis11437992002-04-12 09:54:03 +000011735 echo "$as_me: failed program was:" >&5
11736cat conftest.$ac_ext >&5
11737eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011738fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011739rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011740fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011741echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11742echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11743if test `eval echo '${'$as_ac_var'}'` = yes; then
11744 cat >>confdefs.h <<_ACEOF
11745#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11746_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011747
Fred Drake8cef4cf2000-06-28 16:40:38 +000011748else
Martin v. Löwis11437992002-04-12 09:54:03 +000011749 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11750echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11751if test "${ac_cv_lib_util_forkpty+set}" = set; then
11752 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011753else
Martin v. Löwis11437992002-04-12 09:54:03 +000011754 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011755LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011756cat >conftest.$ac_ext <<_ACEOF
11757#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011758#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011759
Fred Drake8cef4cf2000-06-28 16:40:38 +000011760/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011761#ifdef __cplusplus
11762extern "C"
11763#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011764/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011765 builtin and then its argument prototype would still apply. */
11766char forkpty ();
11767#ifdef F77_DUMMY_MAIN
11768# ifdef __cplusplus
11769 extern "C"
11770# endif
11771 int F77_DUMMY_MAIN() { return 1; }
11772#endif
11773int
11774main ()
11775{
11776forkpty ();
11777 ;
11778 return 0;
11779}
11780_ACEOF
11781rm -f conftest.$ac_objext conftest$ac_exeext
11782if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11783 (eval $ac_link) 2>&5
11784 ac_status=$?
11785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11786 (exit $ac_status); } &&
11787 { ac_try='test -s conftest$ac_exeext'
11788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11789 (eval $ac_try) 2>&5
11790 ac_status=$?
11791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11792 (exit $ac_status); }; }; then
11793 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011794else
Martin v. Löwis11437992002-04-12 09:54:03 +000011795 echo "$as_me: failed program was:" >&5
11796cat conftest.$ac_ext >&5
11797ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011798fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011799rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11800LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011801fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011802echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11803echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11804if test $ac_cv_lib_util_forkpty = yes; then
11805 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011806#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011807_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011808 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011809fi
11810
11811fi
11812done
11813
Jack Jansendd19cf82001-12-06 22:36:17 +000011814
Michael W. Hudson54241132001-12-07 15:38:26 +000011815# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011816
11817
11818
11819
11820
11821
Fred Drake8cef4cf2000-06-28 16:40:38 +000011822for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11823do
Martin v. Löwis11437992002-04-12 09:54:03 +000011824as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11825echo "$as_me:$LINENO: checking for $ac_func" >&5
11826echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11827if eval "test \"\${$as_ac_var+set}\" = set"; then
11828 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011829else
Martin v. Löwis11437992002-04-12 09:54:03 +000011830 cat >conftest.$ac_ext <<_ACEOF
11831#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011832#include "confdefs.h"
11833/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011834 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011835#include <assert.h>
11836/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011837#ifdef __cplusplus
11838extern "C"
11839#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011840/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011841 builtin and then its argument prototype would still apply. */
11842char $ac_func ();
11843char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011844
Martin v. Löwis11437992002-04-12 09:54:03 +000011845#ifdef F77_DUMMY_MAIN
11846# ifdef __cplusplus
11847 extern "C"
11848# endif
11849 int F77_DUMMY_MAIN() { return 1; }
11850#endif
11851int
11852main ()
11853{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011854/* The GNU C library defines this for functions which it implements
11855 to always fail with ENOSYS. Some functions are actually named
11856 something starting with __ and the normal name is an alias. */
11857#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11858choke me
11859#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011860f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011861#endif
11862
Martin v. Löwis11437992002-04-12 09:54:03 +000011863 ;
11864 return 0;
11865}
11866_ACEOF
11867rm -f conftest.$ac_objext conftest$ac_exeext
11868if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11869 (eval $ac_link) 2>&5
11870 ac_status=$?
11871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11872 (exit $ac_status); } &&
11873 { ac_try='test -s conftest$ac_exeext'
11874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11875 (eval $ac_try) 2>&5
11876 ac_status=$?
11877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11878 (exit $ac_status); }; }; then
11879 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011880else
Martin v. Löwis11437992002-04-12 09:54:03 +000011881 echo "$as_me: failed program was:" >&5
11882cat conftest.$ac_ext >&5
11883eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011884fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011885rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011886fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011887echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11888echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11889if test `eval echo '${'$as_ac_var'}'` = yes; then
11890 cat >>confdefs.h <<_ACEOF
11891#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11892_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011893
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011894fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011895done
11896
Michael W. Hudson54241132001-12-07 15:38:26 +000011897
Martin v. Löwis11437992002-04-12 09:54:03 +000011898
11899
11900
11901
11902
Martin v. Löwis1142de32002-03-29 16:28:31 +000011903for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011904do
Martin v. Löwis11437992002-04-12 09:54:03 +000011905as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11906echo "$as_me:$LINENO: checking for $ac_func" >&5
11907echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11908if eval "test \"\${$as_ac_var+set}\" = set"; then
11909 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011910else
Martin v. Löwis11437992002-04-12 09:54:03 +000011911 cat >conftest.$ac_ext <<_ACEOF
11912#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011913#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011914/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011915 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011916#include <assert.h>
11917/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011918#ifdef __cplusplus
11919extern "C"
11920#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011921/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011922 builtin and then its argument prototype would still apply. */
11923char $ac_func ();
11924char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011925
Martin v. Löwis11437992002-04-12 09:54:03 +000011926#ifdef F77_DUMMY_MAIN
11927# ifdef __cplusplus
11928 extern "C"
11929# endif
11930 int F77_DUMMY_MAIN() { return 1; }
11931#endif
11932int
11933main ()
11934{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011935/* The GNU C library defines this for functions which it implements
11936 to always fail with ENOSYS. Some functions are actually named
11937 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011938#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011939choke me
11940#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011941f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011942#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011943
Martin v. Löwis11437992002-04-12 09:54:03 +000011944 ;
11945 return 0;
11946}
11947_ACEOF
11948rm -f conftest.$ac_objext conftest$ac_exeext
11949if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11950 (eval $ac_link) 2>&5
11951 ac_status=$?
11952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11953 (exit $ac_status); } &&
11954 { ac_try='test -s conftest$ac_exeext'
11955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11956 (eval $ac_try) 2>&5
11957 ac_status=$?
11958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11959 (exit $ac_status); }; }; then
11960 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011961else
Martin v. Löwis11437992002-04-12 09:54:03 +000011962 echo "$as_me: failed program was:" >&5
11963cat conftest.$ac_ext >&5
11964eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011965fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011966rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011967fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011968echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11969echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11970if test `eval echo '${'$as_ac_var'}'` = yes; then
11971 cat >>confdefs.h <<_ACEOF
11972#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11973_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011974
Martin v. Löwis1142de32002-03-29 16:28:31 +000011975else
Martin v. Löwis11437992002-04-12 09:54:03 +000011976 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011977fi
11978done
11979
11980
Martin v. Löwis11437992002-04-12 09:54:03 +000011981
Martin v. Löwis1142de32002-03-29 16:28:31 +000011982for ac_func in getpgrp
11983do
Martin v. Löwis11437992002-04-12 09:54:03 +000011984as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11985echo "$as_me:$LINENO: checking for $ac_func" >&5
11986echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11987if eval "test \"\${$as_ac_var+set}\" = set"; then
11988 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011989else
Martin v. Löwis11437992002-04-12 09:54:03 +000011990 cat >conftest.$ac_ext <<_ACEOF
11991#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011992#include "confdefs.h"
11993/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011994 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011995#include <assert.h>
11996/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011997#ifdef __cplusplus
11998extern "C"
11999#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012000/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012001 builtin and then its argument prototype would still apply. */
12002char $ac_func ();
12003char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012004
Martin v. Löwis11437992002-04-12 09:54:03 +000012005#ifdef F77_DUMMY_MAIN
12006# ifdef __cplusplus
12007 extern "C"
12008# endif
12009 int F77_DUMMY_MAIN() { return 1; }
12010#endif
12011int
12012main ()
12013{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012014/* The GNU C library defines this for functions which it implements
12015 to always fail with ENOSYS. Some functions are actually named
12016 something starting with __ and the normal name is an alias. */
12017#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12018choke me
12019#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012020f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012021#endif
12022
Martin v. Löwis11437992002-04-12 09:54:03 +000012023 ;
12024 return 0;
12025}
12026_ACEOF
12027rm -f conftest.$ac_objext conftest$ac_exeext
12028if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12029 (eval $ac_link) 2>&5
12030 ac_status=$?
12031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12032 (exit $ac_status); } &&
12033 { ac_try='test -s conftest$ac_exeext'
12034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12035 (eval $ac_try) 2>&5
12036 ac_status=$?
12037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12038 (exit $ac_status); }; }; then
12039 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012040else
Martin v. Löwis11437992002-04-12 09:54:03 +000012041 echo "$as_me: failed program was:" >&5
12042cat conftest.$ac_ext >&5
12043eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012044fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012045rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012046fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012047echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12048echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12049if test `eval echo '${'$as_ac_var'}'` = yes; then
12050 cat >>confdefs.h <<_ACEOF
12051#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12052_ACEOF
12053 cat >conftest.$ac_ext <<_ACEOF
12054#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012055#include "confdefs.h"
12056#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012057#ifdef F77_DUMMY_MAIN
12058# ifdef __cplusplus
12059 extern "C"
12060# endif
12061 int F77_DUMMY_MAIN() { return 1; }
12062#endif
12063int
12064main ()
12065{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012066getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012067 ;
12068 return 0;
12069}
12070_ACEOF
12071rm -f conftest.$ac_objext
12072if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12073 (eval $ac_compile) 2>&5
12074 ac_status=$?
12075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12076 (exit $ac_status); } &&
12077 { ac_try='test -s conftest.$ac_objext'
12078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12079 (eval $ac_try) 2>&5
12080 ac_status=$?
12081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12082 (exit $ac_status); }; }; then
12083
12084cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012085#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012086_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012087
Martin v. Löwis11437992002-04-12 09:54:03 +000012088
Guido van Rossumf78abae1997-01-21 22:02:36 +000012089else
Martin v. Löwis11437992002-04-12 09:54:03 +000012090 echo "$as_me: failed program was:" >&5
12091cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012092fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012093rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012094
Guido van Rossum627b2d71993-12-24 10:39:16 +000012095fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012096done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012097
Martin v. Löwis11437992002-04-12 09:54:03 +000012098
Thomas Wouters3a584202000-08-05 23:28:51 +000012099for ac_func in setpgrp
12100do
Martin v. Löwis11437992002-04-12 09:54:03 +000012101as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12102echo "$as_me:$LINENO: checking for $ac_func" >&5
12103echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12104if eval "test \"\${$as_ac_var+set}\" = set"; then
12105 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012106else
Martin v. Löwis11437992002-04-12 09:54:03 +000012107 cat >conftest.$ac_ext <<_ACEOF
12108#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012109#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012110/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012111 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012112#include <assert.h>
12113/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012114#ifdef __cplusplus
12115extern "C"
12116#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012117/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012118 builtin and then its argument prototype would still apply. */
12119char $ac_func ();
12120char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012121
Martin v. Löwis11437992002-04-12 09:54:03 +000012122#ifdef F77_DUMMY_MAIN
12123# ifdef __cplusplus
12124 extern "C"
12125# endif
12126 int F77_DUMMY_MAIN() { return 1; }
12127#endif
12128int
12129main ()
12130{
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012131/* The GNU C library defines this for functions which it implements
12132 to always fail with ENOSYS. Some functions are actually named
12133 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012134#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012135choke me
12136#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012137f = $ac_func;
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012138#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012139
Martin v. Löwis11437992002-04-12 09:54:03 +000012140 ;
12141 return 0;
12142}
12143_ACEOF
12144rm -f conftest.$ac_objext conftest$ac_exeext
12145if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12146 (eval $ac_link) 2>&5
12147 ac_status=$?
12148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12149 (exit $ac_status); } &&
12150 { ac_try='test -s conftest$ac_exeext'
12151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12152 (eval $ac_try) 2>&5
12153 ac_status=$?
12154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12155 (exit $ac_status); }; }; then
12156 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012157else
Martin v. Löwis11437992002-04-12 09:54:03 +000012158 echo "$as_me: failed program was:" >&5
12159cat conftest.$ac_ext >&5
12160eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012161fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012162rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012163fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012164echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12165echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12166if test `eval echo '${'$as_ac_var'}'` = yes; then
12167 cat >>confdefs.h <<_ACEOF
12168#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12169_ACEOF
12170 cat >conftest.$ac_ext <<_ACEOF
12171#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012172#include "confdefs.h"
12173#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012174#ifdef F77_DUMMY_MAIN
12175# ifdef __cplusplus
12176 extern "C"
12177# endif
12178 int F77_DUMMY_MAIN() { return 1; }
12179#endif
12180int
12181main ()
12182{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012183setpgrp(0,0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012184 ;
12185 return 0;
12186}
12187_ACEOF
12188rm -f conftest.$ac_objext
12189if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12190 (eval $ac_compile) 2>&5
12191 ac_status=$?
12192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12193 (exit $ac_status); } &&
12194 { ac_try='test -s conftest.$ac_objext'
12195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12196 (eval $ac_try) 2>&5
12197 ac_status=$?
12198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12199 (exit $ac_status); }; }; then
12200
12201cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012202#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012203_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012204
Martin v. Löwis11437992002-04-12 09:54:03 +000012205
Guido van Rossumf78abae1997-01-21 22:02:36 +000012206else
Martin v. Löwis11437992002-04-12 09:54:03 +000012207 echo "$as_me: failed program was:" >&5
12208cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012209fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012210rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012211
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012212fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012213done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012214
Martin v. Löwis11437992002-04-12 09:54:03 +000012215
Thomas Wouters3a584202000-08-05 23:28:51 +000012216for ac_func in gettimeofday
12217do
Martin v. Löwis11437992002-04-12 09:54:03 +000012218as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12219echo "$as_me:$LINENO: checking for $ac_func" >&5
12220echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12221if eval "test \"\${$as_ac_var+set}\" = set"; then
12222 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012223else
Martin v. Löwis11437992002-04-12 09:54:03 +000012224 cat >conftest.$ac_ext <<_ACEOF
12225#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012226#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012227/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012228 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012229#include <assert.h>
12230/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012231#ifdef __cplusplus
12232extern "C"
12233#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012234/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012235 builtin and then its argument prototype would still apply. */
12236char $ac_func ();
12237char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012238
Martin v. Löwis11437992002-04-12 09:54:03 +000012239#ifdef F77_DUMMY_MAIN
12240# ifdef __cplusplus
12241 extern "C"
12242# endif
12243 int F77_DUMMY_MAIN() { return 1; }
12244#endif
12245int
12246main ()
12247{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012248/* The GNU C library defines this for functions which it implements
12249 to always fail with ENOSYS. Some functions are actually named
12250 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012251#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012252choke me
12253#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012254f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012255#endif
12256
Martin v. Löwis11437992002-04-12 09:54:03 +000012257 ;
12258 return 0;
12259}
12260_ACEOF
12261rm -f conftest.$ac_objext conftest$ac_exeext
12262if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12263 (eval $ac_link) 2>&5
12264 ac_status=$?
12265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12266 (exit $ac_status); } &&
12267 { ac_try='test -s conftest$ac_exeext'
12268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12269 (eval $ac_try) 2>&5
12270 ac_status=$?
12271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12272 (exit $ac_status); }; }; then
12273 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012274else
Martin v. Löwis11437992002-04-12 09:54:03 +000012275 echo "$as_me: failed program was:" >&5
12276cat conftest.$ac_ext >&5
12277eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012278fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012279rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012280fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012281echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12282echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12283if test `eval echo '${'$as_ac_var'}'` = yes; then
12284 cat >>confdefs.h <<_ACEOF
12285#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12286_ACEOF
12287 cat >conftest.$ac_ext <<_ACEOF
12288#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012289#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012290#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012291#ifdef F77_DUMMY_MAIN
12292# ifdef __cplusplus
12293 extern "C"
12294# endif
12295 int F77_DUMMY_MAIN() { return 1; }
12296#endif
12297int
12298main ()
12299{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012300gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012301 ;
12302 return 0;
12303}
12304_ACEOF
12305rm -f conftest.$ac_objext
12306if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12307 (eval $ac_compile) 2>&5
12308 ac_status=$?
12309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12310 (exit $ac_status); } &&
12311 { ac_try='test -s conftest.$ac_objext'
12312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12313 (eval $ac_try) 2>&5
12314 ac_status=$?
12315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12316 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012317 :
12318else
Martin v. Löwis11437992002-04-12 09:54:03 +000012319 echo "$as_me: failed program was:" >&5
12320cat conftest.$ac_ext >&5
12321
12322cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012323#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012324_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012325
Martin v. Löwis11437992002-04-12 09:54:03 +000012326
Guido van Rossum627b2d71993-12-24 10:39:16 +000012327fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012328rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012329
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012330fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012331done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012332
Michael W. Hudson54241132001-12-07 15:38:26 +000012333
12334
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012335# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012336# for [no]getaddrinfo in netdb.h.
12337echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12338echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12339cat >conftest.$ac_ext <<_ACEOF
12340#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012341#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012342
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012343#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012344#include <sys/socket.h>
12345#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012346#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012347
Martin v. Löwis11437992002-04-12 09:54:03 +000012348#ifdef F77_DUMMY_MAIN
12349# ifdef __cplusplus
12350 extern "C"
12351# endif
12352 int F77_DUMMY_MAIN() { return 1; }
12353#endif
12354int
12355main ()
12356{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012357
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012358getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012359
Martin v. Löwis11437992002-04-12 09:54:03 +000012360 ;
12361 return 0;
12362}
12363_ACEOF
12364rm -f conftest.$ac_objext conftest$ac_exeext
12365if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12366 (eval $ac_link) 2>&5
12367 ac_status=$?
12368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12369 (exit $ac_status); } &&
12370 { ac_try='test -s conftest$ac_exeext'
12371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12372 (eval $ac_try) 2>&5
12373 ac_status=$?
12374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12375 (exit $ac_status); }; }; then
12376
12377echo "$as_me:$LINENO: result: yes" >&5
12378echo "${ECHO_T}yes" >&6
12379echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12380echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012381if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012382 echo "$as_me:$LINENO: result: buggy" >&5
12383echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012384buggygetaddrinfo=yes
12385else
Martin v. Löwis11437992002-04-12 09:54:03 +000012386 cat >conftest.$ac_ext <<_ACEOF
12387#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012388#include "confdefs.h"
12389
12390#include <sys/types.h>
12391#include <netdb.h>
12392#include <string.h>
12393#include <sys/socket.h>
12394#include <netinet/in.h>
12395
12396main()
12397{
12398 int passive, gaierr, inet4 = 0, inet6 = 0;
12399 struct addrinfo hints, *ai, *aitop;
12400 char straddr[INET6_ADDRSTRLEN], strport[16];
12401
12402 for (passive = 0; passive <= 1; passive++) {
12403 memset(&hints, 0, sizeof(hints));
12404 hints.ai_family = AF_UNSPEC;
12405 hints.ai_flags = passive ? AI_PASSIVE : 0;
12406 hints.ai_socktype = SOCK_STREAM;
12407 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12408 (void)gai_strerror(gaierr);
12409 goto bad;
12410 }
12411 for (ai = aitop; ai; ai = ai->ai_next) {
12412 if (ai->ai_addr == NULL ||
12413 ai->ai_addrlen == 0 ||
12414 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12415 straddr, sizeof(straddr), strport, sizeof(strport),
12416 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12417 goto bad;
12418 }
12419 switch (ai->ai_family) {
12420 case AF_INET:
12421 if (strcmp(strport, "54321") != 0) {
12422 goto bad;
12423 }
12424 if (passive) {
12425 if (strcmp(straddr, "0.0.0.0") != 0) {
12426 goto bad;
12427 }
12428 } else {
12429 if (strcmp(straddr, "127.0.0.1") != 0) {
12430 goto bad;
12431 }
12432 }
12433 inet4++;
12434 break;
12435 case AF_INET6:
12436 if (strcmp(strport, "54321") != 0) {
12437 goto bad;
12438 }
12439 if (passive) {
12440 if (strcmp(straddr, "::") != 0) {
12441 goto bad;
12442 }
12443 } else {
12444 if (strcmp(straddr, "::1") != 0) {
12445 goto bad;
12446 }
12447 }
12448 inet6++;
12449 break;
12450 case AF_UNSPEC:
12451 goto bad;
12452 break;
12453 default:
12454 /* another family support? */
12455 break;
12456 }
12457 }
12458 }
12459
12460 if (!(inet4 == 0 || inet4 == 2))
12461 goto bad;
12462 if (!(inet6 == 0 || inet6 == 2))
12463 goto bad;
12464
12465 if (aitop)
12466 freeaddrinfo(aitop);
12467 exit(0);
12468
12469 bad:
12470 if (aitop)
12471 freeaddrinfo(aitop);
12472 exit(1);
12473}
12474
Martin v. Löwis11437992002-04-12 09:54:03 +000012475_ACEOF
12476rm -f conftest$ac_exeext
12477if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12478 (eval $ac_link) 2>&5
12479 ac_status=$?
12480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12481 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12483 (eval $ac_try) 2>&5
12484 ac_status=$?
12485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12486 (exit $ac_status); }; }; then
12487 echo "$as_me:$LINENO: result: good" >&5
12488echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012489buggygetaddrinfo=no
12490else
Martin v. Löwis11437992002-04-12 09:54:03 +000012491 echo "$as_me: program exited with status $ac_status" >&5
12492echo "$as_me: failed program was:" >&5
12493cat conftest.$ac_ext >&5
12494( exit $ac_status )
12495echo "$as_me:$LINENO: result: buggy" >&5
12496echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012497buggygetaddrinfo=yes
12498fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012499rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012500fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012501else
Martin v. Löwis11437992002-04-12 09:54:03 +000012502 echo "$as_me: failed program was:" >&5
12503cat conftest.$ac_ext >&5
12504
12505echo "$as_me:$LINENO: result: no" >&5
12506echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012507buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012508
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012509fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012510rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012511
12512if test "$buggygetaddrinfo" = "yes"; then
12513 if test "$ipv6" = "yes"; then
12514 echo 'Fatal: You must get working getaddrinfo() function.'
12515 echo ' or you can specify "--disable-ipv6"'.
12516 exit 1
12517 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012518else
Martin v. Löwis11437992002-04-12 09:54:03 +000012519
12520cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012521#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012522_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012523
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012524fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012525
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012526for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012527do
Martin v. Löwis11437992002-04-12 09:54:03 +000012528as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12529echo "$as_me:$LINENO: checking for $ac_func" >&5
12530echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12531if eval "test \"\${$as_ac_var+set}\" = set"; then
12532 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012533else
Martin v. Löwis11437992002-04-12 09:54:03 +000012534 cat >conftest.$ac_ext <<_ACEOF
12535#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012536#include "confdefs.h"
12537/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012538 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012539#include <assert.h>
12540/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012541#ifdef __cplusplus
12542extern "C"
12543#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012544/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012545 builtin and then its argument prototype would still apply. */
12546char $ac_func ();
12547char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012548
Martin v. Löwis11437992002-04-12 09:54:03 +000012549#ifdef F77_DUMMY_MAIN
12550# ifdef __cplusplus
12551 extern "C"
12552# endif
12553 int F77_DUMMY_MAIN() { return 1; }
12554#endif
12555int
12556main ()
12557{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012558/* The GNU C library defines this for functions which it implements
12559 to always fail with ENOSYS. Some functions are actually named
12560 something starting with __ and the normal name is an alias. */
12561#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12562choke me
12563#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012564f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012565#endif
12566
Martin v. Löwis11437992002-04-12 09:54:03 +000012567 ;
12568 return 0;
12569}
12570_ACEOF
12571rm -f conftest.$ac_objext conftest$ac_exeext
12572if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12573 (eval $ac_link) 2>&5
12574 ac_status=$?
12575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12576 (exit $ac_status); } &&
12577 { ac_try='test -s conftest$ac_exeext'
12578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12579 (eval $ac_try) 2>&5
12580 ac_status=$?
12581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12582 (exit $ac_status); }; }; then
12583 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012584else
Martin v. Löwis11437992002-04-12 09:54:03 +000012585 echo "$as_me: failed program was:" >&5
12586cat conftest.$ac_ext >&5
12587eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012588fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012589rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012590fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012591echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12592echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12593if test `eval echo '${'$as_ac_var'}'` = yes; then
12594 cat >>confdefs.h <<_ACEOF
12595#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12596_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012597
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012598fi
12599done
12600
Michael W. Hudson54241132001-12-07 15:38:26 +000012601
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012602# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012603echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12604echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12605if test "${ac_cv_header_time+set}" = set; then
12606 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012607else
Martin v. Löwis11437992002-04-12 09:54:03 +000012608 cat >conftest.$ac_ext <<_ACEOF
12609#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012610#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012611#include <sys/types.h>
12612#include <sys/time.h>
12613#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012614
12615#ifdef F77_DUMMY_MAIN
12616# ifdef __cplusplus
12617 extern "C"
12618# endif
12619 int F77_DUMMY_MAIN() { return 1; }
12620#endif
12621int
12622main ()
12623{
12624if ((struct tm *) 0)
12625return 0;
12626 ;
12627 return 0;
12628}
12629_ACEOF
12630rm -f conftest.$ac_objext
12631if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12632 (eval $ac_compile) 2>&5
12633 ac_status=$?
12634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12635 (exit $ac_status); } &&
12636 { ac_try='test -s conftest.$ac_objext'
12637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12638 (eval $ac_try) 2>&5
12639 ac_status=$?
12640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12641 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012642 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012643else
Martin v. Löwis11437992002-04-12 09:54:03 +000012644 echo "$as_me: failed program was:" >&5
12645cat conftest.$ac_ext >&5
12646ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012647fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012648rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012649fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012650echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12651echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012652if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012653
12654cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012655#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012656_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012657
12658fi
12659
Martin v. Löwis11437992002-04-12 09:54:03 +000012660echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12661echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12662if test "${ac_cv_struct_tm+set}" = set; then
12663 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012664else
Martin v. Löwis11437992002-04-12 09:54:03 +000012665 cat >conftest.$ac_ext <<_ACEOF
12666#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012667#include "confdefs.h"
12668#include <sys/types.h>
12669#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012670
12671#ifdef F77_DUMMY_MAIN
12672# ifdef __cplusplus
12673 extern "C"
12674# endif
12675 int F77_DUMMY_MAIN() { return 1; }
12676#endif
12677int
12678main ()
12679{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012680struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 ;
12682 return 0;
12683}
12684_ACEOF
12685rm -f conftest.$ac_objext
12686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12687 (eval $ac_compile) 2>&5
12688 ac_status=$?
12689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12690 (exit $ac_status); } &&
12691 { ac_try='test -s conftest.$ac_objext'
12692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12693 (eval $ac_try) 2>&5
12694 ac_status=$?
12695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12696 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012697 ac_cv_struct_tm=time.h
12698else
Martin v. Löwis11437992002-04-12 09:54:03 +000012699 echo "$as_me: failed program was:" >&5
12700cat conftest.$ac_ext >&5
12701ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012702fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012703rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012704fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012705echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12706echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012707if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012708
12709cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012710#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012711_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012712
12713fi
12714
Martin v. Löwis11437992002-04-12 09:54:03 +000012715echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12716echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12717if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12718 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012719else
Martin v. Löwis11437992002-04-12 09:54:03 +000012720 cat >conftest.$ac_ext <<_ACEOF
12721#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012722#include "confdefs.h"
12723#include <sys/types.h>
12724#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012725
12726
12727#ifdef F77_DUMMY_MAIN
12728# ifdef __cplusplus
12729 extern "C"
12730# endif
12731 int F77_DUMMY_MAIN() { return 1; }
12732#endif
12733int
12734main ()
12735{
12736static struct tm ac_aggr;
12737if (ac_aggr.tm_zone)
12738return 0;
12739 ;
12740 return 0;
12741}
12742_ACEOF
12743rm -f conftest.$ac_objext
12744if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12745 (eval $ac_compile) 2>&5
12746 ac_status=$?
12747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12748 (exit $ac_status); } &&
12749 { ac_try='test -s conftest.$ac_objext'
12750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12751 (eval $ac_try) 2>&5
12752 ac_status=$?
12753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12754 (exit $ac_status); }; }; then
12755 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012756else
Martin v. Löwis11437992002-04-12 09:54:03 +000012757 echo "$as_me: failed program was:" >&5
12758cat conftest.$ac_ext >&5
12759ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012760fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012761rm -f conftest.$ac_objext conftest.$ac_ext
12762fi
12763echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12764echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12765if test $ac_cv_member_struct_tm_tm_zone = yes; then
12766
12767cat >>confdefs.h <<_ACEOF
12768#define HAVE_STRUCT_TM_TM_ZONE 1
12769_ACEOF
12770
12771
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012772fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012773
Martin v. Löwis11437992002-04-12 09:54:03 +000012774if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12775
12776cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012777#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012778_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012779
12780else
Martin v. Löwis11437992002-04-12 09:54:03 +000012781 echo "$as_me:$LINENO: checking for tzname" >&5
12782echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12783if test "${ac_cv_var_tzname+set}" = set; then
12784 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012785else
Martin v. Löwis11437992002-04-12 09:54:03 +000012786 cat >conftest.$ac_ext <<_ACEOF
12787#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012788#include "confdefs.h"
12789#include <time.h>
12790#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012791extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012793
12794#ifdef F77_DUMMY_MAIN
12795# ifdef __cplusplus
12796 extern "C"
12797# endif
12798 int F77_DUMMY_MAIN() { return 1; }
12799#endif
12800int
12801main ()
12802{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012803atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012804 ;
12805 return 0;
12806}
12807_ACEOF
12808rm -f conftest.$ac_objext conftest$ac_exeext
12809if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12810 (eval $ac_link) 2>&5
12811 ac_status=$?
12812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12813 (exit $ac_status); } &&
12814 { ac_try='test -s conftest$ac_exeext'
12815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12816 (eval $ac_try) 2>&5
12817 ac_status=$?
12818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12819 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012820 ac_cv_var_tzname=yes
12821else
Martin v. Löwis11437992002-04-12 09:54:03 +000012822 echo "$as_me: failed program was:" >&5
12823cat conftest.$ac_ext >&5
12824ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012825fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012826rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012827fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012828echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12829echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012830 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012831
12832cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012833#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012834_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012835
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012836 fi
12837fi
12838
Jack Jansendd19cf82001-12-06 22:36:17 +000012839
Martin v. Löwis11437992002-04-12 09:54:03 +000012840echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12841echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12842if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12843 echo $ECHO_N "(cached) $ECHO_C" >&6
12844else
12845 cat >conftest.$ac_ext <<_ACEOF
12846#line $LINENO "configure"
12847#include "confdefs.h"
12848$ac_includes_default
12849#ifdef F77_DUMMY_MAIN
12850# ifdef __cplusplus
12851 extern "C"
12852# endif
12853 int F77_DUMMY_MAIN() { return 1; }
12854#endif
12855int
12856main ()
12857{
12858static struct stat ac_aggr;
12859if (ac_aggr.st_rdev)
12860return 0;
12861 ;
12862 return 0;
12863}
12864_ACEOF
12865rm -f conftest.$ac_objext
12866if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12867 (eval $ac_compile) 2>&5
12868 ac_status=$?
12869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12870 (exit $ac_status); } &&
12871 { ac_try='test -s conftest.$ac_objext'
12872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12873 (eval $ac_try) 2>&5
12874 ac_status=$?
12875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12876 (exit $ac_status); }; }; then
12877 ac_cv_member_struct_stat_st_rdev=yes
12878else
12879 echo "$as_me: failed program was:" >&5
12880cat conftest.$ac_ext >&5
12881ac_cv_member_struct_stat_st_rdev=no
12882fi
12883rm -f conftest.$ac_objext conftest.$ac_ext
12884fi
12885echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12886echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12887if test $ac_cv_member_struct_stat_st_rdev = yes; then
12888
12889cat >>confdefs.h <<_ACEOF
12890#define HAVE_STRUCT_STAT_ST_RDEV 1
12891_ACEOF
12892
12893
12894cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012895#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012896_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012897
12898fi
12899
Martin v. Löwis11437992002-04-12 09:54:03 +000012900
12901
12902echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12903echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12904if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12905 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012906else
Martin v. Löwis11437992002-04-12 09:54:03 +000012907 cat >conftest.$ac_ext <<_ACEOF
12908#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012909#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012910$ac_includes_default
12911#ifdef F77_DUMMY_MAIN
12912# ifdef __cplusplus
12913 extern "C"
12914# endif
12915 int F77_DUMMY_MAIN() { return 1; }
12916#endif
12917int
12918main ()
12919{
12920static struct stat ac_aggr;
12921if (ac_aggr.st_blksize)
12922return 0;
12923 ;
12924 return 0;
12925}
12926_ACEOF
12927rm -f conftest.$ac_objext
12928if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12929 (eval $ac_compile) 2>&5
12930 ac_status=$?
12931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12932 (exit $ac_status); } &&
12933 { ac_try='test -s conftest.$ac_objext'
12934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12935 (eval $ac_try) 2>&5
12936 ac_status=$?
12937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12938 (exit $ac_status); }; }; then
12939 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012940else
Martin v. Löwis11437992002-04-12 09:54:03 +000012941 echo "$as_me: failed program was:" >&5
12942cat conftest.$ac_ext >&5
12943ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012944fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012945rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012946fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012947echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12948echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12949if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012950
Martin v. Löwis11437992002-04-12 09:54:03 +000012951cat >>confdefs.h <<_ACEOF
12952#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12953_ACEOF
12954
12955
12956cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012957#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012958_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012959
12960fi
12961
Martin v. Löwis11437992002-04-12 09:54:03 +000012962
12963echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12964echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12965if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12966 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012967else
Martin v. Löwis11437992002-04-12 09:54:03 +000012968 cat >conftest.$ac_ext <<_ACEOF
12969#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012970#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012971$ac_includes_default
12972#ifdef F77_DUMMY_MAIN
12973# ifdef __cplusplus
12974 extern "C"
12975# endif
12976 int F77_DUMMY_MAIN() { return 1; }
12977#endif
12978int
12979main ()
12980{
12981static struct stat ac_aggr;
12982if (ac_aggr.st_blocks)
12983return 0;
12984 ;
12985 return 0;
12986}
12987_ACEOF
12988rm -f conftest.$ac_objext
12989if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12990 (eval $ac_compile) 2>&5
12991 ac_status=$?
12992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12993 (exit $ac_status); } &&
12994 { ac_try='test -s conftest.$ac_objext'
12995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12996 (eval $ac_try) 2>&5
12997 ac_status=$?
12998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12999 (exit $ac_status); }; }; then
13000 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013001else
Martin v. Löwis11437992002-04-12 09:54:03 +000013002 echo "$as_me: failed program was:" >&5
13003cat conftest.$ac_ext >&5
13004ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013005fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013006rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013007fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013008echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13009echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13010if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013011
Martin v. Löwis11437992002-04-12 09:54:03 +000013012cat >>confdefs.h <<_ACEOF
13013#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13014_ACEOF
13015
13016
13017cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013018#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013019_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013020
13021else
Martin v. Löwis11437992002-04-12 09:54:03 +000013022 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013023fi
13024
Michael W. Hudson54241132001-12-07 15:38:26 +000013025
Martin v. Löwis11437992002-04-12 09:54:03 +000013026
13027echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13028echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13029if test "${ac_cv_header_time_altzone+set}" = set; then
13030 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013031else
Martin v. Löwis11437992002-04-12 09:54:03 +000013032 cat >conftest.$ac_ext <<_ACEOF
13033#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013034#include "confdefs.h"
13035#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013036#ifdef F77_DUMMY_MAIN
13037# ifdef __cplusplus
13038 extern "C"
13039# endif
13040 int F77_DUMMY_MAIN() { return 1; }
13041#endif
13042int
13043main ()
13044{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013045return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013046 ;
13047 return 0;
13048}
13049_ACEOF
13050rm -f conftest.$ac_objext
13051if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13052 (eval $ac_compile) 2>&5
13053 ac_status=$?
13054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13055 (exit $ac_status); } &&
13056 { ac_try='test -s conftest.$ac_objext'
13057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13058 (eval $ac_try) 2>&5
13059 ac_status=$?
13060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13061 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013062 ac_cv_header_time_altzone=yes
13063else
Martin v. Löwis11437992002-04-12 09:54:03 +000013064 echo "$as_me: failed program was:" >&5
13065cat conftest.$ac_ext >&5
13066ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013067fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013068rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013069fi
13070
Martin v. Löwis11437992002-04-12 09:54:03 +000013071echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13072echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013073if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013074
13075cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013076#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013077_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013078
13079fi
13080
Guido van Rossumda88dad1995-01-26 00:46:29 +000013081was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013082echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13083echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13084cat >conftest.$ac_ext <<_ACEOF
13085#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013086#include "confdefs.h"
13087
13088#include <sys/types.h>
13089#include <sys/select.h>
13090#include <sys/time.h>
13091
Martin v. Löwis11437992002-04-12 09:54:03 +000013092#ifdef F77_DUMMY_MAIN
13093# ifdef __cplusplus
13094 extern "C"
13095# endif
13096 int F77_DUMMY_MAIN() { return 1; }
13097#endif
13098int
13099main ()
13100{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013101;
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 ;
13103 return 0;
13104}
13105_ACEOF
13106rm -f conftest.$ac_objext
13107if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13108 (eval $ac_compile) 2>&5
13109 ac_status=$?
13110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13111 (exit $ac_status); } &&
13112 { ac_try='test -s conftest.$ac_objext'
13113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13114 (eval $ac_try) 2>&5
13115 ac_status=$?
13116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13117 (exit $ac_status); }; }; then
13118
13119
13120cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013121#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013122_ACEOF
13123
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013124 was_it_defined=yes
13125
Guido van Rossumf78abae1997-01-21 22:02:36 +000013126else
Martin v. Löwis11437992002-04-12 09:54:03 +000013127 echo "$as_me: failed program was:" >&5
13128cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013129fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013130rm -f conftest.$ac_objext conftest.$ac_ext
13131echo "$as_me:$LINENO: result: $was_it_defined" >&5
13132echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013133
Martin v. Löwis11437992002-04-12 09:54:03 +000013134echo "$as_me:$LINENO: checking for addrinfo" >&5
13135echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13136if test "${ac_cv_struct_addrinfo+set}" = set; then
13137 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013138else
Martin v. Löwis11437992002-04-12 09:54:03 +000013139 cat >conftest.$ac_ext <<_ACEOF
13140#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013141#include "confdefs.h"
13142
13143# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013144#ifdef F77_DUMMY_MAIN
13145# ifdef __cplusplus
13146 extern "C"
13147# endif
13148 int F77_DUMMY_MAIN() { return 1; }
13149#endif
13150int
13151main ()
13152{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013153struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013154 ;
13155 return 0;
13156}
13157_ACEOF
13158rm -f conftest.$ac_objext
13159if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13160 (eval $ac_compile) 2>&5
13161 ac_status=$?
13162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13163 (exit $ac_status); } &&
13164 { ac_try='test -s conftest.$ac_objext'
13165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13166 (eval $ac_try) 2>&5
13167 ac_status=$?
13168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13169 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013170 ac_cv_struct_addrinfo=yes
13171else
Martin v. Löwis11437992002-04-12 09:54:03 +000013172 echo "$as_me: failed program was:" >&5
13173cat conftest.$ac_ext >&5
13174ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013175fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013176rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013177fi
13178
Martin v. Löwis11437992002-04-12 09:54:03 +000013179echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13180echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013181if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013182
13183cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013184#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013185_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013186
13187fi
13188
Martin v. Löwis11437992002-04-12 09:54:03 +000013189echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13190echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13191if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13192 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013193else
Martin v. Löwis11437992002-04-12 09:54:03 +000013194 cat >conftest.$ac_ext <<_ACEOF
13195#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013196#include "confdefs.h"
13197
13198# include <sys/types.h>
13199# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013200#ifdef F77_DUMMY_MAIN
13201# ifdef __cplusplus
13202 extern "C"
13203# endif
13204 int F77_DUMMY_MAIN() { return 1; }
13205#endif
13206int
13207main ()
13208{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013209struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013210 ;
13211 return 0;
13212}
13213_ACEOF
13214rm -f conftest.$ac_objext
13215if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13216 (eval $ac_compile) 2>&5
13217 ac_status=$?
13218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13219 (exit $ac_status); } &&
13220 { ac_try='test -s conftest.$ac_objext'
13221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13222 (eval $ac_try) 2>&5
13223 ac_status=$?
13224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13225 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013226 ac_cv_struct_sockaddr_storage=yes
13227else
Martin v. Löwis11437992002-04-12 09:54:03 +000013228 echo "$as_me: failed program was:" >&5
13229cat conftest.$ac_ext >&5
13230ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013231fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013232rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013233fi
13234
Martin v. Löwis11437992002-04-12 09:54:03 +000013235echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13236echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013237if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013238
13239cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013240#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013241_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013242
13243fi
13244
Guido van Rossum627b2d71993-12-24 10:39:16 +000013245# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013246
Michael W. Hudson54241132001-12-07 15:38:26 +000013247
Martin v. Löwis11437992002-04-12 09:54:03 +000013248echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13249echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13250if test "${ac_cv_c_char_unsigned+set}" = set; then
13251 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013252else
Martin v. Löwis11437992002-04-12 09:54:03 +000013253 cat >conftest.$ac_ext <<_ACEOF
13254#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013255#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013256$ac_includes_default
13257#ifdef F77_DUMMY_MAIN
13258# ifdef __cplusplus
13259 extern "C"
13260# endif
13261 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013262#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013263int
13264main ()
13265{
13266static int test_array [1 - 2 * !(((char) -1) < 0)];
13267test_array [0] = 0
13268
13269 ;
13270 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013271}
Martin v. Löwis11437992002-04-12 09:54:03 +000013272_ACEOF
13273rm -f conftest.$ac_objext
13274if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13275 (eval $ac_compile) 2>&5
13276 ac_status=$?
13277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13278 (exit $ac_status); } &&
13279 { ac_try='test -s conftest.$ac_objext'
13280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13281 (eval $ac_try) 2>&5
13282 ac_status=$?
13283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13284 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013285 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013286else
13287 echo "$as_me: failed program was:" >&5
13288cat conftest.$ac_ext >&5
13289ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013290fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013291rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013292fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013293echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13294echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013295if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013296 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013297#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013298_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013299
13300fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013301
Martin v. Löwis11437992002-04-12 09:54:03 +000013302echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13303echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13304if test "${ac_cv_prog_cc_stdc+set}" = set; then
13305 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013306else
Martin v. Löwis11437992002-04-12 09:54:03 +000013307 ac_cv_prog_cc_stdc=no
13308ac_save_CC=$CC
13309cat >conftest.$ac_ext <<_ACEOF
13310#line $LINENO "configure"
13311#include "confdefs.h"
13312#include <stdarg.h>
13313#include <stdio.h>
13314#include <sys/types.h>
13315#include <sys/stat.h>
13316/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13317struct buf { int x; };
13318FILE * (*rcsopen) (struct buf *, struct stat *, int);
13319static char *e (p, i)
13320 char **p;
13321 int i;
13322{
13323 return p[i];
13324}
13325static char *f (char * (*g) (char **, int), char **p, ...)
13326{
13327 char *s;
13328 va_list v;
13329 va_start (v,p);
13330 s = g (p, va_arg (v,int));
13331 va_end (v);
13332 return s;
13333}
13334int test (int i, double x);
13335struct s1 {int (*f) (int a);};
13336struct s2 {int (*f) (double a);};
13337int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13338int argc;
13339char **argv;
13340#ifdef F77_DUMMY_MAIN
13341# ifdef __cplusplus
13342 extern "C"
13343# endif
13344 int F77_DUMMY_MAIN() { return 1; }
13345#endif
13346int
13347main ()
13348{
13349return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13350 ;
13351 return 0;
13352}
13353_ACEOF
13354# Don't try gcc -ansi; that turns off useful extensions and
13355# breaks some systems' header files.
13356# AIX -qlanglvl=ansi
13357# Ultrix and OSF/1 -std1
13358# HP-UX 10.20 and later -Ae
13359# HP-UX older versions -Aa -D_HPUX_SOURCE
13360# SVR4 -Xc -D__EXTENSIONS__
13361for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13362do
13363 CC="$ac_save_CC $ac_arg"
13364 rm -f conftest.$ac_objext
13365if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13366 (eval $ac_compile) 2>&5
13367 ac_status=$?
13368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13369 (exit $ac_status); } &&
13370 { ac_try='test -s conftest.$ac_objext'
13371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13372 (eval $ac_try) 2>&5
13373 ac_status=$?
13374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13375 (exit $ac_status); }; }; then
13376 ac_cv_prog_cc_stdc=$ac_arg
13377break
13378else
13379 echo "$as_me: failed program was:" >&5
13380cat conftest.$ac_ext >&5
13381fi
13382rm -f conftest.$ac_objext
13383done
13384rm -f conftest.$ac_ext conftest.$ac_objext
13385CC=$ac_save_CC
13386
13387fi
13388
13389case "x$ac_cv_prog_cc_stdc" in
13390 x|xno)
13391 echo "$as_me:$LINENO: result: none needed" >&5
13392echo "${ECHO_T}none needed" >&6 ;;
13393 *)
13394 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13395echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13396 CC="$CC $ac_cv_prog_cc_stdc" ;;
13397esac
13398
13399echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13400echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13401if test "${ac_cv_c_const+set}" = set; then
13402 echo $ECHO_N "(cached) $ECHO_C" >&6
13403else
13404 cat >conftest.$ac_ext <<_ACEOF
13405#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013406#include "confdefs.h"
13407
Martin v. Löwis11437992002-04-12 09:54:03 +000013408#ifdef F77_DUMMY_MAIN
13409# ifdef __cplusplus
13410 extern "C"
13411# endif
13412 int F77_DUMMY_MAIN() { return 1; }
13413#endif
13414int
13415main ()
13416{
13417/* FIXME: Include the comments suggested by Paul. */
13418#ifndef __cplusplus
13419 /* Ultrix mips cc rejects this. */
13420 typedef int charset[2];
13421 const charset x;
13422 /* SunOS 4.1.1 cc rejects this. */
13423 char const *const *ccp;
13424 char **p;
13425 /* NEC SVR4.0.2 mips cc rejects this. */
13426 struct point {int x, y;};
13427 static struct point const zero = {0,0};
13428 /* AIX XL C 1.02.0.0 rejects this.
13429 It does not let you subtract one const X* pointer from another in
13430 an arm of an if-expression whose if-part is not a constant
13431 expression */
13432 const char *g = "string";
13433 ccp = &g + (g ? g-g : 0);
13434 /* HPUX 7.0 cc rejects these. */
13435 ++ccp;
13436 p = (char**) ccp;
13437 ccp = (char const *const *) p;
13438 { /* SCO 3.2v4 cc rejects this. */
13439 char *t;
13440 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013441
Martin v. Löwis11437992002-04-12 09:54:03 +000013442 *t++ = 0;
13443 }
13444 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13445 int x[] = {25, 17};
13446 const int *foo = &x[0];
13447 ++foo;
13448 }
13449 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13450 typedef const int *iptr;
13451 iptr p = 0;
13452 ++p;
13453 }
13454 { /* AIX XL C 1.02.0.0 rejects this saying
13455 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13456 struct s { int j; const int *ap[3]; };
13457 struct s *b; b->j = 5;
13458 }
13459 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13460 const int foo = 10;
13461 }
13462#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013463
Martin v. Löwis11437992002-04-12 09:54:03 +000013464 ;
13465 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013466}
Martin v. Löwis11437992002-04-12 09:54:03 +000013467_ACEOF
13468rm -f conftest.$ac_objext
13469if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13470 (eval $ac_compile) 2>&5
13471 ac_status=$?
13472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13473 (exit $ac_status); } &&
13474 { ac_try='test -s conftest.$ac_objext'
13475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13476 (eval $ac_try) 2>&5
13477 ac_status=$?
13478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13479 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013480 ac_cv_c_const=yes
13481else
Martin v. Löwis11437992002-04-12 09:54:03 +000013482 echo "$as_me: failed program was:" >&5
13483cat conftest.$ac_ext >&5
13484ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013485fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013486rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013487fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013488echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13489echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013490if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013491
13492cat >>confdefs.h <<\_ACEOF
13493#define const
13494_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013495
13496fi
13497
Michael W. Hudson54241132001-12-07 15:38:26 +000013498
Guido van Rossumda88dad1995-01-26 00:46:29 +000013499works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013500echo "$as_me:$LINENO: checking for working volatile" >&5
13501echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13502cat >conftest.$ac_ext <<_ACEOF
13503#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013504#include "confdefs.h"
13505
Martin v. Löwis11437992002-04-12 09:54:03 +000013506#ifdef F77_DUMMY_MAIN
13507# ifdef __cplusplus
13508 extern "C"
13509# endif
13510 int F77_DUMMY_MAIN() { return 1; }
13511#endif
13512int
13513main ()
13514{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013515volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013516 ;
13517 return 0;
13518}
13519_ACEOF
13520rm -f conftest.$ac_objext
13521if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13522 (eval $ac_compile) 2>&5
13523 ac_status=$?
13524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13525 (exit $ac_status); } &&
13526 { ac_try='test -s conftest.$ac_objext'
13527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13528 (eval $ac_try) 2>&5
13529 ac_status=$?
13530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13531 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013532 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013533else
Martin v. Löwis11437992002-04-12 09:54:03 +000013534 echo "$as_me: failed program was:" >&5
13535cat conftest.$ac_ext >&5
13536
13537cat >>confdefs.h <<\_ACEOF
13538#define volatile
13539_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013540
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013541
Guido van Rossum627b2d71993-12-24 10:39:16 +000013542fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013543rm -f conftest.$ac_objext conftest.$ac_ext
13544echo "$as_me:$LINENO: result: $works" >&5
13545echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013546
Guido van Rossumda88dad1995-01-26 00:46:29 +000013547works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013548echo "$as_me:$LINENO: checking for working signed char" >&5
13549echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13550cat >conftest.$ac_ext <<_ACEOF
13551#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013552#include "confdefs.h"
13553
Martin v. Löwis11437992002-04-12 09:54:03 +000013554#ifdef F77_DUMMY_MAIN
13555# ifdef __cplusplus
13556 extern "C"
13557# endif
13558 int F77_DUMMY_MAIN() { return 1; }
13559#endif
13560int
13561main ()
13562{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013563signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 ;
13565 return 0;
13566}
13567_ACEOF
13568rm -f conftest.$ac_objext
13569if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13570 (eval $ac_compile) 2>&5
13571 ac_status=$?
13572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13573 (exit $ac_status); } &&
13574 { ac_try='test -s conftest.$ac_objext'
13575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13576 (eval $ac_try) 2>&5
13577 ac_status=$?
13578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13579 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013580 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013581else
Martin v. Löwis11437992002-04-12 09:54:03 +000013582 echo "$as_me: failed program was:" >&5
13583cat conftest.$ac_ext >&5
13584
13585cat >>confdefs.h <<\_ACEOF
13586#define signed
13587_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013588
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013589
Guido van Rossum7f43da71994-08-01 12:15:30 +000013590fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013591rm -f conftest.$ac_objext conftest.$ac_ext
13592echo "$as_me:$LINENO: result: $works" >&5
13593echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013594
Guido van Rossumda88dad1995-01-26 00:46:29 +000013595have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013596echo "$as_me:$LINENO: checking for prototypes" >&5
13597echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13598cat >conftest.$ac_ext <<_ACEOF
13599#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013600#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013601int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013602#ifdef F77_DUMMY_MAIN
13603# ifdef __cplusplus
13604 extern "C"
13605# endif
13606 int F77_DUMMY_MAIN() { return 1; }
13607#endif
13608int
13609main ()
13610{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013611return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013612 ;
13613 return 0;
13614}
13615_ACEOF
13616rm -f conftest.$ac_objext
13617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13618 (eval $ac_compile) 2>&5
13619 ac_status=$?
13620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13621 (exit $ac_status); } &&
13622 { ac_try='test -s conftest.$ac_objext'
13623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13624 (eval $ac_try) 2>&5
13625 ac_status=$?
13626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13627 (exit $ac_status); }; }; then
13628
13629
13630cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013631#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013632_ACEOF
13633
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013634 have_prototypes=yes
13635
Guido van Rossumf78abae1997-01-21 22:02:36 +000013636else
Martin v. Löwis11437992002-04-12 09:54:03 +000013637 echo "$as_me: failed program was:" >&5
13638cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013639fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013640rm -f conftest.$ac_objext conftest.$ac_ext
13641echo "$as_me:$LINENO: result: $have_prototypes" >&5
13642echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013643
Guido van Rossumda88dad1995-01-26 00:46:29 +000013644works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013645echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13646echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13647cat >conftest.$ac_ext <<_ACEOF
13648#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013649#include "confdefs.h"
13650
13651#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013652int foo(int x, ...) {
13653 va_list va;
13654 va_start(va, x);
13655 va_arg(va, int);
13656 va_arg(va, char *);
13657 va_arg(va, double);
13658 return 0;
13659}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013660
Martin v. Löwis11437992002-04-12 09:54:03 +000013661#ifdef F77_DUMMY_MAIN
13662# ifdef __cplusplus
13663 extern "C"
13664# endif
13665 int F77_DUMMY_MAIN() { return 1; }
13666#endif
13667int
13668main ()
13669{
Guido van Rossum90eea071996-08-30 20:58:57 +000013670return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013671 ;
13672 return 0;
13673}
13674_ACEOF
13675rm -f conftest.$ac_objext
13676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13677 (eval $ac_compile) 2>&5
13678 ac_status=$?
13679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13680 (exit $ac_status); } &&
13681 { ac_try='test -s conftest.$ac_objext'
13682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13683 (eval $ac_try) 2>&5
13684 ac_status=$?
13685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13686 (exit $ac_status); }; }; then
13687
13688
13689cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013690#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013691_ACEOF
13692
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013693 works=yes
13694
Guido van Rossumf78abae1997-01-21 22:02:36 +000013695else
Martin v. Löwis11437992002-04-12 09:54:03 +000013696 echo "$as_me: failed program was:" >&5
13697cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013698fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013699rm -f conftest.$ac_objext conftest.$ac_ext
13700echo "$as_me:$LINENO: result: $works" >&5
13701echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013702
Guido van Rossumda88dad1995-01-26 00:46:29 +000013703if test "$have_prototypes" = yes; then
13704bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013705echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13706echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13707cat >conftest.$ac_ext <<_ACEOF
13708#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013709#include "confdefs.h"
13710#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013711#ifdef F77_DUMMY_MAIN
13712# ifdef __cplusplus
13713 extern "C"
13714# endif
13715 int F77_DUMMY_MAIN() { return 1; }
13716#endif
13717int
13718main ()
13719{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013720char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013721 ;
13722 return 0;
13723}
13724_ACEOF
13725rm -f conftest.$ac_objext
13726if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13727 (eval $ac_compile) 2>&5
13728 ac_status=$?
13729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13730 (exit $ac_status); } &&
13731 { ac_try='test -s conftest.$ac_objext'
13732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13733 (eval $ac_try) 2>&5
13734 ac_status=$?
13735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13736 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013737 :
13738else
Martin v. Löwis11437992002-04-12 09:54:03 +000013739 echo "$as_me: failed program was:" >&5
13740cat conftest.$ac_ext >&5
13741
13742cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013743#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013744_ACEOF
13745
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013746 bad_prototypes=yes
13747
Guido van Rossum627b2d71993-12-24 10:39:16 +000013748fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013749rm -f conftest.$ac_objext conftest.$ac_ext
13750echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13751echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013752fi
13753
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013754# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013755echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13756echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13757cat >conftest.$ac_ext <<_ACEOF
13758#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013759#include "confdefs.h"
13760#include <sys/types.h>
13761#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013762#ifdef F77_DUMMY_MAIN
13763# ifdef __cplusplus
13764 extern "C"
13765# endif
13766 int F77_DUMMY_MAIN() { return 1; }
13767#endif
13768int
13769main ()
13770{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013771struct sockaddr x;
13772x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013773 ;
13774 return 0;
13775}
13776_ACEOF
13777rm -f conftest.$ac_objext
13778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13779 (eval $ac_compile) 2>&5
13780 ac_status=$?
13781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13782 (exit $ac_status); } &&
13783 { ac_try='test -s conftest.$ac_objext'
13784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13785 (eval $ac_try) 2>&5
13786 ac_status=$?
13787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13788 (exit $ac_status); }; }; then
13789 echo "$as_me:$LINENO: result: yes" >&5
13790echo "${ECHO_T}yes" >&6
13791
13792cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013793#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013794_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013795
13796else
Martin v. Löwis11437992002-04-12 09:54:03 +000013797 echo "$as_me: failed program was:" >&5
13798cat conftest.$ac_ext >&5
13799echo "$as_me:$LINENO: result: no" >&5
13800echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013801fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013802rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013803
Martin v. Löwis11437992002-04-12 09:54:03 +000013804echo "$as_me:$LINENO: checking for bad static forward" >&5
13805echo $ECHO_N "checking for bad static forward... $ECHO_C" >&6
13806if test "${ac_cv_bad_static_forward+set}" = set; then
13807 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013808else
13809 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013810 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013811else
Martin v. Löwis11437992002-04-12 09:54:03 +000013812 cat >conftest.$ac_ext <<_ACEOF
13813#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013814#include "confdefs.h"
13815
13816struct s { int a; int b; };
13817static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013818int foobar() {
13819 static int random;
13820 random = (int) &foo;
13821 return random;
13822}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013823static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013824main() {
13825 exit(!((int)&foo == foobar()));
13826}
Martin v. Löwis11437992002-04-12 09:54:03 +000013827_ACEOF
13828rm -f conftest$ac_exeext
13829if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13830 (eval $ac_link) 2>&5
13831 ac_status=$?
13832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13833 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13835 (eval $ac_try) 2>&5
13836 ac_status=$?
13837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13838 (exit $ac_status); }; }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013839 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013840else
Martin v. Löwis11437992002-04-12 09:54:03 +000013841 echo "$as_me: program exited with status $ac_status" >&5
13842echo "$as_me: failed program was:" >&5
13843cat conftest.$ac_ext >&5
13844( exit $ac_status )
13845ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013846fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013847rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13848fi
Guido van Rossumf78abae1997-01-21 22:02:36 +000013849fi
13850
Martin v. Löwis11437992002-04-12 09:54:03 +000013851echo "$as_me:$LINENO: result: $ac_cv_bad_static_forward" >&5
13852echo "${ECHO_T}$ac_cv_bad_static_forward" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013853if test "$ac_cv_bad_static_forward" = yes
13854then
Martin v. Löwis11437992002-04-12 09:54:03 +000013855
13856cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013857#define BAD_STATIC_FORWARD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013858_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013859
13860fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013861
Guido van Rossumda88dad1995-01-26 00:46:29 +000013862va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013863echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13864echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13865cat >conftest.$ac_ext <<_ACEOF
13866#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013867#include "confdefs.h"
13868
13869#ifdef HAVE_STDARG_PROTOTYPES
13870#include <stdarg.h>
13871#else
13872#include <varargs.h>
13873#endif
13874
Martin v. Löwis11437992002-04-12 09:54:03 +000013875#ifdef F77_DUMMY_MAIN
13876# ifdef __cplusplus
13877 extern "C"
13878# endif
13879 int F77_DUMMY_MAIN() { return 1; }
13880#endif
13881int
13882main ()
13883{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013884va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013885 ;
13886 return 0;
13887}
13888_ACEOF
13889rm -f conftest.$ac_objext
13890if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13891 (eval $ac_compile) 2>&5
13892 ac_status=$?
13893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13894 (exit $ac_status); } &&
13895 { ac_try='test -s conftest.$ac_objext'
13896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13897 (eval $ac_try) 2>&5
13898 ac_status=$?
13899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13900 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013901 :
13902else
Martin v. Löwis11437992002-04-12 09:54:03 +000013903 echo "$as_me: failed program was:" >&5
13904cat conftest.$ac_ext >&5
13905
13906
13907cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013908#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013909_ACEOF
13910
Guido van Rossumda88dad1995-01-26 00:46:29 +000013911 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013912
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013913fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013914rm -f conftest.$ac_objext conftest.$ac_ext
13915echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13916echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013917
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013918# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013919
13920
13921
13922echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13923echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13924if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13925 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013926else
Martin v. Löwis11437992002-04-12 09:54:03 +000013927 cat >conftest.$ac_ext <<_ACEOF
13928#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013929#include "confdefs.h"
13930/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013931 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013932#include <assert.h>
13933/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013934#ifdef __cplusplus
13935extern "C"
13936#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013937/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013938 builtin and then its argument prototype would still apply. */
13939char gethostbyname_r ();
13940char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013941
Martin v. Löwis11437992002-04-12 09:54:03 +000013942#ifdef F77_DUMMY_MAIN
13943# ifdef __cplusplus
13944 extern "C"
13945# endif
13946 int F77_DUMMY_MAIN() { return 1; }
13947#endif
13948int
13949main ()
13950{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013951/* The GNU C library defines this for functions which it implements
13952 to always fail with ENOSYS. Some functions are actually named
13953 something starting with __ and the normal name is an alias. */
13954#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13955choke me
13956#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013957f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013958#endif
13959
Martin v. Löwis11437992002-04-12 09:54:03 +000013960 ;
13961 return 0;
13962}
13963_ACEOF
13964rm -f conftest.$ac_objext conftest$ac_exeext
13965if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13966 (eval $ac_link) 2>&5
13967 ac_status=$?
13968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13969 (exit $ac_status); } &&
13970 { ac_try='test -s conftest$ac_exeext'
13971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13972 (eval $ac_try) 2>&5
13973 ac_status=$?
13974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13975 (exit $ac_status); }; }; then
13976 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013977else
Martin v. Löwis11437992002-04-12 09:54:03 +000013978 echo "$as_me: failed program was:" >&5
13979cat conftest.$ac_ext >&5
13980ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013981fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013982rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013983fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013984echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13985echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13986if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013987
Martin v. Löwis11437992002-04-12 09:54:03 +000013988 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013989#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013990_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013991
Martin v. Löwis11437992002-04-12 09:54:03 +000013992 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13993echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013994 OLD_CFLAGS=$CFLAGS
13995 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013996 cat >conftest.$ac_ext <<_ACEOF
13997#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013998#include "confdefs.h"
13999
14000# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014001
14002#ifdef F77_DUMMY_MAIN
14003# ifdef __cplusplus
14004 extern "C"
14005# endif
14006 int F77_DUMMY_MAIN() { return 1; }
14007#endif
14008int
14009main ()
14010{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014011
14012 char *name;
14013 struct hostent *he, *res;
14014 char buffer[2048];
14015 int buflen = 2048;
14016 int h_errnop;
14017
14018 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014019
14020 ;
14021 return 0;
14022}
14023_ACEOF
14024rm -f conftest.$ac_objext
14025if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14026 (eval $ac_compile) 2>&5
14027 ac_status=$?
14028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14029 (exit $ac_status); } &&
14030 { ac_try='test -s conftest.$ac_objext'
14031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14032 (eval $ac_try) 2>&5
14033 ac_status=$?
14034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14035 (exit $ac_status); }; }; then
14036
14037 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014038#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014039_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014040
Martin v. Löwis11437992002-04-12 09:54:03 +000014041
14042cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014043#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014044_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014045
Martin v. Löwis11437992002-04-12 09:54:03 +000014046 echo "$as_me:$LINENO: result: yes" >&5
14047echo "${ECHO_T}yes" >&6
14048
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014049else
Martin v. Löwis11437992002-04-12 09:54:03 +000014050 echo "$as_me: failed program was:" >&5
14051cat conftest.$ac_ext >&5
14052
14053 echo "$as_me:$LINENO: result: no" >&5
14054echo "${ECHO_T}no" >&6
14055 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14056echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14057 cat >conftest.$ac_ext <<_ACEOF
14058#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014059#include "confdefs.h"
14060
14061# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014062
14063#ifdef F77_DUMMY_MAIN
14064# ifdef __cplusplus
14065 extern "C"
14066# endif
14067 int F77_DUMMY_MAIN() { return 1; }
14068#endif
14069int
14070main ()
14071{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014072
14073 char *name;
14074 struct hostent *he;
14075 char buffer[2048];
14076 int buflen = 2048;
14077 int h_errnop;
14078
14079 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014080
14081 ;
14082 return 0;
14083}
14084_ACEOF
14085rm -f conftest.$ac_objext
14086if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14087 (eval $ac_compile) 2>&5
14088 ac_status=$?
14089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14090 (exit $ac_status); } &&
14091 { ac_try='test -s conftest.$ac_objext'
14092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14093 (eval $ac_try) 2>&5
14094 ac_status=$?
14095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14096 (exit $ac_status); }; }; then
14097
14098 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014099#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014100_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014101
Martin v. Löwis11437992002-04-12 09:54:03 +000014102
14103cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014104#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014105_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014106
Martin v. Löwis11437992002-04-12 09:54:03 +000014107 echo "$as_me:$LINENO: result: yes" >&5
14108echo "${ECHO_T}yes" >&6
14109
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014110else
Martin v. Löwis11437992002-04-12 09:54:03 +000014111 echo "$as_me: failed program was:" >&5
14112cat conftest.$ac_ext >&5
14113
14114 echo "$as_me:$LINENO: result: no" >&5
14115echo "${ECHO_T}no" >&6
14116 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14117echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14118 cat >conftest.$ac_ext <<_ACEOF
14119#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014120#include "confdefs.h"
14121
14122# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014123
14124#ifdef F77_DUMMY_MAIN
14125# ifdef __cplusplus
14126 extern "C"
14127# endif
14128 int F77_DUMMY_MAIN() { return 1; }
14129#endif
14130int
14131main ()
14132{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014133
14134 char *name;
14135 struct hostent *he;
14136 struct hostent_data data;
14137
14138 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014139
14140 ;
14141 return 0;
14142}
14143_ACEOF
14144rm -f conftest.$ac_objext
14145if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14146 (eval $ac_compile) 2>&5
14147 ac_status=$?
14148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14149 (exit $ac_status); } &&
14150 { ac_try='test -s conftest.$ac_objext'
14151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14152 (eval $ac_try) 2>&5
14153 ac_status=$?
14154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14155 (exit $ac_status); }; }; then
14156
14157 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014158#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014159_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014160
Martin v. Löwis11437992002-04-12 09:54:03 +000014161
14162cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014163#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014164_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014165
Martin v. Löwis11437992002-04-12 09:54:03 +000014166 echo "$as_me:$LINENO: result: yes" >&5
14167echo "${ECHO_T}yes" >&6
14168
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014169else
Martin v. Löwis11437992002-04-12 09:54:03 +000014170 echo "$as_me: failed program was:" >&5
14171cat conftest.$ac_ext >&5
14172
14173 echo "$as_me:$LINENO: result: no" >&5
14174echo "${ECHO_T}no" >&6
14175
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014176fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014177rm -f conftest.$ac_objext conftest.$ac_ext
14178
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014179fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014180rm -f conftest.$ac_objext conftest.$ac_ext
14181
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014182fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014183rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014184 CFLAGS=$OLD_CFLAGS
14185
14186else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014187
Martin v. Löwis11437992002-04-12 09:54:03 +000014188
14189for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014190do
Martin v. Löwis11437992002-04-12 09:54:03 +000014191as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14192echo "$as_me:$LINENO: checking for $ac_func" >&5
14193echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14194if eval "test \"\${$as_ac_var+set}\" = set"; then
14195 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014196else
Martin v. Löwis11437992002-04-12 09:54:03 +000014197 cat >conftest.$ac_ext <<_ACEOF
14198#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014199#include "confdefs.h"
14200/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014201 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014202#include <assert.h>
14203/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014204#ifdef __cplusplus
14205extern "C"
14206#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014207/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014208 builtin and then its argument prototype would still apply. */
14209char $ac_func ();
14210char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014211
Martin v. Löwis11437992002-04-12 09:54:03 +000014212#ifdef F77_DUMMY_MAIN
14213# ifdef __cplusplus
14214 extern "C"
14215# endif
14216 int F77_DUMMY_MAIN() { return 1; }
14217#endif
14218int
14219main ()
14220{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014221/* The GNU C library defines this for functions which it implements
14222 to always fail with ENOSYS. Some functions are actually named
14223 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014224#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014225choke me
14226#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014227f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014228#endif
14229
Martin v. Löwis11437992002-04-12 09:54:03 +000014230 ;
14231 return 0;
14232}
14233_ACEOF
14234rm -f conftest.$ac_objext conftest$ac_exeext
14235if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14236 (eval $ac_link) 2>&5
14237 ac_status=$?
14238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14239 (exit $ac_status); } &&
14240 { ac_try='test -s conftest$ac_exeext'
14241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14242 (eval $ac_try) 2>&5
14243 ac_status=$?
14244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14245 (exit $ac_status); }; }; then
14246 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014247else
Martin v. Löwis11437992002-04-12 09:54:03 +000014248 echo "$as_me: failed program was:" >&5
14249cat conftest.$ac_ext >&5
14250eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014251fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014252rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014253fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014254echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14255echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14256if test `eval echo '${'$as_ac_var'}'` = yes; then
14257 cat >>confdefs.h <<_ACEOF
14258#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14259_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014260
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014261fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014262done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014263
Michael W. Hudson54241132001-12-07 15:38:26 +000014264
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014265fi
14266
Michael W. Hudson54241132001-12-07 15:38:26 +000014267
14268
14269
14270
14271
14272
Guido van Rossum627b2d71993-12-24 10:39:16 +000014273# checks for system services
14274# (none yet)
14275
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014276# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014277echo "$as_me:$LINENO: checking for __fpu_control" >&5
14278echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14279if test "${ac_cv_func___fpu_control+set}" = set; then
14280 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014281else
Martin v. Löwis11437992002-04-12 09:54:03 +000014282 cat >conftest.$ac_ext <<_ACEOF
14283#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014284#include "confdefs.h"
14285/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014286 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014287#include <assert.h>
14288/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014289#ifdef __cplusplus
14290extern "C"
14291#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014292/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014293 builtin and then its argument prototype would still apply. */
14294char __fpu_control ();
14295char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014296
Martin v. Löwis11437992002-04-12 09:54:03 +000014297#ifdef F77_DUMMY_MAIN
14298# ifdef __cplusplus
14299 extern "C"
14300# endif
14301 int F77_DUMMY_MAIN() { return 1; }
14302#endif
14303int
14304main ()
14305{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014306/* The GNU C library defines this for functions which it implements
14307 to always fail with ENOSYS. Some functions are actually named
14308 something starting with __ and the normal name is an alias. */
14309#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14310choke me
14311#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014312f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014313#endif
14314
Martin v. Löwis11437992002-04-12 09:54:03 +000014315 ;
14316 return 0;
14317}
14318_ACEOF
14319rm -f conftest.$ac_objext conftest$ac_exeext
14320if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14321 (eval $ac_link) 2>&5
14322 ac_status=$?
14323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14324 (exit $ac_status); } &&
14325 { ac_try='test -s conftest$ac_exeext'
14326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14327 (eval $ac_try) 2>&5
14328 ac_status=$?
14329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14330 (exit $ac_status); }; }; then
14331 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014332else
Martin v. Löwis11437992002-04-12 09:54:03 +000014333 echo "$as_me: failed program was:" >&5
14334cat conftest.$ac_ext >&5
14335ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014336fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014337rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014338fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014339echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14340echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14341if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014342 :
14343else
Martin v. Löwis11437992002-04-12 09:54:03 +000014344
14345echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14346echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14347if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14348 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014349else
Martin v. Löwis11437992002-04-12 09:54:03 +000014350 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014351LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014352cat >conftest.$ac_ext <<_ACEOF
14353#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014354#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014355
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014356/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014357#ifdef __cplusplus
14358extern "C"
14359#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014360/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014361 builtin and then its argument prototype would still apply. */
14362char __fpu_control ();
14363#ifdef F77_DUMMY_MAIN
14364# ifdef __cplusplus
14365 extern "C"
14366# endif
14367 int F77_DUMMY_MAIN() { return 1; }
14368#endif
14369int
14370main ()
14371{
14372__fpu_control ();
14373 ;
14374 return 0;
14375}
14376_ACEOF
14377rm -f conftest.$ac_objext conftest$ac_exeext
14378if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14379 (eval $ac_link) 2>&5
14380 ac_status=$?
14381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14382 (exit $ac_status); } &&
14383 { ac_try='test -s conftest$ac_exeext'
14384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14385 (eval $ac_try) 2>&5
14386 ac_status=$?
14387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14388 (exit $ac_status); }; }; then
14389 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014390else
Martin v. Löwis11437992002-04-12 09:54:03 +000014391 echo "$as_me: failed program was:" >&5
14392cat conftest.$ac_ext >&5
14393ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014394fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014395rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14396LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014397fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014398echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14399echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14400if test $ac_cv_lib_ieee___fpu_control = yes; then
14401 cat >>confdefs.h <<_ACEOF
14402#define HAVE_LIBIEEE 1
14403_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014404
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014405 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014406
Guido van Rossum627b2d71993-12-24 10:39:16 +000014407fi
14408
Michael W. Hudson54241132001-12-07 15:38:26 +000014409
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014410fi
14411
Michael W. Hudson54241132001-12-07 15:38:26 +000014412
Guido van Rossum7f253911997-05-09 02:42:48 +000014413# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014414echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14415echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14416
Guido van Rossum7f253911997-05-09 02:42:48 +000014417# Check whether --with-fpectl or --without-fpectl was given.
14418if test "${with_fpectl+set}" = set; then
14419 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014420
Guido van Rossum7f253911997-05-09 02:42:48 +000014421if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014422then
14423
14424cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014425#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014426_ACEOF
14427
14428 echo "$as_me:$LINENO: result: yes" >&5
14429echo "${ECHO_T}yes" >&6
14430else echo "$as_me:$LINENO: result: no" >&5
14431echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014432fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014433else
Martin v. Löwis11437992002-04-12 09:54:03 +000014434 echo "$as_me:$LINENO: result: no" >&5
14435echo "${ECHO_T}no" >&6
14436fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014437
Guido van Rossum7f43da71994-08-01 12:15:30 +000014438# check for --with-libm=...
14439
Guido van Rossum563e7081996-09-10 18:20:48 +000014440case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014441Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014442BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014443*) LIBM=-lm
14444esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014445echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14446echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14447
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014448# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014449if test "${with_libm+set}" = set; then
14450 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014451
Guido van Rossum7f253911997-05-09 02:42:48 +000014452if test "$withval" = no
14453then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014454 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14455echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014456elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014457then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014458 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14459echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14460else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14461echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14462 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014463fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014464else
Martin v. Löwis11437992002-04-12 09:54:03 +000014465 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14466echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14467fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014468
14469# check for --with-libc=...
14470
Martin v. Löwis11437992002-04-12 09:54:03 +000014471echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14472echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14473
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014474# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014475if test "${with_libc+set}" = set; then
14476 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014477
Guido van Rossum7f253911997-05-09 02:42:48 +000014478if test "$withval" = no
14479then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014480 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14481echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014482elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014483then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014484 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14485echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14486else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14487echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14488 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014489fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014490else
Martin v. Löwis11437992002-04-12 09:54:03 +000014491 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14492echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14493fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014494
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014495# check for hypot() in math library
14496LIBS_SAVE=$LIBS
14497LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014498
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014499for ac_func in hypot
14500do
Martin v. Löwis11437992002-04-12 09:54:03 +000014501as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14502echo "$as_me:$LINENO: checking for $ac_func" >&5
14503echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14504if eval "test \"\${$as_ac_var+set}\" = set"; then
14505 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014506else
Martin v. Löwis11437992002-04-12 09:54:03 +000014507 cat >conftest.$ac_ext <<_ACEOF
14508#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014509#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014510/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014511 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014512#include <assert.h>
14513/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014514#ifdef __cplusplus
14515extern "C"
14516#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014517/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014518 builtin and then its argument prototype would still apply. */
14519char $ac_func ();
14520char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014521
Martin v. Löwis11437992002-04-12 09:54:03 +000014522#ifdef F77_DUMMY_MAIN
14523# ifdef __cplusplus
14524 extern "C"
14525# endif
14526 int F77_DUMMY_MAIN() { return 1; }
14527#endif
14528int
14529main ()
14530{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014531/* The GNU C library defines this for functions which it implements
14532 to always fail with ENOSYS. Some functions are actually named
14533 something starting with __ and the normal name is an alias. */
14534#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14535choke me
14536#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014537f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014538#endif
14539
Martin v. Löwis11437992002-04-12 09:54:03 +000014540 ;
14541 return 0;
14542}
14543_ACEOF
14544rm -f conftest.$ac_objext conftest$ac_exeext
14545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14546 (eval $ac_link) 2>&5
14547 ac_status=$?
14548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14549 (exit $ac_status); } &&
14550 { ac_try='test -s conftest$ac_exeext'
14551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14552 (eval $ac_try) 2>&5
14553 ac_status=$?
14554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14555 (exit $ac_status); }; }; then
14556 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014557else
Martin v. Löwis11437992002-04-12 09:54:03 +000014558 echo "$as_me: failed program was:" >&5
14559cat conftest.$ac_ext >&5
14560eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014561fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014562rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014563fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014564echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14565echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14566if test `eval echo '${'$as_ac_var'}'` = yes; then
14567 cat >>confdefs.h <<_ACEOF
14568#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14569_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014570
Michael W. Hudson54241132001-12-07 15:38:26 +000014571else
Martin v. Löwis11437992002-04-12 09:54:03 +000014572 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014573fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014574done
14575
Michael W. Hudson54241132001-12-07 15:38:26 +000014576
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014577LIBS=$LIBS_SAVE
14578
Guido van Rossumad713701997-07-10 22:42:38 +000014579# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014580echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14581echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14582if test "${ac_cv_malloc_zero+set}" = set; then
14583 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014584else
14585 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014586 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014587else
Martin v. Löwis11437992002-04-12 09:54:03 +000014588 cat >conftest.$ac_ext <<_ACEOF
14589#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014590#include "confdefs.h"
14591#include <stdio.h>
14592#ifdef HAVE_STDLIB
14593#include <stdlib.h>
14594#else
14595char *malloc(), *realloc();
14596int *free();
14597#endif
14598main() {
14599 char *p;
14600 p = malloc(0);
14601 if (p == NULL) exit(1);
14602 p = realloc(p, 0);
14603 if (p == NULL) exit(1);
14604 free(p);
14605 exit(0);
14606}
Martin v. Löwis11437992002-04-12 09:54:03 +000014607_ACEOF
14608rm -f conftest$ac_exeext
14609if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14610 (eval $ac_link) 2>&5
14611 ac_status=$?
14612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14613 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14615 (eval $ac_try) 2>&5
14616 ac_status=$?
14617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14618 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014619 ac_cv_malloc_zero=nonnull
14620else
Martin v. Löwis11437992002-04-12 09:54:03 +000014621 echo "$as_me: program exited with status $ac_status" >&5
14622echo "$as_me: failed program was:" >&5
14623cat conftest.$ac_ext >&5
14624( exit $ac_status )
14625ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014626fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014627rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014628fi
Guido van Rossumad713701997-07-10 22:42:38 +000014629fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014630 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014631echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14632echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014633if test "$ac_cv_malloc_zero" = null
14634then
Martin v. Löwis11437992002-04-12 09:54:03 +000014635
14636cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014637#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014638_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014639
14640fi
14641
Guido van Rossumef2255b2000-03-10 22:30:29 +000014642# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014643if test "${ac_cv_header_wchar_h+set}" = set; then
14644 echo "$as_me:$LINENO: checking for wchar.h" >&5
14645echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14646if test "${ac_cv_header_wchar_h+set}" = set; then
14647 echo $ECHO_N "(cached) $ECHO_C" >&6
14648fi
14649echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14650echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014651else
Martin v. Löwis11437992002-04-12 09:54:03 +000014652 # Is the header compilable?
14653echo "$as_me:$LINENO: checking wchar.h usability" >&5
14654echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14655cat >conftest.$ac_ext <<_ACEOF
14656#line $LINENO "configure"
14657#include "confdefs.h"
14658$ac_includes_default
14659#include <wchar.h>
14660_ACEOF
14661rm -f conftest.$ac_objext
14662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14663 (eval $ac_compile) 2>&5
14664 ac_status=$?
14665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14666 (exit $ac_status); } &&
14667 { ac_try='test -s conftest.$ac_objext'
14668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14669 (eval $ac_try) 2>&5
14670 ac_status=$?
14671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14672 (exit $ac_status); }; }; then
14673 ac_header_compiler=yes
14674else
14675 echo "$as_me: failed program was:" >&5
14676cat conftest.$ac_ext >&5
14677ac_header_compiler=no
14678fi
14679rm -f conftest.$ac_objext conftest.$ac_ext
14680echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14681echo "${ECHO_T}$ac_header_compiler" >&6
14682
14683# Is the header present?
14684echo "$as_me:$LINENO: checking wchar.h presence" >&5
14685echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14686cat >conftest.$ac_ext <<_ACEOF
14687#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014688#include "confdefs.h"
14689#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014690_ACEOF
14691if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14692 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14693 ac_status=$?
14694 egrep -v '^ *\+' conftest.er1 >conftest.err
14695 rm -f conftest.er1
14696 cat conftest.err >&5
14697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14698 (exit $ac_status); } >/dev/null; then
14699 if test -s conftest.err; then
14700 ac_cpp_err=$ac_c_preproc_warn_flag
14701 else
14702 ac_cpp_err=
14703 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014704else
Martin v. Löwis11437992002-04-12 09:54:03 +000014705 ac_cpp_err=yes
14706fi
14707if test -z "$ac_cpp_err"; then
14708 ac_header_preproc=yes
14709else
14710 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014711 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014712 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014713fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014714rm -f conftest.err conftest.$ac_ext
14715echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14716echo "${ECHO_T}$ac_header_preproc" >&6
14717
14718# So? What about this header?
14719case $ac_header_compiler:$ac_header_preproc in
14720 yes:no )
14721 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14722echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14723 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14724echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14725 no:yes )
14726 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14727echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14728 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14729echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14730 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14731echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14732esac
14733echo "$as_me:$LINENO: checking for wchar.h" >&5
14734echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14735if test "${ac_cv_header_wchar_h+set}" = set; then
14736 echo $ECHO_N "(cached) $ECHO_C" >&6
14737else
14738 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014739fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014740echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14741echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14742
14743fi
14744if test $ac_cv_header_wchar_h = yes; then
14745
14746
14747cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014748#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014749_ACEOF
14750
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014751 wchar_h="yes"
14752
Guido van Rossumef2255b2000-03-10 22:30:29 +000014753else
Martin v. Löwis11437992002-04-12 09:54:03 +000014754 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014755
14756fi
14757
Michael W. Hudson54241132001-12-07 15:38:26 +000014758
Martin v. Löwis11437992002-04-12 09:54:03 +000014759
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014760# determine wchar_t size
14761if test "$wchar_h" = yes
14762then
Martin v. Löwis11437992002-04-12 09:54:03 +000014763 echo "$as_me:$LINENO: checking for wchar_t" >&5
14764echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14765if test "${ac_cv_type_wchar_t+set}" = set; then
14766 echo $ECHO_N "(cached) $ECHO_C" >&6
14767else
14768 cat >conftest.$ac_ext <<_ACEOF
14769#line $LINENO "configure"
14770#include "confdefs.h"
14771#include <wchar.h>
14772
14773#ifdef F77_DUMMY_MAIN
14774# ifdef __cplusplus
14775 extern "C"
14776# endif
14777 int F77_DUMMY_MAIN() { return 1; }
14778#endif
14779int
14780main ()
14781{
14782if ((wchar_t *) 0)
14783 return 0;
14784if (sizeof (wchar_t))
14785 return 0;
14786 ;
14787 return 0;
14788}
14789_ACEOF
14790rm -f conftest.$ac_objext
14791if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14792 (eval $ac_compile) 2>&5
14793 ac_status=$?
14794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14795 (exit $ac_status); } &&
14796 { ac_try='test -s conftest.$ac_objext'
14797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14798 (eval $ac_try) 2>&5
14799 ac_status=$?
14800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14801 (exit $ac_status); }; }; then
14802 ac_cv_type_wchar_t=yes
14803else
14804 echo "$as_me: failed program was:" >&5
14805cat conftest.$ac_ext >&5
14806ac_cv_type_wchar_t=no
14807fi
14808rm -f conftest.$ac_objext conftest.$ac_ext
14809fi
14810echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14811echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14812
14813echo "$as_me:$LINENO: checking size of wchar_t" >&5
14814echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14815if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14816 echo $ECHO_N "(cached) $ECHO_C" >&6
14817else
14818 if test "$ac_cv_type_wchar_t" = yes; then
14819 # The cast to unsigned long works around a bug in the HP C Compiler
14820 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14821 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14822 # This bug is HP SR number 8606223364.
14823 if test "$cross_compiling" = yes; then
14824 # Depending upon the size, compute the lo and hi bounds.
14825cat >conftest.$ac_ext <<_ACEOF
14826#line $LINENO "configure"
14827#include "confdefs.h"
14828#include <wchar.h>
14829
14830#ifdef F77_DUMMY_MAIN
14831# ifdef __cplusplus
14832 extern "C"
14833# endif
14834 int F77_DUMMY_MAIN() { return 1; }
14835#endif
14836int
14837main ()
14838{
14839static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14840test_array [0] = 0
14841
14842 ;
14843 return 0;
14844}
14845_ACEOF
14846rm -f conftest.$ac_objext
14847if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14848 (eval $ac_compile) 2>&5
14849 ac_status=$?
14850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14851 (exit $ac_status); } &&
14852 { ac_try='test -s conftest.$ac_objext'
14853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14854 (eval $ac_try) 2>&5
14855 ac_status=$?
14856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14857 (exit $ac_status); }; }; then
14858 ac_lo=0 ac_mid=0
14859 while :; do
14860 cat >conftest.$ac_ext <<_ACEOF
14861#line $LINENO "configure"
14862#include "confdefs.h"
14863#include <wchar.h>
14864
14865#ifdef F77_DUMMY_MAIN
14866# ifdef __cplusplus
14867 extern "C"
14868# endif
14869 int F77_DUMMY_MAIN() { return 1; }
14870#endif
14871int
14872main ()
14873{
14874static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14875test_array [0] = 0
14876
14877 ;
14878 return 0;
14879}
14880_ACEOF
14881rm -f conftest.$ac_objext
14882if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14883 (eval $ac_compile) 2>&5
14884 ac_status=$?
14885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14886 (exit $ac_status); } &&
14887 { ac_try='test -s conftest.$ac_objext'
14888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14889 (eval $ac_try) 2>&5
14890 ac_status=$?
14891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14892 (exit $ac_status); }; }; then
14893 ac_hi=$ac_mid; break
14894else
14895 echo "$as_me: failed program was:" >&5
14896cat conftest.$ac_ext >&5
14897ac_lo=`expr $ac_mid + 1`
14898 if test $ac_lo -le $ac_mid; then
14899 ac_lo= ac_hi=
14900 break
14901 fi
14902 ac_mid=`expr 2 '*' $ac_mid + 1`
14903fi
14904rm -f conftest.$ac_objext conftest.$ac_ext
14905 done
14906else
14907 echo "$as_me: failed program was:" >&5
14908cat conftest.$ac_ext >&5
14909cat >conftest.$ac_ext <<_ACEOF
14910#line $LINENO "configure"
14911#include "confdefs.h"
14912#include <wchar.h>
14913
14914#ifdef F77_DUMMY_MAIN
14915# ifdef __cplusplus
14916 extern "C"
14917# endif
14918 int F77_DUMMY_MAIN() { return 1; }
14919#endif
14920int
14921main ()
14922{
14923static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14924test_array [0] = 0
14925
14926 ;
14927 return 0;
14928}
14929_ACEOF
14930rm -f conftest.$ac_objext
14931if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14932 (eval $ac_compile) 2>&5
14933 ac_status=$?
14934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14935 (exit $ac_status); } &&
14936 { ac_try='test -s conftest.$ac_objext'
14937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14938 (eval $ac_try) 2>&5
14939 ac_status=$?
14940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14941 (exit $ac_status); }; }; then
14942 ac_hi=-1 ac_mid=-1
14943 while :; do
14944 cat >conftest.$ac_ext <<_ACEOF
14945#line $LINENO "configure"
14946#include "confdefs.h"
14947#include <wchar.h>
14948
14949#ifdef F77_DUMMY_MAIN
14950# ifdef __cplusplus
14951 extern "C"
14952# endif
14953 int F77_DUMMY_MAIN() { return 1; }
14954#endif
14955int
14956main ()
14957{
14958static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14959test_array [0] = 0
14960
14961 ;
14962 return 0;
14963}
14964_ACEOF
14965rm -f conftest.$ac_objext
14966if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14967 (eval $ac_compile) 2>&5
14968 ac_status=$?
14969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14970 (exit $ac_status); } &&
14971 { ac_try='test -s conftest.$ac_objext'
14972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14973 (eval $ac_try) 2>&5
14974 ac_status=$?
14975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14976 (exit $ac_status); }; }; then
14977 ac_lo=$ac_mid; break
14978else
14979 echo "$as_me: failed program was:" >&5
14980cat conftest.$ac_ext >&5
14981ac_hi=`expr '(' $ac_mid ')' - 1`
14982 if test $ac_mid -le $ac_hi; then
14983 ac_lo= ac_hi=
14984 break
14985 fi
14986 ac_mid=`expr 2 '*' $ac_mid`
14987fi
14988rm -f conftest.$ac_objext conftest.$ac_ext
14989 done
14990else
14991 echo "$as_me: failed program was:" >&5
14992cat conftest.$ac_ext >&5
14993ac_lo= ac_hi=
14994fi
14995rm -f conftest.$ac_objext conftest.$ac_ext
14996fi
14997rm -f conftest.$ac_objext conftest.$ac_ext
14998# Binary search between lo and hi bounds.
14999while test "x$ac_lo" != "x$ac_hi"; do
15000 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15001 cat >conftest.$ac_ext <<_ACEOF
15002#line $LINENO "configure"
15003#include "confdefs.h"
15004#include <wchar.h>
15005
15006#ifdef F77_DUMMY_MAIN
15007# ifdef __cplusplus
15008 extern "C"
15009# endif
15010 int F77_DUMMY_MAIN() { return 1; }
15011#endif
15012int
15013main ()
15014{
15015static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15016test_array [0] = 0
15017
15018 ;
15019 return 0;
15020}
15021_ACEOF
15022rm -f conftest.$ac_objext
15023if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15024 (eval $ac_compile) 2>&5
15025 ac_status=$?
15026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15027 (exit $ac_status); } &&
15028 { ac_try='test -s conftest.$ac_objext'
15029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15030 (eval $ac_try) 2>&5
15031 ac_status=$?
15032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15033 (exit $ac_status); }; }; then
15034 ac_hi=$ac_mid
15035else
15036 echo "$as_me: failed program was:" >&5
15037cat conftest.$ac_ext >&5
15038ac_lo=`expr '(' $ac_mid ')' + 1`
15039fi
15040rm -f conftest.$ac_objext conftest.$ac_ext
15041done
15042case $ac_lo in
15043?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15044'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15045echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15046 { (exit 1); exit 1; }; } ;;
15047esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015048else
15049 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015050 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15051echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15052 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015053else
Martin v. Löwis11437992002-04-12 09:54:03 +000015054 cat >conftest.$ac_ext <<_ACEOF
15055#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015056#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015057#include <wchar.h>
15058
15059long longval () { return (long) (sizeof (wchar_t)); }
15060unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015061#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015062#include <stdlib.h>
15063#ifdef F77_DUMMY_MAIN
15064# ifdef __cplusplus
15065 extern "C"
15066# endif
15067 int F77_DUMMY_MAIN() { return 1; }
15068#endif
15069int
15070main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015071{
Martin v. Löwis11437992002-04-12 09:54:03 +000015072
15073 FILE *f = fopen ("conftest.val", "w");
15074 if (! f)
15075 exit (1);
15076 if (((long) (sizeof (wchar_t))) < 0)
15077 {
15078 long i = longval ();
15079 if (i != ((long) (sizeof (wchar_t))))
15080 exit (1);
15081 fprintf (f, "%ld\n", i);
15082 }
15083 else
15084 {
15085 unsigned long i = ulongval ();
15086 if (i != ((long) (sizeof (wchar_t))))
15087 exit (1);
15088 fprintf (f, "%lu\n", i);
15089 }
15090 exit (ferror (f) || fclose (f) != 0);
15091
15092 ;
15093 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015094}
Martin v. Löwis11437992002-04-12 09:54:03 +000015095_ACEOF
15096rm -f conftest$ac_exeext
15097if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15098 (eval $ac_link) 2>&5
15099 ac_status=$?
15100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15101 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15103 (eval $ac_try) 2>&5
15104 ac_status=$?
15105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15106 (exit $ac_status); }; }; then
15107 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015108else
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 echo "$as_me: program exited with status $ac_status" >&5
15110echo "$as_me: failed program was:" >&5
15111cat conftest.$ac_ext >&5
15112( exit $ac_status )
15113{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15114echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15115 { (exit 1); exit 1; }; }
15116fi
15117rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15118fi
15119fi
15120rm -f conftest.val
15121else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015122 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015123fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015124fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015125echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15126echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15127cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015128#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015129_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015130
Michael W. Hudson54241132001-12-07 15:38:26 +000015131
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015132fi
15133
Martin v. Löwis11437992002-04-12 09:54:03 +000015134echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15135echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015136# Check whether --enable-unicode or --disable-unicode was given.
15137if test "${enable_unicode+set}" = set; then
15138 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015139
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015140else
15141 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015142fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015143
15144if test $enable_unicode = yes
15145then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015146 # Without any arguments, Py_UNICODE defaults to two-byte mode
15147 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015148fi
15149
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015150
15151
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015152case "$enable_unicode" in
15153ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015154 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015155#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015156_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015157
15158 ;;
15159ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015160 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015161#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015162_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015163
15164 ;;
15165esac
15166
Michael W. Hudson54241132001-12-07 15:38:26 +000015167
Martin v. Löwis11437992002-04-12 09:54:03 +000015168
15169
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015170
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015171if test "$enable_unicode" = "no"
15172then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015173 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015174 echo "$as_me:$LINENO: result: not used" >&5
15175echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015176else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015177 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015178
15179cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015180#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015181_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015182
15183 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15184 then
15185 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015186
Martin v. Löwis11437992002-04-12 09:54:03 +000015187cat >>confdefs.h <<\_ACEOF
15188#define HAVE_USABLE_WCHAR_T 1
15189_ACEOF
15190
15191 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015192#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015193_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015194
15195 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15196 then
15197 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015198 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015199#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015200_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015201
15202 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15203 then
15204 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015205 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015206#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015207_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015208
15209 else
15210 PY_UNICODE_TYPE="no type found"
15211 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015212 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15213echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015214fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015215
15216# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015217echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15218echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15219if test "${ac_cv_c_bigendian+set}" = set; then
15220 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015221else
Martin v. Löwis11437992002-04-12 09:54:03 +000015222 # See if sys/param.h defines the BYTE_ORDER macro.
15223cat >conftest.$ac_ext <<_ACEOF
15224#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015225#include "confdefs.h"
15226#include <sys/types.h>
15227#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015228
Martin v. Löwis11437992002-04-12 09:54:03 +000015229#ifdef F77_DUMMY_MAIN
15230# ifdef __cplusplus
15231 extern "C"
15232# endif
15233 int F77_DUMMY_MAIN() { return 1; }
15234#endif
15235int
15236main ()
15237{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015238#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15239 bogus endian macros
15240#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015241
15242 ;
15243 return 0;
15244}
15245_ACEOF
15246rm -f conftest.$ac_objext
15247if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15248 (eval $ac_compile) 2>&5
15249 ac_status=$?
15250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15251 (exit $ac_status); } &&
15252 { ac_try='test -s conftest.$ac_objext'
15253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15254 (eval $ac_try) 2>&5
15255 ac_status=$?
15256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15257 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015258 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015259cat >conftest.$ac_ext <<_ACEOF
15260#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015261#include "confdefs.h"
15262#include <sys/types.h>
15263#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015264
Martin v. Löwis11437992002-04-12 09:54:03 +000015265#ifdef F77_DUMMY_MAIN
15266# ifdef __cplusplus
15267 extern "C"
15268# endif
15269 int F77_DUMMY_MAIN() { return 1; }
15270#endif
15271int
15272main ()
15273{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015274#if BYTE_ORDER != BIG_ENDIAN
15275 not big endian
15276#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015277
15278 ;
15279 return 0;
15280}
15281_ACEOF
15282rm -f conftest.$ac_objext
15283if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15284 (eval $ac_compile) 2>&5
15285 ac_status=$?
15286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15287 (exit $ac_status); } &&
15288 { ac_try='test -s conftest.$ac_objext'
15289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15290 (eval $ac_try) 2>&5
15291 ac_status=$?
15292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15293 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015294 ac_cv_c_bigendian=yes
15295else
Martin v. Löwis11437992002-04-12 09:54:03 +000015296 echo "$as_me: failed program was:" >&5
15297cat conftest.$ac_ext >&5
15298ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015299fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015300rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015301else
Martin v. Löwis11437992002-04-12 09:54:03 +000015302 echo "$as_me: failed program was:" >&5
15303cat conftest.$ac_ext >&5
15304# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015305if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015306 # try to guess the endianess by grep'ing values into an object file
15307 ac_cv_c_bigendian=unknown
15308 cat >conftest.$ac_ext <<_ACEOF
15309#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015310#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015311short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15312short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15313void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15314short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15315short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15316void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15317#ifdef F77_DUMMY_MAIN
15318# ifdef __cplusplus
15319 extern "C"
15320# endif
15321 int F77_DUMMY_MAIN() { return 1; }
15322#endif
15323int
15324main ()
15325{
15326 _ascii (); _ebcdic ();
15327 ;
15328 return 0;
15329}
15330_ACEOF
15331rm -f conftest.$ac_objext
15332if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15333 (eval $ac_compile) 2>&5
15334 ac_status=$?
15335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15336 (exit $ac_status); } &&
15337 { ac_try='test -s conftest.$ac_objext'
15338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15339 (eval $ac_try) 2>&5
15340 ac_status=$?
15341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15342 (exit $ac_status); }; }; then
15343 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15344 ac_cv_c_bigendian=yes
15345fi
15346if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15347 if test "$ac_cv_c_bigendian" = unknown; then
15348 ac_cv_c_bigendian=no
15349 else
15350 # finding both strings is unlikely to happen, but who knows?
15351 ac_cv_c_bigendian=unknown
15352 fi
15353fi
15354else
15355 echo "$as_me: failed program was:" >&5
15356cat conftest.$ac_ext >&5
15357fi
15358rm -f conftest.$ac_objext conftest.$ac_ext
15359else
15360 cat >conftest.$ac_ext <<_ACEOF
15361#line $LINENO "configure"
15362#include "confdefs.h"
15363int
15364main ()
15365{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015366 /* Are we little or big endian? From Harbison&Steele. */
15367 union
15368 {
15369 long l;
15370 char c[sizeof (long)];
15371 } u;
15372 u.l = 1;
15373 exit (u.c[sizeof (long) - 1] == 1);
15374}
Martin v. Löwis11437992002-04-12 09:54:03 +000015375_ACEOF
15376rm -f conftest$ac_exeext
15377if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15378 (eval $ac_link) 2>&5
15379 ac_status=$?
15380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15381 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15383 (eval $ac_try) 2>&5
15384 ac_status=$?
15385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15386 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015387 ac_cv_c_bigendian=no
15388else
Martin v. Löwis11437992002-04-12 09:54:03 +000015389 echo "$as_me: program exited with status $ac_status" >&5
15390echo "$as_me: failed program was:" >&5
15391cat conftest.$ac_ext >&5
15392( exit $ac_status )
15393ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015394fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015395rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015396fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015397fi
15398rm -f conftest.$ac_objext conftest.$ac_ext
15399fi
15400echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15401echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15402case $ac_cv_c_bigendian in
15403 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015404
Martin v. Löwis11437992002-04-12 09:54:03 +000015405cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015406#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015407_ACEOF
15408 ;;
15409 no)
15410 ;;
15411 *)
15412 { { echo "$as_me:$LINENO: error: unknown endianess
15413presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15414echo "$as_me: error: unknown endianess
15415presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15416 { (exit 1); exit 1; }; } ;;
15417esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015418
Michael W. Hudson54241132001-12-07 15:38:26 +000015419
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015420# Check whether right shifting a negative integer extends the sign bit
15421# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015422echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15423echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15424if test "${ac_cv_rshift_extends_sign+set}" = set; then
15425 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015426else
Martin v. Löwis11437992002-04-12 09:54:03 +000015427
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015428if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015429 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015430else
Martin v. Löwis11437992002-04-12 09:54:03 +000015431 cat >conftest.$ac_ext <<_ACEOF
15432#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015433#include "confdefs.h"
15434
15435int main()
15436{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015437 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015438}
15439
Martin v. Löwis11437992002-04-12 09:54:03 +000015440_ACEOF
15441rm -f conftest$ac_exeext
15442if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15443 (eval $ac_link) 2>&5
15444 ac_status=$?
15445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15446 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15448 (eval $ac_try) 2>&5
15449 ac_status=$?
15450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15451 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015452 ac_cv_rshift_extends_sign=yes
15453else
Martin v. Löwis11437992002-04-12 09:54:03 +000015454 echo "$as_me: program exited with status $ac_status" >&5
15455echo "$as_me: failed program was:" >&5
15456cat conftest.$ac_ext >&5
15457( exit $ac_status )
15458ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015459fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015460rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15461fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015462fi
15463
Martin v. Löwis11437992002-04-12 09:54:03 +000015464echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15465echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015466if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015467then
Martin v. Löwis11437992002-04-12 09:54:03 +000015468
15469cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015470#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015471_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015472
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015473fi
15474
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015475# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015476echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15477echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15478if test "${ac_cv_have_getc_unlocked+set}" = set; then
15479 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015480else
Martin v. Löwis11437992002-04-12 09:54:03 +000015481
15482cat >conftest.$ac_ext <<_ACEOF
15483#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015484#include "confdefs.h"
15485#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015486#ifdef F77_DUMMY_MAIN
15487# ifdef __cplusplus
15488 extern "C"
15489# endif
15490 int F77_DUMMY_MAIN() { return 1; }
15491#endif
15492int
15493main ()
15494{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015495
15496 FILE *f = fopen("/dev/null", "r");
15497 flockfile(f);
15498 getc_unlocked(f);
15499 funlockfile(f);
15500
Martin v. Löwis11437992002-04-12 09:54:03 +000015501 ;
15502 return 0;
15503}
15504_ACEOF
15505rm -f conftest.$ac_objext conftest$ac_exeext
15506if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15507 (eval $ac_link) 2>&5
15508 ac_status=$?
15509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15510 (exit $ac_status); } &&
15511 { ac_try='test -s conftest$ac_exeext'
15512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15513 (eval $ac_try) 2>&5
15514 ac_status=$?
15515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15516 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015517 ac_cv_have_getc_unlocked=yes
15518else
Martin v. Löwis11437992002-04-12 09:54:03 +000015519 echo "$as_me: failed program was:" >&5
15520cat conftest.$ac_ext >&5
15521ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015522fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015523rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015524fi
15525
Martin v. Löwis11437992002-04-12 09:54:03 +000015526echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15527echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015528if test "$ac_cv_have_getc_unlocked" = yes
15529then
Martin v. Löwis11437992002-04-12 09:54:03 +000015530
15531cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015532#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015533_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015534
15535fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015536
Martin v. Löwis0daad592001-09-30 21:09:59 +000015537# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015538echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15539echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15540if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15541 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015542else
Martin v. Löwis11437992002-04-12 09:54:03 +000015543 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015544LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015545cat >conftest.$ac_ext <<_ACEOF
15546#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015547#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015548
Guido van Rossum353ae582001-07-10 16:45:32 +000015549/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015550#ifdef __cplusplus
15551extern "C"
15552#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015553/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015554 builtin and then its argument prototype would still apply. */
15555char rl_pre_input_hook ();
15556#ifdef F77_DUMMY_MAIN
15557# ifdef __cplusplus
15558 extern "C"
15559# endif
15560 int F77_DUMMY_MAIN() { return 1; }
15561#endif
15562int
15563main ()
15564{
15565rl_pre_input_hook ();
15566 ;
15567 return 0;
15568}
15569_ACEOF
15570rm -f conftest.$ac_objext conftest$ac_exeext
15571if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15572 (eval $ac_link) 2>&5
15573 ac_status=$?
15574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15575 (exit $ac_status); } &&
15576 { ac_try='test -s conftest$ac_exeext'
15577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15578 (eval $ac_try) 2>&5
15579 ac_status=$?
15580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15581 (exit $ac_status); }; }; then
15582 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015583else
Martin v. Löwis11437992002-04-12 09:54:03 +000015584 echo "$as_me: failed program was:" >&5
15585cat conftest.$ac_ext >&5
15586ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015587fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015588rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15589LIBS=$ac_check_lib_save_LIBS
15590fi
15591echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15592echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15593if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015594
Martin v. Löwis11437992002-04-12 09:54:03 +000015595cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015596#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015597_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015598
Martin v. Löwis0daad592001-09-30 21:09:59 +000015599fi
15600
Michael W. Hudson54241132001-12-07 15:38:26 +000015601
Martin v. Löwis0daad592001-09-30 21:09:59 +000015602# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015603echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15604echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15605if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15606 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015607else
Martin v. Löwis11437992002-04-12 09:54:03 +000015608 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015609LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015610cat >conftest.$ac_ext <<_ACEOF
15611#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015612#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015613
Martin v. Löwis0daad592001-09-30 21:09:59 +000015614/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015615#ifdef __cplusplus
15616extern "C"
15617#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015618/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015619 builtin and then its argument prototype would still apply. */
15620char rl_completion_matches ();
15621#ifdef F77_DUMMY_MAIN
15622# ifdef __cplusplus
15623 extern "C"
15624# endif
15625 int F77_DUMMY_MAIN() { return 1; }
15626#endif
15627int
15628main ()
15629{
15630rl_completion_matches ();
15631 ;
15632 return 0;
15633}
15634_ACEOF
15635rm -f conftest.$ac_objext conftest$ac_exeext
15636if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15637 (eval $ac_link) 2>&5
15638 ac_status=$?
15639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15640 (exit $ac_status); } &&
15641 { ac_try='test -s conftest$ac_exeext'
15642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15643 (eval $ac_try) 2>&5
15644 ac_status=$?
15645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15646 (exit $ac_status); }; }; then
15647 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015648else
Martin v. Löwis11437992002-04-12 09:54:03 +000015649 echo "$as_me: failed program was:" >&5
15650cat conftest.$ac_ext >&5
15651ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015652fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015653rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15654LIBS=$ac_check_lib_save_LIBS
15655fi
15656echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15657echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15658if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015659
Martin v. Löwis11437992002-04-12 09:54:03 +000015660cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015661#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015662_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015663
Guido van Rossum353ae582001-07-10 16:45:32 +000015664fi
15665
Jack Jansendd19cf82001-12-06 22:36:17 +000015666
Martin v. Löwis11437992002-04-12 09:54:03 +000015667echo "$as_me:$LINENO: checking for broken nice()" >&5
15668echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15669if test "${ac_cv_broken_nice+set}" = set; then
15670 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015671else
Martin v. Löwis11437992002-04-12 09:54:03 +000015672
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015673if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015674 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015675else
Martin v. Löwis11437992002-04-12 09:54:03 +000015676 cat >conftest.$ac_ext <<_ACEOF
15677#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015678#include "confdefs.h"
15679
15680int main()
15681{
15682 int val1 = nice(1);
15683 if (val1 != -1 && val1 == nice(2))
15684 exit(0);
15685 exit(1);
15686}
15687
Martin v. Löwis11437992002-04-12 09:54:03 +000015688_ACEOF
15689rm -f conftest$ac_exeext
15690if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15691 (eval $ac_link) 2>&5
15692 ac_status=$?
15693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15694 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15696 (eval $ac_try) 2>&5
15697 ac_status=$?
15698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15699 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015700 ac_cv_broken_nice=yes
15701else
Martin v. Löwis11437992002-04-12 09:54:03 +000015702 echo "$as_me: program exited with status $ac_status" >&5
15703echo "$as_me: failed program was:" >&5
15704cat conftest.$ac_ext >&5
15705( exit $ac_status )
15706ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015707fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015708rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15709fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015710fi
15711
Martin v. Löwis11437992002-04-12 09:54:03 +000015712echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15713echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015714if test "$ac_cv_broken_nice" = yes
15715then
Martin v. Löwis11437992002-04-12 09:54:03 +000015716
15717cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015718#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015719_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015720
15721fi
15722
Jack Jansen666b1e72001-10-31 12:11:48 +000015723# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015724echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15725echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15726if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15727 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015728else
Martin v. Löwis11437992002-04-12 09:54:03 +000015729 cat >conftest.$ac_ext <<_ACEOF
15730#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015731#include "confdefs.h"
15732#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015733#ifdef F77_DUMMY_MAIN
15734# ifdef __cplusplus
15735 extern "C"
15736# endif
15737 int F77_DUMMY_MAIN() { return 1; }
15738#endif
15739int
15740main ()
15741{
Jack Jansen666b1e72001-10-31 12:11:48 +000015742
15743 int rtn;
15744 rtn = mvwdelch(0,0,0);
15745
Martin v. Löwis11437992002-04-12 09:54:03 +000015746 ;
15747 return 0;
15748}
15749_ACEOF
15750rm -f conftest.$ac_objext
15751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15752 (eval $ac_compile) 2>&5
15753 ac_status=$?
15754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15755 (exit $ac_status); } &&
15756 { ac_try='test -s conftest.$ac_objext'
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
Jack Jansen666b1e72001-10-31 12:11:48 +000015762 ac_cv_mvwdelch_is_expression=yes
15763else
Martin v. Löwis11437992002-04-12 09:54:03 +000015764 echo "$as_me: failed program was:" >&5
15765cat conftest.$ac_ext >&5
15766ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015767fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015768rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015769fi
15770
Martin v. Löwis11437992002-04-12 09:54:03 +000015771echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15772echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015773
15774if test "$ac_cv_mvwdelch_is_expression" = yes
15775then
Martin v. Löwis11437992002-04-12 09:54:03 +000015776
15777cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015778#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015779_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015780
15781fi
15782
Martin v. Löwis11437992002-04-12 09:54:03 +000015783echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15784echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15785if test "${ac_cv_window_has_flags+set}" = set; then
15786 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015787else
Martin v. Löwis11437992002-04-12 09:54:03 +000015788 cat >conftest.$ac_ext <<_ACEOF
15789#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015790#include "confdefs.h"
15791#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015792#ifdef F77_DUMMY_MAIN
15793# ifdef __cplusplus
15794 extern "C"
15795# endif
15796 int F77_DUMMY_MAIN() { return 1; }
15797#endif
15798int
15799main ()
15800{
Jack Jansen666b1e72001-10-31 12:11:48 +000015801
15802 WINDOW *w;
15803 w->_flags = 0;
15804
Martin v. Löwis11437992002-04-12 09:54:03 +000015805 ;
15806 return 0;
15807}
15808_ACEOF
15809rm -f conftest.$ac_objext
15810if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15811 (eval $ac_compile) 2>&5
15812 ac_status=$?
15813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15814 (exit $ac_status); } &&
15815 { ac_try='test -s conftest.$ac_objext'
15816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15817 (eval $ac_try) 2>&5
15818 ac_status=$?
15819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15820 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015821 ac_cv_window_has_flags=yes
15822else
Martin v. Löwis11437992002-04-12 09:54:03 +000015823 echo "$as_me: failed program was:" >&5
15824cat conftest.$ac_ext >&5
15825ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015826fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015827rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015828fi
15829
Martin v. Löwis11437992002-04-12 09:54:03 +000015830echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15831echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015832
Jack Jansen666b1e72001-10-31 12:11:48 +000015833
15834if test "$ac_cv_window_has_flags" = yes
15835then
Martin v. Löwis11437992002-04-12 09:54:03 +000015836
15837cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015838#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015839_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015840
15841fi
15842
Guido van Rossum95713eb2000-05-18 20:53:31 +000015843# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15844# Add sys/socket.h to confdefs.h
15845cat >> confdefs.h <<\EOF
15846#ifdef HAVE_SYS_SOCKET_H
15847#include <sys/socket.h>
15848#endif
15849EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015850echo "$as_me:$LINENO: checking for socklen_t" >&5
15851echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15852if test "${ac_cv_type_socklen_t+set}" = set; then
15853 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015854else
Martin v. Löwis11437992002-04-12 09:54:03 +000015855 cat >conftest.$ac_ext <<_ACEOF
15856#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015857#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015858$ac_includes_default
15859#ifdef F77_DUMMY_MAIN
15860# ifdef __cplusplus
15861 extern "C"
15862# endif
15863 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015865int
15866main ()
15867{
15868if ((socklen_t *) 0)
15869 return 0;
15870if (sizeof (socklen_t))
15871 return 0;
15872 ;
15873 return 0;
15874}
15875_ACEOF
15876rm -f conftest.$ac_objext
15877if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15878 (eval $ac_compile) 2>&5
15879 ac_status=$?
15880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15881 (exit $ac_status); } &&
15882 { ac_try='test -s conftest.$ac_objext'
15883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15884 (eval $ac_try) 2>&5
15885 ac_status=$?
15886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15887 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015888 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015889else
Martin v. Löwis11437992002-04-12 09:54:03 +000015890 echo "$as_me: failed program was:" >&5
15891cat conftest.$ac_ext >&5
15892ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015893fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015894rm -f conftest.$ac_objext conftest.$ac_ext
15895fi
15896echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15897echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15898if test $ac_cv_type_socklen_t = yes; then
15899 :
15900else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015901
Martin v. Löwis11437992002-04-12 09:54:03 +000015902cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015903#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015904_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015905
15906fi
15907
Michael W. Hudson54241132001-12-07 15:38:26 +000015908
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015909#AC_MSG_CHECKING(for Modules/Setup)
15910#if test ! -f Modules/Setup ; then
15911# if test ! -d Modules ; then
15912# mkdir Modules
15913# fi
15914# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15915# AC_MSG_RESULT(creating)
15916#else
15917# AC_MSG_RESULT(already exists)
15918#fi
15919
Michael W. Hudson54241132001-12-07 15:38:26 +000015920
15921
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015922for h in `(cd $srcdir;echo Python/thread_*.h)`
15923do
15924 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15925done
15926
Michael W. Hudson54241132001-12-07 15:38:26 +000015927
Jack Jansen0b06be72002-06-21 14:48:38 +000015928SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000015929echo "$as_me:$LINENO: checking for build directories" >&5
15930echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015931for dir in $SRCDIRS; do
15932 if test ! -d $dir; then
15933 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015934 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015935done
Martin v. Löwis11437992002-04-12 09:54:03 +000015936echo "$as_me:$LINENO: result: done" >&5
15937echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015938
Guido van Rossum627b2d71993-12-24 10:39:16 +000015939# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015940ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15941cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015942# This file is a shell script that caches the results of configure
15943# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015944# scripts and configure runs, see configure's option --config-cache.
15945# It is not useful on other systems. If it contains results you don't
15946# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015947#
Martin v. Löwis11437992002-04-12 09:54:03 +000015948# config.status only pays attention to the cache file if you give it
15949# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015950#
Martin v. Löwis11437992002-04-12 09:54:03 +000015951# `ac_cv_env_foo' variables (set or unset) will be overriden when
15952# loading this file, other *unset* `ac_cv_foo' will be assigned the
15953# following values.
15954
15955_ACEOF
15956
Guido van Rossumf78abae1997-01-21 22:02:36 +000015957# The following way of writing the cache mishandles newlines in values,
15958# but we know of no workaround that is simple, portable, and efficient.
15959# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015960# Ultrix sh set writes to stderr and can't be redirected directly,
15961# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015962{
15963 (set) 2>&1 |
15964 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15965 *ac_space=\ *)
15966 # `set' does not quote correctly, so add quotes (double-quote
15967 # substitution turns \\\\ into \\, and sed turns \\ into \).
15968 sed -n \
15969 "s/'/'\\\\''/g;
15970 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15971 ;;
15972 *)
15973 # `set' quotes correctly as required by POSIX, so do not add quotes.
15974 sed -n \
15975 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15976 ;;
15977 esac;
15978} |
15979 sed '
15980 t clear
15981 : clear
15982 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15983 t end
15984 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15985 : end' >>confcache
15986if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015987 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015988 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15989 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015990 else
15991 echo "not updating unwritable cache $cache_file"
15992 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015993fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015994rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015995
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015996test "x$prefix" = xNONE && prefix=$ac_default_prefix
15997# Let make expand exec_prefix.
15998test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015999
Martin v. Löwis11437992002-04-12 09:54:03 +000016000# VPATH may cause trouble with some makes, so we remove $(srcdir),
16001# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16002# trailing colons and then remove the whole line if VPATH becomes empty
16003# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016004if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016005 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16006s/:*\$(srcdir):*/:/;
16007s/:*\${srcdir}:*/:/;
16008s/:*@srcdir@:*/:/;
16009s/^\([^=]*=[ ]*\):*/\1/;
16010s/:*$//;
16011s/^[^=]*=[ ]*$//;
16012}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016013fi
16014
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016015DEFS=-DHAVE_CONFIG_H
16016
Martin v. Löwis11437992002-04-12 09:54:03 +000016017
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016018: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016019ac_clean_files_save=$ac_clean_files
16020ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16021{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16022echo "$as_me: creating $CONFIG_STATUS" >&6;}
16023cat >$CONFIG_STATUS <<_ACEOF
16024#! $SHELL
16025# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016026# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016027# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016028# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016029
Martin v. Löwis11437992002-04-12 09:54:03 +000016030debug=false
16031SHELL=\${CONFIG_SHELL-$SHELL}
16032_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016033
Martin v. Löwis11437992002-04-12 09:54:03 +000016034cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016035
Martin v. Löwis11437992002-04-12 09:54:03 +000016036## --------------------- ##
16037## M4sh Initialization. ##
16038## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016039
Martin v. Löwis11437992002-04-12 09:54:03 +000016040# Be Bourne compatible
16041if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16042 emulate sh
16043 NULLCMD=:
16044elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16045 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016046fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016047
Martin v. Löwis11437992002-04-12 09:54:03 +000016048# NLS nuisances.
16049# Support unset when possible.
16050if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16051 as_unset=unset
16052else
16053 as_unset=false
16054fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016055
Martin v. Löwis11437992002-04-12 09:54:03 +000016056(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16057 { $as_unset LANG || test "${LANG+set}" != set; } ||
16058 { LANG=C; export LANG; }
16059(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16060 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16061 { LC_ALL=C; export LC_ALL; }
16062(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16063 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16064 { LC_TIME=C; export LC_TIME; }
16065(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16066 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16067 { LC_CTYPE=C; export LC_CTYPE; }
16068(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16069 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16070 { LANGUAGE=C; export LANGUAGE; }
16071(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16072 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16073 { LC_COLLATE=C; export LC_COLLATE; }
16074(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16075 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16076 { LC_NUMERIC=C; export LC_NUMERIC; }
16077(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16078 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16079 { LC_MESSAGES=C; export LC_MESSAGES; }
16080
16081
16082# Name of the executable.
16083as_me=`(basename "$0") 2>/dev/null ||
16084$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16085 X"$0" : 'X\(//\)$' \| \
16086 X"$0" : 'X\(/\)$' \| \
16087 . : '\(.\)' 2>/dev/null ||
16088echo X/"$0" |
16089 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16090 /^X\/\(\/\/\)$/{ s//\1/; q; }
16091 /^X\/\(\/\).*/{ s//\1/; q; }
16092 s/.*/./; q'`
16093
16094# PATH needs CR, and LINENO needs CR and PATH.
16095# Avoid depending upon Character Ranges.
16096as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16097as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16098as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16099as_cr_digits='0123456789'
16100as_cr_alnum=$as_cr_Letters$as_cr_digits
16101
16102# The user is always right.
16103if test "${PATH_SEPARATOR+set}" != set; then
16104 echo "#! /bin/sh" >conftest.sh
16105 echo "exit 0" >>conftest.sh
16106 chmod +x conftest.sh
16107 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16108 PATH_SEPARATOR=';'
16109 else
16110 PATH_SEPARATOR=:
16111 fi
16112 rm -f conftest.sh
16113fi
16114
16115
16116 as_lineno_1=$LINENO
16117 as_lineno_2=$LINENO
16118 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16119 test "x$as_lineno_1" != "x$as_lineno_2" &&
16120 test "x$as_lineno_3" = "x$as_lineno_2" || {
16121 # Find who we are. Look in the path if we contain no path at all
16122 # relative or not.
16123 case $0 in
16124 *[\\/]* ) as_myself=$0 ;;
16125 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16126for as_dir in $PATH
16127do
16128 IFS=$as_save_IFS
16129 test -z "$as_dir" && as_dir=.
16130 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16131done
16132
16133 ;;
16134 esac
16135 # We did not find ourselves, most probably we were run as `sh COMMAND'
16136 # in which case we are not to be found in the path.
16137 if test "x$as_myself" = x; then
16138 as_myself=$0
16139 fi
16140 if test ! -f "$as_myself"; then
16141 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16142echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16143 { (exit 1); exit 1; }; }
16144 fi
16145 case $CONFIG_SHELL in
16146 '')
16147 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16148for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16149do
16150 IFS=$as_save_IFS
16151 test -z "$as_dir" && as_dir=.
16152 for as_base in sh bash ksh sh5; do
16153 case $as_dir in
16154 /*)
16155 if ("$as_dir/$as_base" -c '
16156 as_lineno_1=$LINENO
16157 as_lineno_2=$LINENO
16158 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16159 test "x$as_lineno_1" != "x$as_lineno_2" &&
16160 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16161 CONFIG_SHELL=$as_dir/$as_base
16162 export CONFIG_SHELL
16163 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16164 fi;;
16165 esac
16166 done
16167done
16168;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016169 esac
16170
Martin v. Löwis11437992002-04-12 09:54:03 +000016171 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16172 # uniformly replaced by the line number. The first 'sed' inserts a
16173 # line-number line before each line; the second 'sed' does the real
16174 # work. The second script uses 'N' to pair each line-number line
16175 # with the numbered line, and appends trailing '-' during
16176 # substitution so that $LINENO is not a special case at line end.
16177 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16178 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16179 sed '=' <$as_myself |
16180 sed '
16181 N
16182 s,$,-,
16183 : loop
16184 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16185 t loop
16186 s,-$,,
16187 s,^['$as_cr_digits']*\n,,
16188 ' >$as_me.lineno &&
16189 chmod +x $as_me.lineno ||
16190 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16191echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16192 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016193
Martin v. Löwis11437992002-04-12 09:54:03 +000016194 # Don't try to exec as it changes $[0], causing all sort of problems
16195 # (the dirname of $[0] is not the place where we might find the
16196 # original and so on. Autoconf is especially sensible to this).
16197 . ./$as_me.lineno
16198 # Exit status is that of the last command.
16199 exit
16200}
16201
16202
16203case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16204 *c*,-n*) ECHO_N= ECHO_C='
16205' ECHO_T=' ' ;;
16206 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16207 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16208esac
16209
16210if expr a : '\(a\)' >/dev/null 2>&1; then
16211 as_expr=expr
16212else
16213 as_expr=false
16214fi
16215
16216rm -f conf$$ conf$$.exe conf$$.file
16217echo >conf$$.file
16218if ln -s conf$$.file conf$$ 2>/dev/null; then
16219 # We could just check for DJGPP; but this test a) works b) is more generic
16220 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16221 if test -f conf$$.exe; then
16222 # Don't use ln at all; we don't have any links
16223 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016224 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016225 as_ln_s='ln -s'
16226 fi
16227elif ln conf$$.file conf$$ 2>/dev/null; then
16228 as_ln_s=ln
16229else
16230 as_ln_s='cp -p'
16231fi
16232rm -f conf$$ conf$$.exe conf$$.file
16233
16234as_executable_p="test -f"
16235
16236# Sed expression to map a string onto a valid CPP name.
16237as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16238
16239# Sed expression to map a string onto a valid variable name.
16240as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16241
16242
16243# IFS
16244# We need space, tab and new line, in precisely that order.
16245as_nl='
16246'
16247IFS=" $as_nl"
16248
16249# CDPATH.
16250$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16251
16252exec 6>&1
16253
16254# Open the log real soon, to keep \$[0] and so on meaningful, and to
16255# report actual input values of CONFIG_FILES etc. instead of their
16256# values after options handling. Logging --version etc. is OK.
16257exec 5>>config.log
16258{
16259 echo
16260 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16261## Running $as_me. ##
16262_ASBOX
16263} >&5
16264cat >&5 <<_CSEOF
16265
16266This file was extended by $as_me, which was
16267generated by GNU Autoconf 2.53. Invocation command line was
16268
16269 CONFIG_FILES = $CONFIG_FILES
16270 CONFIG_HEADERS = $CONFIG_HEADERS
16271 CONFIG_LINKS = $CONFIG_LINKS
16272 CONFIG_COMMANDS = $CONFIG_COMMANDS
16273 $ $0 $@
16274
16275_CSEOF
16276echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16277echo >&5
16278_ACEOF
16279
16280# Files that config.status was made for.
16281if test -n "$ac_config_files"; then
16282 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16283fi
16284
16285if test -n "$ac_config_headers"; then
16286 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16287fi
16288
16289if test -n "$ac_config_links"; then
16290 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16291fi
16292
16293if test -n "$ac_config_commands"; then
16294 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16295fi
16296
16297cat >>$CONFIG_STATUS <<\_ACEOF
16298
16299ac_cs_usage="\
16300\`$as_me' instantiates files from templates according to the
16301current configuration.
16302
16303Usage: $0 [OPTIONS] [FILE]...
16304
16305 -h, --help print this help, then exit
16306 -V, --version print version number, then exit
16307 -d, --debug don't remove temporary files
16308 --recheck update $as_me by reconfiguring in the same conditions
16309 --file=FILE[:TEMPLATE]
16310 instantiate the configuration file FILE
16311 --header=FILE[:TEMPLATE]
16312 instantiate the configuration header FILE
16313
16314Configuration files:
16315$config_files
16316
16317Configuration headers:
16318$config_headers
16319
16320Report bugs to <bug-autoconf@gnu.org>."
16321_ACEOF
16322
16323cat >>$CONFIG_STATUS <<_ACEOF
16324ac_cs_version="\\
16325config.status
16326configured by $0, generated by GNU Autoconf 2.53,
16327 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16328
16329Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16330Free Software Foundation, Inc.
16331This config.status script is free software; the Free Software Foundation
16332gives unlimited permission to copy, distribute and modify it."
16333srcdir=$srcdir
16334INSTALL="$INSTALL"
16335_ACEOF
16336
16337cat >>$CONFIG_STATUS <<\_ACEOF
16338# If no file are specified by the user, then we need to provide default
16339# value. By we need to know if files were specified by the user.
16340ac_need_defaults=:
16341while test $# != 0
16342do
16343 case $1 in
16344 --*=*)
16345 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16346 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16347 shift
16348 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16349 shift
16350 ;;
16351 -*);;
16352 *) # This is not an option, so the user has probably given explicit
16353 # arguments.
16354 ac_need_defaults=false;;
16355 esac
16356
16357 case $1 in
16358 # Handling of the options.
16359_ACEOF
16360cat >>$CONFIG_STATUS <<_ACEOF
16361 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16362 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16363 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16364_ACEOF
16365cat >>$CONFIG_STATUS <<\_ACEOF
16366 --version | --vers* | -V )
16367 echo "$ac_cs_version"; exit 0 ;;
16368 --he | --h)
16369 # Conflict between --help and --header
16370 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16371Try \`$0 --help' for more information." >&5
16372echo "$as_me: error: ambiguous option: $1
16373Try \`$0 --help' for more information." >&2;}
16374 { (exit 1); exit 1; }; };;
16375 --help | --hel | -h )
16376 echo "$ac_cs_usage"; exit 0 ;;
16377 --debug | --d* | -d )
16378 debug=: ;;
16379 --file | --fil | --fi | --f )
16380 shift
16381 CONFIG_FILES="$CONFIG_FILES $1"
16382 ac_need_defaults=false;;
16383 --header | --heade | --head | --hea )
16384 shift
16385 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16386 ac_need_defaults=false;;
16387
16388 # This is an error.
16389 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16390Try \`$0 --help' for more information." >&5
16391echo "$as_me: error: unrecognized option: $1
16392Try \`$0 --help' for more information." >&2;}
16393 { (exit 1); exit 1; }; } ;;
16394
16395 *) ac_config_targets="$ac_config_targets $1" ;;
16396
16397 esac
16398 shift
16399done
16400
16401_ACEOF
16402
16403
16404
16405
16406
16407cat >>$CONFIG_STATUS <<\_ACEOF
16408for ac_config_target in $ac_config_targets
16409do
16410 case "$ac_config_target" in
16411 # Handling of arguments.
16412 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16413 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16414 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16415 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16416echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16417 { (exit 1); exit 1; }; };;
16418 esac
16419done
16420
16421# If the user did not use the arguments to specify the items to instantiate,
16422# then the envvar interface is used. Set only those that are not.
16423# We use the long form for the default assignment because of an extremely
16424# bizarre bug on SunOS 4.1.3.
16425if $ac_need_defaults; then
16426 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16427 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16428fi
16429
16430# Create a temporary directory, and hook for its removal unless debugging.
16431$debug ||
16432{
16433 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16434 trap '{ (exit 1); exit 1; }' 1 2 13 15
16435}
16436
16437# Create a (secure) tmp directory for tmp files.
16438: ${TMPDIR=/tmp}
16439{
16440 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16441 test -n "$tmp" && test -d "$tmp"
16442} ||
16443{
16444 tmp=$TMPDIR/cs$$-$RANDOM
16445 (umask 077 && mkdir $tmp)
16446} ||
16447{
16448 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16449 { (exit 1); exit 1; }
16450}
16451
16452_ACEOF
16453
16454cat >>$CONFIG_STATUS <<_ACEOF
16455
16456#
16457# CONFIG_FILES section.
16458#
16459
16460# No need to generate the scripts if there are no CONFIG_FILES.
16461# This happens for instance when ./config.status config.h
16462if test -n "\$CONFIG_FILES"; then
16463 # Protect against being on the right side of a sed subst in config.status.
16464 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16465 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16466s,@SHELL@,$SHELL,;t t
16467s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16468s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16469s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16470s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16471s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16472s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16473s,@exec_prefix@,$exec_prefix,;t t
16474s,@prefix@,$prefix,;t t
16475s,@program_transform_name@,$program_transform_name,;t t
16476s,@bindir@,$bindir,;t t
16477s,@sbindir@,$sbindir,;t t
16478s,@libexecdir@,$libexecdir,;t t
16479s,@datadir@,$datadir,;t t
16480s,@sysconfdir@,$sysconfdir,;t t
16481s,@sharedstatedir@,$sharedstatedir,;t t
16482s,@localstatedir@,$localstatedir,;t t
16483s,@libdir@,$libdir,;t t
16484s,@includedir@,$includedir,;t t
16485s,@oldincludedir@,$oldincludedir,;t t
16486s,@infodir@,$infodir,;t t
16487s,@mandir@,$mandir,;t t
16488s,@build_alias@,$build_alias,;t t
16489s,@host_alias@,$host_alias,;t t
16490s,@target_alias@,$target_alias,;t t
16491s,@DEFS@,$DEFS,;t t
16492s,@ECHO_C@,$ECHO_C,;t t
16493s,@ECHO_N@,$ECHO_N,;t t
16494s,@ECHO_T@,$ECHO_T,;t t
16495s,@LIBS@,$LIBS,;t t
16496s,@VERSION@,$VERSION,;t t
16497s,@SOVERSION@,$SOVERSION,;t t
16498s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16499s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16500s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16501s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16502s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16503s,@MACHDEP@,$MACHDEP,;t t
16504s,@SGI_ABI@,$SGI_ABI,;t t
16505s,@CXX@,$CXX,;t t
16506s,@MAINOBJ@,$MAINOBJ,;t t
16507s,@EXEEXT@,$EXEEXT,;t t
16508s,@CC@,$CC,;t t
16509s,@CFLAGS@,$CFLAGS,;t t
16510s,@LDFLAGS@,$LDFLAGS,;t t
16511s,@CPPFLAGS@,$CPPFLAGS,;t t
16512s,@ac_ct_CC@,$ac_ct_CC,;t t
16513s,@OBJEXT@,$OBJEXT,;t t
16514s,@CPP@,$CPP,;t t
16515s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16516s,@LIBRARY@,$LIBRARY,;t t
16517s,@LDLIBRARY@,$LDLIBRARY,;t t
16518s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16519s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16520s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16521s,@INSTSONAME@,$INSTSONAME,;t t
16522s,@RUNSHARED@,$RUNSHARED,;t t
16523s,@LINKCC@,$LINKCC,;t t
16524s,@RANLIB@,$RANLIB,;t t
16525s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16526s,@AR@,$AR,;t t
16527s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16528s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16529s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16530s,@LN@,$LN,;t t
16531s,@OPT@,$OPT,;t t
16532s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16533s,@SO@,$SO,;t t
16534s,@LDSHARED@,$LDSHARED,;t t
16535s,@BLDSHARED@,$BLDSHARED,;t t
16536s,@CCSHARED@,$CCSHARED,;t t
16537s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16538s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016539s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000016540s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16541s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16542s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16543s,@LDLAST@,$LDLAST,;t t
16544s,@THREADOBJ@,$THREADOBJ,;t t
16545s,@DLINCLDIR@,$DLINCLDIR,;t t
16546s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16547s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16548s,@LIBOBJS@,$LIBOBJS,;t t
16549s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16550s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16551s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16552s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16553s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16554s,@LIBM@,$LIBM,;t t
16555s,@LIBC@,$LIBC,;t t
16556s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16557s,@THREADHEADERS@,$THREADHEADERS,;t t
16558s,@SRCDIRS@,$SRCDIRS,;t t
16559CEOF
16560
16561_ACEOF
16562
16563 cat >>$CONFIG_STATUS <<\_ACEOF
16564 # Split the substitutions into bite-sized pieces for seds with
16565 # small command number limits, like on Digital OSF/1 and HP-UX.
16566 ac_max_sed_lines=48
16567 ac_sed_frag=1 # Number of current file.
16568 ac_beg=1 # First line for current file.
16569 ac_end=$ac_max_sed_lines # Line after last line for current file.
16570 ac_more_lines=:
16571 ac_sed_cmds=
16572 while $ac_more_lines; do
16573 if test $ac_beg -gt 1; then
16574 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16575 else
16576 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16577 fi
16578 if test ! -s $tmp/subs.frag; then
16579 ac_more_lines=false
16580 else
16581 # The purpose of the label and of the branching condition is to
16582 # speed up the sed processing (if there are no `@' at all, there
16583 # is no need to browse any of the substitutions).
16584 # These are the two extra sed commands mentioned above.
16585 (echo ':t
16586 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16587 if test -z "$ac_sed_cmds"; then
16588 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16589 else
16590 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16591 fi
16592 ac_sed_frag=`expr $ac_sed_frag + 1`
16593 ac_beg=$ac_end
16594 ac_end=`expr $ac_end + $ac_max_sed_lines`
16595 fi
16596 done
16597 if test -z "$ac_sed_cmds"; then
16598 ac_sed_cmds=cat
16599 fi
16600fi # test -n "$CONFIG_FILES"
16601
16602_ACEOF
16603cat >>$CONFIG_STATUS <<\_ACEOF
16604for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16605 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16606 case $ac_file in
16607 - | *:- | *:-:* ) # input from stdin
16608 cat >$tmp/stdin
16609 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16610 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16611 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16612 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16613 * ) ac_file_in=$ac_file.in ;;
16614 esac
16615
16616 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16617 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16618$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16619 X"$ac_file" : 'X\(//\)[^/]' \| \
16620 X"$ac_file" : 'X\(//\)$' \| \
16621 X"$ac_file" : 'X\(/\)' \| \
16622 . : '\(.\)' 2>/dev/null ||
16623echo X"$ac_file" |
16624 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16625 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16626 /^X\(\/\/\)$/{ s//\1/; q; }
16627 /^X\(\/\).*/{ s//\1/; q; }
16628 s/.*/./; q'`
16629 { case "$ac_dir" in
16630 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16631 *) as_incr_dir=.;;
16632esac
16633as_dummy="$ac_dir"
16634for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16635 case $as_mkdir_dir in
16636 # Skip DOS drivespec
16637 ?:) as_incr_dir=$as_mkdir_dir ;;
16638 *)
16639 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16640 test -d "$as_incr_dir" ||
16641 mkdir "$as_incr_dir" ||
16642 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16643echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16644 { (exit 1); exit 1; }; }
16645 ;;
16646 esac
16647done; }
16648
16649 ac_builddir=.
16650
16651if test "$ac_dir" != .; then
16652 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16653 # A "../" for each directory in $ac_dir_suffix.
16654 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16655else
16656 ac_dir_suffix= ac_top_builddir=
16657fi
16658
16659case $srcdir in
16660 .) # No --srcdir option. We are building in place.
16661 ac_srcdir=.
16662 if test -z "$ac_top_builddir"; then
16663 ac_top_srcdir=.
16664 else
16665 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16666 fi ;;
16667 [\\/]* | ?:[\\/]* ) # Absolute path.
16668 ac_srcdir=$srcdir$ac_dir_suffix;
16669 ac_top_srcdir=$srcdir ;;
16670 *) # Relative path.
16671 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16672 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16673esac
16674# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16675# absolute.
16676ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16677ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16678ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16679ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16680
16681
16682 case $INSTALL in
16683 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16684 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16685 esac
16686
16687 if test x"$ac_file" != x-; then
16688 { echo "$as_me:$LINENO: creating $ac_file" >&5
16689echo "$as_me: creating $ac_file" >&6;}
16690 rm -f "$ac_file"
16691 fi
16692 # Let's still pretend it is `configure' which instantiates (i.e., don't
16693 # use $as_me), people would be surprised to read:
16694 # /* config.h. Generated by config.status. */
16695 if test x"$ac_file" = x-; then
16696 configure_input=
16697 else
16698 configure_input="$ac_file. "
16699 fi
16700 configure_input=$configure_input"Generated from `echo $ac_file_in |
16701 sed 's,.*/,,'` by configure."
16702
16703 # First look for the input files in the build tree, otherwise in the
16704 # src tree.
16705 ac_file_inputs=`IFS=:
16706 for f in $ac_file_in; do
16707 case $f in
16708 -) echo $tmp/stdin ;;
16709 [\\/$]*)
16710 # Absolute (can't be DOS-style, as IFS=:)
16711 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16712echo "$as_me: error: cannot find input file: $f" >&2;}
16713 { (exit 1); exit 1; }; }
16714 echo $f;;
16715 *) # Relative
16716 if test -f "$f"; then
16717 # Build tree
16718 echo $f
16719 elif test -f "$srcdir/$f"; then
16720 # Source tree
16721 echo $srcdir/$f
16722 else
16723 # /dev/null tree
16724 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16725echo "$as_me: error: cannot find input file: $f" >&2;}
16726 { (exit 1); exit 1; }; }
16727 fi;;
16728 esac
16729 done` || { (exit 1); exit 1; }
16730_ACEOF
16731cat >>$CONFIG_STATUS <<_ACEOF
16732 sed "$ac_vpsub
16733$extrasub
16734_ACEOF
16735cat >>$CONFIG_STATUS <<\_ACEOF
16736:t
16737/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16738s,@configure_input@,$configure_input,;t t
16739s,@srcdir@,$ac_srcdir,;t t
16740s,@abs_srcdir@,$ac_abs_srcdir,;t t
16741s,@top_srcdir@,$ac_top_srcdir,;t t
16742s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16743s,@builddir@,$ac_builddir,;t t
16744s,@abs_builddir@,$ac_abs_builddir,;t t
16745s,@top_builddir@,$ac_top_builddir,;t t
16746s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16747s,@INSTALL@,$ac_INSTALL,;t t
16748" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16749 rm -f $tmp/stdin
16750 if test x"$ac_file" != x-; then
16751 mv $tmp/out $ac_file
16752 else
16753 cat $tmp/out
16754 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016755 fi
16756
Martin v. Löwis11437992002-04-12 09:54:03 +000016757done
16758_ACEOF
16759cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016760
Martin v. Löwis11437992002-04-12 09:54:03 +000016761#
16762# CONFIG_HEADER section.
16763#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016764
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016765# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16766# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016767#
16768# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016769ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16770ac_dB='[ ].*$,\1#\2'
16771ac_dC=' '
16772ac_dD=',;t'
16773# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16774ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16775ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016776ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016777ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016778
Martin v. Löwis11437992002-04-12 09:54:03 +000016779for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016780 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016781 case $ac_file in
16782 - | *:- | *:-:* ) # input from stdin
16783 cat >$tmp/stdin
16784 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16785 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16786 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16787 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16788 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016789 esac
16790
Martin v. Löwis11437992002-04-12 09:54:03 +000016791 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16792echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016793
Martin v. Löwis11437992002-04-12 09:54:03 +000016794 # First look for the input files in the build tree, otherwise in the
16795 # src tree.
16796 ac_file_inputs=`IFS=:
16797 for f in $ac_file_in; do
16798 case $f in
16799 -) echo $tmp/stdin ;;
16800 [\\/$]*)
16801 # Absolute (can't be DOS-style, as IFS=:)
16802 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16803echo "$as_me: error: cannot find input file: $f" >&2;}
16804 { (exit 1); exit 1; }; }
16805 echo $f;;
16806 *) # Relative
16807 if test -f "$f"; then
16808 # Build tree
16809 echo $f
16810 elif test -f "$srcdir/$f"; then
16811 # Source tree
16812 echo $srcdir/$f
16813 else
16814 # /dev/null tree
16815 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16816echo "$as_me: error: cannot find input file: $f" >&2;}
16817 { (exit 1); exit 1; }; }
16818 fi;;
16819 esac
16820 done` || { (exit 1); exit 1; }
16821 # Remove the trailing spaces.
16822 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016823
Martin v. Löwis11437992002-04-12 09:54:03 +000016824_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016825
Martin v. Löwis11437992002-04-12 09:54:03 +000016826# Transform confdefs.h into two sed scripts, `conftest.defines' and
16827# `conftest.undefs', that substitutes the proper values into
16828# config.h.in to produce config.h. The first handles `#define'
16829# templates, and the second `#undef' templates.
16830# And first: Protect against being on the right side of a sed subst in
16831# config.status. Protect against being in an unquoted here document
16832# in config.status.
16833rm -f conftest.defines conftest.undefs
16834# Using a here document instead of a string reduces the quoting nightmare.
16835# Putting comments in sed scripts is not portable.
16836#
16837# `end' is used to avoid that the second main sed command (meant for
16838# 0-ary CPP macros) applies to n-ary macro definitions.
16839# See the Autoconf documentation for `clear'.
16840cat >confdef2sed.sed <<\_ACEOF
16841s/[\\&,]/\\&/g
16842s,[\\$`],\\&,g
16843t clear
16844: clear
16845s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16846t end
16847s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16848: end
16849_ACEOF
16850# If some macros were called several times there might be several times
16851# the same #defines, which is useless. Nevertheless, we may not want to
16852# sort them, since we want the *last* AC-DEFINE to be honored.
16853uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16854sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16855rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016856
16857# This sed command replaces #undef with comments. This is necessary, for
16858# example, in the case of _POSIX_SOURCE, which is predefined and required
16859# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016860cat >>conftest.undefs <<\_ACEOF
16861s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16862_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016863
Martin v. Löwis11437992002-04-12 09:54:03 +000016864# Break up conftest.defines because some shells have a limit on the size
16865# of here documents, and old seds have small limits too (100 cmds).
16866echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16867echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16868echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16869echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016870rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016871while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016872do
Martin v. Löwis11437992002-04-12 09:54:03 +000016873 # Write a limited-size here document to $tmp/defines.sed.
16874 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16875 # Speed up: don't consider the non `#define' lines.
16876 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16877 # Work around the forget-to-reset-the-flag bug.
16878 echo 't clr' >>$CONFIG_STATUS
16879 echo ': clr' >>$CONFIG_STATUS
16880 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016881 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016882 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16883 rm -f $tmp/in
16884 mv $tmp/out $tmp/in
16885' >>$CONFIG_STATUS
16886 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16887 rm -f conftest.defines
16888 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016889done
Martin v. Löwis11437992002-04-12 09:54:03 +000016890rm -f conftest.defines
16891echo ' fi # egrep' >>$CONFIG_STATUS
16892echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016893
Martin v. Löwis11437992002-04-12 09:54:03 +000016894# Break up conftest.undefs because some shells have a limit on the size
16895# of here documents, and old seds have small limits too (100 cmds).
16896echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16897rm -f conftest.tail
16898while grep . conftest.undefs >/dev/null
16899do
16900 # Write a limited-size here document to $tmp/undefs.sed.
16901 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16902 # Speed up: don't consider the non `#undef'
16903 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16904 # Work around the forget-to-reset-the-flag bug.
16905 echo 't clr' >>$CONFIG_STATUS
16906 echo ': clr' >>$CONFIG_STATUS
16907 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16908 echo 'CEOF
16909 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16910 rm -f $tmp/in
16911 mv $tmp/out $tmp/in
16912' >>$CONFIG_STATUS
16913 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16914 rm -f conftest.undefs
16915 mv conftest.tail conftest.undefs
16916done
16917rm -f conftest.undefs
16918
16919cat >>$CONFIG_STATUS <<\_ACEOF
16920 # Let's still pretend it is `configure' which instantiates (i.e., don't
16921 # use $as_me), people would be surprised to read:
16922 # /* config.h. Generated by config.status. */
16923 if test x"$ac_file" = x-; then
16924 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016925 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016926 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016927 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016928 cat $tmp/in >>$tmp/config.h
16929 rm -f $tmp/in
16930 if test x"$ac_file" != x-; then
16931 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16932 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16933echo "$as_me: $ac_file is unchanged" >&6;}
16934 else
16935 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16936$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16937 X"$ac_file" : 'X\(//\)[^/]' \| \
16938 X"$ac_file" : 'X\(//\)$' \| \
16939 X"$ac_file" : 'X\(/\)' \| \
16940 . : '\(.\)' 2>/dev/null ||
16941echo X"$ac_file" |
16942 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16943 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16944 /^X\(\/\/\)$/{ s//\1/; q; }
16945 /^X\(\/\).*/{ s//\1/; q; }
16946 s/.*/./; q'`
16947 { case "$ac_dir" in
16948 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16949 *) as_incr_dir=.;;
16950esac
16951as_dummy="$ac_dir"
16952for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16953 case $as_mkdir_dir in
16954 # Skip DOS drivespec
16955 ?:) as_incr_dir=$as_mkdir_dir ;;
16956 *)
16957 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16958 test -d "$as_incr_dir" ||
16959 mkdir "$as_incr_dir" ||
16960 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16961echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16962 { (exit 1); exit 1; }; }
16963 ;;
16964 esac
16965done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016966
Martin v. Löwis11437992002-04-12 09:54:03 +000016967 rm -f $ac_file
16968 mv $tmp/config.h $ac_file
16969 fi
16970 else
16971 cat $tmp/config.h
16972 rm -f $tmp/config.h
16973 fi
16974done
16975_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016976
Martin v. Löwis11437992002-04-12 09:54:03 +000016977cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016978
Martin v. Löwis11437992002-04-12 09:54:03 +000016979{ (exit 0); exit 0; }
16980_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016981chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016982ac_clean_files=$ac_clean_files_save
16983
16984
16985# configure is writing to config.log, and then calls config.status.
16986# config.status does its own redirection, appending to config.log.
16987# Unfortunately, on DOS this fails, as config.log is still kept open
16988# by configure, so config.status won't be able to write to it; its
16989# output is simply discarded. So we exec the FD to /dev/null,
16990# effectively closing config.log, so it can be properly (re)opened and
16991# appended to by config.status. When coming back to configure, we
16992# need to make the FD available again.
16993if test "$no_create" != yes; then
16994 ac_cs_success=:
16995 exec 5>/dev/null
16996 $SHELL $CONFIG_STATUS || ac_cs_success=false
16997 exec 5>>config.log
16998 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16999 # would make configure fail if this is the last instruction.
17000 $ac_cs_success || { (exit 1); exit 1; }
17001fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017002
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017003
17004echo "creating Setup"
17005if test ! -f Modules/Setup
17006then
17007 cp $srcdir/Modules/Setup.dist Modules/Setup
17008fi
17009
17010echo "creating Setup.local"
17011if test ! -f Modules/Setup.local
17012then
17013 echo "# Edit this file for local setup changes" >Modules/Setup.local
17014fi
17015
17016echo "creating Makefile"
17017$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17018 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017019 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017020mv config.c Modules