blob: 181c98342ea6f05cddf1c615f6e73bb8c428bb58 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00002# From configure.in Revision: 1.349 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis11437992002-04-12 09:54:03 +00004# Generated by GNU Autoconf 2.53.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000010
Martin v. Löwis11437992002-04-12 09:54:03 +000011if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
18## --------------------- ##
19## M4sh Initialization. ##
20## --------------------- ##
21
22# Be Bourne compatible
23if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24 emulate sh
25 NULLCMD=:
26elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27 set -o posix
28fi
29
30# NLS nuisances.
31# Support unset when possible.
32if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
33 as_unset=unset
34else
35 as_unset=false
36fi
37
38(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
39 { $as_unset LANG || test "${LANG+set}" != set; } ||
40 { LANG=C; export LANG; }
41(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
42 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
43 { LC_ALL=C; export LC_ALL; }
44(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
45 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
46 { LC_TIME=C; export LC_TIME; }
47(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
48 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
49 { LC_CTYPE=C; export LC_CTYPE; }
50(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
51 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
52 { LANGUAGE=C; export LANGUAGE; }
53(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
54 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
55 { LC_COLLATE=C; export LC_COLLATE; }
56(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
57 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
58 { LC_NUMERIC=C; export LC_NUMERIC; }
59(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
60 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
61 { LC_MESSAGES=C; export LC_MESSAGES; }
62
63
64# Name of the executable.
65as_me=`(basename "$0") 2>/dev/null ||
66$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67 X"$0" : 'X\(//\)$' \| \
68 X"$0" : 'X\(/\)$' \| \
69 . : '\(.\)' 2>/dev/null ||
70echo X/"$0" |
71 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
72 /^X\/\(\/\/\)$/{ s//\1/; q; }
73 /^X\/\(\/\).*/{ s//\1/; q; }
74 s/.*/./; q'`
75
76# PATH needs CR, and LINENO needs CR and PATH.
77# Avoid depending upon Character Ranges.
78as_cr_letters='abcdefghijklmnopqrstuvwxyz'
79as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
80as_cr_Letters=$as_cr_letters$as_cr_LETTERS
81as_cr_digits='0123456789'
82as_cr_alnum=$as_cr_Letters$as_cr_digits
83
84# The user is always right.
85if test "${PATH_SEPARATOR+set}" != set; then
86 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
89 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
90 PATH_SEPARATOR=';'
91 else
92 PATH_SEPARATOR=:
93 fi
94 rm -f conftest.sh
95fi
96
97
98 as_lineno_1=$LINENO
99 as_lineno_2=$LINENO
100 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
101 test "x$as_lineno_1" != "x$as_lineno_2" &&
102 test "x$as_lineno_3" = "x$as_lineno_2" || {
103 # Find who we are. Look in the path if we contain no path at all
104 # relative or not.
105 case $0 in
106 *[\\/]* ) as_myself=$0 ;;
107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
108for as_dir in $PATH
109do
110 IFS=$as_save_IFS
111 test -z "$as_dir" && as_dir=.
112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
113done
114
115 ;;
116 esac
117 # We did not find ourselves, most probably we were run as `sh COMMAND'
118 # in which case we are not to be found in the path.
119 if test "x$as_myself" = x; then
120 as_myself=$0
121 fi
122 if test ! -f "$as_myself"; then
123 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
124 { (exit 1); exit 1; }; }
125 fi
126 case $CONFIG_SHELL in
127 '')
128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
129for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
130do
131 IFS=$as_save_IFS
132 test -z "$as_dir" && as_dir=.
133 for as_base in sh bash ksh sh5; do
134 case $as_dir in
135 /*)
136 if ("$as_dir/$as_base" -c '
137 as_lineno_1=$LINENO
138 as_lineno_2=$LINENO
139 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
140 test "x$as_lineno_1" != "x$as_lineno_2" &&
141 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
142 CONFIG_SHELL=$as_dir/$as_base
143 export CONFIG_SHELL
144 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
145 fi;;
146 esac
147 done
148done
149;;
150 esac
151
152 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
153 # uniformly replaced by the line number. The first 'sed' inserts a
154 # line-number line before each line; the second 'sed' does the real
155 # work. The second script uses 'N' to pair each line-number line
156 # with the numbered line, and appends trailing '-' during
157 # substitution so that $LINENO is not a special case at line end.
158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
159 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
160 sed '=' <$as_myself |
161 sed '
162 N
163 s,$,-,
164 : loop
165 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
166 t loop
167 s,-$,,
168 s,^['$as_cr_digits']*\n,,
169 ' >$as_me.lineno &&
170 chmod +x $as_me.lineno ||
171 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
172 { (exit 1); exit 1; }; }
173
174 # Don't try to exec as it changes $[0], causing all sort of problems
175 # (the dirname of $[0] is not the place where we might find the
176 # original and so on. Autoconf is especially sensible to this).
177 . ./$as_me.lineno
178 # Exit status is that of the last command.
179 exit
180}
181
182
183case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
184 *c*,-n*) ECHO_N= ECHO_C='
185' ECHO_T=' ' ;;
186 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
187 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
188esac
189
190if expr a : '\(a\)' >/dev/null 2>&1; then
191 as_expr=expr
192else
193 as_expr=false
194fi
195
196rm -f conf$$ conf$$.exe conf$$.file
197echo >conf$$.file
198if ln -s conf$$.file conf$$ 2>/dev/null; then
199 # We could just check for DJGPP; but this test a) works b) is more generic
200 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
201 if test -f conf$$.exe; then
202 # Don't use ln at all; we don't have any links
203 as_ln_s='cp -p'
204 else
205 as_ln_s='ln -s'
206 fi
207elif ln conf$$.file conf$$ 2>/dev/null; then
208 as_ln_s=ln
209else
210 as_ln_s='cp -p'
211fi
212rm -f conf$$ conf$$.exe conf$$.file
213
214as_executable_p="test -f"
215
216# Sed expression to map a string onto a valid CPP name.
217as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
218
219# Sed expression to map a string onto a valid variable name.
220as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
221
222
223# IFS
224# We need space, tab and new line, in precisely that order.
225as_nl='
226'
227IFS=" $as_nl"
228
229# CDPATH.
230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
231
232
233# Name of the host.
234# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
235# so uname gets run too.
236ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
237
238exec 6>&1
239
240#
241# Initializations.
242#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000243ac_default_prefix=/usr/local
Martin v. Löwis11437992002-04-12 09:54:03 +0000244cross_compiling=no
245subdirs=
246MFLAGS=
247MAKEFLAGS=
248SHELL=${CONFIG_SHELL-/bin/sh}
249
250# Maximum number of lines to put in a shell here document.
251# This variable seems obsolete. It should probably be removed, and
252# only ac_max_sed_lines should be used.
253: ${ac_max_here_lines=38}
254
255# Identity of this package.
256PACKAGE_NAME=
257PACKAGE_TARNAME=
258PACKAGE_VERSION=
259PACKAGE_STRING=
260PACKAGE_BUGREPORT=
261
262ac_unique_file="Include/object.h"
263# Factoring default headers for most tests.
264ac_includes_default="\
265#include <stdio.h>
266#if HAVE_SYS_TYPES_H
267# include <sys/types.h>
268#endif
269#if HAVE_SYS_STAT_H
270# include <sys/stat.h>
271#endif
272#if STDC_HEADERS
273# include <stdlib.h>
274# include <stddef.h>
275#else
276# if HAVE_STDLIB_H
277# include <stdlib.h>
278# endif
279#endif
280#if HAVE_STRING_H
281# if !STDC_HEADERS && HAVE_MEMORY_H
282# include <memory.h>
283# endif
284# include <string.h>
285#endif
286#if HAVE_STRINGS_H
287# include <strings.h>
288#endif
289#if HAVE_INTTYPES_H
290# include <inttypes.h>
291#else
292# if HAVE_STDINT_H
293# include <stdint.h>
294# endif
295#endif
296#if HAVE_UNISTD_H
297# include <unistd.h>
298#endif"
299
Guido van Rossum627b2d71993-12-24 10:39:16 +0000300
Guido van Rossum7f43da71994-08-01 12:15:30 +0000301# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000302ac_init_help=
303ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304# The variables have the same names as the options, with
305# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000306cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000308no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000309no_recursion=
310prefix=NONE
311program_prefix=NONE
312program_suffix=NONE
313program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000314silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000315site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318x_includes=NONE
319x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000320
321# Installation directory options.
322# These are left unexpanded so users can "make install exec_prefix=/foo"
323# and all the variables that are supposed to be based on exec_prefix
324# by default will actually change.
325# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000326bindir='${exec_prefix}/bin'
327sbindir='${exec_prefix}/sbin'
328libexecdir='${exec_prefix}/libexec'
329datadir='${prefix}/share'
330sysconfdir='${prefix}/etc'
331sharedstatedir='${prefix}/com'
332localstatedir='${prefix}/var'
333libdir='${exec_prefix}/lib'
334includedir='${prefix}/include'
335oldincludedir='/usr/include'
336infodir='${prefix}/info'
337mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000338
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339ac_prev=
340for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000341do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000342 # If the previous option needs an argument, assign it.
343 if test -n "$ac_prev"; then
344 eval "$ac_prev=\$ac_option"
345 ac_prev=
346 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000348
Martin v. Löwis11437992002-04-12 09:54:03 +0000349 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000351 # Accept the important Cygnus configure options, so we can diagnose typos.
352
Martin v. Löwis11437992002-04-12 09:54:03 +0000353 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000355 -bindir | --bindir | --bindi | --bind | --bin | --bi)
356 ac_prev=bindir ;;
357 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000358 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000359
360 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000361 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 -cache-file | --cache-file | --cache-fil | --cache-fi \
366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
367 ac_prev=cache_file ;;
368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 cache_file=$ac_optarg ;;
371
372 --config-cache | -C)
373 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
376 ac_prev=datadir ;;
377 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
378 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000379 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000380
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000382 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
385 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
386 { (exit 1); exit 1; }; }
387 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
388 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000391 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395 { (exit 1); exit 1; }; }
396 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397 case $ac_option in
398 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 *) ac_optarg=yes ;;
400 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
404 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
405 | --exec | --exe | --ex)
406 ac_prev=exec_prefix ;;
407 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
408 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
409 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 # Obsolete; use --with-gas.
414 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 -help | --help | --hel | --he | -h)
417 ac_init_help=long ;;
418 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
419 ac_init_help=recursive ;;
420 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
421 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000426 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 -includedir | --includedir | --includedi | --included | --include \
429 | --includ | --inclu | --incl | --inc)
430 ac_prev=includedir ;;
431 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
432 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000434
435 -infodir | --infodir | --infodi | --infod | --info | --inf)
436 ac_prev=infodir ;;
437 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439
440 -libdir | --libdir | --libdi | --libd)
441 ac_prev=libdir ;;
442 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000444
445 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
446 | --libexe | --libex | --libe)
447 ac_prev=libexecdir ;;
448 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
449 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -localstatedir | --localstatedir | --localstatedi | --localstated \
453 | --localstate | --localstat | --localsta | --localst \
454 | --locals | --local | --loca | --loc | --lo)
455 ac_prev=localstatedir ;;
456 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
457 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
458 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000460
461 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
462 ac_prev=mandir ;;
463 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 # Obsolete; use --without-fp.
468 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469
470 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000471 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 no_create=yes ;;
473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
476 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000478 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
479 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
480 | --oldin | --oldi | --old | --ol | --o)
481 ac_prev=oldincludedir ;;
482 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
483 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
484 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
488 ac_prev=prefix ;;
489 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000490 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
492 -program-prefix | --program-prefix | --program-prefi | --program-pref \
493 | --program-pre | --program-pr | --program-p)
494 ac_prev=program_prefix ;;
495 -program-prefix=* | --program-prefix=* | --program-prefi=* \
496 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498
499 -program-suffix | --program-suffix | --program-suffi | --program-suff \
500 | --program-suf | --program-su | --program-s)
501 ac_prev=program_suffix ;;
502 -program-suffix=* | --program-suffix=* | --program-suffi=* \
503 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-transform-name | --program-transform-name \
507 | --program-transform-nam | --program-transform-na \
508 | --program-transform-n | --program-transform- \
509 | --program-transform | --program-transfor \
510 | --program-transfo | --program-transf \
511 | --program-trans | --program-tran \
512 | --progr-tra | --program-tr | --program-t)
513 ac_prev=program_transform_name ;;
514 -program-transform-name=* | --program-transform-name=* \
515 | --program-transform-nam=* | --program-transform-na=* \
516 | --program-transform-n=* | --program-transform-=* \
517 | --program-transform=* | --program-transfor=* \
518 | --program-transfo=* | --program-transf=* \
519 | --program-trans=* | --program-tran=* \
520 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
524 | -silent | --silent | --silen | --sile | --sil)
525 silent=yes ;;
526
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000527 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
528 ac_prev=sbindir ;;
529 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
530 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000532
533 -sharedstatedir | --sharedstatedir | --sharedstatedi \
534 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
535 | --sharedst | --shareds | --shared | --share | --shar \
536 | --sha | --sh)
537 ac_prev=sharedstatedir ;;
538 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
539 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
540 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
541 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544 -site | --site | --sit)
545 ac_prev=site ;;
546 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000547 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
550 ac_prev=srcdir ;;
551 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000552 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
555 | --syscon | --sysco | --sysc | --sys | --sy)
556 ac_prev=sysconfdir ;;
557 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
558 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565
566 -v | -verbose | --verbose | --verbos | --verbo | --verb)
567 verbose=yes ;;
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 -version | --version | --versio | --versi | --vers | -V)
570 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000571
572 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
576 { echo "$as_me: error: invalid package name: $ac_package" >&2
577 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 case $ac_option in
580 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581 *) ac_optarg=yes ;;
582 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000584
585 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package | sed 's/-/_/g'`
592 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000594 --x)
595 # Obsolete; use --with-x.
596 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597
598 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
599 | --x-incl | --x-inc | --x-in | --x-i)
600 ac_prev=x_includes ;;
601 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
602 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
605 -x-libraries | --x-libraries | --x-librarie | --x-librari \
606 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
607 ac_prev=x_libraries ;;
608 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
609 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000610 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
Martin v. Löwis11437992002-04-12 09:54:03 +0000612 -*) { echo "$as_me: error: unrecognized option: $ac_option
613Try \`$0 --help' for more information." >&2
614 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615 ;;
616
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 *=*)
618 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
619 # Reject names that are not valid shell variable names.
620 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
621 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
622 { (exit 1); exit 1; }; }
623 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
624 eval "$ac_envvar='$ac_optarg'"
625 export $ac_envvar ;;
626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000627 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 # FIXME: should be removed in autoconf 3.0.
629 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
630 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
631 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
632 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633 ;;
634
635 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636done
637
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
640 { echo "$as_me: error: missing argument to $ac_option" >&2
641 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642fi
643
Martin v. Löwis11437992002-04-12 09:54:03 +0000644# Be sure to have absolute paths.
645for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646do
Martin v. Löwis11437992002-04-12 09:54:03 +0000647 eval ac_val=$`echo $ac_var`
648 case $ac_val in
649 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
650 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
651 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652 esac
653done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
657 localstatedir libdir includedir oldincludedir infodir mandir
658do
659 eval ac_val=$`echo $ac_var`
660 case $ac_val in
661 [\\/$]* | ?:[\\/]* ) ;;
662 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
663 { (exit 1); exit 1; }; };;
664 esac
665done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666
Martin v. Löwis11437992002-04-12 09:54:03 +0000667# There might be people who depend on the old broken behavior: `$host'
668# used to hold the argument of --host etc.
669# FIXME: To remove some day.
670build=$build_alias
671host=$host_alias
672target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673
Martin v. Löwis11437992002-04-12 09:54:03 +0000674# FIXME: To remove some day.
675if test "x$host_alias" != x; then
676 if test "x$build_alias" = x; then
677 cross_compiling=maybe
678 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
679 If a cross compiler is detected then cross compile mode will be used." >&2
680 elif test "x$build_alias" != "x$host_alias"; then
681 cross_compiling=yes
682 fi
683fi
684
685ac_tool_prefix=
686test -n "$host_alias" && ac_tool_prefix=$host_alias-
687
688test "$silent" = yes && exec 6>/dev/null
689
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
691# Find the source files, if location was not specified.
692if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000693 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000694 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000695 ac_confdir=`(dirname "$0") 2>/dev/null ||
696$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
697 X"$0" : 'X\(//\)[^/]' \| \
698 X"$0" : 'X\(//\)$' \| \
699 X"$0" : 'X\(/\)' \| \
700 . : '\(.\)' 2>/dev/null ||
701echo X"$0" |
702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
703 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
704 /^X\(\/\/\)$/{ s//\1/; q; }
705 /^X\(\/\).*/{ s//\1/; q; }
706 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 srcdir=$ac_confdir
708 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709 srcdir=..
710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711else
712 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000716 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
717 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000719 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
720 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000722fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000723srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
724ac_env_build_alias_set=${build_alias+set}
725ac_env_build_alias_value=$build_alias
726ac_cv_env_build_alias_set=${build_alias+set}
727ac_cv_env_build_alias_value=$build_alias
728ac_env_host_alias_set=${host_alias+set}
729ac_env_host_alias_value=$host_alias
730ac_cv_env_host_alias_set=${host_alias+set}
731ac_cv_env_host_alias_value=$host_alias
732ac_env_target_alias_set=${target_alias+set}
733ac_env_target_alias_value=$target_alias
734ac_cv_env_target_alias_set=${target_alias+set}
735ac_cv_env_target_alias_value=$target_alias
736ac_env_CC_set=${CC+set}
737ac_env_CC_value=$CC
738ac_cv_env_CC_set=${CC+set}
739ac_cv_env_CC_value=$CC
740ac_env_CFLAGS_set=${CFLAGS+set}
741ac_env_CFLAGS_value=$CFLAGS
742ac_cv_env_CFLAGS_set=${CFLAGS+set}
743ac_cv_env_CFLAGS_value=$CFLAGS
744ac_env_LDFLAGS_set=${LDFLAGS+set}
745ac_env_LDFLAGS_value=$LDFLAGS
746ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
747ac_cv_env_LDFLAGS_value=$LDFLAGS
748ac_env_CPPFLAGS_set=${CPPFLAGS+set}
749ac_env_CPPFLAGS_value=$CPPFLAGS
750ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
751ac_cv_env_CPPFLAGS_value=$CPPFLAGS
752ac_env_CPP_set=${CPP+set}
753ac_env_CPP_value=$CPP
754ac_cv_env_CPP_set=${CPP+set}
755ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756
Martin v. Löwis11437992002-04-12 09:54:03 +0000757#
758# Report the --help message.
759#
760if test "$ac_init_help" = "long"; then
761 # Omit some internal or obsolete options to make the list less imposing.
762 # This message is too long to be a string in the A/UX 3.1 sh.
763 cat <<_ACEOF
764\`configure' configures this package to adapt to many kinds of systems.
765
766Usage: $0 [OPTION]... [VAR=VALUE]...
767
768To assign environment variables (e.g., CC, CFLAGS...), specify them as
769VAR=VALUE. See below for descriptions of some of the useful variables.
770
771Defaults for the options are specified in brackets.
772
773Configuration:
774 -h, --help display this help and exit
775 --help=short display options specific to this package
776 --help=recursive display the short help of all the included packages
777 -V, --version display version information and exit
778 -q, --quiet, --silent do not print \`checking...' messages
779 --cache-file=FILE cache test results in FILE [disabled]
780 -C, --config-cache alias for \`--cache-file=config.cache'
781 -n, --no-create do not create output files
782 --srcdir=DIR find the sources in DIR [configure dir or \`..']
783
784_ACEOF
785
786 cat <<_ACEOF
787Installation directories:
788 --prefix=PREFIX install architecture-independent files in PREFIX
789 [$ac_default_prefix]
790 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
791 [PREFIX]
792
793By default, \`make install' will install all the files in
794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
796for instance \`--prefix=\$HOME'.
797
798For better control, use the options below.
799
800Fine tuning of the installation directories:
801 --bindir=DIR user executables [EPREFIX/bin]
802 --sbindir=DIR system admin executables [EPREFIX/sbin]
803 --libexecdir=DIR program executables [EPREFIX/libexec]
804 --datadir=DIR read-only architecture-independent data [PREFIX/share]
805 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
806 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
807 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
808 --libdir=DIR object code libraries [EPREFIX/lib]
809 --includedir=DIR C header files [PREFIX/include]
810 --oldincludedir=DIR C header files for non-gcc [/usr/include]
811 --infodir=DIR info documentation [PREFIX/info]
812 --mandir=DIR man documentation [PREFIX/man]
813_ACEOF
814
815 cat <<\_ACEOF
816_ACEOF
817fi
818
819if test -n "$ac_init_help"; then
820
821 cat <<\_ACEOF
822
823Optional Features:
824 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
825 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
826 --enable-framework=INSTALLDIR Build (MacOSX|Darwin) framework
827 --enable-shared disable/enable building shared python library
828 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
829 --enable-ipv6 Enable ipv6 (with ipv4) support
830 --disable-ipv6 Disable ipv6 support
831 --enable-unicode=ucs2,ucs4 Enable Unicode strings (default is yes)
832
833Optional Packages:
834 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
835 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
836 --without-gcc never use gcc
837 --with-cxx=<compiler> enable C++ support
838 --with-suffix=.exe set executable suffix
839 --with-pydebug build with Py_DEBUG defined
840 --with-libs='lib1 ...' link against additional libs
841 --with-signal-module disable/enable signal module
842 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
843 --with(out)-threads=DIRECTORY disable/enable thread support
844 --with(out)-thread=DIRECTORY deprecated; use --with(out)-threads
845 --with-pth use GNU pth threading libraries
Jack Jansen7b8c7542002-04-14 20:12:41 +0000846 --with(out)-universal-newlines disable/enable foreign newlines
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +0000847 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 --with(out)-pymalloc disable/enable specialized mallocs
849 --with-wctype-functions use wctype.h functions
850 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
851 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking
852 --with-fpectl enable SIGFPE catching
853 --with-libm=STRING math library
854 --with-libc=STRING C library
855
856Some influential environment variables:
857 CC C compiler command
858 CFLAGS C compiler flags
859 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
860 nonstandard directory <lib dir>
861 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
862 headers in a nonstandard directory <include dir>
863 CPP C preprocessor
864
865Use these variables to override the choices made by `configure' or to help
866it to find libraries and programs with nonstandard names/locations.
867
868_ACEOF
869fi
870
871if test "$ac_init_help" = "recursive"; then
872 # If there are subdirs, report their specific --help.
873 ac_popdir=`pwd`
874 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
875 test -d $ac_dir || continue
876 ac_builddir=.
877
878if test "$ac_dir" != .; then
879 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
880 # A "../" for each directory in $ac_dir_suffix.
881 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
882else
883 ac_dir_suffix= ac_top_builddir=
884fi
885
886case $srcdir in
887 .) # No --srcdir option. We are building in place.
888 ac_srcdir=.
889 if test -z "$ac_top_builddir"; then
890 ac_top_srcdir=.
891 else
892 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
893 fi ;;
894 [\\/]* | ?:[\\/]* ) # Absolute path.
895 ac_srcdir=$srcdir$ac_dir_suffix;
896 ac_top_srcdir=$srcdir ;;
897 *) # Relative path.
898 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
899 ac_top_srcdir=$ac_top_builddir$srcdir ;;
900esac
901# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
902# absolute.
903ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
904ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
905ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
906ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
907
908 cd $ac_dir
909 # Check for guested configure; otherwise get Cygnus style configure.
910 if test -f $ac_srcdir/configure.gnu; then
911 echo
912 $SHELL $ac_srcdir/configure.gnu --help=recursive
913 elif test -f $ac_srcdir/configure; then
914 echo
915 $SHELL $ac_srcdir/configure --help=recursive
916 elif test -f $ac_srcdir/configure.ac ||
917 test -f $ac_srcdir/configure.in; then
918 echo
919 $ac_configure --help
920 else
921 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
922 fi
923 cd $ac_popdir
924 done
925fi
926
927test -n "$ac_init_help" && exit 0
928if $ac_init_version; then
929 cat <<\_ACEOF
930
931Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
932Free Software Foundation, Inc.
933This configure script is free software; the Free Software Foundation
934gives unlimited permission to copy, distribute and modify it.
935_ACEOF
936 exit 0
937fi
938exec 5>config.log
939cat >&5 <<_ACEOF
940This file contains any messages produced by compilers while
941running configure, to aid debugging if configure makes a mistake.
942
943It was created by $as_me, which was
944generated by GNU Autoconf 2.53. Invocation command line was
945
946 $ $0 $@
947
948_ACEOF
949{
950cat <<_ASUNAME
951## --------- ##
952## Platform. ##
953## --------- ##
954
955hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
956uname -m = `(uname -m) 2>/dev/null || echo unknown`
957uname -r = `(uname -r) 2>/dev/null || echo unknown`
958uname -s = `(uname -s) 2>/dev/null || echo unknown`
959uname -v = `(uname -v) 2>/dev/null || echo unknown`
960
961/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
962/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
963
964/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
965/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
966/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
967hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
968/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
969/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
970/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
971
972_ASUNAME
973
974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
975for as_dir in $PATH
976do
977 IFS=$as_save_IFS
978 test -z "$as_dir" && as_dir=.
979 echo "PATH: $as_dir"
980done
981
982} >&5
983
984cat >&5 <<_ACEOF
985
986
987## ----------- ##
988## Core tests. ##
989## ----------- ##
990
991_ACEOF
992
993
994# Keep a trace of the command line.
995# Strip out --no-create and --no-recursion so they do not pile up.
996# Also quote any args containing shell meta-characters.
997ac_configure_args=
998ac_sep=
999for ac_arg
1000do
1001 case $ac_arg in
1002 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1003 | --no-cr | --no-c | -n ) continue ;;
1004 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1005 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1006 continue ;;
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1009 esac
1010 case " $ac_configure_args " in
1011 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1012 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1013 ac_sep=" " ;;
1014 esac
1015 # Get rid of the leading space.
1016done
1017
1018# When interrupted or exit'd, cleanup temporary files, and complete
1019# config.log. We remove comments because anyway the quotes in there
1020# would cause problems or look ugly.
1021# WARNING: Be sure not to use single quotes in there, as some shells,
1022# such as our DU 5.0 friend, will then `close' the trap.
1023trap 'exit_status=$?
1024 # Save into config.log some information that might help in debugging.
1025 {
1026 echo
1027 cat <<\_ASBOX
1028## ---------------- ##
1029## Cache variables. ##
1030## ---------------- ##
1031_ASBOX
1032 echo
1033 # The following way of writing the cache mishandles newlines in values,
1034{
1035 (set) 2>&1 |
1036 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1037 *ac_space=\ *)
1038 sed -n \
1039 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1040 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1041 ;;
1042 *)
1043 sed -n \
1044 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1045 ;;
1046 esac;
1047}
1048 echo
1049 if test -s confdefs.h; then
1050 cat <<\_ASBOX
1051## ----------- ##
1052## confdefs.h. ##
1053## ----------- ##
1054_ASBOX
1055 echo
1056 sed "/^$/d" confdefs.h
1057 echo
1058 fi
1059 test "$ac_signal" != 0 &&
1060 echo "$as_me: caught signal $ac_signal"
1061 echo "$as_me: exit $exit_status"
1062 } >&5
1063 rm -f core core.* *.core &&
1064 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1065 exit $exit_status
1066 ' 0
1067for ac_signal in 1 2 13 15; do
1068 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1069done
1070ac_signal=0
1071
1072# confdefs.h avoids OS command line length limits that DEFS can exceed.
1073rm -rf conftest* confdefs.h
1074# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1075echo >confdefs.h
1076
1077# Predefined preprocessor variables.
1078
1079cat >>confdefs.h <<_ACEOF
1080#define PACKAGE_NAME "$PACKAGE_NAME"
1081_ACEOF
1082
1083
1084cat >>confdefs.h <<_ACEOF
1085#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1086_ACEOF
1087
1088
1089cat >>confdefs.h <<_ACEOF
1090#define PACKAGE_VERSION "$PACKAGE_VERSION"
1091_ACEOF
1092
1093
1094cat >>confdefs.h <<_ACEOF
1095#define PACKAGE_STRING "$PACKAGE_STRING"
1096_ACEOF
1097
1098
1099cat >>confdefs.h <<_ACEOF
1100#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1101_ACEOF
1102
1103
1104# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105# Prefer explicitly selected file to automatically selected ones.
1106if test -z "$CONFIG_SITE"; then
1107 if test "x$prefix" != xNONE; then
1108 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1109 else
1110 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1111 fi
1112fi
1113for ac_site_file in $CONFIG_SITE; do
1114 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1116echo "$as_me: loading site script $ac_site_file" >&6;}
1117 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 . "$ac_site_file"
1119 fi
1120done
1121
1122if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 # Some versions of bash will fail to source /dev/null (special
1124 # files actually), so we avoid doing that.
1125 if test -f "$cache_file"; then
1126 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1127echo "$as_me: loading cache $cache_file" >&6;}
1128 case $cache_file in
1129 [\\/]* | ?:[\\/]* ) . $cache_file;;
1130 *) . ./$cache_file;;
1131 esac
1132 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133else
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1135echo "$as_me: creating cache $cache_file" >&6;}
1136 >$cache_file
1137fi
1138
1139# Check that the precious variables saved in the cache have kept the same
1140# value.
1141ac_cache_corrupted=false
1142for ac_var in `(set) 2>&1 |
1143 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1144 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1145 eval ac_new_set=\$ac_env_${ac_var}_set
1146 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1147 eval ac_new_val="\$ac_env_${ac_var}_value"
1148 case $ac_old_set,$ac_new_set in
1149 set,)
1150 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1151echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1152 ac_cache_corrupted=: ;;
1153 ,set)
1154 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1155echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1156 ac_cache_corrupted=: ;;
1157 ,);;
1158 *)
1159 if test "x$ac_old_val" != "x$ac_new_val"; then
1160 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1161echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1162 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1163echo "$as_me: former value: $ac_old_val" >&2;}
1164 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1165echo "$as_me: current value: $ac_new_val" >&2;}
1166 ac_cache_corrupted=:
1167 fi;;
1168 esac
1169 # Pass precious variables to config.status.
1170 if test "$ac_new_set" = set; then
1171 case $ac_new_val in
1172 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1173 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1174 *) ac_arg=$ac_var=$ac_new_val ;;
1175 esac
1176 case " $ac_configure_args " in
1177 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1178 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1179 esac
1180 fi
1181done
1182if $ac_cache_corrupted; then
1183 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1184echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1185 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1186echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1187 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188fi
1189
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001192ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1193ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1194ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195
Guido van Rossum627b2d71993-12-24 10:39:16 +00001196
Michael W. Hudson54241132001-12-07 15:38:26 +00001197
1198
Guido van Rossum627b2d71993-12-24 10:39:16 +00001199
Martin v. Löwis11437992002-04-12 09:54:03 +00001200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213ac_config_headers="$ac_config_headers pyconfig.h"
1214
1215
1216# This is for stuff that absolutely must end up in pyconfig.h.
1217# Please use pyport.h instead, if possible.
1218
1219
1220
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001221# Set VERSION so we only need to edit in one place (i.e., here)
1222
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001223VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001224
Martin v. Löwis1142de32002-03-29 16:28:31 +00001225
1226SOVERSION=1.0
1227
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001228# The later defininition of _XOPEN_SOURCE disables certain features
1229# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1230
1231cat >>confdefs.h <<\_ACEOF
1232#define _GNU_SOURCE 1
1233_ACEOF
1234
1235
1236# The definition of _GNU_SOURCE potentially causes a change of the value
1237# of _XOPEN_SOURCE. So define it only conditionally.
1238
1239
1240cat >>confdefs.h <<\_ACEOF
1241#define _XOPEN_SOURCE 500
1242_ACEOF
1243
1244
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001245# Arguments passed to configure.
1246
1247CONFIG_ARGS="$ac_configure_args"
1248
Michael W. Hudson54241132001-12-07 15:38:26 +00001249
Jack Jansene578a632001-08-15 01:27:14 +00001250# Check whether --enable-framework or --disable-framework was given.
1251if test "${enable_framework+set}" = set; then
1252 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
Jack Jansene578a632001-08-15 01:27:14 +00001254 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001256 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001257 esac
1258 case $enableval in
1259 no)
1260 PYTHONFRAMEWORK=
1261 PYTHONFRAMEWORKDIR=no-framework
1262 PYTHONFRAMEWORKPREFIX=
1263 PYTHONFRAMEWORKINSTALLDIR=
1264 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001265 ;;
1266 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001267 PYTHONFRAMEWORK=Python
1268 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001269 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001270 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1271 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001272 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001273
Guido van Rossum563e7081996-09-10 18:20:48 +00001274else
Martin v. Löwis11437992002-04-12 09:54:03 +00001275
Jack Jansene578a632001-08-15 01:27:14 +00001276 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001277 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001278 PYTHONFRAMEWORKPREFIX=
1279 PYTHONFRAMEWORKINSTALLDIR=
1280 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001281
Martin v. Löwis11437992002-04-12 09:54:03 +00001282fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001283
1284
1285
1286
Jack Jansene578a632001-08-15 01:27:14 +00001287
1288##AC_ARG_WITH(dyld,
1289##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1290##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001291# Set name for machine-dependent library files
1292
Martin v. Löwis11437992002-04-12 09:54:03 +00001293echo "$as_me:$LINENO: checking MACHDEP" >&5
1294echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001295if test -z "$MACHDEP"
1296then
Guido van Rossum563e7081996-09-10 18:20:48 +00001297 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001298 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1299 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001300 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001301 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001302 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001303 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001304 ac_md_system=`echo $ac_sys_system |
1305 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1306 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001307 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001308 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001309
Guido van Rossum07397971997-04-29 21:49:50 +00001310 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001311 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001312 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001313 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001314 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001315 esac
1316fi
Guido van Rossum91922671997-10-09 20:24:13 +00001317
1318#
1319# SGI compilers allow the specification of the both the ABI and the
1320# ISA on the command line. Depending on the values of these switches,
1321# different and often incompatable code will be generated.
1322#
1323# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1324# thus supply support for various ABI/ISA combinations. The MACHDEP
1325# variable is also adjusted.
1326#
1327
1328if test ! -z "$SGI_ABI"
1329then
1330 CC="cc $SGI_ABI"
1331 LDFLAGS="$SGI_ABI $LDFLAGS"
1332 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1333fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001334echo "$as_me:$LINENO: result: $MACHDEP" >&5
1335echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001336
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001338echo "$as_me:$LINENO: checking for --without-gcc" >&5
1339echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1340
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001341# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001342if test "${with_gcc+set}" = set; then
1343 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001344
Guido van Rossum7f43da71994-08-01 12:15:30 +00001345 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001346 no) CC=cc
1347 without_gcc=yes;;
1348 yes) CC=gcc
1349 without_gcc=no;;
1350 *) CC=$withval
1351 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001352 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001353else
Martin v. Löwis11437992002-04-12 09:54:03 +00001354
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001355 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001356 AIX*) CC=cc_r
1357 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001358 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001359 case $BE_HOST_CPU in
1360 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001361 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001362 without_gcc=yes
Mark Hammond8235ea12002-07-19 06:55:41 +00001363 OPT="-O -export pragma"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001364 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001365 ;;
1366 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001367 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001368 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001369 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001370 ;;
1371 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001372 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1373echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1374 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001375 ;;
1376 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001377 AR="\$(srcdir)/Modules/ar_beos"
1378 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001379 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001380 Monterey*)
1381 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001382 without_gcc=;;
1383 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001384 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001385fi;
1386echo "$as_me:$LINENO: result: $without_gcc" >&5
1387echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001388
1389
Guido van Rossum95012191999-12-16 17:50:52 +00001390
Fred Drakea1a84e72001-03-06 05:52:16 +00001391MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001392echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1393echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1394
Guido van Rossum95012191999-12-16 17:50:52 +00001395# Check whether --with-cxx or --without-cxx was given.
1396if test "${with_cxx+set}" = set; then
1397 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001398
Martin v. Löwis22352952000-12-13 17:37:02 +00001399 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001400 case $withval in
1401 no) CXX=
1402 with_cxx=no;;
1403 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001404 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001405 with_cxx=$withval;;
1406 esac
1407else
Martin v. Löwis11437992002-04-12 09:54:03 +00001408
Guido van Rossum95012191999-12-16 17:50:52 +00001409 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001410 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001411
Martin v. Löwis11437992002-04-12 09:54:03 +00001412fi;
1413echo "$as_me:$LINENO: result: $with_cxx" >&5
1414echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001415
1416if test "$with_cxx" = "yes"
1417then
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1419echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1420 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001421fi
1422
1423
1424
1425
Martin v. Löwis11437992002-04-12 09:54:03 +00001426if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001427then
1428 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1429do
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 # Extract the first word of "$ac_prog", so it can be a program name with args.
Martin v. Löwis22352952000-12-13 17:37:02 +00001431set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001432echo "$as_me:$LINENO: checking for $ac_word" >&5
1433echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1434if test "${ac_cv_prog_CXX+set}" = set; then
1435 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001436else
1437 if test -n "$CXX"; then
1438 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1439else
Martin v. Löwis11437992002-04-12 09:54:03 +00001440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1441for as_dir in $PATH
1442do
1443 IFS=$as_save_IFS
1444 test -z "$as_dir" && as_dir=.
1445 for ac_exec_ext in '' $ac_executable_extensions; do
1446 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1447 ac_cv_prog_CXX="$ac_prog"
1448 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1449 break 2
1450 fi
1451done
1452done
1453
Martin v. Löwis22352952000-12-13 17:37:02 +00001454fi
1455fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001456CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001457if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 echo "$as_me:$LINENO: result: $CXX" >&5
1459echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001460else
Martin v. Löwis11437992002-04-12 09:54:03 +00001461 echo "$as_me:$LINENO: result: no" >&5
1462echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001463fi
1464
Martin v. Löwis11437992002-04-12 09:54:03 +00001465 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001466done
1467test -n "$CXX" || CXX="notfound"
1468
1469 if test "$CXX" = "notfound"
1470 then
1471 CXX=
1472 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001473 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001474ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001475ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1476ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1477ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1478 cat >conftest.$ac_ext <<_ACEOF
1479#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001480#include "confdefs.h"
1481
Martin v. Löwis11437992002-04-12 09:54:03 +00001482#ifdef F77_DUMMY_MAIN
1483# ifdef __cplusplus
1484 extern "C"
1485# endif
1486 int F77_DUMMY_MAIN() { return 1; }
1487#endif
1488int
1489main ()
1490{
Michael W. Hudson54241132001-12-07 15:38:26 +00001491
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 ;
1493 return 0;
1494}
1495_ACEOF
1496ac_clean_files_save=$ac_clean_files
1497ac_clean_files="$ac_clean_files a.out a.exe"
1498# Try to create an executable without -o first, disregard a.out.
1499# It will help us diagnose broken compilers, and finding out an intuition
1500# of exeext.
1501echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1502echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1503ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1504if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1505 (eval $ac_link_default) 2>&5
1506 ac_status=$?
1507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1508 (exit $ac_status); }; then
1509 # Find the output, starting from the most likely. This scheme is
1510# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1511# resort.
1512
1513# Be careful to initialize this variable, since it used to be cached.
1514# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1515ac_cv_exeext=
1516for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1517 ls a.out conftest 2>/dev/null;
1518 ls a.* conftest.* 2>/dev/null`; do
1519 case $ac_file in
1520 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1521 a.out ) # We found the default executable, but exeext='' is most
1522 # certainly right.
1523 break;;
1524 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1525 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1526 export ac_cv_exeext
1527 break;;
1528 * ) break;;
1529 esac
1530done
1531else
1532 echo "$as_me: failed program was:" >&5
1533cat conftest.$ac_ext >&5
1534{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1535echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1536 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001537fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001538
1539ac_exeext=$ac_cv_exeext
1540echo "$as_me:$LINENO: result: $ac_file" >&5
1541echo "${ECHO_T}$ac_file" >&6
1542
1543# Check the compiler produces executables we can run. If not, either
1544# the compiler is broken, or we cross compile.
1545echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1546echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1547# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1548# If not cross compiling, check that we can run a simple program.
1549if test "$cross_compiling" != yes; then
1550 if { ac_try='./$ac_file'
1551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1552 (eval $ac_try) 2>&5
1553 ac_status=$?
1554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1555 (exit $ac_status); }; }; then
1556 cross_compiling=no
1557 else
1558 if test "$cross_compiling" = maybe; then
1559 cross_compiling=yes
1560 else
1561 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1562If you meant to cross compile, use \`--host'." >&5
1563echo "$as_me: error: cannot run C++ compiled programs.
1564If you meant to cross compile, use \`--host'." >&2;}
1565 { (exit 1); exit 1; }; }
1566 fi
1567 fi
1568fi
1569echo "$as_me:$LINENO: result: yes" >&5
1570echo "${ECHO_T}yes" >&6
1571
1572rm -f a.out a.exe conftest$ac_cv_exeext
1573ac_clean_files=$ac_clean_files_save
1574# Check the compiler produces executables we can run. If not, either
1575# the compiler is broken, or we cross compile.
1576echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1577echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1578echo "$as_me:$LINENO: result: $cross_compiling" >&5
1579echo "${ECHO_T}$cross_compiling" >&6
1580
1581echo "$as_me:$LINENO: checking for suffix of executables" >&5
1582echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1583if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1584 (eval $ac_link) 2>&5
1585 ac_status=$?
1586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1587 (exit $ac_status); }; then
1588 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1589# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1590# work properly (i.e., refer to `conftest.exe'), while it won't with
1591# `rm'.
1592for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1593 case $ac_file in
1594 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1595 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1596 export ac_cv_exeext
1597 break;;
1598 * ) break;;
1599 esac
1600done
1601else
1602 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1603echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1604 { (exit 1); exit 1; }; }
1605fi
1606
1607rm -f conftest$ac_cv_exeext
1608echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1609echo "${ECHO_T}$ac_cv_exeext" >&6
1610
1611rm -f conftest.$ac_ext
1612EXEEXT=$ac_cv_exeext
1613ac_exeext=$EXEEXT
1614
1615 ac_ext=c
1616ac_cpp='$CPP $CPPFLAGS'
1617ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1618ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1619ac_compiler_gnu=$ac_cv_c_compiler_gnu
1620
1621
Martin v. Löwis22352952000-12-13 17:37:02 +00001622
1623 fi
1624fi
1625
Guido van Rossum8b131c51995-03-09 14:10:13 +00001626# If the user switches compilers, we can't believe the cache
1627if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1628then
Martin v. Löwis11437992002-04-12 09:54:03 +00001629 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1630(it is also a good idea to do 'make clean' before compiling)" >&5
1631echo "$as_me: error: cached CC is different -- throw away $cache_file
1632(it is also a good idea to do 'make clean' before compiling)" >&2;}
1633 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001634fi
1635
Martin v. Löwis11437992002-04-12 09:54:03 +00001636ac_ext=c
1637ac_cpp='$CPP $CPPFLAGS'
1638ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1639ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1640ac_compiler_gnu=$ac_cv_c_compiler_gnu
1641if test -n "$ac_tool_prefix"; then
1642 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1643set dummy ${ac_tool_prefix}gcc; ac_word=$2
1644echo "$as_me:$LINENO: checking for $ac_word" >&5
1645echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1646if test "${ac_cv_prog_CC+set}" = set; then
1647 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001648else
1649 if test -n "$CC"; then
1650 ac_cv_prog_CC="$CC" # Let the user override the test.
1651else
Martin v. Löwis11437992002-04-12 09:54:03 +00001652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1653for as_dir in $PATH
1654do
1655 IFS=$as_save_IFS
1656 test -z "$as_dir" && as_dir=.
1657 for ac_exec_ext in '' $ac_executable_extensions; do
1658 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1659 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1660 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1661 break 2
1662 fi
1663done
1664done
1665
Jack Jansendd19cf82001-12-06 22:36:17 +00001666fi
1667fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001668CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001669if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001670 echo "$as_me:$LINENO: result: $CC" >&5
1671echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001672else
Martin v. Löwis11437992002-04-12 09:54:03 +00001673 echo "$as_me:$LINENO: result: no" >&5
1674echo "${ECHO_T}no" >&6
1675fi
1676
1677fi
1678if test -z "$ac_cv_prog_CC"; then
1679 ac_ct_CC=$CC
1680 # Extract the first word of "gcc", so it can be a program name with args.
1681set dummy gcc; ac_word=$2
1682echo "$as_me:$LINENO: checking for $ac_word" >&5
1683echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1684if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1685 echo $ECHO_N "(cached) $ECHO_C" >&6
1686else
1687 if test -n "$ac_ct_CC"; then
1688 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1689else
1690as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1691for as_dir in $PATH
1692do
1693 IFS=$as_save_IFS
1694 test -z "$as_dir" && as_dir=.
1695 for ac_exec_ext in '' $ac_executable_extensions; do
1696 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1697 ac_cv_prog_ac_ct_CC="gcc"
1698 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1699 break 2
1700 fi
1701done
1702done
1703
1704fi
1705fi
1706ac_ct_CC=$ac_cv_prog_ac_ct_CC
1707if test -n "$ac_ct_CC"; then
1708 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1709echo "${ECHO_T}$ac_ct_CC" >&6
1710else
1711 echo "$as_me:$LINENO: result: no" >&5
1712echo "${ECHO_T}no" >&6
1713fi
1714
1715 CC=$ac_ct_CC
1716else
1717 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001718fi
1719
Jack Jansendd19cf82001-12-06 22:36:17 +00001720if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001721 if test -n "$ac_tool_prefix"; then
1722 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1723set dummy ${ac_tool_prefix}cc; ac_word=$2
1724echo "$as_me:$LINENO: checking for $ac_word" >&5
1725echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1726if test "${ac_cv_prog_CC+set}" = set; then
1727 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001728else
1729 if test -n "$CC"; then
1730 ac_cv_prog_CC="$CC" # Let the user override the test.
1731else
Martin v. Löwis11437992002-04-12 09:54:03 +00001732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1733for as_dir in $PATH
1734do
1735 IFS=$as_save_IFS
1736 test -z "$as_dir" && as_dir=.
1737 for ac_exec_ext in '' $ac_executable_extensions; do
1738 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1739 ac_cv_prog_CC="${ac_tool_prefix}cc"
1740 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1741 break 2
1742 fi
1743done
1744done
1745
1746fi
1747fi
1748CC=$ac_cv_prog_CC
1749if test -n "$CC"; then
1750 echo "$as_me:$LINENO: result: $CC" >&5
1751echo "${ECHO_T}$CC" >&6
1752else
1753 echo "$as_me:$LINENO: result: no" >&5
1754echo "${ECHO_T}no" >&6
1755fi
1756
1757fi
1758if test -z "$ac_cv_prog_CC"; then
1759 ac_ct_CC=$CC
1760 # Extract the first word of "cc", so it can be a program name with args.
1761set dummy cc; ac_word=$2
1762echo "$as_me:$LINENO: checking for $ac_word" >&5
1763echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1764if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1765 echo $ECHO_N "(cached) $ECHO_C" >&6
1766else
1767 if test -n "$ac_ct_CC"; then
1768 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1769else
1770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1771for as_dir in $PATH
1772do
1773 IFS=$as_save_IFS
1774 test -z "$as_dir" && as_dir=.
1775 for ac_exec_ext in '' $ac_executable_extensions; do
1776 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1777 ac_cv_prog_ac_ct_CC="cc"
1778 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1779 break 2
1780 fi
1781done
1782done
1783
1784fi
1785fi
1786ac_ct_CC=$ac_cv_prog_ac_ct_CC
1787if test -n "$ac_ct_CC"; then
1788 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1789echo "${ECHO_T}$ac_ct_CC" >&6
1790else
1791 echo "$as_me:$LINENO: result: no" >&5
1792echo "${ECHO_T}no" >&6
1793fi
1794
1795 CC=$ac_ct_CC
1796else
1797 CC="$ac_cv_prog_CC"
1798fi
1799
1800fi
1801if test -z "$CC"; then
1802 # Extract the first word of "cc", so it can be a program name with args.
1803set dummy cc; ac_word=$2
1804echo "$as_me:$LINENO: checking for $ac_word" >&5
1805echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1806if test "${ac_cv_prog_CC+set}" = set; then
1807 echo $ECHO_N "(cached) $ECHO_C" >&6
1808else
1809 if test -n "$CC"; then
1810 ac_cv_prog_CC="$CC" # Let the user override the test.
1811else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001812 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1814for as_dir in $PATH
1815do
1816 IFS=$as_save_IFS
1817 test -z "$as_dir" && as_dir=.
1818 for ac_exec_ext in '' $ac_executable_extensions; do
1819 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1820 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1821 ac_prog_rejected=yes
1822 continue
1823 fi
1824 ac_cv_prog_CC="cc"
1825 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1826 break 2
1827 fi
1828done
1829done
1830
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001831if test $ac_prog_rejected = yes; then
1832 # We found a bogon in the path, so make sure we never use it.
1833 set dummy $ac_cv_prog_CC
1834 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001835 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001836 # We chose a different compiler from the bogus one.
1837 # However, it has the same basename, so the bogon will be chosen
1838 # first if we set CC to just the basename; use the full file name.
1839 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001840 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001841 shift
1842 ac_cv_prog_CC="$@"
1843 fi
1844fi
1845fi
1846fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001847CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001848if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001849 echo "$as_me:$LINENO: result: $CC" >&5
1850echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001851else
Martin v. Löwis11437992002-04-12 09:54:03 +00001852 echo "$as_me:$LINENO: result: no" >&5
1853echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001854fi
1855
Martin v. Löwis11437992002-04-12 09:54:03 +00001856fi
1857if test -z "$CC"; then
1858 if test -n "$ac_tool_prefix"; then
1859 for ac_prog in cl
1860 do
1861 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1862set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1863echo "$as_me:$LINENO: checking for $ac_word" >&5
1864echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1865if test "${ac_cv_prog_CC+set}" = set; then
1866 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001867else
1868 if test -n "$CC"; then
1869 ac_cv_prog_CC="$CC" # Let the user override the test.
1870else
Martin v. Löwis11437992002-04-12 09:54:03 +00001871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1872for as_dir in $PATH
1873do
1874 IFS=$as_save_IFS
1875 test -z "$as_dir" && as_dir=.
1876 for ac_exec_ext in '' $ac_executable_extensions; do
1877 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1878 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1879 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1880 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001881 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001882done
1883done
1884
1885fi
1886fi
1887CC=$ac_cv_prog_CC
1888if test -n "$CC"; then
1889 echo "$as_me:$LINENO: result: $CC" >&5
1890echo "${ECHO_T}$CC" >&6
1891else
1892 echo "$as_me:$LINENO: result: no" >&5
1893echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001894fi
1895
Martin v. Löwis11437992002-04-12 09:54:03 +00001896 test -n "$CC" && break
1897 done
1898fi
1899if test -z "$CC"; then
1900 ac_ct_CC=$CC
1901 for ac_prog in cl
1902do
1903 # Extract the first word of "$ac_prog", so it can be a program name with args.
1904set dummy $ac_prog; ac_word=$2
1905echo "$as_me:$LINENO: checking for $ac_word" >&5
1906echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1907if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1908 echo $ECHO_N "(cached) $ECHO_C" >&6
1909else
1910 if test -n "$ac_ct_CC"; then
1911 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1912else
1913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1914for as_dir in $PATH
1915do
1916 IFS=$as_save_IFS
1917 test -z "$as_dir" && as_dir=.
1918 for ac_exec_ext in '' $ac_executable_extensions; do
1919 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1920 ac_cv_prog_ac_ct_CC="$ac_prog"
1921 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1922 break 2
1923 fi
1924done
1925done
Jack Jansendd19cf82001-12-06 22:36:17 +00001926
Martin v. Löwis11437992002-04-12 09:54:03 +00001927fi
1928fi
1929ac_ct_CC=$ac_cv_prog_ac_ct_CC
1930if test -n "$ac_ct_CC"; then
1931 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1932echo "${ECHO_T}$ac_ct_CC" >&6
1933else
1934 echo "$as_me:$LINENO: result: no" >&5
1935echo "${ECHO_T}no" >&6
1936fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001937
Martin v. Löwis11437992002-04-12 09:54:03 +00001938 test -n "$ac_ct_CC" && break
1939done
Michael W. Hudson54241132001-12-07 15:38:26 +00001940
Martin v. Löwis11437992002-04-12 09:54:03 +00001941 CC=$ac_ct_CC
1942fi
1943
1944fi
1945
1946
1947test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1948echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1949 { (exit 1); exit 1; }; }
1950
1951# Provide some information about the compiler.
1952echo "$as_me:$LINENO:" \
1953 "checking for C compiler version" >&5
1954ac_compiler=`set X $ac_compile; echo $2`
1955{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1956 (eval $ac_compiler --version </dev/null >&5) 2>&5
1957 ac_status=$?
1958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1959 (exit $ac_status); }
1960{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1961 (eval $ac_compiler -v </dev/null >&5) 2>&5
1962 ac_status=$?
1963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1964 (exit $ac_status); }
1965{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1966 (eval $ac_compiler -V </dev/null >&5) 2>&5
1967 ac_status=$?
1968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1969 (exit $ac_status); }
1970
1971cat >conftest.$ac_ext <<_ACEOF
1972#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001973#include "confdefs.h"
1974
Martin v. Löwis11437992002-04-12 09:54:03 +00001975#ifdef F77_DUMMY_MAIN
1976# ifdef __cplusplus
1977 extern "C"
1978# endif
1979 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001981int
1982main ()
1983{
1984
1985 ;
1986 return 0;
1987}
1988_ACEOF
1989ac_clean_files_save=$ac_clean_files
1990ac_clean_files="$ac_clean_files a.out a.exe"
1991# Try to create an executable without -o first, disregard a.out.
1992# It will help us diagnose broken compilers, and finding out an intuition
1993# of exeext.
1994echo "$as_me:$LINENO: checking for C compiler default output" >&5
1995echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1996ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1997if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1998 (eval $ac_link_default) 2>&5
1999 ac_status=$?
2000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2001 (exit $ac_status); }; then
2002 # Find the output, starting from the most likely. This scheme is
2003# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2004# resort.
2005
2006# Be careful to initialize this variable, since it used to be cached.
2007# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2008ac_cv_exeext=
2009for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2010 ls a.out conftest 2>/dev/null;
2011 ls a.* conftest.* 2>/dev/null`; do
2012 case $ac_file in
2013 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2014 a.out ) # We found the default executable, but exeext='' is most
2015 # certainly right.
2016 break;;
2017 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2018 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2019 export ac_cv_exeext
2020 break;;
2021 * ) break;;
2022 esac
2023done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002024else
Martin v. Löwis11437992002-04-12 09:54:03 +00002025 echo "$as_me: failed program was:" >&5
2026cat conftest.$ac_ext >&5
2027{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2028echo "$as_me: error: C compiler cannot create executables" >&2;}
2029 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002030fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002031
Martin v. Löwis11437992002-04-12 09:54:03 +00002032ac_exeext=$ac_cv_exeext
2033echo "$as_me:$LINENO: result: $ac_file" >&5
2034echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002035
Martin v. Löwis11437992002-04-12 09:54:03 +00002036# Check the compiler produces executables we can run. If not, either
2037# the compiler is broken, or we cross compile.
2038echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2039echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2040# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2041# If not cross compiling, check that we can run a simple program.
2042if test "$cross_compiling" != yes; then
2043 if { ac_try='./$ac_file'
2044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2045 (eval $ac_try) 2>&5
2046 ac_status=$?
2047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2048 (exit $ac_status); }; }; then
2049 cross_compiling=no
2050 else
2051 if test "$cross_compiling" = maybe; then
2052 cross_compiling=yes
2053 else
2054 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2055If you meant to cross compile, use \`--host'." >&5
2056echo "$as_me: error: cannot run C compiled programs.
2057If you meant to cross compile, use \`--host'." >&2;}
2058 { (exit 1); exit 1; }; }
2059 fi
2060 fi
2061fi
2062echo "$as_me:$LINENO: result: yes" >&5
2063echo "${ECHO_T}yes" >&6
2064
2065rm -f a.out a.exe conftest$ac_cv_exeext
2066ac_clean_files=$ac_clean_files_save
2067# Check the compiler produces executables we can run. If not, either
2068# the compiler is broken, or we cross compile.
2069echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2070echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2071echo "$as_me:$LINENO: result: $cross_compiling" >&5
2072echo "${ECHO_T}$cross_compiling" >&6
2073
2074echo "$as_me:$LINENO: checking for suffix of executables" >&5
2075echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2076if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2077 (eval $ac_link) 2>&5
2078 ac_status=$?
2079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2080 (exit $ac_status); }; then
2081 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2082# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2083# work properly (i.e., refer to `conftest.exe'), while it won't with
2084# `rm'.
2085for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2086 case $ac_file in
2087 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2088 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2089 export ac_cv_exeext
2090 break;;
2091 * ) break;;
2092 esac
2093done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002094else
Martin v. Löwis11437992002-04-12 09:54:03 +00002095 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2096echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2097 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002098fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002099
Martin v. Löwis11437992002-04-12 09:54:03 +00002100rm -f conftest$ac_cv_exeext
2101echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2102echo "${ECHO_T}$ac_cv_exeext" >&6
2103
2104rm -f conftest.$ac_ext
2105EXEEXT=$ac_cv_exeext
2106ac_exeext=$EXEEXT
2107echo "$as_me:$LINENO: checking for suffix of object files" >&5
2108echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2109if test "${ac_cv_objext+set}" = set; then
2110 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002111else
Martin v. Löwis11437992002-04-12 09:54:03 +00002112 cat >conftest.$ac_ext <<_ACEOF
2113#line $LINENO "configure"
2114#include "confdefs.h"
2115
2116#ifdef F77_DUMMY_MAIN
2117# ifdef __cplusplus
2118 extern "C"
2119# endif
2120 int F77_DUMMY_MAIN() { return 1; }
2121#endif
2122int
2123main ()
2124{
2125
2126 ;
2127 return 0;
2128}
2129_ACEOF
2130rm -f conftest.o conftest.obj
2131if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2132 (eval $ac_compile) 2>&5
2133 ac_status=$?
2134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2135 (exit $ac_status); }; then
2136 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2137 case $ac_file in
2138 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2139 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2140 break;;
2141 esac
2142done
2143else
2144 echo "$as_me: failed program was:" >&5
2145cat conftest.$ac_ext >&5
2146{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2147echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2148 { (exit 1); exit 1; }; }
2149fi
2150
2151rm -f conftest.$ac_cv_objext conftest.$ac_ext
2152fi
2153echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2154echo "${ECHO_T}$ac_cv_objext" >&6
2155OBJEXT=$ac_cv_objext
2156ac_objext=$OBJEXT
2157echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2158echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2159if test "${ac_cv_c_compiler_gnu+set}" = set; then
2160 echo $ECHO_N "(cached) $ECHO_C" >&6
2161else
2162 cat >conftest.$ac_ext <<_ACEOF
2163#line $LINENO "configure"
2164#include "confdefs.h"
2165
2166#ifdef F77_DUMMY_MAIN
2167# ifdef __cplusplus
2168 extern "C"
2169# endif
2170 int F77_DUMMY_MAIN() { return 1; }
2171#endif
2172int
2173main ()
2174{
2175#ifndef __GNUC__
2176 choke me
2177#endif
2178
2179 ;
2180 return 0;
2181}
2182_ACEOF
2183rm -f conftest.$ac_objext
2184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2185 (eval $ac_compile) 2>&5
2186 ac_status=$?
2187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2188 (exit $ac_status); } &&
2189 { ac_try='test -s conftest.$ac_objext'
2190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2191 (eval $ac_try) 2>&5
2192 ac_status=$?
2193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2194 (exit $ac_status); }; }; then
2195 ac_compiler_gnu=yes
2196else
2197 echo "$as_me: failed program was:" >&5
2198cat conftest.$ac_ext >&5
2199ac_compiler_gnu=no
2200fi
2201rm -f conftest.$ac_objext conftest.$ac_ext
2202ac_cv_c_compiler_gnu=$ac_compiler_gnu
2203
2204fi
2205echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2206echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2207GCC=`test $ac_compiler_gnu = yes && echo yes`
2208ac_test_CFLAGS=${CFLAGS+set}
2209ac_save_CFLAGS=$CFLAGS
2210CFLAGS="-g"
2211echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2212echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2213if test "${ac_cv_prog_cc_g+set}" = set; then
2214 echo $ECHO_N "(cached) $ECHO_C" >&6
2215else
2216 cat >conftest.$ac_ext <<_ACEOF
2217#line $LINENO "configure"
2218#include "confdefs.h"
2219
2220#ifdef F77_DUMMY_MAIN
2221# ifdef __cplusplus
2222 extern "C"
2223# endif
2224 int F77_DUMMY_MAIN() { return 1; }
2225#endif
2226int
2227main ()
2228{
2229
2230 ;
2231 return 0;
2232}
2233_ACEOF
2234rm -f conftest.$ac_objext
2235if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2236 (eval $ac_compile) 2>&5
2237 ac_status=$?
2238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2239 (exit $ac_status); } &&
2240 { ac_try='test -s conftest.$ac_objext'
2241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2242 (eval $ac_try) 2>&5
2243 ac_status=$?
2244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2245 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002246 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002247else
Martin v. Löwis11437992002-04-12 09:54:03 +00002248 echo "$as_me: failed program was:" >&5
2249cat conftest.$ac_ext >&5
2250ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002251fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002252rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002253fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002254echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2255echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002256if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002257 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002258elif test $ac_cv_prog_cc_g = yes; then
2259 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002260 CFLAGS="-g -O2"
2261 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002262 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002263 fi
2264else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002265 if test "$GCC" = yes; then
2266 CFLAGS="-O2"
2267 else
2268 CFLAGS=
2269 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002270fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002271# Some people use a C++ compiler to compile C. Since we use `exit',
2272# in C++ we need to declare it. In case someone uses the same compiler
2273# for both compiling C and C++ we need to have the C++ compiler decide
2274# the declaration of exit, since it's the most demanding environment.
2275cat >conftest.$ac_ext <<_ACEOF
2276#ifndef __cplusplus
2277 choke me
2278#endif
2279_ACEOF
2280rm -f conftest.$ac_objext
2281if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2282 (eval $ac_compile) 2>&5
2283 ac_status=$?
2284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2285 (exit $ac_status); } &&
2286 { ac_try='test -s conftest.$ac_objext'
2287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2288 (eval $ac_try) 2>&5
2289 ac_status=$?
2290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2291 (exit $ac_status); }; }; then
2292 for ac_declaration in \
2293 ''\
2294 '#include <stdlib.h>' \
2295 'extern "C" void std::exit (int) throw (); using std::exit;' \
2296 'extern "C" void std::exit (int); using std::exit;' \
2297 'extern "C" void exit (int) throw ();' \
2298 'extern "C" void exit (int);' \
2299 'void exit (int);'
2300do
2301 cat >conftest.$ac_ext <<_ACEOF
2302#line $LINENO "configure"
2303#include "confdefs.h"
2304#include <stdlib.h>
2305$ac_declaration
2306#ifdef F77_DUMMY_MAIN
2307# ifdef __cplusplus
2308 extern "C"
2309# endif
2310 int F77_DUMMY_MAIN() { return 1; }
2311#endif
2312int
2313main ()
2314{
2315exit (42);
2316 ;
2317 return 0;
2318}
2319_ACEOF
2320rm -f conftest.$ac_objext
2321if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2322 (eval $ac_compile) 2>&5
2323 ac_status=$?
2324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2325 (exit $ac_status); } &&
2326 { ac_try='test -s conftest.$ac_objext'
2327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2328 (eval $ac_try) 2>&5
2329 ac_status=$?
2330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2331 (exit $ac_status); }; }; then
2332 :
2333else
2334 echo "$as_me: failed program was:" >&5
2335cat conftest.$ac_ext >&5
2336continue
2337fi
2338rm -f conftest.$ac_objext conftest.$ac_ext
2339 cat >conftest.$ac_ext <<_ACEOF
2340#line $LINENO "configure"
2341#include "confdefs.h"
2342$ac_declaration
2343#ifdef F77_DUMMY_MAIN
2344# ifdef __cplusplus
2345 extern "C"
2346# endif
2347 int F77_DUMMY_MAIN() { return 1; }
2348#endif
2349int
2350main ()
2351{
2352exit (42);
2353 ;
2354 return 0;
2355}
2356_ACEOF
2357rm -f conftest.$ac_objext
2358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2359 (eval $ac_compile) 2>&5
2360 ac_status=$?
2361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2362 (exit $ac_status); } &&
2363 { ac_try='test -s conftest.$ac_objext'
2364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2365 (eval $ac_try) 2>&5
2366 ac_status=$?
2367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2368 (exit $ac_status); }; }; then
2369 break
2370else
2371 echo "$as_me: failed program was:" >&5
2372cat conftest.$ac_ext >&5
2373fi
2374rm -f conftest.$ac_objext conftest.$ac_ext
2375done
2376rm -f conftest*
2377if test -n "$ac_declaration"; then
2378 echo '#ifdef __cplusplus' >>confdefs.h
2379 echo $ac_declaration >>confdefs.h
2380 echo '#endif' >>confdefs.h
2381fi
2382
2383else
2384 echo "$as_me: failed program was:" >&5
2385cat conftest.$ac_ext >&5
2386fi
2387rm -f conftest.$ac_objext conftest.$ac_ext
2388ac_ext=c
2389ac_cpp='$CPP $CPPFLAGS'
2390ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2391ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2392ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002393
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002394
2395# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002396
2397ac_ext=c
2398ac_cpp='$CPP $CPPFLAGS'
2399ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2400ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2401ac_compiler_gnu=$ac_cv_c_compiler_gnu
2402echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2403echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002404# On Suns, sometimes $CPP names a directory.
2405if test -n "$CPP" && test -d "$CPP"; then
2406 CPP=
2407fi
2408if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002409 if test "${ac_cv_prog_CPP+set}" = set; then
2410 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002411else
Martin v. Löwis11437992002-04-12 09:54:03 +00002412 # Double quotes because CPP needs to be expanded
2413 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2414 do
2415 ac_preproc_ok=false
2416for ac_c_preproc_warn_flag in '' yes
2417do
2418 # Use a header file that comes with gcc, so configuring glibc
2419 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002420 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002421 # not just through cpp. "Syntax error" is here to catch this case.
2422 cat >conftest.$ac_ext <<_ACEOF
2423#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002424#include "confdefs.h"
2425#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002426 Syntax error
2427_ACEOF
2428if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2429 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2430 ac_status=$?
2431 egrep -v '^ *\+' conftest.er1 >conftest.err
2432 rm -f conftest.er1
2433 cat conftest.err >&5
2434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2435 (exit $ac_status); } >/dev/null; then
2436 if test -s conftest.err; then
2437 ac_cpp_err=$ac_c_preproc_warn_flag
2438 else
2439 ac_cpp_err=
2440 fi
2441else
2442 ac_cpp_err=yes
2443fi
2444if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002445 :
2446else
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002448 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002449 # Broken: fails on valid input.
2450continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002451fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002452rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002453
Martin v. Löwis11437992002-04-12 09:54:03 +00002454 # OK, works on sane cases. Now check whether non-existent headers
2455 # can be detected and how.
2456 cat >conftest.$ac_ext <<_ACEOF
2457#line $LINENO "configure"
2458#include "confdefs.h"
2459#include <ac_nonexistent.h>
2460_ACEOF
2461if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2462 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2463 ac_status=$?
2464 egrep -v '^ *\+' conftest.er1 >conftest.err
2465 rm -f conftest.er1
2466 cat conftest.err >&5
2467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2468 (exit $ac_status); } >/dev/null; then
2469 if test -s conftest.err; then
2470 ac_cpp_err=$ac_c_preproc_warn_flag
2471 else
2472 ac_cpp_err=
2473 fi
2474else
2475 ac_cpp_err=yes
2476fi
2477if test -z "$ac_cpp_err"; then
2478 # Broken: success on invalid input.
2479continue
2480else
2481 echo "$as_me: failed program was:" >&5
2482 cat conftest.$ac_ext >&5
2483 # Passes both tests.
2484ac_preproc_ok=:
2485break
2486fi
2487rm -f conftest.err conftest.$ac_ext
2488
2489done
2490# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2491rm -f conftest.err conftest.$ac_ext
2492if $ac_preproc_ok; then
2493 break
2494fi
2495
2496 done
2497 ac_cv_prog_CPP=$CPP
2498
2499fi
2500 CPP=$ac_cv_prog_CPP
2501else
2502 ac_cv_prog_CPP=$CPP
2503fi
2504echo "$as_me:$LINENO: result: $CPP" >&5
2505echo "${ECHO_T}$CPP" >&6
2506ac_preproc_ok=false
2507for ac_c_preproc_warn_flag in '' yes
2508do
2509 # Use a header file that comes with gcc, so configuring glibc
2510 # with a fresh cross-compiler works.
2511 # On the NeXT, cc -E runs the code through the compiler's parser,
2512 # not just through cpp. "Syntax error" is here to catch this case.
2513 cat >conftest.$ac_ext <<_ACEOF
2514#line $LINENO "configure"
2515#include "confdefs.h"
2516#include <assert.h>
2517 Syntax error
2518_ACEOF
2519if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2520 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2521 ac_status=$?
2522 egrep -v '^ *\+' conftest.er1 >conftest.err
2523 rm -f conftest.er1
2524 cat conftest.err >&5
2525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2526 (exit $ac_status); } >/dev/null; then
2527 if test -s conftest.err; then
2528 ac_cpp_err=$ac_c_preproc_warn_flag
2529 else
2530 ac_cpp_err=
2531 fi
2532else
2533 ac_cpp_err=yes
2534fi
2535if test -z "$ac_cpp_err"; then
2536 :
2537else
2538 echo "$as_me: failed program was:" >&5
2539 cat conftest.$ac_ext >&5
2540 # Broken: fails on valid input.
2541continue
2542fi
2543rm -f conftest.err conftest.$ac_ext
2544
2545 # OK, works on sane cases. Now check whether non-existent headers
2546 # can be detected and how.
2547 cat >conftest.$ac_ext <<_ACEOF
2548#line $LINENO "configure"
2549#include "confdefs.h"
2550#include <ac_nonexistent.h>
2551_ACEOF
2552if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2553 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2554 ac_status=$?
2555 egrep -v '^ *\+' conftest.er1 >conftest.err
2556 rm -f conftest.er1
2557 cat conftest.err >&5
2558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2559 (exit $ac_status); } >/dev/null; then
2560 if test -s conftest.err; then
2561 ac_cpp_err=$ac_c_preproc_warn_flag
2562 else
2563 ac_cpp_err=
2564 fi
2565else
2566 ac_cpp_err=yes
2567fi
2568if test -z "$ac_cpp_err"; then
2569 # Broken: success on invalid input.
2570continue
2571else
2572 echo "$as_me: failed program was:" >&5
2573 cat conftest.$ac_ext >&5
2574 # Passes both tests.
2575ac_preproc_ok=:
2576break
2577fi
2578rm -f conftest.err conftest.$ac_ext
2579
2580done
2581# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2582rm -f conftest.err conftest.$ac_ext
2583if $ac_preproc_ok; then
2584 :
2585else
2586 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2587echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2588 { (exit 1); exit 1; }; }
2589fi
2590
2591ac_ext=c
2592ac_cpp='$CPP $CPPFLAGS'
2593ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2594ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2595ac_compiler_gnu=$ac_cv_c_compiler_gnu
2596
2597
2598
2599echo "$as_me:$LINENO: checking for AIX" >&5
2600echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2601cat >conftest.$ac_ext <<_ACEOF
2602#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002603#include "confdefs.h"
2604#ifdef _AIX
2605 yes
2606#endif
2607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002609if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2610 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 echo "$as_me:$LINENO: result: yes" >&5
2612echo "${ECHO_T}yes" >&6
2613cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002614#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002615_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002616
2617else
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 echo "$as_me:$LINENO: result: no" >&5
2619echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002620fi
2621rm -f conftest*
2622
Michael W. Hudson54241132001-12-07 15:38:26 +00002623
Martin v. Löwis11437992002-04-12 09:54:03 +00002624echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2625echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2626if test "${ac_cv_header_stdc+set}" = set; then
2627 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002628else
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 cat >conftest.$ac_ext <<_ACEOF
2630#line $LINENO "configure"
2631#include "confdefs.h"
2632#include <stdlib.h>
2633#include <stdarg.h>
2634#include <string.h>
2635#include <float.h>
2636
2637_ACEOF
2638if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2639 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2640 ac_status=$?
2641 egrep -v '^ *\+' conftest.er1 >conftest.err
2642 rm -f conftest.er1
2643 cat conftest.err >&5
2644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2645 (exit $ac_status); } >/dev/null; then
2646 if test -s conftest.err; then
2647 ac_cpp_err=$ac_c_preproc_warn_flag
2648 else
2649 ac_cpp_err=
2650 fi
2651else
2652 ac_cpp_err=yes
2653fi
2654if test -z "$ac_cpp_err"; then
2655 ac_cv_header_stdc=yes
2656else
2657 echo "$as_me: failed program was:" >&5
2658 cat conftest.$ac_ext >&5
2659 ac_cv_header_stdc=no
2660fi
2661rm -f conftest.err conftest.$ac_ext
2662
2663if test $ac_cv_header_stdc = yes; then
2664 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2665 cat >conftest.$ac_ext <<_ACEOF
2666#line $LINENO "configure"
2667#include "confdefs.h"
2668#include <string.h>
2669
2670_ACEOF
2671if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2672 egrep "memchr" >/dev/null 2>&1; then
2673 :
2674else
2675 ac_cv_header_stdc=no
2676fi
2677rm -f conftest*
2678
2679fi
2680
2681if test $ac_cv_header_stdc = yes; then
2682 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2683 cat >conftest.$ac_ext <<_ACEOF
2684#line $LINENO "configure"
2685#include "confdefs.h"
2686#include <stdlib.h>
2687
2688_ACEOF
2689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2690 egrep "free" >/dev/null 2>&1; then
2691 :
2692else
2693 ac_cv_header_stdc=no
2694fi
2695rm -f conftest*
2696
2697fi
2698
2699if test $ac_cv_header_stdc = yes; then
2700 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2701 if test "$cross_compiling" = yes; then
2702 :
2703else
2704 cat >conftest.$ac_ext <<_ACEOF
2705#line $LINENO "configure"
2706#include "confdefs.h"
2707#include <ctype.h>
2708#if ((' ' & 0x0FF) == 0x020)
2709# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2710# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2711#else
2712# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2713 || ('j' <= (c) && (c) <= 'r') \
2714 || ('s' <= (c) && (c) <= 'z'))
2715# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2716#endif
2717
2718#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2719int
2720main ()
2721{
2722 int i;
2723 for (i = 0; i < 256; i++)
2724 if (XOR (islower (i), ISLOWER (i))
2725 || toupper (i) != TOUPPER (i))
2726 exit(2);
2727 exit (0);
2728}
2729_ACEOF
2730rm -f conftest$ac_exeext
2731if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2732 (eval $ac_link) 2>&5
2733 ac_status=$?
2734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2735 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2737 (eval $ac_try) 2>&5
2738 ac_status=$?
2739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2740 (exit $ac_status); }; }; then
2741 :
2742else
2743 echo "$as_me: program exited with status $ac_status" >&5
2744echo "$as_me: failed program was:" >&5
2745cat conftest.$ac_ext >&5
2746( exit $ac_status )
2747ac_cv_header_stdc=no
2748fi
2749rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2750fi
2751fi
2752fi
2753echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2754echo "${ECHO_T}$ac_cv_header_stdc" >&6
2755if test $ac_cv_header_stdc = yes; then
2756
2757cat >>confdefs.h <<\_ACEOF
2758#define STDC_HEADERS 1
2759_ACEOF
2760
2761fi
2762
2763# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2774 inttypes.h stdint.h unistd.h
2775do
2776as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2777echo "$as_me:$LINENO: checking for $ac_header" >&5
2778echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2779if eval "test \"\${$as_ac_Header+set}\" = set"; then
2780 echo $ECHO_N "(cached) $ECHO_C" >&6
2781else
2782 cat >conftest.$ac_ext <<_ACEOF
2783#line $LINENO "configure"
2784#include "confdefs.h"
2785$ac_includes_default
2786
2787#include <$ac_header>
2788_ACEOF
2789rm -f conftest.$ac_objext
2790if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2791 (eval $ac_compile) 2>&5
2792 ac_status=$?
2793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2794 (exit $ac_status); } &&
2795 { ac_try='test -s conftest.$ac_objext'
2796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2797 (eval $ac_try) 2>&5
2798 ac_status=$?
2799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2800 (exit $ac_status); }; }; then
2801 eval "$as_ac_Header=yes"
2802else
2803 echo "$as_me: failed program was:" >&5
2804cat conftest.$ac_ext >&5
2805eval "$as_ac_Header=no"
2806fi
2807rm -f conftest.$ac_objext conftest.$ac_ext
2808fi
2809echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2810echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2811if test `eval echo '${'$as_ac_Header'}'` = yes; then
2812 cat >>confdefs.h <<_ACEOF
2813#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2814_ACEOF
2815
2816fi
2817
2818done
2819
2820
2821if test "${ac_cv_header_minix_config_h+set}" = set; then
2822 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2823echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2824if test "${ac_cv_header_minix_config_h+set}" = set; then
2825 echo $ECHO_N "(cached) $ECHO_C" >&6
2826fi
2827echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2828echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2829else
2830 # Is the header compilable?
2831echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2832echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2833cat >conftest.$ac_ext <<_ACEOF
2834#line $LINENO "configure"
2835#include "confdefs.h"
2836$ac_includes_default
2837#include <minix/config.h>
2838_ACEOF
2839rm -f conftest.$ac_objext
2840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2841 (eval $ac_compile) 2>&5
2842 ac_status=$?
2843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2844 (exit $ac_status); } &&
2845 { ac_try='test -s conftest.$ac_objext'
2846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2847 (eval $ac_try) 2>&5
2848 ac_status=$?
2849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2850 (exit $ac_status); }; }; then
2851 ac_header_compiler=yes
2852else
2853 echo "$as_me: failed program was:" >&5
2854cat conftest.$ac_ext >&5
2855ac_header_compiler=no
2856fi
2857rm -f conftest.$ac_objext conftest.$ac_ext
2858echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2859echo "${ECHO_T}$ac_header_compiler" >&6
2860
2861# Is the header present?
2862echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2863echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2864cat >conftest.$ac_ext <<_ACEOF
2865#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002866#include "confdefs.h"
2867#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002868_ACEOF
2869if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2870 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2871 ac_status=$?
2872 egrep -v '^ *\+' conftest.er1 >conftest.err
2873 rm -f conftest.er1
2874 cat conftest.err >&5
2875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2876 (exit $ac_status); } >/dev/null; then
2877 if test -s conftest.err; then
2878 ac_cpp_err=$ac_c_preproc_warn_flag
2879 else
2880 ac_cpp_err=
2881 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002882else
Martin v. Löwis11437992002-04-12 09:54:03 +00002883 ac_cpp_err=yes
2884fi
2885if test -z "$ac_cpp_err"; then
2886 ac_header_preproc=yes
2887else
2888 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002889 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002890 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002891fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002892rm -f conftest.err conftest.$ac_ext
2893echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2894echo "${ECHO_T}$ac_header_preproc" >&6
2895
2896# So? What about this header?
2897case $ac_header_compiler:$ac_header_preproc in
2898 yes:no )
2899 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2900echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2901 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2902echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2903 no:yes )
2904 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2905echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2906 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2907echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2908 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2909echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2910esac
2911echo "$as_me:$LINENO: checking for minix/config.h" >&5
2912echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2913if test "${ac_cv_header_minix_config_h+set}" = set; then
2914 echo $ECHO_N "(cached) $ECHO_C" >&6
2915else
2916 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002917fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002918echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2919echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2920
2921fi
2922if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002923 MINIX=yes
2924else
Martin v. Löwis11437992002-04-12 09:54:03 +00002925 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002926fi
2927
Martin v. Löwis11437992002-04-12 09:54:03 +00002928
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002929if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002930
2931cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002932#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002933_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002934
Martin v. Löwis11437992002-04-12 09:54:03 +00002935
2936cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002937#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002938_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002939
Martin v. Löwis11437992002-04-12 09:54:03 +00002940
2941cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002942#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002943_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002944
2945fi
2946
2947
Michael W. Hudson54241132001-12-07 15:38:26 +00002948
Martin v. Löwis11437992002-04-12 09:54:03 +00002949echo "$as_me:$LINENO: checking for --with-suffix" >&5
2950echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002951
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002952# Check whether --with-suffix or --without-suffix was given.
2953if test "${with_suffix+set}" = set; then
2954 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002955
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002956 case $withval in
2957 no) EXEEXT=;;
2958 yes) EXEEXT=.exe;;
2959 *) EXEEXT=$withval;;
2960 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002961fi;
2962echo "$as_me:$LINENO: result: $EXEEXT" >&5
2963echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002964
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002965# Test whether we're running on a non-case-sensitive system, in which
2966# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002967
Martin v. Löwis11437992002-04-12 09:54:03 +00002968echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
2969echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen0b06be72002-06-21 14:48:38 +00002970if test -d "${srcdir}/python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002971then
Martin v. Löwis11437992002-04-12 09:54:03 +00002972 echo "$as_me:$LINENO: result: yes" >&5
2973echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002974 BUILDEXEEXT=.exe
2975else
Martin v. Löwis11437992002-04-12 09:54:03 +00002976 echo "$as_me:$LINENO: result: no" >&5
2977echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002978 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002979fi
Guido van Rossumff555e32000-09-22 15:38:21 +00002980
Guido van Rossumdd997f71998-10-07 19:58:26 +00002981case $MACHDEP in
2982bsdos*)
2983 case $CC in
2984 gcc) CC="$CC -D_HAVE_BSDI";;
2985 esac;;
2986esac
2987
Guido van Rossum24b1e751997-08-21 02:29:16 +00002988case $ac_sys_system in
2989hp*|HP*)
2990 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00002991 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002992 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002993Monterey*)
2994 case $CC in
2995 cc) CC="$CC -Wl,-Bexport";;
2996 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002997SunOS*)
2998 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00002999
3000cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003001#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003002_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003003
3004 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003005esac
3006
Michael W. Hudson54241132001-12-07 15:38:26 +00003007
3008
Martin v. Löwis11437992002-04-12 09:54:03 +00003009echo "$as_me:$LINENO: checking LIBRARY" >&5
3010echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003011if test -z "$LIBRARY"
3012then
3013 LIBRARY='libpython$(VERSION).a'
3014fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003015echo "$as_me:$LINENO: result: $LIBRARY" >&5
3016echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003017
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003018# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003019# name of the library into which to insert object files). BLDLIBRARY is also
3020# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3021# is blank as the main program is not linked directly against LDLIBRARY.
3022# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3023# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3024# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3025# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003026#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003027# RUNSHARED is used to run shared python without installed libraries
3028#
3029# INSTSONAME is the name of the shared library that will be use to install
3030# on the system - some systems like version suffix, others don't
3031
3032
Michael W. Hudson54241132001-12-07 15:38:26 +00003033
3034
3035
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003036
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003037LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003038BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003039INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003040DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003041LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003042RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003043
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003044# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003045# If CXX is set, and if it is needed to link a main function that was
3046# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3047# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003048# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003049# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003050
Martin v. Löwis11437992002-04-12 09:54:03 +00003051echo "$as_me:$LINENO: checking LINKCC" >&5
3052echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003053if test -z "$LINKCC"
3054then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003055 if test -z "$CXX"; then
3056 LINKCC="\$(PURIFY) \$(CC)"
3057 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003058 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003059 $CXX -c conftest.$ac_ext 2>&5
3060 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3061 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3062 then
3063 LINKCC="\$(PURIFY) \$(CC)"
3064 else
3065 LINKCC="\$(PURIFY) \$(CXX)"
3066 fi
3067 rm -fr conftest*
3068 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003069 case $ac_sys_system in
3070 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003071 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003072 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003073 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003074 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003075 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003076 esac
3077fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003078echo "$as_me:$LINENO: result: $LINKCC" >&5
3079echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003080
Martin v. Löwis11437992002-04-12 09:54:03 +00003081echo "$as_me:$LINENO: checking for --enable-shared" >&5
3082echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003083# Check whether --enable-shared or --disable-shared was given.
3084if test "${enable_shared+set}" = set; then
3085 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003086
Martin v. Löwis11437992002-04-12 09:54:03 +00003087fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003088
3089if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003090then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003091 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003092 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003093 enable_shared="yes";;
3094 *)
3095 enable_shared="no";;
3096 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003097fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003098echo "$as_me:$LINENO: result: $enable_shared" >&5
3099echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003100
3101
Martin v. Löwis11437992002-04-12 09:54:03 +00003102echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3103echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003104
Guido van Rossumb8552162001-09-05 14:58:11 +00003105# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3106# library that we build, but we do not want to link against it (we
3107# will find it with a -framework option). For this reason there is an
3108# extra variable BLDLIBRARY against which Python and the extension
3109# modules are linked, BLDLIBRARY. This is normally the same as
3110# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003111if test "$enable_framework"
3112then
3113 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3114 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3115 BLDLIBRARY=''
3116else
3117 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003118fi
Jack Jansene578a632001-08-15 01:27:14 +00003119
Martin v. Löwis1142de32002-03-29 16:28:31 +00003120# Other platforms follow
3121if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003122
3123cat >>confdefs.h <<\_ACEOF
3124#define Py_ENABLE_SHARED 1
3125_ACEOF
3126
Martin v. Löwis1142de32002-03-29 16:28:31 +00003127 case $ac_sys_system in
3128 BeOS*)
3129 LDLIBRARY='libpython$(VERSION).so'
3130 ;;
3131 CYGWIN*)
3132 LDLIBRARY='libpython$(VERSION).dll.a'
3133 DLLLIBRARY='libpython$(VERSION).dll'
3134 ;;
3135 SunOS*)
3136 LDLIBRARY='libpython$(VERSION).so'
3137 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3138 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3139 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003140 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003141 LDLIBRARY='libpython$(VERSION).so'
3142 BLDLIBRARY='-L. -lpython$(VERSION)'
3143 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3144 INSTSONAME="$LDLIBRARY".$SOVERSION
3145 ;;
3146 hp*|HP*)
3147 LDLIBRARY='libpython$(VERSION).sl'
3148 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3149 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3150 ;;
3151 OSF*)
3152 LDLIBRARY='libpython$(VERSION).so'
3153 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3154 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3155 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003156 atheos*)
3157 LDLIBRARY='libpython$(VERSION).so'
3158 BLDLIBRARY='-L. -lpython$(VERSION)'
3159 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3160 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003161 esac
3162 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3163 case $MACHDEP in
3164 dguxR4)
3165 LDLIBRARY='libpython$(VERSION).so'
3166 OPT="$OPT -pic"
3167 ;;
3168 esac
3169fi
3170
Martin v. Löwis11437992002-04-12 09:54:03 +00003171echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3172echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003173
Martin v. Löwis11437992002-04-12 09:54:03 +00003174if test -n "$ac_tool_prefix"; then
3175 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3176set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3177echo "$as_me:$LINENO: checking for $ac_word" >&5
3178echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3179if test "${ac_cv_prog_RANLIB+set}" = set; then
3180 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003181else
3182 if test -n "$RANLIB"; then
3183 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3184else
Martin v. Löwis11437992002-04-12 09:54:03 +00003185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3186for as_dir in $PATH
3187do
3188 IFS=$as_save_IFS
3189 test -z "$as_dir" && as_dir=.
3190 for ac_exec_ext in '' $ac_executable_extensions; do
3191 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3192 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3193 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3194 break 2
3195 fi
3196done
3197done
3198
Guido van Rossum627b2d71993-12-24 10:39:16 +00003199fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003200fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003201RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003202if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003203 echo "$as_me:$LINENO: result: $RANLIB" >&5
3204echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003205else
Martin v. Löwis11437992002-04-12 09:54:03 +00003206 echo "$as_me:$LINENO: result: no" >&5
3207echo "${ECHO_T}no" >&6
3208fi
3209
3210fi
3211if test -z "$ac_cv_prog_RANLIB"; then
3212 ac_ct_RANLIB=$RANLIB
3213 # Extract the first word of "ranlib", so it can be a program name with args.
3214set dummy ranlib; ac_word=$2
3215echo "$as_me:$LINENO: checking for $ac_word" >&5
3216echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3217if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3218 echo $ECHO_N "(cached) $ECHO_C" >&6
3219else
3220 if test -n "$ac_ct_RANLIB"; then
3221 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3222else
3223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3224for as_dir in $PATH
3225do
3226 IFS=$as_save_IFS
3227 test -z "$as_dir" && as_dir=.
3228 for ac_exec_ext in '' $ac_executable_extensions; do
3229 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3230 ac_cv_prog_ac_ct_RANLIB="ranlib"
3231 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3232 break 2
3233 fi
3234done
3235done
3236
3237 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3238fi
3239fi
3240ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3241if test -n "$ac_ct_RANLIB"; then
3242 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3243echo "${ECHO_T}$ac_ct_RANLIB" >&6
3244else
3245 echo "$as_me:$LINENO: result: no" >&5
3246echo "${ECHO_T}no" >&6
3247fi
3248
3249 RANLIB=$ac_ct_RANLIB
3250else
3251 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003252fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003253
3254
Guido van Rossum7f43da71994-08-01 12:15:30 +00003255for ac_prog in ar aal
3256do
Martin v. Löwis11437992002-04-12 09:54:03 +00003257 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003258set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003259echo "$as_me:$LINENO: checking for $ac_word" >&5
3260echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3261if test "${ac_cv_prog_AR+set}" = set; then
3262 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003263else
3264 if test -n "$AR"; then
3265 ac_cv_prog_AR="$AR" # Let the user override the test.
3266else
Martin v. Löwis11437992002-04-12 09:54:03 +00003267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3268for as_dir in $PATH
3269do
3270 IFS=$as_save_IFS
3271 test -z "$as_dir" && as_dir=.
3272 for ac_exec_ext in '' $ac_executable_extensions; do
3273 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3274 ac_cv_prog_AR="$ac_prog"
3275 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3276 break 2
3277 fi
3278done
3279done
3280
Guido van Rossum7f43da71994-08-01 12:15:30 +00003281fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003282fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003283AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003284if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003285 echo "$as_me:$LINENO: result: $AR" >&5
3286echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003287else
Martin v. Löwis11437992002-04-12 09:54:03 +00003288 echo "$as_me:$LINENO: result: no" >&5
3289echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003290fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003291
Martin v. Löwis11437992002-04-12 09:54:03 +00003292 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003293done
3294test -n "$AR" || AR="ar"
3295
Michael W. Hudson54241132001-12-07 15:38:26 +00003296
Neil Schemenauera42c8272001-03-31 00:01:55 +00003297case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003298bsdos*|hp*|HP*)
3299 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003300 if test -z "$INSTALL"
3301 then
3302 INSTALL="${srcdir}/install-sh -c"
3303 fi
3304esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003305ac_aux_dir=
3306for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3307 if test -f $ac_dir/install-sh; then
3308 ac_aux_dir=$ac_dir
3309 ac_install_sh="$ac_aux_dir/install-sh -c"
3310 break
3311 elif test -f $ac_dir/install.sh; then
3312 ac_aux_dir=$ac_dir
3313 ac_install_sh="$ac_aux_dir/install.sh -c"
3314 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003315 elif test -f $ac_dir/shtool; then
3316 ac_aux_dir=$ac_dir
3317 ac_install_sh="$ac_aux_dir/shtool install -c"
3318 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003319 fi
3320done
3321if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003322 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3323echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3324 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003325fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003326ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3327ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3328ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003329
3330# Find a good install program. We prefer a C program (faster),
3331# so one script is as good as another. But avoid the broken or
3332# incompatible versions:
3333# SysV /etc/install, /usr/sbin/install
3334# SunOS /usr/etc/install
3335# IRIX /sbin/install
3336# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003337# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003338# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3339# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3340# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3341# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003342echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3343echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003344if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003345if test "${ac_cv_path_install+set}" = set; then
3346 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003347else
Martin v. Löwis11437992002-04-12 09:54:03 +00003348 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3349for as_dir in $PATH
3350do
3351 IFS=$as_save_IFS
3352 test -z "$as_dir" && as_dir=.
3353 # Account for people who put trailing slashes in PATH elements.
3354case $as_dir/ in
3355 ./ | .// | /cC/* | \
3356 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3357 /usr/ucb/* ) ;;
3358 *)
3359 # OSF1 and SCO ODT 3.0 have their own names for install.
3360 # Don't use installbsd from OSF since it installs stuff as root
3361 # by default.
3362 for ac_prog in ginstall scoinst install; do
3363 for ac_exec_ext in '' $ac_executable_extensions; do
3364 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3365 if test $ac_prog = install &&
3366 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3367 # AIX install. It has an incompatible calling convention.
3368 :
3369 elif test $ac_prog = install &&
3370 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3371 # program-specific install script used by HP pwplus--don't use.
3372 :
3373 else
3374 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3375 break 3
3376 fi
3377 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003378 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003379 done
3380 ;;
3381esac
3382done
3383
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003384
3385fi
3386 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003387 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003388 else
3389 # As a last resort, use the slow shell script. We don't cache a
3390 # path for INSTALL within a source directory, because that will
3391 # break other packages using the cache if that directory is
3392 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003393 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003394 fi
3395fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003396echo "$as_me:$LINENO: result: $INSTALL" >&5
3397echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003398
3399# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3400# It thinks the first close brace ends the variable substitution.
3401test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3402
Martin v. Löwis11437992002-04-12 09:54:03 +00003403test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003404
3405test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3406
Michael W. Hudson54241132001-12-07 15:38:26 +00003407
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003408# Not every filesystem supports hard links
3409
3410if test -z "$LN" ; then
3411 case $ac_sys_system in
3412 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003413 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003414 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003415 *) LN=ln;;
3416 esac
3417fi
3418
Fred Drake109d9862001-07-11 06:27:56 +00003419# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003420echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3421echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3422
Fred Drake109d9862001-07-11 06:27:56 +00003423# Check whether --with-pydebug or --without-pydebug was given.
3424if test "${with_pydebug+set}" = set; then
3425 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003426
Fred Drake109d9862001-07-11 06:27:56 +00003427if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003428then
3429
3430cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003431#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003432_ACEOF
3433
3434 echo "$as_me:$LINENO: result: yes" >&5
3435echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003436 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003437else echo "$as_me:$LINENO: result: no" >&5
3438echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003439fi
3440else
Martin v. Löwis11437992002-04-12 09:54:03 +00003441 echo "$as_me:$LINENO: result: no" >&5
3442echo "${ECHO_T}no" >&6
3443fi;
Fred Drake109d9862001-07-11 06:27:56 +00003444
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003445# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003446
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003447if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003448then
Neal Norwitzd957f392002-09-25 21:26:19 +00003449 case $GCC in
Guido van Rossumedca74a1997-07-18 23:29:40 +00003450 yes)
3451 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003452 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003453 if test "$Py_DEBUG" = 'true' ; then
3454 # Optimization messes up debuggers, so turn it off for
3455 # debug builds.
3456 OPT="-g -Wall -Wstrict-prototypes"
3457 else
3458 OPT="-g -O3 -Wall -Wstrict-prototypes"
3459 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003460 *)
Fred Drake109d9862001-07-11 06:27:56 +00003461 OPT="-O3 -Wall -Wstrict-prototypes";;
3462 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003463 case $ac_sys_system in
3464 SCO_SV*) OPT="$OPT -m486 -DSCO5";;
3465 esac
Fred Drake109d9862001-07-11 06:27:56 +00003466 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003467 *)
3468 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003469 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003470 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003471 SCO_SV*)
3472 CFLAGS="$CFLAGS -belf"
3473 OPT="-belf -O -Ki486 -DSCO5";;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003474 *)
3475 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003476 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003477 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003478 case $ac_sys_system in
3479 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003480 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003481 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003482fi
3483
Fred Drakee1ceaa02001-12-04 20:55:47 +00003484if test "$Py_DEBUG" = 'true'; then
3485 :
3486else
3487 OPT="-DNDEBUG $OPT"
3488fi
3489
Trent Mick635f6fb2000-08-23 21:33:05 +00003490# The current (beta) Monterey compiler dies with optimizations
3491case $ac_sys_system in
3492Monterey*) OPT="";;
3493esac
3494
Guido van Rossum563e7081996-09-10 18:20:48 +00003495if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003496then
3497 OPT="$OPT $ac_arch_flags"
3498fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003499
Martin v. Löwis11437992002-04-12 09:54:03 +00003500echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3501echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3502if test "${ac_cv_opt_olimit_ok+set}" = set; then
3503 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003504else
3505 ac_save_cc="$CC"
3506CC="$CC -OPT:Olimit=0"
3507if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003508 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003509else
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 cat >conftest.$ac_ext <<_ACEOF
3511#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003512#include "confdefs.h"
3513int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003514_ACEOF
3515rm -f conftest$ac_exeext
3516if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3517 (eval $ac_link) 2>&5
3518 ac_status=$?
3519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3520 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3522 (eval $ac_try) 2>&5
3523 ac_status=$?
3524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3525 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003526 ac_cv_opt_olimit_ok=yes
3527else
Martin v. Löwis11437992002-04-12 09:54:03 +00003528 echo "$as_me: program exited with status $ac_status" >&5
3529echo "$as_me: failed program was:" >&5
3530cat conftest.$ac_ext >&5
3531( exit $ac_status )
3532ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003533fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003534rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003535fi
Guido van Rossum91922671997-10-09 20:24:13 +00003536CC="$ac_save_cc"
3537fi
3538
Martin v. Löwis11437992002-04-12 09:54:03 +00003539echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3540echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003541if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003542 case $ac_sys_system in
3543 Darwin*) OPT="$OPT" ;;
3544 *) OPT="$OPT -OPT:Olimit=0";;
3545 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003546else
Martin v. Löwis11437992002-04-12 09:54:03 +00003547 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3548echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3549 if test "${ac_cv_olimit_ok+set}" = set; then
3550 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003551else
3552 ac_save_cc="$CC"
3553 CC="$CC -Olimit 1500"
3554 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003555 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003556else
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 cat >conftest.$ac_ext <<_ACEOF
3558#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003559#include "confdefs.h"
3560int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003561_ACEOF
3562rm -f conftest$ac_exeext
3563if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3564 (eval $ac_link) 2>&5
3565 ac_status=$?
3566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3567 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3569 (eval $ac_try) 2>&5
3570 ac_status=$?
3571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3572 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003573 ac_cv_olimit_ok=yes
3574else
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 echo "$as_me: program exited with status $ac_status" >&5
3576echo "$as_me: failed program was:" >&5
3577cat conftest.$ac_ext >&5
3578( exit $ac_status )
3579ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003580fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003581rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003582fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003583 CC="$ac_save_cc"
3584fi
3585
Martin v. Löwis11437992002-04-12 09:54:03 +00003586 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3587echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003588 if test $ac_cv_olimit_ok = yes; then
3589 OPT="$OPT -Olimit 1500"
3590 fi
3591fi
3592
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003593# On some compilers, pthreads are available without further options
3594# (e.g. MacOS X). On some of these systems, the compiler will not
3595# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3596# So we have to see first whether pthreads are available without
3597# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003598echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3599echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3600if test "${ac_cv_pthread_is_default+set}" = set; then
3601 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003602else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003603 if test "$cross_compiling" = yes; then
3604 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003605else
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 cat >conftest.$ac_ext <<_ACEOF
3607#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003608#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003609
Martin v. Löwis130fb172001-07-19 11:00:41 +00003610#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003611
3612void* routine(void* p){return NULL;}
3613
3614int main(){
3615 pthread_t p;
3616 if(pthread_create(&p,NULL,routine,NULL)!=0)
3617 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003618 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003619 return 0;
3620}
3621
Martin v. Löwis11437992002-04-12 09:54:03 +00003622_ACEOF
3623rm -f conftest$ac_exeext
3624if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3625 (eval $ac_link) 2>&5
3626 ac_status=$?
3627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3628 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3630 (eval $ac_try) 2>&5
3631 ac_status=$?
3632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3633 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003634 ac_cv_pthread_is_default=yes
3635else
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 echo "$as_me: program exited with status $ac_status" >&5
3637echo "$as_me: failed program was:" >&5
3638cat conftest.$ac_ext >&5
3639( exit $ac_status )
3640ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003641fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003642rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003643fi
3644
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003645fi
3646
Martin v. Löwis11437992002-04-12 09:54:03 +00003647echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3648echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003649
Michael W. Hudson54241132001-12-07 15:38:26 +00003650
Martin v. Löwis11437992002-04-12 09:54:03 +00003651if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003652then
3653 ac_cv_kpthread=no
3654else
3655# -Kpthread, if available, provides the right #defines
3656# and linker options to make pthread_create available
3657# Some compilers won't report that they do not support -Kpthread,
3658# so we need to run a program to see whether it really made the
3659# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003660echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3661echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3662if test "${ac_cv_kpthread+set}" = set; then
3663 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003664else
3665 ac_save_cc="$CC"
3666CC="$CC -Kpthread"
3667if test "$cross_compiling" = yes; then
3668 ac_cv_kpthread=no
3669else
Martin v. Löwis11437992002-04-12 09:54:03 +00003670 cat >conftest.$ac_ext <<_ACEOF
3671#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003672#include "confdefs.h"
3673
3674#include <pthread.h>
3675
3676void* routine(void* p){return NULL;}
3677
3678int main(){
3679 pthread_t p;
3680 if(pthread_create(&p,NULL,routine,NULL)!=0)
3681 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003682 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003683 return 0;
3684}
3685
Martin v. Löwis11437992002-04-12 09:54:03 +00003686_ACEOF
3687rm -f conftest$ac_exeext
3688if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3689 (eval $ac_link) 2>&5
3690 ac_status=$?
3691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3692 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3694 (eval $ac_try) 2>&5
3695 ac_status=$?
3696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3697 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003698 ac_cv_kpthread=yes
3699else
Martin v. Löwis11437992002-04-12 09:54:03 +00003700 echo "$as_me: program exited with status $ac_status" >&5
3701echo "$as_me: failed program was:" >&5
3702cat conftest.$ac_ext >&5
3703( exit $ac_status )
3704ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003705fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003706rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003707fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003708CC="$ac_save_cc"
3709fi
3710
Martin v. Löwis11437992002-04-12 09:54:03 +00003711echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3712echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003713fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003714
Michael W. Hudson54241132001-12-07 15:38:26 +00003715
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003716# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003717echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3718echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3719if test "${ac_cv_header_stdc+set}" = set; then
3720 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003721else
Martin v. Löwis11437992002-04-12 09:54:03 +00003722 cat >conftest.$ac_ext <<_ACEOF
3723#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003724#include "confdefs.h"
3725#include <stdlib.h>
3726#include <stdarg.h>
3727#include <string.h>
3728#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003729
3730_ACEOF
3731if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3732 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3733 ac_status=$?
3734 egrep -v '^ *\+' conftest.er1 >conftest.err
3735 rm -f conftest.er1
3736 cat conftest.err >&5
3737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3738 (exit $ac_status); } >/dev/null; then
3739 if test -s conftest.err; then
3740 ac_cpp_err=$ac_c_preproc_warn_flag
3741 else
3742 ac_cpp_err=
3743 fi
3744else
3745 ac_cpp_err=yes
3746fi
3747if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003748 ac_cv_header_stdc=yes
3749else
Martin v. Löwis11437992002-04-12 09:54:03 +00003750 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003751 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003752 ac_cv_header_stdc=no
3753fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003754rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003755
3756if test $ac_cv_header_stdc = yes; then
3757 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003758 cat >conftest.$ac_ext <<_ACEOF
3759#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003760#include "confdefs.h"
3761#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003762
3763_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003764if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3765 egrep "memchr" >/dev/null 2>&1; then
3766 :
3767else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003768 ac_cv_header_stdc=no
3769fi
3770rm -f conftest*
3771
3772fi
3773
3774if test $ac_cv_header_stdc = yes; then
3775 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 cat >conftest.$ac_ext <<_ACEOF
3777#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003778#include "confdefs.h"
3779#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003780
3781_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3783 egrep "free" >/dev/null 2>&1; then
3784 :
3785else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003786 ac_cv_header_stdc=no
3787fi
3788rm -f conftest*
3789
3790fi
3791
3792if test $ac_cv_header_stdc = yes; then
3793 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003794 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003795 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003796else
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 cat >conftest.$ac_ext <<_ACEOF
3798#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003799#include "confdefs.h"
3800#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003801#if ((' ' & 0x0FF) == 0x020)
3802# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3803# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3804#else
3805# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3806 || ('j' <= (c) && (c) <= 'r') \
3807 || ('s' <= (c) && (c) <= 'z'))
3808# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3809#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003810
Martin v. Löwis11437992002-04-12 09:54:03 +00003811#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3812int
3813main ()
3814{
3815 int i;
3816 for (i = 0; i < 256; i++)
3817 if (XOR (islower (i), ISLOWER (i))
3818 || toupper (i) != TOUPPER (i))
3819 exit(2);
3820 exit (0);
3821}
3822_ACEOF
3823rm -f conftest$ac_exeext
3824if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3825 (eval $ac_link) 2>&5
3826 ac_status=$?
3827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3828 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3830 (eval $ac_try) 2>&5
3831 ac_status=$?
3832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3833 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003834 :
3835else
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 echo "$as_me: program exited with status $ac_status" >&5
3837echo "$as_me: failed program was:" >&5
3838cat conftest.$ac_ext >&5
3839( exit $ac_status )
3840ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003841fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003842rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003843fi
3844fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003845fi
3846echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3847echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003848if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003849
3850cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003851#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003852_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003853
3854fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003855
Martin v. Löwis11437992002-04-12 09:54:03 +00003856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
Martin v. Löwis11437992002-04-12 09:54:03 +00003893for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003894libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003895signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003896sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003897sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwis69532332001-10-13 09:12:41 +00003898sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003899sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003900do
Martin v. Löwis11437992002-04-12 09:54:03 +00003901as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3902if eval "test \"\${$as_ac_Header+set}\" = set"; then
3903 echo "$as_me:$LINENO: checking for $ac_header" >&5
3904echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3905if eval "test \"\${$as_ac_Header+set}\" = set"; then
3906 echo $ECHO_N "(cached) $ECHO_C" >&6
3907fi
3908echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3909echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003910else
Martin v. Löwis11437992002-04-12 09:54:03 +00003911 # Is the header compilable?
3912echo "$as_me:$LINENO: checking $ac_header usability" >&5
3913echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3914cat >conftest.$ac_ext <<_ACEOF
3915#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003916#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003917$ac_includes_default
3918#include <$ac_header>
3919_ACEOF
3920rm -f conftest.$ac_objext
3921if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3922 (eval $ac_compile) 2>&5
3923 ac_status=$?
3924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3925 (exit $ac_status); } &&
3926 { ac_try='test -s conftest.$ac_objext'
3927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3928 (eval $ac_try) 2>&5
3929 ac_status=$?
3930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3931 (exit $ac_status); }; }; then
3932 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003933else
Martin v. Löwis11437992002-04-12 09:54:03 +00003934 echo "$as_me: failed program was:" >&5
3935cat conftest.$ac_ext >&5
3936ac_header_compiler=no
3937fi
3938rm -f conftest.$ac_objext conftest.$ac_ext
3939echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3940echo "${ECHO_T}$ac_header_compiler" >&6
3941
3942# Is the header present?
3943echo "$as_me:$LINENO: checking $ac_header presence" >&5
3944echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3945cat >conftest.$ac_ext <<_ACEOF
3946#line $LINENO "configure"
3947#include "confdefs.h"
3948#include <$ac_header>
3949_ACEOF
3950if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3951 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3952 ac_status=$?
3953 egrep -v '^ *\+' conftest.er1 >conftest.err
3954 rm -f conftest.er1
3955 cat conftest.err >&5
3956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3957 (exit $ac_status); } >/dev/null; then
3958 if test -s conftest.err; then
3959 ac_cpp_err=$ac_c_preproc_warn_flag
3960 else
3961 ac_cpp_err=
3962 fi
3963else
3964 ac_cpp_err=yes
3965fi
3966if test -z "$ac_cpp_err"; then
3967 ac_header_preproc=yes
3968else
3969 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003970 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003971 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003972fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003973rm -f conftest.err conftest.$ac_ext
3974echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3975echo "${ECHO_T}$ac_header_preproc" >&6
3976
3977# So? What about this header?
3978case $ac_header_compiler:$ac_header_preproc in
3979 yes:no )
3980 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3981echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3982 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3983echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3984 no:yes )
3985 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3986echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3987 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3988echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3989 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3990echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3991esac
3992echo "$as_me:$LINENO: checking for $ac_header" >&5
3993echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3994if eval "test \"\${$as_ac_Header+set}\" = set"; then
3995 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003996else
Martin v. Löwis11437992002-04-12 09:54:03 +00003997 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003998fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003999echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4000echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4001
4002fi
4003if test `eval echo '${'$as_ac_Header'}'` = yes; then
4004 cat >>confdefs.h <<_ACEOF
4005#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4006_ACEOF
4007
4008fi
4009
Guido van Rossum627b2d71993-12-24 10:39:16 +00004010done
4011
Martin v. Löwis11437992002-04-12 09:54:03 +00004012
4013
4014
4015
4016
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004017ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004018for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4019 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4020echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4021echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4022if eval "test \"\${$as_ac_Header+set}\" = set"; then
4023 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004024else
Martin v. Löwis11437992002-04-12 09:54:03 +00004025 cat >conftest.$ac_ext <<_ACEOF
4026#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004027#include "confdefs.h"
4028#include <sys/types.h>
4029#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004030
4031#ifdef F77_DUMMY_MAIN
4032# ifdef __cplusplus
4033 extern "C"
4034# endif
4035 int F77_DUMMY_MAIN() { return 1; }
4036#endif
4037int
4038main ()
4039{
4040if ((DIR *) 0)
4041return 0;
4042 ;
4043 return 0;
4044}
4045_ACEOF
4046rm -f conftest.$ac_objext
4047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4048 (eval $ac_compile) 2>&5
4049 ac_status=$?
4050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4051 (exit $ac_status); } &&
4052 { ac_try='test -s conftest.$ac_objext'
4053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4054 (eval $ac_try) 2>&5
4055 ac_status=$?
4056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4057 (exit $ac_status); }; }; then
4058 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004059else
Martin v. Löwis11437992002-04-12 09:54:03 +00004060 echo "$as_me: failed program was:" >&5
4061cat conftest.$ac_ext >&5
4062eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004063fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004064rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004065fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004066echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4067echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4068if test `eval echo '${'$as_ac_Header'}'` = yes; then
4069 cat >>confdefs.h <<_ACEOF
4070#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4071_ACEOF
4072
4073ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004074fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004076done
4077# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4078if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004079 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4080echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4081if test "${ac_cv_search_opendir+set}" = set; then
4082 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004083else
Martin v. Löwis11437992002-04-12 09:54:03 +00004084 ac_func_search_save_LIBS=$LIBS
4085ac_cv_search_opendir=no
4086cat >conftest.$ac_ext <<_ACEOF
4087#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004088#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004090/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004091#ifdef __cplusplus
4092extern "C"
4093#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004094/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004095 builtin and then its argument prototype would still apply. */
4096char opendir ();
4097#ifdef F77_DUMMY_MAIN
4098# ifdef __cplusplus
4099 extern "C"
4100# endif
4101 int F77_DUMMY_MAIN() { return 1; }
4102#endif
4103int
4104main ()
4105{
4106opendir ();
4107 ;
4108 return 0;
4109}
4110_ACEOF
4111rm -f conftest.$ac_objext conftest$ac_exeext
4112if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4113 (eval $ac_link) 2>&5
4114 ac_status=$?
4115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4116 (exit $ac_status); } &&
4117 { ac_try='test -s conftest$ac_exeext'
4118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4119 (eval $ac_try) 2>&5
4120 ac_status=$?
4121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4122 (exit $ac_status); }; }; then
4123 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004124else
Martin v. Löwis11437992002-04-12 09:54:03 +00004125 echo "$as_me: failed program was:" >&5
4126cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004127fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004128rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4129if test "$ac_cv_search_opendir" = no; then
4130 for ac_lib in dir; do
4131 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4132 cat >conftest.$ac_ext <<_ACEOF
4133#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004134#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004135
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004136/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004137#ifdef __cplusplus
4138extern "C"
4139#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004140/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004141 builtin and then its argument prototype would still apply. */
4142char opendir ();
4143#ifdef F77_DUMMY_MAIN
4144# ifdef __cplusplus
4145 extern "C"
4146# endif
4147 int F77_DUMMY_MAIN() { return 1; }
4148#endif
4149int
4150main ()
4151{
4152opendir ();
4153 ;
4154 return 0;
4155}
4156_ACEOF
4157rm -f conftest.$ac_objext conftest$ac_exeext
4158if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4159 (eval $ac_link) 2>&5
4160 ac_status=$?
4161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4162 (exit $ac_status); } &&
4163 { ac_try='test -s conftest$ac_exeext'
4164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4165 (eval $ac_try) 2>&5
4166 ac_status=$?
4167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4168 (exit $ac_status); }; }; then
4169 ac_cv_search_opendir="-l$ac_lib"
4170break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004171else
Martin v. Löwis11437992002-04-12 09:54:03 +00004172 echo "$as_me: failed program was:" >&5
4173cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004174fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004175rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4176 done
4177fi
4178LIBS=$ac_func_search_save_LIBS
4179fi
4180echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4181echo "${ECHO_T}$ac_cv_search_opendir" >&6
4182if test "$ac_cv_search_opendir" != no; then
4183 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004184
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004185fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004186
Michael W. Hudson54241132001-12-07 15:38:26 +00004187else
Martin v. Löwis11437992002-04-12 09:54:03 +00004188 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4189echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4190if test "${ac_cv_search_opendir+set}" = set; then
4191 echo $ECHO_N "(cached) $ECHO_C" >&6
4192else
4193 ac_func_search_save_LIBS=$LIBS
4194ac_cv_search_opendir=no
4195cat >conftest.$ac_ext <<_ACEOF
4196#line $LINENO "configure"
4197#include "confdefs.h"
4198
4199/* Override any gcc2 internal prototype to avoid an error. */
4200#ifdef __cplusplus
4201extern "C"
4202#endif
4203/* We use char because int might match the return type of a gcc2
4204 builtin and then its argument prototype would still apply. */
4205char opendir ();
4206#ifdef F77_DUMMY_MAIN
4207# ifdef __cplusplus
4208 extern "C"
4209# endif
4210 int F77_DUMMY_MAIN() { return 1; }
4211#endif
4212int
4213main ()
4214{
4215opendir ();
4216 ;
4217 return 0;
4218}
4219_ACEOF
4220rm -f conftest.$ac_objext conftest$ac_exeext
4221if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4222 (eval $ac_link) 2>&5
4223 ac_status=$?
4224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4225 (exit $ac_status); } &&
4226 { ac_try='test -s conftest$ac_exeext'
4227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4228 (eval $ac_try) 2>&5
4229 ac_status=$?
4230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4231 (exit $ac_status); }; }; then
4232 ac_cv_search_opendir="none required"
4233else
4234 echo "$as_me: failed program was:" >&5
4235cat conftest.$ac_ext >&5
4236fi
4237rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4238if test "$ac_cv_search_opendir" = no; then
4239 for ac_lib in x; do
4240 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4241 cat >conftest.$ac_ext <<_ACEOF
4242#line $LINENO "configure"
4243#include "confdefs.h"
4244
4245/* Override any gcc2 internal prototype to avoid an error. */
4246#ifdef __cplusplus
4247extern "C"
4248#endif
4249/* We use char because int might match the return type of a gcc2
4250 builtin and then its argument prototype would still apply. */
4251char opendir ();
4252#ifdef F77_DUMMY_MAIN
4253# ifdef __cplusplus
4254 extern "C"
4255# endif
4256 int F77_DUMMY_MAIN() { return 1; }
4257#endif
4258int
4259main ()
4260{
4261opendir ();
4262 ;
4263 return 0;
4264}
4265_ACEOF
4266rm -f conftest.$ac_objext conftest$ac_exeext
4267if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4268 (eval $ac_link) 2>&5
4269 ac_status=$?
4270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4271 (exit $ac_status); } &&
4272 { ac_try='test -s conftest$ac_exeext'
4273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4274 (eval $ac_try) 2>&5
4275 ac_status=$?
4276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4277 (exit $ac_status); }; }; then
4278 ac_cv_search_opendir="-l$ac_lib"
4279break
4280else
4281 echo "$as_me: failed program was:" >&5
4282cat conftest.$ac_ext >&5
4283fi
4284rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4285 done
4286fi
4287LIBS=$ac_func_search_save_LIBS
4288fi
4289echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4290echo "${ECHO_T}$ac_cv_search_opendir" >&6
4291if test "$ac_cv_search_opendir" != no; then
4292 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4293
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004294fi
4295
4296fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004297
Michael W. Hudson54241132001-12-07 15:38:26 +00004298
Guido van Rossum627b2d71993-12-24 10:39:16 +00004299# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004300was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004301echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4302echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4303cat >conftest.$ac_ext <<_ACEOF
4304#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004305#include "confdefs.h"
4306#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004307
4308_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004309if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4310 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004311 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004312else
Martin v. Löwis11437992002-04-12 09:54:03 +00004313
4314
4315cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004316#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004317_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004318
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004319
Guido van Rossum627b2d71993-12-24 10:39:16 +00004320fi
4321rm -f conftest*
4322
Martin v. Löwis11437992002-04-12 09:54:03 +00004323echo "$as_me:$LINENO: result: $was_it_defined" >&5
4324echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004325
Neal Norwitz11690112002-07-30 01:08:28 +00004326# Check whether using makedev requires defining _OSF_SOURCE
4327echo "$as_me:$LINENO: checking for makedev" >&5
4328echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4329cat >conftest.$ac_ext <<_ACEOF
4330#line $LINENO "configure"
4331#include "confdefs.h"
4332 #include <sys/types.h>
4333#ifdef F77_DUMMY_MAIN
4334# ifdef __cplusplus
4335 extern "C"
4336# endif
4337 int F77_DUMMY_MAIN() { return 1; }
4338#endif
4339int
4340main ()
4341{
4342 makedev(0, 0)
4343 ;
4344 return 0;
4345}
4346_ACEOF
4347rm -f conftest.$ac_objext conftest$ac_exeext
4348if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4349 (eval $ac_link) 2>&5
4350 ac_status=$?
4351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4352 (exit $ac_status); } &&
4353 { ac_try='test -s conftest$ac_exeext'
4354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4355 (eval $ac_try) 2>&5
4356 ac_status=$?
4357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4358 (exit $ac_status); }; }; then
4359 ac_cv_has_makedev=yes
4360else
4361 echo "$as_me: failed program was:" >&5
4362cat conftest.$ac_ext >&5
4363ac_cv_has_makedev=no
4364fi
4365rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4366if test "$ac_cv_has_makedev" = "no"; then
4367 # we didn't link, try if _OSF_SOURCE will allow us to link
4368 cat >conftest.$ac_ext <<_ACEOF
4369#line $LINENO "configure"
4370#include "confdefs.h"
4371
4372 #define _OSF_SOURCE 1
4373 #include <sys/types.h>
4374
4375#ifdef F77_DUMMY_MAIN
4376# ifdef __cplusplus
4377 extern "C"
4378# endif
4379 int F77_DUMMY_MAIN() { return 1; }
4380#endif
4381int
4382main ()
4383{
4384 makedev(0, 0)
4385 ;
4386 return 0;
4387}
4388_ACEOF
4389rm -f conftest.$ac_objext conftest$ac_exeext
4390if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4391 (eval $ac_link) 2>&5
4392 ac_status=$?
4393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4394 (exit $ac_status); } &&
4395 { ac_try='test -s conftest$ac_exeext'
4396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4397 (eval $ac_try) 2>&5
4398 ac_status=$?
4399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4400 (exit $ac_status); }; }; then
4401 ac_cv_has_makedev=yes
4402else
4403 echo "$as_me: failed program was:" >&5
4404cat conftest.$ac_ext >&5
4405ac_cv_has_makedev=no
4406fi
4407rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4408 if test "$ac_cv_has_makedev" = "yes"; then
4409
4410cat >>confdefs.h <<\_ACEOF
4411#define _OSF_SOURCE 1
4412_ACEOF
4413
4414 fi
4415fi
4416echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4417echo "${ECHO_T}$ac_cv_has_makedev" >&6
4418if test "$ac_cv_has_makedev" = "yes"; then
4419
4420cat >>confdefs.h <<\_ACEOF
4421#define HAVE_MAKEDEV 1
4422_ACEOF
4423
4424fi
4425
Guido van Rossum810cc512001-09-09 23:51:39 +00004426# Two defines needed to enable largefile support on various platforms
4427# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004428
Martin v. Löwis11437992002-04-12 09:54:03 +00004429cat >>confdefs.h <<\_ACEOF
4430#define _LARGEFILE_SOURCE 1
4431_ACEOF
4432
4433
4434cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004435#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004436_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004437
Michael W. Hudson54241132001-12-07 15:38:26 +00004438
Guido van Rossum84e7b241996-08-19 21:59:00 +00004439# Add some code to confdefs.h so that the test for off_t works on SCO
4440cat >> confdefs.h <<\EOF
4441#if defined(SCO_DS)
4442#undef _OFF_T
4443#endif
4444EOF
4445
Guido van Rossumef2255b2000-03-10 22:30:29 +00004446# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004447echo "$as_me:$LINENO: checking for mode_t" >&5
4448echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4449if test "${ac_cv_type_mode_t+set}" = set; then
4450 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004451else
Martin v. Löwis11437992002-04-12 09:54:03 +00004452 cat >conftest.$ac_ext <<_ACEOF
4453#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004454#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004455$ac_includes_default
4456#ifdef F77_DUMMY_MAIN
4457# ifdef __cplusplus
4458 extern "C"
4459# endif
4460 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004461#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004462int
4463main ()
4464{
4465if ((mode_t *) 0)
4466 return 0;
4467if (sizeof (mode_t))
4468 return 0;
4469 ;
4470 return 0;
4471}
4472_ACEOF
4473rm -f conftest.$ac_objext
4474if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4475 (eval $ac_compile) 2>&5
4476 ac_status=$?
4477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4478 (exit $ac_status); } &&
4479 { ac_try='test -s conftest.$ac_objext'
4480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4481 (eval $ac_try) 2>&5
4482 ac_status=$?
4483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4484 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004485 ac_cv_type_mode_t=yes
4486else
Martin v. Löwis11437992002-04-12 09:54:03 +00004487 echo "$as_me: failed program was:" >&5
4488cat conftest.$ac_ext >&5
4489ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004490fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004491rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004492fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004493echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4494echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4495if test $ac_cv_type_mode_t = yes; then
4496 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004497else
Martin v. Löwis11437992002-04-12 09:54:03 +00004498
4499cat >>confdefs.h <<_ACEOF
4500#define mode_t int
4501_ACEOF
4502
4503fi
4504
4505echo "$as_me:$LINENO: checking for off_t" >&5
4506echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4507if test "${ac_cv_type_off_t+set}" = set; then
4508 echo $ECHO_N "(cached) $ECHO_C" >&6
4509else
4510 cat >conftest.$ac_ext <<_ACEOF
4511#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004512#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004513$ac_includes_default
4514#ifdef F77_DUMMY_MAIN
4515# ifdef __cplusplus
4516 extern "C"
4517# endif
4518 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004519#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004520int
4521main ()
4522{
4523if ((off_t *) 0)
4524 return 0;
4525if (sizeof (off_t))
4526 return 0;
4527 ;
4528 return 0;
4529}
4530_ACEOF
4531rm -f conftest.$ac_objext
4532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4533 (eval $ac_compile) 2>&5
4534 ac_status=$?
4535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4536 (exit $ac_status); } &&
4537 { ac_try='test -s conftest.$ac_objext'
4538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4539 (eval $ac_try) 2>&5
4540 ac_status=$?
4541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4542 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004543 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004544else
Martin v. Löwis11437992002-04-12 09:54:03 +00004545 echo "$as_me: failed program was:" >&5
4546cat conftest.$ac_ext >&5
4547ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004548fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004549rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004550fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004551echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4552echo "${ECHO_T}$ac_cv_type_off_t" >&6
4553if test $ac_cv_type_off_t = yes; then
4554 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004555else
Martin v. Löwis11437992002-04-12 09:54:03 +00004556
4557cat >>confdefs.h <<_ACEOF
4558#define off_t long
4559_ACEOF
4560
4561fi
4562
4563echo "$as_me:$LINENO: checking for pid_t" >&5
4564echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4565if test "${ac_cv_type_pid_t+set}" = set; then
4566 echo $ECHO_N "(cached) $ECHO_C" >&6
4567else
4568 cat >conftest.$ac_ext <<_ACEOF
4569#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004570#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004571$ac_includes_default
4572#ifdef F77_DUMMY_MAIN
4573# ifdef __cplusplus
4574 extern "C"
4575# endif
4576 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004577#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004578int
4579main ()
4580{
4581if ((pid_t *) 0)
4582 return 0;
4583if (sizeof (pid_t))
4584 return 0;
4585 ;
4586 return 0;
4587}
4588_ACEOF
4589rm -f conftest.$ac_objext
4590if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4591 (eval $ac_compile) 2>&5
4592 ac_status=$?
4593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4594 (exit $ac_status); } &&
4595 { ac_try='test -s conftest.$ac_objext'
4596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4597 (eval $ac_try) 2>&5
4598 ac_status=$?
4599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4600 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004601 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004602else
Martin v. Löwis11437992002-04-12 09:54:03 +00004603 echo "$as_me: failed program was:" >&5
4604cat conftest.$ac_ext >&5
4605ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004606fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004607rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004608fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004609echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4610echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4611if test $ac_cv_type_pid_t = yes; then
4612 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004613else
Martin v. Löwis11437992002-04-12 09:54:03 +00004614
4615cat >>confdefs.h <<_ACEOF
4616#define pid_t int
4617_ACEOF
4618
4619fi
4620
4621echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4622echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4623if test "${ac_cv_type_signal+set}" = set; then
4624 echo $ECHO_N "(cached) $ECHO_C" >&6
4625else
4626 cat >conftest.$ac_ext <<_ACEOF
4627#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004628#include "confdefs.h"
4629#include <sys/types.h>
4630#include <signal.h>
4631#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004632# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004633#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004634#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004635extern "C" void (*signal (int, void (*)(int)))(int);
4636#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004637void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004638#endif
4639
Martin v. Löwis11437992002-04-12 09:54:03 +00004640#ifdef F77_DUMMY_MAIN
4641# ifdef __cplusplus
4642 extern "C"
4643# endif
4644 int F77_DUMMY_MAIN() { return 1; }
4645#endif
4646int
4647main ()
4648{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004649int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004650 ;
4651 return 0;
4652}
4653_ACEOF
4654rm -f conftest.$ac_objext
4655if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4656 (eval $ac_compile) 2>&5
4657 ac_status=$?
4658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4659 (exit $ac_status); } &&
4660 { ac_try='test -s conftest.$ac_objext'
4661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4662 (eval $ac_try) 2>&5
4663 ac_status=$?
4664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4665 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004666 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004667else
Martin v. Löwis11437992002-04-12 09:54:03 +00004668 echo "$as_me: failed program was:" >&5
4669cat conftest.$ac_ext >&5
4670ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004671fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004672rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004673fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004674echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4675echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004676
Martin v. Löwis11437992002-04-12 09:54:03 +00004677cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004678#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004679_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004680
Michael W. Hudson54241132001-12-07 15:38:26 +00004681
Martin v. Löwis11437992002-04-12 09:54:03 +00004682echo "$as_me:$LINENO: checking for size_t" >&5
4683echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4684if test "${ac_cv_type_size_t+set}" = set; then
4685 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004686else
Martin v. Löwis11437992002-04-12 09:54:03 +00004687 cat >conftest.$ac_ext <<_ACEOF
4688#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004689#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004690$ac_includes_default
4691#ifdef F77_DUMMY_MAIN
4692# ifdef __cplusplus
4693 extern "C"
4694# endif
4695 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004696#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004697int
4698main ()
4699{
4700if ((size_t *) 0)
4701 return 0;
4702if (sizeof (size_t))
4703 return 0;
4704 ;
4705 return 0;
4706}
4707_ACEOF
4708rm -f conftest.$ac_objext
4709if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4710 (eval $ac_compile) 2>&5
4711 ac_status=$?
4712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4713 (exit $ac_status); } &&
4714 { ac_try='test -s conftest.$ac_objext'
4715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4716 (eval $ac_try) 2>&5
4717 ac_status=$?
4718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4719 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004720 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004721else
Martin v. Löwis11437992002-04-12 09:54:03 +00004722 echo "$as_me: failed program was:" >&5
4723cat conftest.$ac_ext >&5
4724ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004725fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004726rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004727fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004728echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4729echo "${ECHO_T}$ac_cv_type_size_t" >&6
4730if test $ac_cv_type_size_t = yes; then
4731 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004732else
Martin v. Löwis11437992002-04-12 09:54:03 +00004733
4734cat >>confdefs.h <<_ACEOF
4735#define size_t unsigned
4736_ACEOF
4737
4738fi
4739
4740echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4741echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4742if test "${ac_cv_type_uid_t+set}" = set; then
4743 echo $ECHO_N "(cached) $ECHO_C" >&6
4744else
4745 cat >conftest.$ac_ext <<_ACEOF
4746#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004747#include "confdefs.h"
4748#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004749
4750_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004751if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4752 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004753 ac_cv_type_uid_t=yes
4754else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004755 ac_cv_type_uid_t=no
4756fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004757rm -f conftest*
4758
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004759fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004760echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4761echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004762if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004763
Martin v. Löwis11437992002-04-12 09:54:03 +00004764cat >>confdefs.h <<\_ACEOF
4765#define uid_t int
4766_ACEOF
4767
4768
4769cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004770#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004771_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004772
4773fi
4774
Jack Jansendd19cf82001-12-06 22:36:17 +00004775
Michael W. Hudson54241132001-12-07 15:38:26 +00004776# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004777echo "$as_me:$LINENO: checking for int" >&5
4778echo $ECHO_N "checking for int... $ECHO_C" >&6
4779if test "${ac_cv_type_int+set}" = set; then
4780 echo $ECHO_N "(cached) $ECHO_C" >&6
4781else
4782 cat >conftest.$ac_ext <<_ACEOF
4783#line $LINENO "configure"
4784#include "confdefs.h"
4785$ac_includes_default
4786#ifdef F77_DUMMY_MAIN
4787# ifdef __cplusplus
4788 extern "C"
4789# endif
4790 int F77_DUMMY_MAIN() { return 1; }
4791#endif
4792int
4793main ()
4794{
4795if ((int *) 0)
4796 return 0;
4797if (sizeof (int))
4798 return 0;
4799 ;
4800 return 0;
4801}
4802_ACEOF
4803rm -f conftest.$ac_objext
4804if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4805 (eval $ac_compile) 2>&5
4806 ac_status=$?
4807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4808 (exit $ac_status); } &&
4809 { ac_try='test -s conftest.$ac_objext'
4810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4811 (eval $ac_try) 2>&5
4812 ac_status=$?
4813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4814 (exit $ac_status); }; }; then
4815 ac_cv_type_int=yes
4816else
4817 echo "$as_me: failed program was:" >&5
4818cat conftest.$ac_ext >&5
4819ac_cv_type_int=no
4820fi
4821rm -f conftest.$ac_objext conftest.$ac_ext
4822fi
4823echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4824echo "${ECHO_T}$ac_cv_type_int" >&6
4825
4826echo "$as_me:$LINENO: checking size of int" >&5
4827echo $ECHO_N "checking size of int... $ECHO_C" >&6
4828if test "${ac_cv_sizeof_int+set}" = set; then
4829 echo $ECHO_N "(cached) $ECHO_C" >&6
4830else
4831 if test "$ac_cv_type_int" = yes; then
4832 # The cast to unsigned long works around a bug in the HP C Compiler
4833 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4834 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4835 # This bug is HP SR number 8606223364.
4836 if test "$cross_compiling" = yes; then
4837 # Depending upon the size, compute the lo and hi bounds.
4838cat >conftest.$ac_ext <<_ACEOF
4839#line $LINENO "configure"
4840#include "confdefs.h"
4841$ac_includes_default
4842#ifdef F77_DUMMY_MAIN
4843# ifdef __cplusplus
4844 extern "C"
4845# endif
4846 int F77_DUMMY_MAIN() { return 1; }
4847#endif
4848int
4849main ()
4850{
4851static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4852test_array [0] = 0
4853
4854 ;
4855 return 0;
4856}
4857_ACEOF
4858rm -f conftest.$ac_objext
4859if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4860 (eval $ac_compile) 2>&5
4861 ac_status=$?
4862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4863 (exit $ac_status); } &&
4864 { ac_try='test -s conftest.$ac_objext'
4865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4866 (eval $ac_try) 2>&5
4867 ac_status=$?
4868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4869 (exit $ac_status); }; }; then
4870 ac_lo=0 ac_mid=0
4871 while :; do
4872 cat >conftest.$ac_ext <<_ACEOF
4873#line $LINENO "configure"
4874#include "confdefs.h"
4875$ac_includes_default
4876#ifdef F77_DUMMY_MAIN
4877# ifdef __cplusplus
4878 extern "C"
4879# endif
4880 int F77_DUMMY_MAIN() { return 1; }
4881#endif
4882int
4883main ()
4884{
4885static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4886test_array [0] = 0
4887
4888 ;
4889 return 0;
4890}
4891_ACEOF
4892rm -f conftest.$ac_objext
4893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4894 (eval $ac_compile) 2>&5
4895 ac_status=$?
4896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4897 (exit $ac_status); } &&
4898 { ac_try='test -s conftest.$ac_objext'
4899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4900 (eval $ac_try) 2>&5
4901 ac_status=$?
4902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4903 (exit $ac_status); }; }; then
4904 ac_hi=$ac_mid; break
4905else
4906 echo "$as_me: failed program was:" >&5
4907cat conftest.$ac_ext >&5
4908ac_lo=`expr $ac_mid + 1`
4909 if test $ac_lo -le $ac_mid; then
4910 ac_lo= ac_hi=
4911 break
4912 fi
4913 ac_mid=`expr 2 '*' $ac_mid + 1`
4914fi
4915rm -f conftest.$ac_objext conftest.$ac_ext
4916 done
4917else
4918 echo "$as_me: failed program was:" >&5
4919cat conftest.$ac_ext >&5
4920cat >conftest.$ac_ext <<_ACEOF
4921#line $LINENO "configure"
4922#include "confdefs.h"
4923$ac_includes_default
4924#ifdef F77_DUMMY_MAIN
4925# ifdef __cplusplus
4926 extern "C"
4927# endif
4928 int F77_DUMMY_MAIN() { return 1; }
4929#endif
4930int
4931main ()
4932{
4933static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4934test_array [0] = 0
4935
4936 ;
4937 return 0;
4938}
4939_ACEOF
4940rm -f conftest.$ac_objext
4941if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4942 (eval $ac_compile) 2>&5
4943 ac_status=$?
4944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4945 (exit $ac_status); } &&
4946 { ac_try='test -s conftest.$ac_objext'
4947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4948 (eval $ac_try) 2>&5
4949 ac_status=$?
4950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4951 (exit $ac_status); }; }; then
4952 ac_hi=-1 ac_mid=-1
4953 while :; do
4954 cat >conftest.$ac_ext <<_ACEOF
4955#line $LINENO "configure"
4956#include "confdefs.h"
4957$ac_includes_default
4958#ifdef F77_DUMMY_MAIN
4959# ifdef __cplusplus
4960 extern "C"
4961# endif
4962 int F77_DUMMY_MAIN() { return 1; }
4963#endif
4964int
4965main ()
4966{
4967static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4968test_array [0] = 0
4969
4970 ;
4971 return 0;
4972}
4973_ACEOF
4974rm -f conftest.$ac_objext
4975if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4976 (eval $ac_compile) 2>&5
4977 ac_status=$?
4978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4979 (exit $ac_status); } &&
4980 { ac_try='test -s conftest.$ac_objext'
4981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4982 (eval $ac_try) 2>&5
4983 ac_status=$?
4984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4985 (exit $ac_status); }; }; then
4986 ac_lo=$ac_mid; break
4987else
4988 echo "$as_me: failed program was:" >&5
4989cat conftest.$ac_ext >&5
4990ac_hi=`expr '(' $ac_mid ')' - 1`
4991 if test $ac_mid -le $ac_hi; then
4992 ac_lo= ac_hi=
4993 break
4994 fi
4995 ac_mid=`expr 2 '*' $ac_mid`
4996fi
4997rm -f conftest.$ac_objext conftest.$ac_ext
4998 done
4999else
5000 echo "$as_me: failed program was:" >&5
5001cat conftest.$ac_ext >&5
5002ac_lo= ac_hi=
5003fi
5004rm -f conftest.$ac_objext conftest.$ac_ext
5005fi
5006rm -f conftest.$ac_objext conftest.$ac_ext
5007# Binary search between lo and hi bounds.
5008while test "x$ac_lo" != "x$ac_hi"; do
5009 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5010 cat >conftest.$ac_ext <<_ACEOF
5011#line $LINENO "configure"
5012#include "confdefs.h"
5013$ac_includes_default
5014#ifdef F77_DUMMY_MAIN
5015# ifdef __cplusplus
5016 extern "C"
5017# endif
5018 int F77_DUMMY_MAIN() { return 1; }
5019#endif
5020int
5021main ()
5022{
5023static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5024test_array [0] = 0
5025
5026 ;
5027 return 0;
5028}
5029_ACEOF
5030rm -f conftest.$ac_objext
5031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5032 (eval $ac_compile) 2>&5
5033 ac_status=$?
5034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5035 (exit $ac_status); } &&
5036 { ac_try='test -s conftest.$ac_objext'
5037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5038 (eval $ac_try) 2>&5
5039 ac_status=$?
5040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5041 (exit $ac_status); }; }; then
5042 ac_hi=$ac_mid
5043else
5044 echo "$as_me: failed program was:" >&5
5045cat conftest.$ac_ext >&5
5046ac_lo=`expr '(' $ac_mid ')' + 1`
5047fi
5048rm -f conftest.$ac_objext conftest.$ac_ext
5049done
5050case $ac_lo in
5051?*) ac_cv_sizeof_int=$ac_lo;;
5052'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5053echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5054 { (exit 1); exit 1; }; } ;;
5055esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005056else
5057 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005058 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5059echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5060 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005061else
Martin v. Löwis11437992002-04-12 09:54:03 +00005062 cat >conftest.$ac_ext <<_ACEOF
5063#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005064#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005065$ac_includes_default
5066long longval () { return (long) (sizeof (int)); }
5067unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005068#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005069#include <stdlib.h>
5070#ifdef F77_DUMMY_MAIN
5071# ifdef __cplusplus
5072 extern "C"
5073# endif
5074 int F77_DUMMY_MAIN() { return 1; }
5075#endif
5076int
5077main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005078{
Martin v. Löwis11437992002-04-12 09:54:03 +00005079
5080 FILE *f = fopen ("conftest.val", "w");
5081 if (! f)
5082 exit (1);
5083 if (((long) (sizeof (int))) < 0)
5084 {
5085 long i = longval ();
5086 if (i != ((long) (sizeof (int))))
5087 exit (1);
5088 fprintf (f, "%ld\n", i);
5089 }
5090 else
5091 {
5092 unsigned long i = ulongval ();
5093 if (i != ((long) (sizeof (int))))
5094 exit (1);
5095 fprintf (f, "%lu\n", i);
5096 }
5097 exit (ferror (f) || fclose (f) != 0);
5098
5099 ;
5100 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005101}
Martin v. Löwis11437992002-04-12 09:54:03 +00005102_ACEOF
5103rm -f conftest$ac_exeext
5104if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5105 (eval $ac_link) 2>&5
5106 ac_status=$?
5107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5108 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5110 (eval $ac_try) 2>&5
5111 ac_status=$?
5112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5113 (exit $ac_status); }; }; then
5114 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005115else
Martin v. Löwis11437992002-04-12 09:54:03 +00005116 echo "$as_me: program exited with status $ac_status" >&5
5117echo "$as_me: failed program was:" >&5
5118cat conftest.$ac_ext >&5
5119( exit $ac_status )
5120{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5121echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5122 { (exit 1); exit 1; }; }
5123fi
5124rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5125fi
5126fi
5127rm -f conftest.val
5128else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005129 ac_cv_sizeof_int=0
5130fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005131fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005132echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5133echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5134cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005135#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005136_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005137
5138
Martin v. Löwis11437992002-04-12 09:54:03 +00005139echo "$as_me:$LINENO: checking for long" >&5
5140echo $ECHO_N "checking for long... $ECHO_C" >&6
5141if test "${ac_cv_type_long+set}" = set; then
5142 echo $ECHO_N "(cached) $ECHO_C" >&6
5143else
5144 cat >conftest.$ac_ext <<_ACEOF
5145#line $LINENO "configure"
5146#include "confdefs.h"
5147$ac_includes_default
5148#ifdef F77_DUMMY_MAIN
5149# ifdef __cplusplus
5150 extern "C"
5151# endif
5152 int F77_DUMMY_MAIN() { return 1; }
5153#endif
5154int
5155main ()
5156{
5157if ((long *) 0)
5158 return 0;
5159if (sizeof (long))
5160 return 0;
5161 ;
5162 return 0;
5163}
5164_ACEOF
5165rm -f conftest.$ac_objext
5166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5167 (eval $ac_compile) 2>&5
5168 ac_status=$?
5169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5170 (exit $ac_status); } &&
5171 { ac_try='test -s conftest.$ac_objext'
5172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5173 (eval $ac_try) 2>&5
5174 ac_status=$?
5175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5176 (exit $ac_status); }; }; then
5177 ac_cv_type_long=yes
5178else
5179 echo "$as_me: failed program was:" >&5
5180cat conftest.$ac_ext >&5
5181ac_cv_type_long=no
5182fi
5183rm -f conftest.$ac_objext conftest.$ac_ext
5184fi
5185echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5186echo "${ECHO_T}$ac_cv_type_long" >&6
5187
5188echo "$as_me:$LINENO: checking size of long" >&5
5189echo $ECHO_N "checking size of long... $ECHO_C" >&6
5190if test "${ac_cv_sizeof_long+set}" = set; then
5191 echo $ECHO_N "(cached) $ECHO_C" >&6
5192else
5193 if test "$ac_cv_type_long" = yes; then
5194 # The cast to unsigned long works around a bug in the HP C Compiler
5195 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5196 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5197 # This bug is HP SR number 8606223364.
5198 if test "$cross_compiling" = yes; then
5199 # Depending upon the size, compute the lo and hi bounds.
5200cat >conftest.$ac_ext <<_ACEOF
5201#line $LINENO "configure"
5202#include "confdefs.h"
5203$ac_includes_default
5204#ifdef F77_DUMMY_MAIN
5205# ifdef __cplusplus
5206 extern "C"
5207# endif
5208 int F77_DUMMY_MAIN() { return 1; }
5209#endif
5210int
5211main ()
5212{
5213static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5214test_array [0] = 0
5215
5216 ;
5217 return 0;
5218}
5219_ACEOF
5220rm -f conftest.$ac_objext
5221if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5222 (eval $ac_compile) 2>&5
5223 ac_status=$?
5224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5225 (exit $ac_status); } &&
5226 { ac_try='test -s conftest.$ac_objext'
5227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5228 (eval $ac_try) 2>&5
5229 ac_status=$?
5230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5231 (exit $ac_status); }; }; then
5232 ac_lo=0 ac_mid=0
5233 while :; do
5234 cat >conftest.$ac_ext <<_ACEOF
5235#line $LINENO "configure"
5236#include "confdefs.h"
5237$ac_includes_default
5238#ifdef F77_DUMMY_MAIN
5239# ifdef __cplusplus
5240 extern "C"
5241# endif
5242 int F77_DUMMY_MAIN() { return 1; }
5243#endif
5244int
5245main ()
5246{
5247static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5248test_array [0] = 0
5249
5250 ;
5251 return 0;
5252}
5253_ACEOF
5254rm -f conftest.$ac_objext
5255if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5256 (eval $ac_compile) 2>&5
5257 ac_status=$?
5258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5259 (exit $ac_status); } &&
5260 { ac_try='test -s conftest.$ac_objext'
5261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5262 (eval $ac_try) 2>&5
5263 ac_status=$?
5264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5265 (exit $ac_status); }; }; then
5266 ac_hi=$ac_mid; break
5267else
5268 echo "$as_me: failed program was:" >&5
5269cat conftest.$ac_ext >&5
5270ac_lo=`expr $ac_mid + 1`
5271 if test $ac_lo -le $ac_mid; then
5272 ac_lo= ac_hi=
5273 break
5274 fi
5275 ac_mid=`expr 2 '*' $ac_mid + 1`
5276fi
5277rm -f conftest.$ac_objext conftest.$ac_ext
5278 done
5279else
5280 echo "$as_me: failed program was:" >&5
5281cat conftest.$ac_ext >&5
5282cat >conftest.$ac_ext <<_ACEOF
5283#line $LINENO "configure"
5284#include "confdefs.h"
5285$ac_includes_default
5286#ifdef F77_DUMMY_MAIN
5287# ifdef __cplusplus
5288 extern "C"
5289# endif
5290 int F77_DUMMY_MAIN() { return 1; }
5291#endif
5292int
5293main ()
5294{
5295static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5296test_array [0] = 0
5297
5298 ;
5299 return 0;
5300}
5301_ACEOF
5302rm -f conftest.$ac_objext
5303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5304 (eval $ac_compile) 2>&5
5305 ac_status=$?
5306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5307 (exit $ac_status); } &&
5308 { ac_try='test -s conftest.$ac_objext'
5309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5310 (eval $ac_try) 2>&5
5311 ac_status=$?
5312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5313 (exit $ac_status); }; }; then
5314 ac_hi=-1 ac_mid=-1
5315 while :; do
5316 cat >conftest.$ac_ext <<_ACEOF
5317#line $LINENO "configure"
5318#include "confdefs.h"
5319$ac_includes_default
5320#ifdef F77_DUMMY_MAIN
5321# ifdef __cplusplus
5322 extern "C"
5323# endif
5324 int F77_DUMMY_MAIN() { return 1; }
5325#endif
5326int
5327main ()
5328{
5329static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5330test_array [0] = 0
5331
5332 ;
5333 return 0;
5334}
5335_ACEOF
5336rm -f conftest.$ac_objext
5337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5338 (eval $ac_compile) 2>&5
5339 ac_status=$?
5340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5341 (exit $ac_status); } &&
5342 { ac_try='test -s conftest.$ac_objext'
5343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5344 (eval $ac_try) 2>&5
5345 ac_status=$?
5346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5347 (exit $ac_status); }; }; then
5348 ac_lo=$ac_mid; break
5349else
5350 echo "$as_me: failed program was:" >&5
5351cat conftest.$ac_ext >&5
5352ac_hi=`expr '(' $ac_mid ')' - 1`
5353 if test $ac_mid -le $ac_hi; then
5354 ac_lo= ac_hi=
5355 break
5356 fi
5357 ac_mid=`expr 2 '*' $ac_mid`
5358fi
5359rm -f conftest.$ac_objext conftest.$ac_ext
5360 done
5361else
5362 echo "$as_me: failed program was:" >&5
5363cat conftest.$ac_ext >&5
5364ac_lo= ac_hi=
5365fi
5366rm -f conftest.$ac_objext conftest.$ac_ext
5367fi
5368rm -f conftest.$ac_objext conftest.$ac_ext
5369# Binary search between lo and hi bounds.
5370while test "x$ac_lo" != "x$ac_hi"; do
5371 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5372 cat >conftest.$ac_ext <<_ACEOF
5373#line $LINENO "configure"
5374#include "confdefs.h"
5375$ac_includes_default
5376#ifdef F77_DUMMY_MAIN
5377# ifdef __cplusplus
5378 extern "C"
5379# endif
5380 int F77_DUMMY_MAIN() { return 1; }
5381#endif
5382int
5383main ()
5384{
5385static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5386test_array [0] = 0
5387
5388 ;
5389 return 0;
5390}
5391_ACEOF
5392rm -f conftest.$ac_objext
5393if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5394 (eval $ac_compile) 2>&5
5395 ac_status=$?
5396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5397 (exit $ac_status); } &&
5398 { ac_try='test -s conftest.$ac_objext'
5399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5400 (eval $ac_try) 2>&5
5401 ac_status=$?
5402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5403 (exit $ac_status); }; }; then
5404 ac_hi=$ac_mid
5405else
5406 echo "$as_me: failed program was:" >&5
5407cat conftest.$ac_ext >&5
5408ac_lo=`expr '(' $ac_mid ')' + 1`
5409fi
5410rm -f conftest.$ac_objext conftest.$ac_ext
5411done
5412case $ac_lo in
5413?*) ac_cv_sizeof_long=$ac_lo;;
5414'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5415echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5416 { (exit 1); exit 1; }; } ;;
5417esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005418else
5419 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005420 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5421echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5422 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005423else
Martin v. Löwis11437992002-04-12 09:54:03 +00005424 cat >conftest.$ac_ext <<_ACEOF
5425#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005426#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005427$ac_includes_default
5428long longval () { return (long) (sizeof (long)); }
5429unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005430#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005431#include <stdlib.h>
5432#ifdef F77_DUMMY_MAIN
5433# ifdef __cplusplus
5434 extern "C"
5435# endif
5436 int F77_DUMMY_MAIN() { return 1; }
5437#endif
5438int
5439main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005440{
Martin v. Löwis11437992002-04-12 09:54:03 +00005441
5442 FILE *f = fopen ("conftest.val", "w");
5443 if (! f)
5444 exit (1);
5445 if (((long) (sizeof (long))) < 0)
5446 {
5447 long i = longval ();
5448 if (i != ((long) (sizeof (long))))
5449 exit (1);
5450 fprintf (f, "%ld\n", i);
5451 }
5452 else
5453 {
5454 unsigned long i = ulongval ();
5455 if (i != ((long) (sizeof (long))))
5456 exit (1);
5457 fprintf (f, "%lu\n", i);
5458 }
5459 exit (ferror (f) || fclose (f) != 0);
5460
5461 ;
5462 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005463}
Martin v. Löwis11437992002-04-12 09:54:03 +00005464_ACEOF
5465rm -f conftest$ac_exeext
5466if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5467 (eval $ac_link) 2>&5
5468 ac_status=$?
5469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5470 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5472 (eval $ac_try) 2>&5
5473 ac_status=$?
5474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5475 (exit $ac_status); }; }; then
5476 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005477else
Martin v. Löwis11437992002-04-12 09:54:03 +00005478 echo "$as_me: program exited with status $ac_status" >&5
5479echo "$as_me: failed program was:" >&5
5480cat conftest.$ac_ext >&5
5481( exit $ac_status )
5482{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5483echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5484 { (exit 1); exit 1; }; }
5485fi
5486rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5487fi
5488fi
5489rm -f conftest.val
5490else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005491 ac_cv_sizeof_long=0
5492fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005493fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005494echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5495echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5496cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005497#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005498_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005499
5500
Martin v. Löwis11437992002-04-12 09:54:03 +00005501echo "$as_me:$LINENO: checking for void *" >&5
5502echo $ECHO_N "checking for void *... $ECHO_C" >&6
5503if test "${ac_cv_type_void_p+set}" = set; then
5504 echo $ECHO_N "(cached) $ECHO_C" >&6
5505else
5506 cat >conftest.$ac_ext <<_ACEOF
5507#line $LINENO "configure"
5508#include "confdefs.h"
5509$ac_includes_default
5510#ifdef F77_DUMMY_MAIN
5511# ifdef __cplusplus
5512 extern "C"
5513# endif
5514 int F77_DUMMY_MAIN() { return 1; }
5515#endif
5516int
5517main ()
5518{
5519if ((void * *) 0)
5520 return 0;
5521if (sizeof (void *))
5522 return 0;
5523 ;
5524 return 0;
5525}
5526_ACEOF
5527rm -f conftest.$ac_objext
5528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5529 (eval $ac_compile) 2>&5
5530 ac_status=$?
5531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5532 (exit $ac_status); } &&
5533 { ac_try='test -s conftest.$ac_objext'
5534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5535 (eval $ac_try) 2>&5
5536 ac_status=$?
5537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5538 (exit $ac_status); }; }; then
5539 ac_cv_type_void_p=yes
5540else
5541 echo "$as_me: failed program was:" >&5
5542cat conftest.$ac_ext >&5
5543ac_cv_type_void_p=no
5544fi
5545rm -f conftest.$ac_objext conftest.$ac_ext
5546fi
5547echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5548echo "${ECHO_T}$ac_cv_type_void_p" >&6
5549
5550echo "$as_me:$LINENO: checking size of void *" >&5
5551echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5552if test "${ac_cv_sizeof_void_p+set}" = set; then
5553 echo $ECHO_N "(cached) $ECHO_C" >&6
5554else
5555 if test "$ac_cv_type_void_p" = yes; then
5556 # The cast to unsigned long works around a bug in the HP C Compiler
5557 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5558 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5559 # This bug is HP SR number 8606223364.
5560 if test "$cross_compiling" = yes; then
5561 # Depending upon the size, compute the lo and hi bounds.
5562cat >conftest.$ac_ext <<_ACEOF
5563#line $LINENO "configure"
5564#include "confdefs.h"
5565$ac_includes_default
5566#ifdef F77_DUMMY_MAIN
5567# ifdef __cplusplus
5568 extern "C"
5569# endif
5570 int F77_DUMMY_MAIN() { return 1; }
5571#endif
5572int
5573main ()
5574{
5575static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5576test_array [0] = 0
5577
5578 ;
5579 return 0;
5580}
5581_ACEOF
5582rm -f conftest.$ac_objext
5583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5584 (eval $ac_compile) 2>&5
5585 ac_status=$?
5586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5587 (exit $ac_status); } &&
5588 { ac_try='test -s conftest.$ac_objext'
5589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5590 (eval $ac_try) 2>&5
5591 ac_status=$?
5592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5593 (exit $ac_status); }; }; then
5594 ac_lo=0 ac_mid=0
5595 while :; do
5596 cat >conftest.$ac_ext <<_ACEOF
5597#line $LINENO "configure"
5598#include "confdefs.h"
5599$ac_includes_default
5600#ifdef F77_DUMMY_MAIN
5601# ifdef __cplusplus
5602 extern "C"
5603# endif
5604 int F77_DUMMY_MAIN() { return 1; }
5605#endif
5606int
5607main ()
5608{
5609static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5610test_array [0] = 0
5611
5612 ;
5613 return 0;
5614}
5615_ACEOF
5616rm -f conftest.$ac_objext
5617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5618 (eval $ac_compile) 2>&5
5619 ac_status=$?
5620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5621 (exit $ac_status); } &&
5622 { ac_try='test -s conftest.$ac_objext'
5623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5624 (eval $ac_try) 2>&5
5625 ac_status=$?
5626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5627 (exit $ac_status); }; }; then
5628 ac_hi=$ac_mid; break
5629else
5630 echo "$as_me: failed program was:" >&5
5631cat conftest.$ac_ext >&5
5632ac_lo=`expr $ac_mid + 1`
5633 if test $ac_lo -le $ac_mid; then
5634 ac_lo= ac_hi=
5635 break
5636 fi
5637 ac_mid=`expr 2 '*' $ac_mid + 1`
5638fi
5639rm -f conftest.$ac_objext conftest.$ac_ext
5640 done
5641else
5642 echo "$as_me: failed program was:" >&5
5643cat conftest.$ac_ext >&5
5644cat >conftest.$ac_ext <<_ACEOF
5645#line $LINENO "configure"
5646#include "confdefs.h"
5647$ac_includes_default
5648#ifdef F77_DUMMY_MAIN
5649# ifdef __cplusplus
5650 extern "C"
5651# endif
5652 int F77_DUMMY_MAIN() { return 1; }
5653#endif
5654int
5655main ()
5656{
5657static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5658test_array [0] = 0
5659
5660 ;
5661 return 0;
5662}
5663_ACEOF
5664rm -f conftest.$ac_objext
5665if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5666 (eval $ac_compile) 2>&5
5667 ac_status=$?
5668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5669 (exit $ac_status); } &&
5670 { ac_try='test -s conftest.$ac_objext'
5671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5672 (eval $ac_try) 2>&5
5673 ac_status=$?
5674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5675 (exit $ac_status); }; }; then
5676 ac_hi=-1 ac_mid=-1
5677 while :; do
5678 cat >conftest.$ac_ext <<_ACEOF
5679#line $LINENO "configure"
5680#include "confdefs.h"
5681$ac_includes_default
5682#ifdef F77_DUMMY_MAIN
5683# ifdef __cplusplus
5684 extern "C"
5685# endif
5686 int F77_DUMMY_MAIN() { return 1; }
5687#endif
5688int
5689main ()
5690{
5691static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5692test_array [0] = 0
5693
5694 ;
5695 return 0;
5696}
5697_ACEOF
5698rm -f conftest.$ac_objext
5699if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5700 (eval $ac_compile) 2>&5
5701 ac_status=$?
5702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5703 (exit $ac_status); } &&
5704 { ac_try='test -s conftest.$ac_objext'
5705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5706 (eval $ac_try) 2>&5
5707 ac_status=$?
5708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5709 (exit $ac_status); }; }; then
5710 ac_lo=$ac_mid; break
5711else
5712 echo "$as_me: failed program was:" >&5
5713cat conftest.$ac_ext >&5
5714ac_hi=`expr '(' $ac_mid ')' - 1`
5715 if test $ac_mid -le $ac_hi; then
5716 ac_lo= ac_hi=
5717 break
5718 fi
5719 ac_mid=`expr 2 '*' $ac_mid`
5720fi
5721rm -f conftest.$ac_objext conftest.$ac_ext
5722 done
5723else
5724 echo "$as_me: failed program was:" >&5
5725cat conftest.$ac_ext >&5
5726ac_lo= ac_hi=
5727fi
5728rm -f conftest.$ac_objext conftest.$ac_ext
5729fi
5730rm -f conftest.$ac_objext conftest.$ac_ext
5731# Binary search between lo and hi bounds.
5732while test "x$ac_lo" != "x$ac_hi"; do
5733 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5734 cat >conftest.$ac_ext <<_ACEOF
5735#line $LINENO "configure"
5736#include "confdefs.h"
5737$ac_includes_default
5738#ifdef F77_DUMMY_MAIN
5739# ifdef __cplusplus
5740 extern "C"
5741# endif
5742 int F77_DUMMY_MAIN() { return 1; }
5743#endif
5744int
5745main ()
5746{
5747static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5748test_array [0] = 0
5749
5750 ;
5751 return 0;
5752}
5753_ACEOF
5754rm -f conftest.$ac_objext
5755if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5756 (eval $ac_compile) 2>&5
5757 ac_status=$?
5758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5759 (exit $ac_status); } &&
5760 { ac_try='test -s conftest.$ac_objext'
5761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5762 (eval $ac_try) 2>&5
5763 ac_status=$?
5764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5765 (exit $ac_status); }; }; then
5766 ac_hi=$ac_mid
5767else
5768 echo "$as_me: failed program was:" >&5
5769cat conftest.$ac_ext >&5
5770ac_lo=`expr '(' $ac_mid ')' + 1`
5771fi
5772rm -f conftest.$ac_objext conftest.$ac_ext
5773done
5774case $ac_lo in
5775?*) ac_cv_sizeof_void_p=$ac_lo;;
5776'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5777echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5778 { (exit 1); exit 1; }; } ;;
5779esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005780else
5781 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005782 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5783echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5784 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005785else
Martin v. Löwis11437992002-04-12 09:54:03 +00005786 cat >conftest.$ac_ext <<_ACEOF
5787#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005788#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005789$ac_includes_default
5790long longval () { return (long) (sizeof (void *)); }
5791unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005792#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005793#include <stdlib.h>
5794#ifdef F77_DUMMY_MAIN
5795# ifdef __cplusplus
5796 extern "C"
5797# endif
5798 int F77_DUMMY_MAIN() { return 1; }
5799#endif
5800int
5801main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005802{
Martin v. Löwis11437992002-04-12 09:54:03 +00005803
5804 FILE *f = fopen ("conftest.val", "w");
5805 if (! f)
5806 exit (1);
5807 if (((long) (sizeof (void *))) < 0)
5808 {
5809 long i = longval ();
5810 if (i != ((long) (sizeof (void *))))
5811 exit (1);
5812 fprintf (f, "%ld\n", i);
5813 }
5814 else
5815 {
5816 unsigned long i = ulongval ();
5817 if (i != ((long) (sizeof (void *))))
5818 exit (1);
5819 fprintf (f, "%lu\n", i);
5820 }
5821 exit (ferror (f) || fclose (f) != 0);
5822
5823 ;
5824 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005825}
Martin v. Löwis11437992002-04-12 09:54:03 +00005826_ACEOF
5827rm -f conftest$ac_exeext
5828if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5829 (eval $ac_link) 2>&5
5830 ac_status=$?
5831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5832 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5834 (eval $ac_try) 2>&5
5835 ac_status=$?
5836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5837 (exit $ac_status); }; }; then
5838 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005839else
Martin v. Löwis11437992002-04-12 09:54:03 +00005840 echo "$as_me: program exited with status $ac_status" >&5
5841echo "$as_me: failed program was:" >&5
5842cat conftest.$ac_ext >&5
5843( exit $ac_status )
5844{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5845echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5846 { (exit 1); exit 1; }; }
5847fi
5848rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5849fi
5850fi
5851rm -f conftest.val
5852else
Guido van Rossumad678af1998-10-02 14:42:15 +00005853 ac_cv_sizeof_void_p=0
5854fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005855fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005856echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5857echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5858cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005859#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005860_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005861
5862
Martin v. Löwis11437992002-04-12 09:54:03 +00005863echo "$as_me:$LINENO: checking for char" >&5
5864echo $ECHO_N "checking for char... $ECHO_C" >&6
5865if test "${ac_cv_type_char+set}" = set; then
5866 echo $ECHO_N "(cached) $ECHO_C" >&6
5867else
5868 cat >conftest.$ac_ext <<_ACEOF
5869#line $LINENO "configure"
5870#include "confdefs.h"
5871$ac_includes_default
5872#ifdef F77_DUMMY_MAIN
5873# ifdef __cplusplus
5874 extern "C"
5875# endif
5876 int F77_DUMMY_MAIN() { return 1; }
5877#endif
5878int
5879main ()
5880{
5881if ((char *) 0)
5882 return 0;
5883if (sizeof (char))
5884 return 0;
5885 ;
5886 return 0;
5887}
5888_ACEOF
5889rm -f conftest.$ac_objext
5890if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5891 (eval $ac_compile) 2>&5
5892 ac_status=$?
5893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5894 (exit $ac_status); } &&
5895 { ac_try='test -s conftest.$ac_objext'
5896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5897 (eval $ac_try) 2>&5
5898 ac_status=$?
5899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5900 (exit $ac_status); }; }; then
5901 ac_cv_type_char=yes
5902else
5903 echo "$as_me: failed program was:" >&5
5904cat conftest.$ac_ext >&5
5905ac_cv_type_char=no
5906fi
5907rm -f conftest.$ac_objext conftest.$ac_ext
5908fi
5909echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5910echo "${ECHO_T}$ac_cv_type_char" >&6
5911
5912echo "$as_me:$LINENO: checking size of char" >&5
5913echo $ECHO_N "checking size of char... $ECHO_C" >&6
5914if test "${ac_cv_sizeof_char+set}" = set; then
5915 echo $ECHO_N "(cached) $ECHO_C" >&6
5916else
5917 if test "$ac_cv_type_char" = yes; then
5918 # The cast to unsigned long works around a bug in the HP C Compiler
5919 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5920 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5921 # This bug is HP SR number 8606223364.
5922 if test "$cross_compiling" = yes; then
5923 # Depending upon the size, compute the lo and hi bounds.
5924cat >conftest.$ac_ext <<_ACEOF
5925#line $LINENO "configure"
5926#include "confdefs.h"
5927$ac_includes_default
5928#ifdef F77_DUMMY_MAIN
5929# ifdef __cplusplus
5930 extern "C"
5931# endif
5932 int F77_DUMMY_MAIN() { return 1; }
5933#endif
5934int
5935main ()
5936{
5937static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5938test_array [0] = 0
5939
5940 ;
5941 return 0;
5942}
5943_ACEOF
5944rm -f conftest.$ac_objext
5945if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5946 (eval $ac_compile) 2>&5
5947 ac_status=$?
5948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5949 (exit $ac_status); } &&
5950 { ac_try='test -s conftest.$ac_objext'
5951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5952 (eval $ac_try) 2>&5
5953 ac_status=$?
5954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5955 (exit $ac_status); }; }; then
5956 ac_lo=0 ac_mid=0
5957 while :; do
5958 cat >conftest.$ac_ext <<_ACEOF
5959#line $LINENO "configure"
5960#include "confdefs.h"
5961$ac_includes_default
5962#ifdef F77_DUMMY_MAIN
5963# ifdef __cplusplus
5964 extern "C"
5965# endif
5966 int F77_DUMMY_MAIN() { return 1; }
5967#endif
5968int
5969main ()
5970{
5971static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5972test_array [0] = 0
5973
5974 ;
5975 return 0;
5976}
5977_ACEOF
5978rm -f conftest.$ac_objext
5979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5980 (eval $ac_compile) 2>&5
5981 ac_status=$?
5982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5983 (exit $ac_status); } &&
5984 { ac_try='test -s conftest.$ac_objext'
5985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5986 (eval $ac_try) 2>&5
5987 ac_status=$?
5988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5989 (exit $ac_status); }; }; then
5990 ac_hi=$ac_mid; break
5991else
5992 echo "$as_me: failed program was:" >&5
5993cat conftest.$ac_ext >&5
5994ac_lo=`expr $ac_mid + 1`
5995 if test $ac_lo -le $ac_mid; then
5996 ac_lo= ac_hi=
5997 break
5998 fi
5999 ac_mid=`expr 2 '*' $ac_mid + 1`
6000fi
6001rm -f conftest.$ac_objext conftest.$ac_ext
6002 done
6003else
6004 echo "$as_me: failed program was:" >&5
6005cat conftest.$ac_ext >&5
6006cat >conftest.$ac_ext <<_ACEOF
6007#line $LINENO "configure"
6008#include "confdefs.h"
6009$ac_includes_default
6010#ifdef F77_DUMMY_MAIN
6011# ifdef __cplusplus
6012 extern "C"
6013# endif
6014 int F77_DUMMY_MAIN() { return 1; }
6015#endif
6016int
6017main ()
6018{
6019static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6020test_array [0] = 0
6021
6022 ;
6023 return 0;
6024}
6025_ACEOF
6026rm -f conftest.$ac_objext
6027if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6028 (eval $ac_compile) 2>&5
6029 ac_status=$?
6030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6031 (exit $ac_status); } &&
6032 { ac_try='test -s conftest.$ac_objext'
6033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6034 (eval $ac_try) 2>&5
6035 ac_status=$?
6036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6037 (exit $ac_status); }; }; then
6038 ac_hi=-1 ac_mid=-1
6039 while :; do
6040 cat >conftest.$ac_ext <<_ACEOF
6041#line $LINENO "configure"
6042#include "confdefs.h"
6043$ac_includes_default
6044#ifdef F77_DUMMY_MAIN
6045# ifdef __cplusplus
6046 extern "C"
6047# endif
6048 int F77_DUMMY_MAIN() { return 1; }
6049#endif
6050int
6051main ()
6052{
6053static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6054test_array [0] = 0
6055
6056 ;
6057 return 0;
6058}
6059_ACEOF
6060rm -f conftest.$ac_objext
6061if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6062 (eval $ac_compile) 2>&5
6063 ac_status=$?
6064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6065 (exit $ac_status); } &&
6066 { ac_try='test -s conftest.$ac_objext'
6067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6068 (eval $ac_try) 2>&5
6069 ac_status=$?
6070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6071 (exit $ac_status); }; }; then
6072 ac_lo=$ac_mid; break
6073else
6074 echo "$as_me: failed program was:" >&5
6075cat conftest.$ac_ext >&5
6076ac_hi=`expr '(' $ac_mid ')' - 1`
6077 if test $ac_mid -le $ac_hi; then
6078 ac_lo= ac_hi=
6079 break
6080 fi
6081 ac_mid=`expr 2 '*' $ac_mid`
6082fi
6083rm -f conftest.$ac_objext conftest.$ac_ext
6084 done
6085else
6086 echo "$as_me: failed program was:" >&5
6087cat conftest.$ac_ext >&5
6088ac_lo= ac_hi=
6089fi
6090rm -f conftest.$ac_objext conftest.$ac_ext
6091fi
6092rm -f conftest.$ac_objext conftest.$ac_ext
6093# Binary search between lo and hi bounds.
6094while test "x$ac_lo" != "x$ac_hi"; do
6095 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6096 cat >conftest.$ac_ext <<_ACEOF
6097#line $LINENO "configure"
6098#include "confdefs.h"
6099$ac_includes_default
6100#ifdef F77_DUMMY_MAIN
6101# ifdef __cplusplus
6102 extern "C"
6103# endif
6104 int F77_DUMMY_MAIN() { return 1; }
6105#endif
6106int
6107main ()
6108{
6109static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6110test_array [0] = 0
6111
6112 ;
6113 return 0;
6114}
6115_ACEOF
6116rm -f conftest.$ac_objext
6117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6118 (eval $ac_compile) 2>&5
6119 ac_status=$?
6120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6121 (exit $ac_status); } &&
6122 { ac_try='test -s conftest.$ac_objext'
6123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6124 (eval $ac_try) 2>&5
6125 ac_status=$?
6126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6127 (exit $ac_status); }; }; then
6128 ac_hi=$ac_mid
6129else
6130 echo "$as_me: failed program was:" >&5
6131cat conftest.$ac_ext >&5
6132ac_lo=`expr '(' $ac_mid ')' + 1`
6133fi
6134rm -f conftest.$ac_objext conftest.$ac_ext
6135done
6136case $ac_lo in
6137?*) ac_cv_sizeof_char=$ac_lo;;
6138'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6139echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6140 { (exit 1); exit 1; }; } ;;
6141esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006142else
6143 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006144 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6145echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6146 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006147else
Martin v. Löwis11437992002-04-12 09:54:03 +00006148 cat >conftest.$ac_ext <<_ACEOF
6149#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006150#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006151$ac_includes_default
6152long longval () { return (long) (sizeof (char)); }
6153unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006154#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006155#include <stdlib.h>
6156#ifdef F77_DUMMY_MAIN
6157# ifdef __cplusplus
6158 extern "C"
6159# endif
6160 int F77_DUMMY_MAIN() { return 1; }
6161#endif
6162int
6163main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006164{
Martin v. Löwis11437992002-04-12 09:54:03 +00006165
6166 FILE *f = fopen ("conftest.val", "w");
6167 if (! f)
6168 exit (1);
6169 if (((long) (sizeof (char))) < 0)
6170 {
6171 long i = longval ();
6172 if (i != ((long) (sizeof (char))))
6173 exit (1);
6174 fprintf (f, "%ld\n", i);
6175 }
6176 else
6177 {
6178 unsigned long i = ulongval ();
6179 if (i != ((long) (sizeof (char))))
6180 exit (1);
6181 fprintf (f, "%lu\n", i);
6182 }
6183 exit (ferror (f) || fclose (f) != 0);
6184
6185 ;
6186 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006187}
Martin v. Löwis11437992002-04-12 09:54:03 +00006188_ACEOF
6189rm -f conftest$ac_exeext
6190if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6191 (eval $ac_link) 2>&5
6192 ac_status=$?
6193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6194 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6196 (eval $ac_try) 2>&5
6197 ac_status=$?
6198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6199 (exit $ac_status); }; }; then
6200 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006201else
Martin v. Löwis11437992002-04-12 09:54:03 +00006202 echo "$as_me: program exited with status $ac_status" >&5
6203echo "$as_me: failed program was:" >&5
6204cat conftest.$ac_ext >&5
6205( exit $ac_status )
6206{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6207echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6208 { (exit 1); exit 1; }; }
6209fi
6210rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6211fi
6212fi
6213rm -f conftest.val
6214else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006215 ac_cv_sizeof_char=0
6216fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006217fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006218echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6219echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6220cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006221#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006222_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006223
6224
Martin v. Löwis11437992002-04-12 09:54:03 +00006225echo "$as_me:$LINENO: checking for short" >&5
6226echo $ECHO_N "checking for short... $ECHO_C" >&6
6227if test "${ac_cv_type_short+set}" = set; then
6228 echo $ECHO_N "(cached) $ECHO_C" >&6
6229else
6230 cat >conftest.$ac_ext <<_ACEOF
6231#line $LINENO "configure"
6232#include "confdefs.h"
6233$ac_includes_default
6234#ifdef F77_DUMMY_MAIN
6235# ifdef __cplusplus
6236 extern "C"
6237# endif
6238 int F77_DUMMY_MAIN() { return 1; }
6239#endif
6240int
6241main ()
6242{
6243if ((short *) 0)
6244 return 0;
6245if (sizeof (short))
6246 return 0;
6247 ;
6248 return 0;
6249}
6250_ACEOF
6251rm -f conftest.$ac_objext
6252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6253 (eval $ac_compile) 2>&5
6254 ac_status=$?
6255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6256 (exit $ac_status); } &&
6257 { ac_try='test -s conftest.$ac_objext'
6258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6259 (eval $ac_try) 2>&5
6260 ac_status=$?
6261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6262 (exit $ac_status); }; }; then
6263 ac_cv_type_short=yes
6264else
6265 echo "$as_me: failed program was:" >&5
6266cat conftest.$ac_ext >&5
6267ac_cv_type_short=no
6268fi
6269rm -f conftest.$ac_objext conftest.$ac_ext
6270fi
6271echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6272echo "${ECHO_T}$ac_cv_type_short" >&6
6273
6274echo "$as_me:$LINENO: checking size of short" >&5
6275echo $ECHO_N "checking size of short... $ECHO_C" >&6
6276if test "${ac_cv_sizeof_short+set}" = set; then
6277 echo $ECHO_N "(cached) $ECHO_C" >&6
6278else
6279 if test "$ac_cv_type_short" = yes; then
6280 # The cast to unsigned long works around a bug in the HP C Compiler
6281 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6282 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6283 # This bug is HP SR number 8606223364.
6284 if test "$cross_compiling" = yes; then
6285 # Depending upon the size, compute the lo and hi bounds.
6286cat >conftest.$ac_ext <<_ACEOF
6287#line $LINENO "configure"
6288#include "confdefs.h"
6289$ac_includes_default
6290#ifdef F77_DUMMY_MAIN
6291# ifdef __cplusplus
6292 extern "C"
6293# endif
6294 int F77_DUMMY_MAIN() { return 1; }
6295#endif
6296int
6297main ()
6298{
6299static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6300test_array [0] = 0
6301
6302 ;
6303 return 0;
6304}
6305_ACEOF
6306rm -f conftest.$ac_objext
6307if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6308 (eval $ac_compile) 2>&5
6309 ac_status=$?
6310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6311 (exit $ac_status); } &&
6312 { ac_try='test -s conftest.$ac_objext'
6313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6314 (eval $ac_try) 2>&5
6315 ac_status=$?
6316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6317 (exit $ac_status); }; }; then
6318 ac_lo=0 ac_mid=0
6319 while :; do
6320 cat >conftest.$ac_ext <<_ACEOF
6321#line $LINENO "configure"
6322#include "confdefs.h"
6323$ac_includes_default
6324#ifdef F77_DUMMY_MAIN
6325# ifdef __cplusplus
6326 extern "C"
6327# endif
6328 int F77_DUMMY_MAIN() { return 1; }
6329#endif
6330int
6331main ()
6332{
6333static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6334test_array [0] = 0
6335
6336 ;
6337 return 0;
6338}
6339_ACEOF
6340rm -f conftest.$ac_objext
6341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6342 (eval $ac_compile) 2>&5
6343 ac_status=$?
6344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6345 (exit $ac_status); } &&
6346 { ac_try='test -s conftest.$ac_objext'
6347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6348 (eval $ac_try) 2>&5
6349 ac_status=$?
6350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6351 (exit $ac_status); }; }; then
6352 ac_hi=$ac_mid; break
6353else
6354 echo "$as_me: failed program was:" >&5
6355cat conftest.$ac_ext >&5
6356ac_lo=`expr $ac_mid + 1`
6357 if test $ac_lo -le $ac_mid; then
6358 ac_lo= ac_hi=
6359 break
6360 fi
6361 ac_mid=`expr 2 '*' $ac_mid + 1`
6362fi
6363rm -f conftest.$ac_objext conftest.$ac_ext
6364 done
6365else
6366 echo "$as_me: failed program was:" >&5
6367cat conftest.$ac_ext >&5
6368cat >conftest.$ac_ext <<_ACEOF
6369#line $LINENO "configure"
6370#include "confdefs.h"
6371$ac_includes_default
6372#ifdef F77_DUMMY_MAIN
6373# ifdef __cplusplus
6374 extern "C"
6375# endif
6376 int F77_DUMMY_MAIN() { return 1; }
6377#endif
6378int
6379main ()
6380{
6381static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6382test_array [0] = 0
6383
6384 ;
6385 return 0;
6386}
6387_ACEOF
6388rm -f conftest.$ac_objext
6389if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6390 (eval $ac_compile) 2>&5
6391 ac_status=$?
6392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6393 (exit $ac_status); } &&
6394 { ac_try='test -s conftest.$ac_objext'
6395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6396 (eval $ac_try) 2>&5
6397 ac_status=$?
6398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6399 (exit $ac_status); }; }; then
6400 ac_hi=-1 ac_mid=-1
6401 while :; do
6402 cat >conftest.$ac_ext <<_ACEOF
6403#line $LINENO "configure"
6404#include "confdefs.h"
6405$ac_includes_default
6406#ifdef F77_DUMMY_MAIN
6407# ifdef __cplusplus
6408 extern "C"
6409# endif
6410 int F77_DUMMY_MAIN() { return 1; }
6411#endif
6412int
6413main ()
6414{
6415static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6416test_array [0] = 0
6417
6418 ;
6419 return 0;
6420}
6421_ACEOF
6422rm -f conftest.$ac_objext
6423if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6424 (eval $ac_compile) 2>&5
6425 ac_status=$?
6426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6427 (exit $ac_status); } &&
6428 { ac_try='test -s conftest.$ac_objext'
6429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6430 (eval $ac_try) 2>&5
6431 ac_status=$?
6432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6433 (exit $ac_status); }; }; then
6434 ac_lo=$ac_mid; break
6435else
6436 echo "$as_me: failed program was:" >&5
6437cat conftest.$ac_ext >&5
6438ac_hi=`expr '(' $ac_mid ')' - 1`
6439 if test $ac_mid -le $ac_hi; then
6440 ac_lo= ac_hi=
6441 break
6442 fi
6443 ac_mid=`expr 2 '*' $ac_mid`
6444fi
6445rm -f conftest.$ac_objext conftest.$ac_ext
6446 done
6447else
6448 echo "$as_me: failed program was:" >&5
6449cat conftest.$ac_ext >&5
6450ac_lo= ac_hi=
6451fi
6452rm -f conftest.$ac_objext conftest.$ac_ext
6453fi
6454rm -f conftest.$ac_objext conftest.$ac_ext
6455# Binary search between lo and hi bounds.
6456while test "x$ac_lo" != "x$ac_hi"; do
6457 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6458 cat >conftest.$ac_ext <<_ACEOF
6459#line $LINENO "configure"
6460#include "confdefs.h"
6461$ac_includes_default
6462#ifdef F77_DUMMY_MAIN
6463# ifdef __cplusplus
6464 extern "C"
6465# endif
6466 int F77_DUMMY_MAIN() { return 1; }
6467#endif
6468int
6469main ()
6470{
6471static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6472test_array [0] = 0
6473
6474 ;
6475 return 0;
6476}
6477_ACEOF
6478rm -f conftest.$ac_objext
6479if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6480 (eval $ac_compile) 2>&5
6481 ac_status=$?
6482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6483 (exit $ac_status); } &&
6484 { ac_try='test -s conftest.$ac_objext'
6485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6486 (eval $ac_try) 2>&5
6487 ac_status=$?
6488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6489 (exit $ac_status); }; }; then
6490 ac_hi=$ac_mid
6491else
6492 echo "$as_me: failed program was:" >&5
6493cat conftest.$ac_ext >&5
6494ac_lo=`expr '(' $ac_mid ')' + 1`
6495fi
6496rm -f conftest.$ac_objext conftest.$ac_ext
6497done
6498case $ac_lo in
6499?*) ac_cv_sizeof_short=$ac_lo;;
6500'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6501echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6502 { (exit 1); exit 1; }; } ;;
6503esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006504else
6505 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006506 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6507echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6508 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006509else
Martin v. Löwis11437992002-04-12 09:54:03 +00006510 cat >conftest.$ac_ext <<_ACEOF
6511#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006512#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006513$ac_includes_default
6514long longval () { return (long) (sizeof (short)); }
6515unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006516#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006517#include <stdlib.h>
6518#ifdef F77_DUMMY_MAIN
6519# ifdef __cplusplus
6520 extern "C"
6521# endif
6522 int F77_DUMMY_MAIN() { return 1; }
6523#endif
6524int
6525main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006526{
Martin v. Löwis11437992002-04-12 09:54:03 +00006527
6528 FILE *f = fopen ("conftest.val", "w");
6529 if (! f)
6530 exit (1);
6531 if (((long) (sizeof (short))) < 0)
6532 {
6533 long i = longval ();
6534 if (i != ((long) (sizeof (short))))
6535 exit (1);
6536 fprintf (f, "%ld\n", i);
6537 }
6538 else
6539 {
6540 unsigned long i = ulongval ();
6541 if (i != ((long) (sizeof (short))))
6542 exit (1);
6543 fprintf (f, "%lu\n", i);
6544 }
6545 exit (ferror (f) || fclose (f) != 0);
6546
6547 ;
6548 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006549}
Martin v. Löwis11437992002-04-12 09:54:03 +00006550_ACEOF
6551rm -f conftest$ac_exeext
6552if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6553 (eval $ac_link) 2>&5
6554 ac_status=$?
6555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6556 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6558 (eval $ac_try) 2>&5
6559 ac_status=$?
6560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6561 (exit $ac_status); }; }; then
6562 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006563else
Martin v. Löwis11437992002-04-12 09:54:03 +00006564 echo "$as_me: program exited with status $ac_status" >&5
6565echo "$as_me: failed program was:" >&5
6566cat conftest.$ac_ext >&5
6567( exit $ac_status )
6568{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6569echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6570 { (exit 1); exit 1; }; }
6571fi
6572rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6573fi
6574fi
6575rm -f conftest.val
6576else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006577 ac_cv_sizeof_short=0
6578fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006579fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006580echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6581echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6582cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006583#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006584_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006585
6586
Martin v. Löwis11437992002-04-12 09:54:03 +00006587echo "$as_me:$LINENO: checking for float" >&5
6588echo $ECHO_N "checking for float... $ECHO_C" >&6
6589if test "${ac_cv_type_float+set}" = set; then
6590 echo $ECHO_N "(cached) $ECHO_C" >&6
6591else
6592 cat >conftest.$ac_ext <<_ACEOF
6593#line $LINENO "configure"
6594#include "confdefs.h"
6595$ac_includes_default
6596#ifdef F77_DUMMY_MAIN
6597# ifdef __cplusplus
6598 extern "C"
6599# endif
6600 int F77_DUMMY_MAIN() { return 1; }
6601#endif
6602int
6603main ()
6604{
6605if ((float *) 0)
6606 return 0;
6607if (sizeof (float))
6608 return 0;
6609 ;
6610 return 0;
6611}
6612_ACEOF
6613rm -f conftest.$ac_objext
6614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6615 (eval $ac_compile) 2>&5
6616 ac_status=$?
6617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6618 (exit $ac_status); } &&
6619 { ac_try='test -s conftest.$ac_objext'
6620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6621 (eval $ac_try) 2>&5
6622 ac_status=$?
6623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6624 (exit $ac_status); }; }; then
6625 ac_cv_type_float=yes
6626else
6627 echo "$as_me: failed program was:" >&5
6628cat conftest.$ac_ext >&5
6629ac_cv_type_float=no
6630fi
6631rm -f conftest.$ac_objext conftest.$ac_ext
6632fi
6633echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6634echo "${ECHO_T}$ac_cv_type_float" >&6
6635
6636echo "$as_me:$LINENO: checking size of float" >&5
6637echo $ECHO_N "checking size of float... $ECHO_C" >&6
6638if test "${ac_cv_sizeof_float+set}" = set; then
6639 echo $ECHO_N "(cached) $ECHO_C" >&6
6640else
6641 if test "$ac_cv_type_float" = yes; then
6642 # The cast to unsigned long works around a bug in the HP C Compiler
6643 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6644 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6645 # This bug is HP SR number 8606223364.
6646 if test "$cross_compiling" = yes; then
6647 # Depending upon the size, compute the lo and hi bounds.
6648cat >conftest.$ac_ext <<_ACEOF
6649#line $LINENO "configure"
6650#include "confdefs.h"
6651$ac_includes_default
6652#ifdef F77_DUMMY_MAIN
6653# ifdef __cplusplus
6654 extern "C"
6655# endif
6656 int F77_DUMMY_MAIN() { return 1; }
6657#endif
6658int
6659main ()
6660{
6661static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6662test_array [0] = 0
6663
6664 ;
6665 return 0;
6666}
6667_ACEOF
6668rm -f conftest.$ac_objext
6669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6670 (eval $ac_compile) 2>&5
6671 ac_status=$?
6672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6673 (exit $ac_status); } &&
6674 { ac_try='test -s conftest.$ac_objext'
6675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6676 (eval $ac_try) 2>&5
6677 ac_status=$?
6678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6679 (exit $ac_status); }; }; then
6680 ac_lo=0 ac_mid=0
6681 while :; do
6682 cat >conftest.$ac_ext <<_ACEOF
6683#line $LINENO "configure"
6684#include "confdefs.h"
6685$ac_includes_default
6686#ifdef F77_DUMMY_MAIN
6687# ifdef __cplusplus
6688 extern "C"
6689# endif
6690 int F77_DUMMY_MAIN() { return 1; }
6691#endif
6692int
6693main ()
6694{
6695static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6696test_array [0] = 0
6697
6698 ;
6699 return 0;
6700}
6701_ACEOF
6702rm -f conftest.$ac_objext
6703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6704 (eval $ac_compile) 2>&5
6705 ac_status=$?
6706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6707 (exit $ac_status); } &&
6708 { ac_try='test -s conftest.$ac_objext'
6709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6710 (eval $ac_try) 2>&5
6711 ac_status=$?
6712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6713 (exit $ac_status); }; }; then
6714 ac_hi=$ac_mid; break
6715else
6716 echo "$as_me: failed program was:" >&5
6717cat conftest.$ac_ext >&5
6718ac_lo=`expr $ac_mid + 1`
6719 if test $ac_lo -le $ac_mid; then
6720 ac_lo= ac_hi=
6721 break
6722 fi
6723 ac_mid=`expr 2 '*' $ac_mid + 1`
6724fi
6725rm -f conftest.$ac_objext conftest.$ac_ext
6726 done
6727else
6728 echo "$as_me: failed program was:" >&5
6729cat conftest.$ac_ext >&5
6730cat >conftest.$ac_ext <<_ACEOF
6731#line $LINENO "configure"
6732#include "confdefs.h"
6733$ac_includes_default
6734#ifdef F77_DUMMY_MAIN
6735# ifdef __cplusplus
6736 extern "C"
6737# endif
6738 int F77_DUMMY_MAIN() { return 1; }
6739#endif
6740int
6741main ()
6742{
6743static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6744test_array [0] = 0
6745
6746 ;
6747 return 0;
6748}
6749_ACEOF
6750rm -f conftest.$ac_objext
6751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6752 (eval $ac_compile) 2>&5
6753 ac_status=$?
6754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6755 (exit $ac_status); } &&
6756 { ac_try='test -s conftest.$ac_objext'
6757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6758 (eval $ac_try) 2>&5
6759 ac_status=$?
6760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6761 (exit $ac_status); }; }; then
6762 ac_hi=-1 ac_mid=-1
6763 while :; do
6764 cat >conftest.$ac_ext <<_ACEOF
6765#line $LINENO "configure"
6766#include "confdefs.h"
6767$ac_includes_default
6768#ifdef F77_DUMMY_MAIN
6769# ifdef __cplusplus
6770 extern "C"
6771# endif
6772 int F77_DUMMY_MAIN() { return 1; }
6773#endif
6774int
6775main ()
6776{
6777static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6778test_array [0] = 0
6779
6780 ;
6781 return 0;
6782}
6783_ACEOF
6784rm -f conftest.$ac_objext
6785if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6786 (eval $ac_compile) 2>&5
6787 ac_status=$?
6788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6789 (exit $ac_status); } &&
6790 { ac_try='test -s conftest.$ac_objext'
6791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6792 (eval $ac_try) 2>&5
6793 ac_status=$?
6794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6795 (exit $ac_status); }; }; then
6796 ac_lo=$ac_mid; break
6797else
6798 echo "$as_me: failed program was:" >&5
6799cat conftest.$ac_ext >&5
6800ac_hi=`expr '(' $ac_mid ')' - 1`
6801 if test $ac_mid -le $ac_hi; then
6802 ac_lo= ac_hi=
6803 break
6804 fi
6805 ac_mid=`expr 2 '*' $ac_mid`
6806fi
6807rm -f conftest.$ac_objext conftest.$ac_ext
6808 done
6809else
6810 echo "$as_me: failed program was:" >&5
6811cat conftest.$ac_ext >&5
6812ac_lo= ac_hi=
6813fi
6814rm -f conftest.$ac_objext conftest.$ac_ext
6815fi
6816rm -f conftest.$ac_objext conftest.$ac_ext
6817# Binary search between lo and hi bounds.
6818while test "x$ac_lo" != "x$ac_hi"; do
6819 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6820 cat >conftest.$ac_ext <<_ACEOF
6821#line $LINENO "configure"
6822#include "confdefs.h"
6823$ac_includes_default
6824#ifdef F77_DUMMY_MAIN
6825# ifdef __cplusplus
6826 extern "C"
6827# endif
6828 int F77_DUMMY_MAIN() { return 1; }
6829#endif
6830int
6831main ()
6832{
6833static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6834test_array [0] = 0
6835
6836 ;
6837 return 0;
6838}
6839_ACEOF
6840rm -f conftest.$ac_objext
6841if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6842 (eval $ac_compile) 2>&5
6843 ac_status=$?
6844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6845 (exit $ac_status); } &&
6846 { ac_try='test -s conftest.$ac_objext'
6847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6848 (eval $ac_try) 2>&5
6849 ac_status=$?
6850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6851 (exit $ac_status); }; }; then
6852 ac_hi=$ac_mid
6853else
6854 echo "$as_me: failed program was:" >&5
6855cat conftest.$ac_ext >&5
6856ac_lo=`expr '(' $ac_mid ')' + 1`
6857fi
6858rm -f conftest.$ac_objext conftest.$ac_ext
6859done
6860case $ac_lo in
6861?*) ac_cv_sizeof_float=$ac_lo;;
6862'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6863echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6864 { (exit 1); exit 1; }; } ;;
6865esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006866else
6867 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006868 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6869echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6870 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006871else
Martin v. Löwis11437992002-04-12 09:54:03 +00006872 cat >conftest.$ac_ext <<_ACEOF
6873#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006874#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006875$ac_includes_default
6876long longval () { return (long) (sizeof (float)); }
6877unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006878#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006879#include <stdlib.h>
6880#ifdef F77_DUMMY_MAIN
6881# ifdef __cplusplus
6882 extern "C"
6883# endif
6884 int F77_DUMMY_MAIN() { return 1; }
6885#endif
6886int
6887main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006888{
Martin v. Löwis11437992002-04-12 09:54:03 +00006889
6890 FILE *f = fopen ("conftest.val", "w");
6891 if (! f)
6892 exit (1);
6893 if (((long) (sizeof (float))) < 0)
6894 {
6895 long i = longval ();
6896 if (i != ((long) (sizeof (float))))
6897 exit (1);
6898 fprintf (f, "%ld\n", i);
6899 }
6900 else
6901 {
6902 unsigned long i = ulongval ();
6903 if (i != ((long) (sizeof (float))))
6904 exit (1);
6905 fprintf (f, "%lu\n", i);
6906 }
6907 exit (ferror (f) || fclose (f) != 0);
6908
6909 ;
6910 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006911}
Martin v. Löwis11437992002-04-12 09:54:03 +00006912_ACEOF
6913rm -f conftest$ac_exeext
6914if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6915 (eval $ac_link) 2>&5
6916 ac_status=$?
6917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6918 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6920 (eval $ac_try) 2>&5
6921 ac_status=$?
6922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6923 (exit $ac_status); }; }; then
6924 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006925else
Martin v. Löwis11437992002-04-12 09:54:03 +00006926 echo "$as_me: program exited with status $ac_status" >&5
6927echo "$as_me: failed program was:" >&5
6928cat conftest.$ac_ext >&5
6929( exit $ac_status )
6930{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6931echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6932 { (exit 1); exit 1; }; }
6933fi
6934rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6935fi
6936fi
6937rm -f conftest.val
6938else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006939 ac_cv_sizeof_float=0
6940fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006941fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006942echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6943echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6944cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006945#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006946_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006947
6948
Martin v. Löwis11437992002-04-12 09:54:03 +00006949echo "$as_me:$LINENO: checking for double" >&5
6950echo $ECHO_N "checking for double... $ECHO_C" >&6
6951if test "${ac_cv_type_double+set}" = set; then
6952 echo $ECHO_N "(cached) $ECHO_C" >&6
6953else
6954 cat >conftest.$ac_ext <<_ACEOF
6955#line $LINENO "configure"
6956#include "confdefs.h"
6957$ac_includes_default
6958#ifdef F77_DUMMY_MAIN
6959# ifdef __cplusplus
6960 extern "C"
6961# endif
6962 int F77_DUMMY_MAIN() { return 1; }
6963#endif
6964int
6965main ()
6966{
6967if ((double *) 0)
6968 return 0;
6969if (sizeof (double))
6970 return 0;
6971 ;
6972 return 0;
6973}
6974_ACEOF
6975rm -f conftest.$ac_objext
6976if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6977 (eval $ac_compile) 2>&5
6978 ac_status=$?
6979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6980 (exit $ac_status); } &&
6981 { ac_try='test -s conftest.$ac_objext'
6982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6983 (eval $ac_try) 2>&5
6984 ac_status=$?
6985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6986 (exit $ac_status); }; }; then
6987 ac_cv_type_double=yes
6988else
6989 echo "$as_me: failed program was:" >&5
6990cat conftest.$ac_ext >&5
6991ac_cv_type_double=no
6992fi
6993rm -f conftest.$ac_objext conftest.$ac_ext
6994fi
6995echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6996echo "${ECHO_T}$ac_cv_type_double" >&6
6997
6998echo "$as_me:$LINENO: checking size of double" >&5
6999echo $ECHO_N "checking size of double... $ECHO_C" >&6
7000if test "${ac_cv_sizeof_double+set}" = set; then
7001 echo $ECHO_N "(cached) $ECHO_C" >&6
7002else
7003 if test "$ac_cv_type_double" = yes; then
7004 # The cast to unsigned long works around a bug in the HP C Compiler
7005 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7006 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7007 # This bug is HP SR number 8606223364.
7008 if test "$cross_compiling" = yes; then
7009 # Depending upon the size, compute the lo and hi bounds.
7010cat >conftest.$ac_ext <<_ACEOF
7011#line $LINENO "configure"
7012#include "confdefs.h"
7013$ac_includes_default
7014#ifdef F77_DUMMY_MAIN
7015# ifdef __cplusplus
7016 extern "C"
7017# endif
7018 int F77_DUMMY_MAIN() { return 1; }
7019#endif
7020int
7021main ()
7022{
7023static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7024test_array [0] = 0
7025
7026 ;
7027 return 0;
7028}
7029_ACEOF
7030rm -f conftest.$ac_objext
7031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7032 (eval $ac_compile) 2>&5
7033 ac_status=$?
7034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7035 (exit $ac_status); } &&
7036 { ac_try='test -s conftest.$ac_objext'
7037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7038 (eval $ac_try) 2>&5
7039 ac_status=$?
7040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7041 (exit $ac_status); }; }; then
7042 ac_lo=0 ac_mid=0
7043 while :; do
7044 cat >conftest.$ac_ext <<_ACEOF
7045#line $LINENO "configure"
7046#include "confdefs.h"
7047$ac_includes_default
7048#ifdef F77_DUMMY_MAIN
7049# ifdef __cplusplus
7050 extern "C"
7051# endif
7052 int F77_DUMMY_MAIN() { return 1; }
7053#endif
7054int
7055main ()
7056{
7057static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7058test_array [0] = 0
7059
7060 ;
7061 return 0;
7062}
7063_ACEOF
7064rm -f conftest.$ac_objext
7065if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7066 (eval $ac_compile) 2>&5
7067 ac_status=$?
7068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7069 (exit $ac_status); } &&
7070 { ac_try='test -s conftest.$ac_objext'
7071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7072 (eval $ac_try) 2>&5
7073 ac_status=$?
7074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7075 (exit $ac_status); }; }; then
7076 ac_hi=$ac_mid; break
7077else
7078 echo "$as_me: failed program was:" >&5
7079cat conftest.$ac_ext >&5
7080ac_lo=`expr $ac_mid + 1`
7081 if test $ac_lo -le $ac_mid; then
7082 ac_lo= ac_hi=
7083 break
7084 fi
7085 ac_mid=`expr 2 '*' $ac_mid + 1`
7086fi
7087rm -f conftest.$ac_objext conftest.$ac_ext
7088 done
7089else
7090 echo "$as_me: failed program was:" >&5
7091cat conftest.$ac_ext >&5
7092cat >conftest.$ac_ext <<_ACEOF
7093#line $LINENO "configure"
7094#include "confdefs.h"
7095$ac_includes_default
7096#ifdef F77_DUMMY_MAIN
7097# ifdef __cplusplus
7098 extern "C"
7099# endif
7100 int F77_DUMMY_MAIN() { return 1; }
7101#endif
7102int
7103main ()
7104{
7105static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7106test_array [0] = 0
7107
7108 ;
7109 return 0;
7110}
7111_ACEOF
7112rm -f conftest.$ac_objext
7113if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7114 (eval $ac_compile) 2>&5
7115 ac_status=$?
7116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7117 (exit $ac_status); } &&
7118 { ac_try='test -s conftest.$ac_objext'
7119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7120 (eval $ac_try) 2>&5
7121 ac_status=$?
7122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7123 (exit $ac_status); }; }; then
7124 ac_hi=-1 ac_mid=-1
7125 while :; do
7126 cat >conftest.$ac_ext <<_ACEOF
7127#line $LINENO "configure"
7128#include "confdefs.h"
7129$ac_includes_default
7130#ifdef F77_DUMMY_MAIN
7131# ifdef __cplusplus
7132 extern "C"
7133# endif
7134 int F77_DUMMY_MAIN() { return 1; }
7135#endif
7136int
7137main ()
7138{
7139static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7140test_array [0] = 0
7141
7142 ;
7143 return 0;
7144}
7145_ACEOF
7146rm -f conftest.$ac_objext
7147if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7148 (eval $ac_compile) 2>&5
7149 ac_status=$?
7150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7151 (exit $ac_status); } &&
7152 { ac_try='test -s conftest.$ac_objext'
7153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7154 (eval $ac_try) 2>&5
7155 ac_status=$?
7156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7157 (exit $ac_status); }; }; then
7158 ac_lo=$ac_mid; break
7159else
7160 echo "$as_me: failed program was:" >&5
7161cat conftest.$ac_ext >&5
7162ac_hi=`expr '(' $ac_mid ')' - 1`
7163 if test $ac_mid -le $ac_hi; then
7164 ac_lo= ac_hi=
7165 break
7166 fi
7167 ac_mid=`expr 2 '*' $ac_mid`
7168fi
7169rm -f conftest.$ac_objext conftest.$ac_ext
7170 done
7171else
7172 echo "$as_me: failed program was:" >&5
7173cat conftest.$ac_ext >&5
7174ac_lo= ac_hi=
7175fi
7176rm -f conftest.$ac_objext conftest.$ac_ext
7177fi
7178rm -f conftest.$ac_objext conftest.$ac_ext
7179# Binary search between lo and hi bounds.
7180while test "x$ac_lo" != "x$ac_hi"; do
7181 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7182 cat >conftest.$ac_ext <<_ACEOF
7183#line $LINENO "configure"
7184#include "confdefs.h"
7185$ac_includes_default
7186#ifdef F77_DUMMY_MAIN
7187# ifdef __cplusplus
7188 extern "C"
7189# endif
7190 int F77_DUMMY_MAIN() { return 1; }
7191#endif
7192int
7193main ()
7194{
7195static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7196test_array [0] = 0
7197
7198 ;
7199 return 0;
7200}
7201_ACEOF
7202rm -f conftest.$ac_objext
7203if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7204 (eval $ac_compile) 2>&5
7205 ac_status=$?
7206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7207 (exit $ac_status); } &&
7208 { ac_try='test -s conftest.$ac_objext'
7209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7210 (eval $ac_try) 2>&5
7211 ac_status=$?
7212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7213 (exit $ac_status); }; }; then
7214 ac_hi=$ac_mid
7215else
7216 echo "$as_me: failed program was:" >&5
7217cat conftest.$ac_ext >&5
7218ac_lo=`expr '(' $ac_mid ')' + 1`
7219fi
7220rm -f conftest.$ac_objext conftest.$ac_ext
7221done
7222case $ac_lo in
7223?*) ac_cv_sizeof_double=$ac_lo;;
7224'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7225echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7226 { (exit 1); exit 1; }; } ;;
7227esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007228else
7229 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007230 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7231echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7232 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007233else
Martin v. Löwis11437992002-04-12 09:54:03 +00007234 cat >conftest.$ac_ext <<_ACEOF
7235#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007236#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007237$ac_includes_default
7238long longval () { return (long) (sizeof (double)); }
7239unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007240#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007241#include <stdlib.h>
7242#ifdef F77_DUMMY_MAIN
7243# ifdef __cplusplus
7244 extern "C"
7245# endif
7246 int F77_DUMMY_MAIN() { return 1; }
7247#endif
7248int
7249main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007250{
Martin v. Löwis11437992002-04-12 09:54:03 +00007251
7252 FILE *f = fopen ("conftest.val", "w");
7253 if (! f)
7254 exit (1);
7255 if (((long) (sizeof (double))) < 0)
7256 {
7257 long i = longval ();
7258 if (i != ((long) (sizeof (double))))
7259 exit (1);
7260 fprintf (f, "%ld\n", i);
7261 }
7262 else
7263 {
7264 unsigned long i = ulongval ();
7265 if (i != ((long) (sizeof (double))))
7266 exit (1);
7267 fprintf (f, "%lu\n", i);
7268 }
7269 exit (ferror (f) || fclose (f) != 0);
7270
7271 ;
7272 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007273}
Martin v. Löwis11437992002-04-12 09:54:03 +00007274_ACEOF
7275rm -f conftest$ac_exeext
7276if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7277 (eval $ac_link) 2>&5
7278 ac_status=$?
7279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7280 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7282 (eval $ac_try) 2>&5
7283 ac_status=$?
7284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7285 (exit $ac_status); }; }; then
7286 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007287else
Martin v. Löwis11437992002-04-12 09:54:03 +00007288 echo "$as_me: program exited with status $ac_status" >&5
7289echo "$as_me: failed program was:" >&5
7290cat conftest.$ac_ext >&5
7291( exit $ac_status )
7292{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7293echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7294 { (exit 1); exit 1; }; }
7295fi
7296rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7297fi
7298fi
7299rm -f conftest.val
7300else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007301 ac_cv_sizeof_double=0
7302fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007303fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007304echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7305echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7306cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007307#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007308_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007309
7310
Martin v. Löwis11437992002-04-12 09:54:03 +00007311echo "$as_me:$LINENO: checking for fpos_t" >&5
7312echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7313if test "${ac_cv_type_fpos_t+set}" = set; then
7314 echo $ECHO_N "(cached) $ECHO_C" >&6
7315else
7316 cat >conftest.$ac_ext <<_ACEOF
7317#line $LINENO "configure"
7318#include "confdefs.h"
7319$ac_includes_default
7320#ifdef F77_DUMMY_MAIN
7321# ifdef __cplusplus
7322 extern "C"
7323# endif
7324 int F77_DUMMY_MAIN() { return 1; }
7325#endif
7326int
7327main ()
7328{
7329if ((fpos_t *) 0)
7330 return 0;
7331if (sizeof (fpos_t))
7332 return 0;
7333 ;
7334 return 0;
7335}
7336_ACEOF
7337rm -f conftest.$ac_objext
7338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7339 (eval $ac_compile) 2>&5
7340 ac_status=$?
7341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7342 (exit $ac_status); } &&
7343 { ac_try='test -s conftest.$ac_objext'
7344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7345 (eval $ac_try) 2>&5
7346 ac_status=$?
7347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7348 (exit $ac_status); }; }; then
7349 ac_cv_type_fpos_t=yes
7350else
7351 echo "$as_me: failed program was:" >&5
7352cat conftest.$ac_ext >&5
7353ac_cv_type_fpos_t=no
7354fi
7355rm -f conftest.$ac_objext conftest.$ac_ext
7356fi
7357echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7358echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7359
7360echo "$as_me:$LINENO: checking size of fpos_t" >&5
7361echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7362if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7363 echo $ECHO_N "(cached) $ECHO_C" >&6
7364else
7365 if test "$ac_cv_type_fpos_t" = yes; then
7366 # The cast to unsigned long works around a bug in the HP C Compiler
7367 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7368 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7369 # This bug is HP SR number 8606223364.
7370 if test "$cross_compiling" = yes; then
7371 # Depending upon the size, compute the lo and hi bounds.
7372cat >conftest.$ac_ext <<_ACEOF
7373#line $LINENO "configure"
7374#include "confdefs.h"
7375$ac_includes_default
7376#ifdef F77_DUMMY_MAIN
7377# ifdef __cplusplus
7378 extern "C"
7379# endif
7380 int F77_DUMMY_MAIN() { return 1; }
7381#endif
7382int
7383main ()
7384{
7385static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7386test_array [0] = 0
7387
7388 ;
7389 return 0;
7390}
7391_ACEOF
7392rm -f conftest.$ac_objext
7393if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7394 (eval $ac_compile) 2>&5
7395 ac_status=$?
7396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7397 (exit $ac_status); } &&
7398 { ac_try='test -s conftest.$ac_objext'
7399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7400 (eval $ac_try) 2>&5
7401 ac_status=$?
7402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7403 (exit $ac_status); }; }; then
7404 ac_lo=0 ac_mid=0
7405 while :; do
7406 cat >conftest.$ac_ext <<_ACEOF
7407#line $LINENO "configure"
7408#include "confdefs.h"
7409$ac_includes_default
7410#ifdef F77_DUMMY_MAIN
7411# ifdef __cplusplus
7412 extern "C"
7413# endif
7414 int F77_DUMMY_MAIN() { return 1; }
7415#endif
7416int
7417main ()
7418{
7419static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7420test_array [0] = 0
7421
7422 ;
7423 return 0;
7424}
7425_ACEOF
7426rm -f conftest.$ac_objext
7427if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7428 (eval $ac_compile) 2>&5
7429 ac_status=$?
7430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7431 (exit $ac_status); } &&
7432 { ac_try='test -s conftest.$ac_objext'
7433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7434 (eval $ac_try) 2>&5
7435 ac_status=$?
7436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7437 (exit $ac_status); }; }; then
7438 ac_hi=$ac_mid; break
7439else
7440 echo "$as_me: failed program was:" >&5
7441cat conftest.$ac_ext >&5
7442ac_lo=`expr $ac_mid + 1`
7443 if test $ac_lo -le $ac_mid; then
7444 ac_lo= ac_hi=
7445 break
7446 fi
7447 ac_mid=`expr 2 '*' $ac_mid + 1`
7448fi
7449rm -f conftest.$ac_objext conftest.$ac_ext
7450 done
7451else
7452 echo "$as_me: failed program was:" >&5
7453cat conftest.$ac_ext >&5
7454cat >conftest.$ac_ext <<_ACEOF
7455#line $LINENO "configure"
7456#include "confdefs.h"
7457$ac_includes_default
7458#ifdef F77_DUMMY_MAIN
7459# ifdef __cplusplus
7460 extern "C"
7461# endif
7462 int F77_DUMMY_MAIN() { return 1; }
7463#endif
7464int
7465main ()
7466{
7467static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7468test_array [0] = 0
7469
7470 ;
7471 return 0;
7472}
7473_ACEOF
7474rm -f conftest.$ac_objext
7475if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7476 (eval $ac_compile) 2>&5
7477 ac_status=$?
7478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7479 (exit $ac_status); } &&
7480 { ac_try='test -s conftest.$ac_objext'
7481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7482 (eval $ac_try) 2>&5
7483 ac_status=$?
7484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7485 (exit $ac_status); }; }; then
7486 ac_hi=-1 ac_mid=-1
7487 while :; do
7488 cat >conftest.$ac_ext <<_ACEOF
7489#line $LINENO "configure"
7490#include "confdefs.h"
7491$ac_includes_default
7492#ifdef F77_DUMMY_MAIN
7493# ifdef __cplusplus
7494 extern "C"
7495# endif
7496 int F77_DUMMY_MAIN() { return 1; }
7497#endif
7498int
7499main ()
7500{
7501static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7502test_array [0] = 0
7503
7504 ;
7505 return 0;
7506}
7507_ACEOF
7508rm -f conftest.$ac_objext
7509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7510 (eval $ac_compile) 2>&5
7511 ac_status=$?
7512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7513 (exit $ac_status); } &&
7514 { ac_try='test -s conftest.$ac_objext'
7515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7516 (eval $ac_try) 2>&5
7517 ac_status=$?
7518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7519 (exit $ac_status); }; }; then
7520 ac_lo=$ac_mid; break
7521else
7522 echo "$as_me: failed program was:" >&5
7523cat conftest.$ac_ext >&5
7524ac_hi=`expr '(' $ac_mid ')' - 1`
7525 if test $ac_mid -le $ac_hi; then
7526 ac_lo= ac_hi=
7527 break
7528 fi
7529 ac_mid=`expr 2 '*' $ac_mid`
7530fi
7531rm -f conftest.$ac_objext conftest.$ac_ext
7532 done
7533else
7534 echo "$as_me: failed program was:" >&5
7535cat conftest.$ac_ext >&5
7536ac_lo= ac_hi=
7537fi
7538rm -f conftest.$ac_objext conftest.$ac_ext
7539fi
7540rm -f conftest.$ac_objext conftest.$ac_ext
7541# Binary search between lo and hi bounds.
7542while test "x$ac_lo" != "x$ac_hi"; do
7543 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7544 cat >conftest.$ac_ext <<_ACEOF
7545#line $LINENO "configure"
7546#include "confdefs.h"
7547$ac_includes_default
7548#ifdef F77_DUMMY_MAIN
7549# ifdef __cplusplus
7550 extern "C"
7551# endif
7552 int F77_DUMMY_MAIN() { return 1; }
7553#endif
7554int
7555main ()
7556{
7557static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7558test_array [0] = 0
7559
7560 ;
7561 return 0;
7562}
7563_ACEOF
7564rm -f conftest.$ac_objext
7565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7566 (eval $ac_compile) 2>&5
7567 ac_status=$?
7568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7569 (exit $ac_status); } &&
7570 { ac_try='test -s conftest.$ac_objext'
7571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7572 (eval $ac_try) 2>&5
7573 ac_status=$?
7574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7575 (exit $ac_status); }; }; then
7576 ac_hi=$ac_mid
7577else
7578 echo "$as_me: failed program was:" >&5
7579cat conftest.$ac_ext >&5
7580ac_lo=`expr '(' $ac_mid ')' + 1`
7581fi
7582rm -f conftest.$ac_objext conftest.$ac_ext
7583done
7584case $ac_lo in
7585?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7586'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7587echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7588 { (exit 1); exit 1; }; } ;;
7589esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007590else
7591 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007592 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7593echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7594 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007595else
Martin v. Löwis11437992002-04-12 09:54:03 +00007596 cat >conftest.$ac_ext <<_ACEOF
7597#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007598#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007599$ac_includes_default
7600long longval () { return (long) (sizeof (fpos_t)); }
7601unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007602#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007603#include <stdlib.h>
7604#ifdef F77_DUMMY_MAIN
7605# ifdef __cplusplus
7606 extern "C"
7607# endif
7608 int F77_DUMMY_MAIN() { return 1; }
7609#endif
7610int
7611main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007612{
Martin v. Löwis11437992002-04-12 09:54:03 +00007613
7614 FILE *f = fopen ("conftest.val", "w");
7615 if (! f)
7616 exit (1);
7617 if (((long) (sizeof (fpos_t))) < 0)
7618 {
7619 long i = longval ();
7620 if (i != ((long) (sizeof (fpos_t))))
7621 exit (1);
7622 fprintf (f, "%ld\n", i);
7623 }
7624 else
7625 {
7626 unsigned long i = ulongval ();
7627 if (i != ((long) (sizeof (fpos_t))))
7628 exit (1);
7629 fprintf (f, "%lu\n", i);
7630 }
7631 exit (ferror (f) || fclose (f) != 0);
7632
7633 ;
7634 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007635}
Martin v. Löwis11437992002-04-12 09:54:03 +00007636_ACEOF
7637rm -f conftest$ac_exeext
7638if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7639 (eval $ac_link) 2>&5
7640 ac_status=$?
7641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7642 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7644 (eval $ac_try) 2>&5
7645 ac_status=$?
7646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7647 (exit $ac_status); }; }; then
7648 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007649else
Martin v. Löwis11437992002-04-12 09:54:03 +00007650 echo "$as_me: program exited with status $ac_status" >&5
7651echo "$as_me: failed program was:" >&5
7652cat conftest.$ac_ext >&5
7653( exit $ac_status )
7654{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7655echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7656 { (exit 1); exit 1; }; }
7657fi
7658rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7659fi
7660fi
7661rm -f conftest.val
7662else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007663 ac_cv_sizeof_fpos_t=0
7664fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007665fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007666echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7667echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7668cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007669#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007670_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007671
Michael W. Hudson54241132001-12-07 15:38:26 +00007672
7673
Martin v. Löwis11437992002-04-12 09:54:03 +00007674echo "$as_me:$LINENO: checking for long long support" >&5
7675echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007676have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007677cat >conftest.$ac_ext <<_ACEOF
7678#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007679#include "confdefs.h"
7680
Martin v. Löwis11437992002-04-12 09:54:03 +00007681#ifdef F77_DUMMY_MAIN
7682# ifdef __cplusplus
7683 extern "C"
7684# endif
7685 int F77_DUMMY_MAIN() { return 1; }
7686#endif
7687int
7688main ()
7689{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007690long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007691 ;
7692 return 0;
7693}
7694_ACEOF
7695rm -f conftest.$ac_objext
7696if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7697 (eval $ac_compile) 2>&5
7698 ac_status=$?
7699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7700 (exit $ac_status); } &&
7701 { ac_try='test -s conftest.$ac_objext'
7702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7703 (eval $ac_try) 2>&5
7704 ac_status=$?
7705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7706 (exit $ac_status); }; }; then
7707
7708
7709cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007710#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007711_ACEOF
7712
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007713 have_long_long=yes
7714
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007715else
Martin v. Löwis11437992002-04-12 09:54:03 +00007716 echo "$as_me: failed program was:" >&5
7717cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007718fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007719rm -f conftest.$ac_objext conftest.$ac_ext
7720echo "$as_me:$LINENO: result: $have_long_long" >&5
7721echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007722if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007723echo "$as_me:$LINENO: checking for long long" >&5
7724echo $ECHO_N "checking for long long... $ECHO_C" >&6
7725if test "${ac_cv_type_long_long+set}" = set; then
7726 echo $ECHO_N "(cached) $ECHO_C" >&6
7727else
7728 cat >conftest.$ac_ext <<_ACEOF
7729#line $LINENO "configure"
7730#include "confdefs.h"
7731$ac_includes_default
7732#ifdef F77_DUMMY_MAIN
7733# ifdef __cplusplus
7734 extern "C"
7735# endif
7736 int F77_DUMMY_MAIN() { return 1; }
7737#endif
7738int
7739main ()
7740{
7741if ((long long *) 0)
7742 return 0;
7743if (sizeof (long long))
7744 return 0;
7745 ;
7746 return 0;
7747}
7748_ACEOF
7749rm -f conftest.$ac_objext
7750if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7751 (eval $ac_compile) 2>&5
7752 ac_status=$?
7753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7754 (exit $ac_status); } &&
7755 { ac_try='test -s conftest.$ac_objext'
7756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7757 (eval $ac_try) 2>&5
7758 ac_status=$?
7759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7760 (exit $ac_status); }; }; then
7761 ac_cv_type_long_long=yes
7762else
7763 echo "$as_me: failed program was:" >&5
7764cat conftest.$ac_ext >&5
7765ac_cv_type_long_long=no
7766fi
7767rm -f conftest.$ac_objext conftest.$ac_ext
7768fi
7769echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7770echo "${ECHO_T}$ac_cv_type_long_long" >&6
7771
7772echo "$as_me:$LINENO: checking size of long long" >&5
7773echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7774if test "${ac_cv_sizeof_long_long+set}" = set; then
7775 echo $ECHO_N "(cached) $ECHO_C" >&6
7776else
7777 if test "$ac_cv_type_long_long" = yes; then
7778 # The cast to unsigned long works around a bug in the HP C Compiler
7779 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7780 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7781 # This bug is HP SR number 8606223364.
7782 if test "$cross_compiling" = yes; then
7783 # Depending upon the size, compute the lo and hi bounds.
7784cat >conftest.$ac_ext <<_ACEOF
7785#line $LINENO "configure"
7786#include "confdefs.h"
7787$ac_includes_default
7788#ifdef F77_DUMMY_MAIN
7789# ifdef __cplusplus
7790 extern "C"
7791# endif
7792 int F77_DUMMY_MAIN() { return 1; }
7793#endif
7794int
7795main ()
7796{
7797static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7798test_array [0] = 0
7799
7800 ;
7801 return 0;
7802}
7803_ACEOF
7804rm -f conftest.$ac_objext
7805if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7806 (eval $ac_compile) 2>&5
7807 ac_status=$?
7808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7809 (exit $ac_status); } &&
7810 { ac_try='test -s conftest.$ac_objext'
7811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7812 (eval $ac_try) 2>&5
7813 ac_status=$?
7814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7815 (exit $ac_status); }; }; then
7816 ac_lo=0 ac_mid=0
7817 while :; do
7818 cat >conftest.$ac_ext <<_ACEOF
7819#line $LINENO "configure"
7820#include "confdefs.h"
7821$ac_includes_default
7822#ifdef F77_DUMMY_MAIN
7823# ifdef __cplusplus
7824 extern "C"
7825# endif
7826 int F77_DUMMY_MAIN() { return 1; }
7827#endif
7828int
7829main ()
7830{
7831static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7832test_array [0] = 0
7833
7834 ;
7835 return 0;
7836}
7837_ACEOF
7838rm -f conftest.$ac_objext
7839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7840 (eval $ac_compile) 2>&5
7841 ac_status=$?
7842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7843 (exit $ac_status); } &&
7844 { ac_try='test -s conftest.$ac_objext'
7845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7846 (eval $ac_try) 2>&5
7847 ac_status=$?
7848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7849 (exit $ac_status); }; }; then
7850 ac_hi=$ac_mid; break
7851else
7852 echo "$as_me: failed program was:" >&5
7853cat conftest.$ac_ext >&5
7854ac_lo=`expr $ac_mid + 1`
7855 if test $ac_lo -le $ac_mid; then
7856 ac_lo= ac_hi=
7857 break
7858 fi
7859 ac_mid=`expr 2 '*' $ac_mid + 1`
7860fi
7861rm -f conftest.$ac_objext conftest.$ac_ext
7862 done
7863else
7864 echo "$as_me: failed program was:" >&5
7865cat conftest.$ac_ext >&5
7866cat >conftest.$ac_ext <<_ACEOF
7867#line $LINENO "configure"
7868#include "confdefs.h"
7869$ac_includes_default
7870#ifdef F77_DUMMY_MAIN
7871# ifdef __cplusplus
7872 extern "C"
7873# endif
7874 int F77_DUMMY_MAIN() { return 1; }
7875#endif
7876int
7877main ()
7878{
7879static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7880test_array [0] = 0
7881
7882 ;
7883 return 0;
7884}
7885_ACEOF
7886rm -f conftest.$ac_objext
7887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7888 (eval $ac_compile) 2>&5
7889 ac_status=$?
7890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7891 (exit $ac_status); } &&
7892 { ac_try='test -s conftest.$ac_objext'
7893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7894 (eval $ac_try) 2>&5
7895 ac_status=$?
7896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7897 (exit $ac_status); }; }; then
7898 ac_hi=-1 ac_mid=-1
7899 while :; do
7900 cat >conftest.$ac_ext <<_ACEOF
7901#line $LINENO "configure"
7902#include "confdefs.h"
7903$ac_includes_default
7904#ifdef F77_DUMMY_MAIN
7905# ifdef __cplusplus
7906 extern "C"
7907# endif
7908 int F77_DUMMY_MAIN() { return 1; }
7909#endif
7910int
7911main ()
7912{
7913static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7914test_array [0] = 0
7915
7916 ;
7917 return 0;
7918}
7919_ACEOF
7920rm -f conftest.$ac_objext
7921if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7922 (eval $ac_compile) 2>&5
7923 ac_status=$?
7924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7925 (exit $ac_status); } &&
7926 { ac_try='test -s conftest.$ac_objext'
7927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7928 (eval $ac_try) 2>&5
7929 ac_status=$?
7930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7931 (exit $ac_status); }; }; then
7932 ac_lo=$ac_mid; break
7933else
7934 echo "$as_me: failed program was:" >&5
7935cat conftest.$ac_ext >&5
7936ac_hi=`expr '(' $ac_mid ')' - 1`
7937 if test $ac_mid -le $ac_hi; then
7938 ac_lo= ac_hi=
7939 break
7940 fi
7941 ac_mid=`expr 2 '*' $ac_mid`
7942fi
7943rm -f conftest.$ac_objext conftest.$ac_ext
7944 done
7945else
7946 echo "$as_me: failed program was:" >&5
7947cat conftest.$ac_ext >&5
7948ac_lo= ac_hi=
7949fi
7950rm -f conftest.$ac_objext conftest.$ac_ext
7951fi
7952rm -f conftest.$ac_objext conftest.$ac_ext
7953# Binary search between lo and hi bounds.
7954while test "x$ac_lo" != "x$ac_hi"; do
7955 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7956 cat >conftest.$ac_ext <<_ACEOF
7957#line $LINENO "configure"
7958#include "confdefs.h"
7959$ac_includes_default
7960#ifdef F77_DUMMY_MAIN
7961# ifdef __cplusplus
7962 extern "C"
7963# endif
7964 int F77_DUMMY_MAIN() { return 1; }
7965#endif
7966int
7967main ()
7968{
7969static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7970test_array [0] = 0
7971
7972 ;
7973 return 0;
7974}
7975_ACEOF
7976rm -f conftest.$ac_objext
7977if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7978 (eval $ac_compile) 2>&5
7979 ac_status=$?
7980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7981 (exit $ac_status); } &&
7982 { ac_try='test -s conftest.$ac_objext'
7983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7984 (eval $ac_try) 2>&5
7985 ac_status=$?
7986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7987 (exit $ac_status); }; }; then
7988 ac_hi=$ac_mid
7989else
7990 echo "$as_me: failed program was:" >&5
7991cat conftest.$ac_ext >&5
7992ac_lo=`expr '(' $ac_mid ')' + 1`
7993fi
7994rm -f conftest.$ac_objext conftest.$ac_ext
7995done
7996case $ac_lo in
7997?*) ac_cv_sizeof_long_long=$ac_lo;;
7998'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7999echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8000 { (exit 1); exit 1; }; } ;;
8001esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008002else
8003 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008004 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8005echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8006 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008007else
Martin v. Löwis11437992002-04-12 09:54:03 +00008008 cat >conftest.$ac_ext <<_ACEOF
8009#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008010#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008011$ac_includes_default
8012long longval () { return (long) (sizeof (long long)); }
8013unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008014#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008015#include <stdlib.h>
8016#ifdef F77_DUMMY_MAIN
8017# ifdef __cplusplus
8018 extern "C"
8019# endif
8020 int F77_DUMMY_MAIN() { return 1; }
8021#endif
8022int
8023main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008024{
Martin v. Löwis11437992002-04-12 09:54:03 +00008025
8026 FILE *f = fopen ("conftest.val", "w");
8027 if (! f)
8028 exit (1);
8029 if (((long) (sizeof (long long))) < 0)
8030 {
8031 long i = longval ();
8032 if (i != ((long) (sizeof (long long))))
8033 exit (1);
8034 fprintf (f, "%ld\n", i);
8035 }
8036 else
8037 {
8038 unsigned long i = ulongval ();
8039 if (i != ((long) (sizeof (long long))))
8040 exit (1);
8041 fprintf (f, "%lu\n", i);
8042 }
8043 exit (ferror (f) || fclose (f) != 0);
8044
8045 ;
8046 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008047}
Martin v. Löwis11437992002-04-12 09:54:03 +00008048_ACEOF
8049rm -f conftest$ac_exeext
8050if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8051 (eval $ac_link) 2>&5
8052 ac_status=$?
8053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8054 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8056 (eval $ac_try) 2>&5
8057 ac_status=$?
8058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8059 (exit $ac_status); }; }; then
8060 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008061else
Martin v. Löwis11437992002-04-12 09:54:03 +00008062 echo "$as_me: program exited with status $ac_status" >&5
8063echo "$as_me: failed program was:" >&5
8064cat conftest.$ac_ext >&5
8065( exit $ac_status )
8066{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8067echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8068 { (exit 1); exit 1; }; }
8069fi
8070rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8071fi
8072fi
8073rm -f conftest.val
8074else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008075 ac_cv_sizeof_long_long=0
8076fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008077fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008078echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8079echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8080cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008081#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008082_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008083
Michael W. Hudson54241132001-12-07 15:38:26 +00008084
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008085fi
8086
Martin v. Löwis11437992002-04-12 09:54:03 +00008087echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8088echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008089have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008090cat >conftest.$ac_ext <<_ACEOF
8091#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008092#include "confdefs.h"
8093
Martin v. Löwis11437992002-04-12 09:54:03 +00008094#ifdef F77_DUMMY_MAIN
8095# ifdef __cplusplus
8096 extern "C"
8097# endif
8098 int F77_DUMMY_MAIN() { return 1; }
8099#endif
8100int
8101main ()
8102{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008103uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008104 ;
8105 return 0;
8106}
8107_ACEOF
8108rm -f conftest.$ac_objext
8109if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8110 (eval $ac_compile) 2>&5
8111 ac_status=$?
8112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8113 (exit $ac_status); } &&
8114 { ac_try='test -s conftest.$ac_objext'
8115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8116 (eval $ac_try) 2>&5
8117 ac_status=$?
8118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8119 (exit $ac_status); }; }; then
8120
8121
8122cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008123#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008124_ACEOF
8125
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008126 have_uintptr_t=yes
8127
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008128else
Martin v. Löwis11437992002-04-12 09:54:03 +00008129 echo "$as_me: failed program was:" >&5
8130cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008131fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008132rm -f conftest.$ac_objext conftest.$ac_ext
8133echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8134echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008135if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008136echo "$as_me:$LINENO: checking for uintptr_t" >&5
8137echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8138if test "${ac_cv_type_uintptr_t+set}" = set; then
8139 echo $ECHO_N "(cached) $ECHO_C" >&6
8140else
8141 cat >conftest.$ac_ext <<_ACEOF
8142#line $LINENO "configure"
8143#include "confdefs.h"
8144$ac_includes_default
8145#ifdef F77_DUMMY_MAIN
8146# ifdef __cplusplus
8147 extern "C"
8148# endif
8149 int F77_DUMMY_MAIN() { return 1; }
8150#endif
8151int
8152main ()
8153{
8154if ((uintptr_t *) 0)
8155 return 0;
8156if (sizeof (uintptr_t))
8157 return 0;
8158 ;
8159 return 0;
8160}
8161_ACEOF
8162rm -f conftest.$ac_objext
8163if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8164 (eval $ac_compile) 2>&5
8165 ac_status=$?
8166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8167 (exit $ac_status); } &&
8168 { ac_try='test -s conftest.$ac_objext'
8169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8170 (eval $ac_try) 2>&5
8171 ac_status=$?
8172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8173 (exit $ac_status); }; }; then
8174 ac_cv_type_uintptr_t=yes
8175else
8176 echo "$as_me: failed program was:" >&5
8177cat conftest.$ac_ext >&5
8178ac_cv_type_uintptr_t=no
8179fi
8180rm -f conftest.$ac_objext conftest.$ac_ext
8181fi
8182echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8183echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8184
8185echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8186echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8187if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8188 echo $ECHO_N "(cached) $ECHO_C" >&6
8189else
8190 if test "$ac_cv_type_uintptr_t" = yes; then
8191 # The cast to unsigned long works around a bug in the HP C Compiler
8192 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8193 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8194 # This bug is HP SR number 8606223364.
8195 if test "$cross_compiling" = yes; then
8196 # Depending upon the size, compute the lo and hi bounds.
8197cat >conftest.$ac_ext <<_ACEOF
8198#line $LINENO "configure"
8199#include "confdefs.h"
8200$ac_includes_default
8201#ifdef F77_DUMMY_MAIN
8202# ifdef __cplusplus
8203 extern "C"
8204# endif
8205 int F77_DUMMY_MAIN() { return 1; }
8206#endif
8207int
8208main ()
8209{
8210static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8211test_array [0] = 0
8212
8213 ;
8214 return 0;
8215}
8216_ACEOF
8217rm -f conftest.$ac_objext
8218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8219 (eval $ac_compile) 2>&5
8220 ac_status=$?
8221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8222 (exit $ac_status); } &&
8223 { ac_try='test -s conftest.$ac_objext'
8224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8225 (eval $ac_try) 2>&5
8226 ac_status=$?
8227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8228 (exit $ac_status); }; }; then
8229 ac_lo=0 ac_mid=0
8230 while :; do
8231 cat >conftest.$ac_ext <<_ACEOF
8232#line $LINENO "configure"
8233#include "confdefs.h"
8234$ac_includes_default
8235#ifdef F77_DUMMY_MAIN
8236# ifdef __cplusplus
8237 extern "C"
8238# endif
8239 int F77_DUMMY_MAIN() { return 1; }
8240#endif
8241int
8242main ()
8243{
8244static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8245test_array [0] = 0
8246
8247 ;
8248 return 0;
8249}
8250_ACEOF
8251rm -f conftest.$ac_objext
8252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8253 (eval $ac_compile) 2>&5
8254 ac_status=$?
8255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8256 (exit $ac_status); } &&
8257 { ac_try='test -s conftest.$ac_objext'
8258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8259 (eval $ac_try) 2>&5
8260 ac_status=$?
8261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8262 (exit $ac_status); }; }; then
8263 ac_hi=$ac_mid; break
8264else
8265 echo "$as_me: failed program was:" >&5
8266cat conftest.$ac_ext >&5
8267ac_lo=`expr $ac_mid + 1`
8268 if test $ac_lo -le $ac_mid; then
8269 ac_lo= ac_hi=
8270 break
8271 fi
8272 ac_mid=`expr 2 '*' $ac_mid + 1`
8273fi
8274rm -f conftest.$ac_objext conftest.$ac_ext
8275 done
8276else
8277 echo "$as_me: failed program was:" >&5
8278cat conftest.$ac_ext >&5
8279cat >conftest.$ac_ext <<_ACEOF
8280#line $LINENO "configure"
8281#include "confdefs.h"
8282$ac_includes_default
8283#ifdef F77_DUMMY_MAIN
8284# ifdef __cplusplus
8285 extern "C"
8286# endif
8287 int F77_DUMMY_MAIN() { return 1; }
8288#endif
8289int
8290main ()
8291{
8292static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8293test_array [0] = 0
8294
8295 ;
8296 return 0;
8297}
8298_ACEOF
8299rm -f conftest.$ac_objext
8300if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8301 (eval $ac_compile) 2>&5
8302 ac_status=$?
8303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8304 (exit $ac_status); } &&
8305 { ac_try='test -s conftest.$ac_objext'
8306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8307 (eval $ac_try) 2>&5
8308 ac_status=$?
8309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8310 (exit $ac_status); }; }; then
8311 ac_hi=-1 ac_mid=-1
8312 while :; do
8313 cat >conftest.$ac_ext <<_ACEOF
8314#line $LINENO "configure"
8315#include "confdefs.h"
8316$ac_includes_default
8317#ifdef F77_DUMMY_MAIN
8318# ifdef __cplusplus
8319 extern "C"
8320# endif
8321 int F77_DUMMY_MAIN() { return 1; }
8322#endif
8323int
8324main ()
8325{
8326static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8327test_array [0] = 0
8328
8329 ;
8330 return 0;
8331}
8332_ACEOF
8333rm -f conftest.$ac_objext
8334if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8335 (eval $ac_compile) 2>&5
8336 ac_status=$?
8337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8338 (exit $ac_status); } &&
8339 { ac_try='test -s conftest.$ac_objext'
8340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8341 (eval $ac_try) 2>&5
8342 ac_status=$?
8343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8344 (exit $ac_status); }; }; then
8345 ac_lo=$ac_mid; break
8346else
8347 echo "$as_me: failed program was:" >&5
8348cat conftest.$ac_ext >&5
8349ac_hi=`expr '(' $ac_mid ')' - 1`
8350 if test $ac_mid -le $ac_hi; then
8351 ac_lo= ac_hi=
8352 break
8353 fi
8354 ac_mid=`expr 2 '*' $ac_mid`
8355fi
8356rm -f conftest.$ac_objext conftest.$ac_ext
8357 done
8358else
8359 echo "$as_me: failed program was:" >&5
8360cat conftest.$ac_ext >&5
8361ac_lo= ac_hi=
8362fi
8363rm -f conftest.$ac_objext conftest.$ac_ext
8364fi
8365rm -f conftest.$ac_objext conftest.$ac_ext
8366# Binary search between lo and hi bounds.
8367while test "x$ac_lo" != "x$ac_hi"; do
8368 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8369 cat >conftest.$ac_ext <<_ACEOF
8370#line $LINENO "configure"
8371#include "confdefs.h"
8372$ac_includes_default
8373#ifdef F77_DUMMY_MAIN
8374# ifdef __cplusplus
8375 extern "C"
8376# endif
8377 int F77_DUMMY_MAIN() { return 1; }
8378#endif
8379int
8380main ()
8381{
8382static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8383test_array [0] = 0
8384
8385 ;
8386 return 0;
8387}
8388_ACEOF
8389rm -f conftest.$ac_objext
8390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8391 (eval $ac_compile) 2>&5
8392 ac_status=$?
8393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8394 (exit $ac_status); } &&
8395 { ac_try='test -s conftest.$ac_objext'
8396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8397 (eval $ac_try) 2>&5
8398 ac_status=$?
8399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8400 (exit $ac_status); }; }; then
8401 ac_hi=$ac_mid
8402else
8403 echo "$as_me: failed program was:" >&5
8404cat conftest.$ac_ext >&5
8405ac_lo=`expr '(' $ac_mid ')' + 1`
8406fi
8407rm -f conftest.$ac_objext conftest.$ac_ext
8408done
8409case $ac_lo in
8410?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8411'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8412echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8413 { (exit 1); exit 1; }; } ;;
8414esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008415else
8416 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008417 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8418echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8419 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008420else
Martin v. Löwis11437992002-04-12 09:54:03 +00008421 cat >conftest.$ac_ext <<_ACEOF
8422#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008423#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008424$ac_includes_default
8425long longval () { return (long) (sizeof (uintptr_t)); }
8426unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008427#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008428#include <stdlib.h>
8429#ifdef F77_DUMMY_MAIN
8430# ifdef __cplusplus
8431 extern "C"
8432# endif
8433 int F77_DUMMY_MAIN() { return 1; }
8434#endif
8435int
8436main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008437{
Martin v. Löwis11437992002-04-12 09:54:03 +00008438
8439 FILE *f = fopen ("conftest.val", "w");
8440 if (! f)
8441 exit (1);
8442 if (((long) (sizeof (uintptr_t))) < 0)
8443 {
8444 long i = longval ();
8445 if (i != ((long) (sizeof (uintptr_t))))
8446 exit (1);
8447 fprintf (f, "%ld\n", i);
8448 }
8449 else
8450 {
8451 unsigned long i = ulongval ();
8452 if (i != ((long) (sizeof (uintptr_t))))
8453 exit (1);
8454 fprintf (f, "%lu\n", i);
8455 }
8456 exit (ferror (f) || fclose (f) != 0);
8457
8458 ;
8459 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008460}
Martin v. Löwis11437992002-04-12 09:54:03 +00008461_ACEOF
8462rm -f conftest$ac_exeext
8463if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8464 (eval $ac_link) 2>&5
8465 ac_status=$?
8466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8467 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8469 (eval $ac_try) 2>&5
8470 ac_status=$?
8471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8472 (exit $ac_status); }; }; then
8473 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008474else
Martin v. Löwis11437992002-04-12 09:54:03 +00008475 echo "$as_me: program exited with status $ac_status" >&5
8476echo "$as_me: failed program was:" >&5
8477cat conftest.$ac_ext >&5
8478( exit $ac_status )
8479{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8480echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8481 { (exit 1); exit 1; }; }
8482fi
8483rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8484fi
8485fi
8486rm -f conftest.val
8487else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008488 ac_cv_sizeof_uintptr_t=0
8489fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008490fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008491echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8492echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8493cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008494#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008495_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008496
Michael W. Hudson54241132001-12-07 15:38:26 +00008497
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008498fi
8499
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008500# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008501echo "$as_me:$LINENO: checking size of off_t" >&5
8502echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8503if test "${ac_cv_sizeof_off_t+set}" = set; then
8504 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008505else
8506 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008507 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008508else
Martin v. Löwis11437992002-04-12 09:54:03 +00008509 cat >conftest.$ac_ext <<_ACEOF
8510#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008511#include "confdefs.h"
8512#include <stdio.h>
8513#include <sys/types.h>
8514main()
8515{
8516 FILE *f=fopen("conftestval", "w");
8517 if (!f) exit(1);
8518 fprintf(f, "%d\n", sizeof(off_t));
8519 exit(0);
8520}
Martin v. Löwis11437992002-04-12 09:54:03 +00008521_ACEOF
8522rm -f conftest$ac_exeext
8523if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8524 (eval $ac_link) 2>&5
8525 ac_status=$?
8526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8527 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8529 (eval $ac_try) 2>&5
8530 ac_status=$?
8531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8532 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008533 ac_cv_sizeof_off_t=`cat conftestval`
8534else
Martin v. Löwis11437992002-04-12 09:54:03 +00008535 echo "$as_me: program exited with status $ac_status" >&5
8536echo "$as_me: failed program was:" >&5
8537cat conftest.$ac_ext >&5
8538( exit $ac_status )
8539ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008540fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008541rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008542fi
8543
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008544fi
8545
Martin v. Löwis11437992002-04-12 09:54:03 +00008546echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8547echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8548
8549cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008550#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008551_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008552
Michael W. Hudson54241132001-12-07 15:38:26 +00008553
Martin v. Löwis11437992002-04-12 09:54:03 +00008554echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8555echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008556if test "$have_long_long" = yes -a \
8557 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8558 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008559
Martin v. Löwis11437992002-04-12 09:54:03 +00008560cat >>confdefs.h <<\_ACEOF
8561#define HAVE_LARGEFILE_SUPPORT 1
8562_ACEOF
8563
8564 echo "$as_me:$LINENO: result: yes" >&5
8565echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008566else
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 echo "$as_me:$LINENO: result: no" >&5
8568echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008569fi
8570
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008571# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008572echo "$as_me:$LINENO: checking size of time_t" >&5
8573echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8574if test "${ac_cv_sizeof_time_t+set}" = set; then
8575 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008576else
8577 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008578 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008579else
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 cat >conftest.$ac_ext <<_ACEOF
8581#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008582#include "confdefs.h"
8583#include <stdio.h>
8584#include <time.h>
8585main()
8586{
8587 FILE *f=fopen("conftestval", "w");
8588 if (!f) exit(1);
8589 fprintf(f, "%d\n", sizeof(time_t));
8590 exit(0);
8591}
Martin v. Löwis11437992002-04-12 09:54:03 +00008592_ACEOF
8593rm -f conftest$ac_exeext
8594if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8595 (eval $ac_link) 2>&5
8596 ac_status=$?
8597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8598 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8600 (eval $ac_try) 2>&5
8601 ac_status=$?
8602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8603 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008604 ac_cv_sizeof_time_t=`cat conftestval`
8605else
Martin v. Löwis11437992002-04-12 09:54:03 +00008606 echo "$as_me: program exited with status $ac_status" >&5
8607echo "$as_me: failed program was:" >&5
8608cat conftest.$ac_ext >&5
8609( exit $ac_status )
8610ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008611fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008612rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008613fi
8614
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008615fi
8616
Martin v. Löwis11437992002-04-12 09:54:03 +00008617echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8618echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8619
8620cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008621#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008622_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008623
Michael W. Hudson54241132001-12-07 15:38:26 +00008624
8625
Trent Mick635f6fb2000-08-23 21:33:05 +00008626# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008627ac_save_cc="$CC"
8628if test "$ac_cv_kpthread" = "yes"
8629then CC="$CC -Kpthread"
8630fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008631echo "$as_me:$LINENO: checking for pthread_t" >&5
8632echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008633have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008634cat >conftest.$ac_ext <<_ACEOF
8635#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008636#include "confdefs.h"
8637#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008638#ifdef F77_DUMMY_MAIN
8639# ifdef __cplusplus
8640 extern "C"
8641# endif
8642 int F77_DUMMY_MAIN() { return 1; }
8643#endif
8644int
8645main ()
8646{
Guido van Rossum12580492000-09-24 16:47:19 +00008647pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008648 ;
8649 return 0;
8650}
8651_ACEOF
8652rm -f conftest.$ac_objext
8653if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8654 (eval $ac_compile) 2>&5
8655 ac_status=$?
8656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8657 (exit $ac_status); } &&
8658 { ac_try='test -s conftest.$ac_objext'
8659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8660 (eval $ac_try) 2>&5
8661 ac_status=$?
8662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8663 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008664 have_pthread_t=yes
8665else
Martin v. Löwis11437992002-04-12 09:54:03 +00008666 echo "$as_me: failed program was:" >&5
8667cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008668fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008669rm -f conftest.$ac_objext conftest.$ac_ext
8670echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8671echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008672if test "$have_pthread_t" = yes ; then
8673 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008674 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8675echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8676 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8677 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008678else
8679 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008680 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008681else
Martin v. Löwis11437992002-04-12 09:54:03 +00008682 cat >conftest.$ac_ext <<_ACEOF
8683#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008684#include "confdefs.h"
8685#include <stdio.h>
8686 #include <pthread.h>
8687 main()
8688 {
8689 FILE *f=fopen("conftestval", "w");
8690 if (!f) exit(1);
8691 fprintf(f, "%d\n", sizeof(pthread_t));
8692 exit(0);
8693 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008694_ACEOF
8695rm -f conftest$ac_exeext
8696if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8697 (eval $ac_link) 2>&5
8698 ac_status=$?
8699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8700 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8702 (eval $ac_try) 2>&5
8703 ac_status=$?
8704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8705 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008706 ac_cv_sizeof_pthread_t=`cat conftestval`
8707else
Martin v. Löwis11437992002-04-12 09:54:03 +00008708 echo "$as_me: program exited with status $ac_status" >&5
8709echo "$as_me: failed program was:" >&5
8710cat conftest.$ac_ext >&5
8711( exit $ac_status )
8712ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008713fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008714rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008715fi
8716
Trent Mick635f6fb2000-08-23 21:33:05 +00008717fi
8718
Martin v. Löwis11437992002-04-12 09:54:03 +00008719 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8720echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8721
8722cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008723#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008724_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008725
8726fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008727CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008728
Martin v. Löwis11437992002-04-12 09:54:03 +00008729echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8730echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008731# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8732if test "${enable_toolbox_glue+set}" = set; then
8733 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008734
Martin v. Löwis11437992002-04-12 09:54:03 +00008735fi;
Jack Jansene578a632001-08-15 01:27:14 +00008736
8737if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008738then
Jack Jansene578a632001-08-15 01:27:14 +00008739 case $ac_sys_system/$ac_sys_release in
8740 Darwin/*)
8741 enable_toolbox_glue="yes";;
8742 *)
8743 enable_toolbox_glue="no";;
8744 esac
8745fi
8746case "$enable_toolbox_glue" in
8747yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008748 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008749 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008750 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008751
8752cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008753#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008754_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008755
8756 ;;
8757*)
8758 extra_frameworks=""
8759 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008760 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008761 ;;
8762esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008763echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8764echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008765
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008766
8767case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008768 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00008769 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00008770 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008771 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8772 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008773 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00008774 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00008775 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008776 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8777 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008778esac
8779
Martin v. Löwis11437992002-04-12 09:54:03 +00008780echo "$as_me:$LINENO: checking for --enable-framework" >&5
8781echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008782if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008783then
Jack Jansenca06bc62001-08-03 15:32:23 +00008784 OPT="$OPT -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008785 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008786 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00008787 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008788
Martin v. Löwis11437992002-04-12 09:54:03 +00008789cat >>confdefs.h <<\_ACEOF
8790#define WITH_NEXT_FRAMEWORK 1
8791_ACEOF
8792
8793 echo "$as_me:$LINENO: result: yes" >&5
8794echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008795else
Martin v. Löwis11437992002-04-12 09:54:03 +00008796 echo "$as_me:$LINENO: result: no" >&5
8797echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008798fi
8799
Martin v. Löwis11437992002-04-12 09:54:03 +00008800echo "$as_me:$LINENO: checking for dyld" >&5
8801echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008802case $ac_sys_system/$ac_sys_release in
8803 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008804
Martin v. Löwis11437992002-04-12 09:54:03 +00008805cat >>confdefs.h <<\_ACEOF
8806#define WITH_DYLD 1
8807_ACEOF
8808
8809 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8810echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008811 ;;
8812 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008813 echo "$as_me:$LINENO: result: no" >&5
8814echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008815 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008816esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008817
Guido van Rossum0a516c91994-09-12 10:58:40 +00008818# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008819
Michael W. Hudson54241132001-12-07 15:38:26 +00008820
8821
8822
8823
Guido van Rossum0a516c91994-09-12 10:58:40 +00008824# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008825# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008826echo "$as_me:$LINENO: checking SO" >&5
8827echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008828if test -z "$SO"
8829then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008830 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008831 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008832 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008833 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008834 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008835fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008836echo "$as_me:$LINENO: result: $SO" >&5
8837echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008838# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008839# -- "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 +00008840# (Shared libraries in this instance are shared modules to be loaded into
8841# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008842echo "$as_me:$LINENO: checking LDSHARED" >&5
8843echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008844if test -z "$LDSHARED"
8845then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008846 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008847 AIX*)
8848 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008849 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008850 ;;
8851 BeOS*)
8852 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008853 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008854 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008855 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008856 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008857 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00008859 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008860 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008861 else LDSHARED="$(CC) -G";
Greg Ward57c9a6632000-05-26 12:22:54 +00008862 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008863 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008864 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8865 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008866 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008867 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8868 if test "$enable_framework" ; then
8869 # Link against the framework. All externals should be defined.
8870 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8871 else
8872 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008873 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008874 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008875 Darwin/*)
8876 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8877 if test "$enable_framework" ; then
8878 # Link against the framework. All externals should be defined.
8879 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8880 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008881 # No framework, use the Python app as bundle-loader
8882 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8883 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008884 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00008885 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008886 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008887 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00008888 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008889 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008890 then
8891 LDSHARED="cc -shared ${LDFLAGS}"
8892 else
8893 LDSHARED="ld -Bshareable ${LDFLAGS}"
8894 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00008895 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008896 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008897 if test "$GCC" = "yes"
8898 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008899 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008900 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008901 SCO_SV*) LDSHARED="$(CC) -Wl,-G,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008902 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008903 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008904 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008905 *) LDSHARED="ld";;
8906 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008907fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008908echo "$as_me:$LINENO: result: $LDSHARED" >&5
8909echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008910BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008911# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008912# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008913echo "$as_me:$LINENO: checking CCSHARED" >&5
8914echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008915if test -z "$CCSHARED"
8916then
Guido van Rossum07397971997-04-29 21:49:50 +00008917 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008918 SunOS*) if test "$GCC" = yes;
8919 then CCSHARED="-fPIC";
8920 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008921 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008922 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008923 else CCSHARED="+z";
8924 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008925 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008926 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008927 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008928 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008929 if test "$GCC" = "yes"
8930 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008931 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008932 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008933 SCO_SV*)
8934 if test "$GCC" = "yes"
8935 then CCSHARED="-fPIC"
8936 else CCSHARED="-Kpic -belf"
8937 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00008938 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008939 IRIX*/6*) case $CC in
8940 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008941 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008942 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008943 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008944 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008945fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008946echo "$as_me:$LINENO: result: $CCSHARED" >&5
8947echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008948# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008949# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008950echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8951echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008952if test -z "$LINKFORSHARED"
8953then
Guido van Rossum07397971997-04-29 21:49:50 +00008954 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008955 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008956 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008957 LINKFORSHARED="-Wl,-E -Wl,+s";;
8958# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008959 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008960 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008961 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008962 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008963 # -u __dummy makes the linker aware of the objc runtime
8964 # in System.framework; otherwise, __objcInit (referenced in
8965 # crt1.o) gets erroneously defined as common, which breaks dynamic
8966 # loading of any modules which reference it in System.framework.
8967 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8968 # not used by the core itself but which needs to be in the core so
8969 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008970 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008971 if test "$enable_framework"
8972 then
8973 LINKFORSHARED="$LINKFORSHARED -framework Python"
8974 fi
8975 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008976 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008977 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008978 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008979 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008980 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8981 then
8982 LINKFORSHARED="-Wl,--export-dynamic"
8983 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008984 SunOS/5*) case $CC in
8985 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008986 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008987 then
8988 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008989 fi;;
8990 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008991 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008992fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008993echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8994echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008995
Michael W. Hudson54241132001-12-07 15:38:26 +00008996
Martin v. Löwis11437992002-04-12 09:54:03 +00008997echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8998echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008999if test ! "$LIBRARY" = "$LDLIBRARY"
9000then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009001 case $ac_sys_system in
9002 CYGWIN*)
9003 # Cygwin needs CCSHARED when building extension DLLs
9004 # but not when building the interpreter DLL.
9005 CFLAGSFORSHARED='';;
9006 *)
9007 CFLAGSFORSHARED='$(CCSHARED)'
9008 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009009fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009010echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9011echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009012
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009013# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9014# library (with --enable-shared).
9015# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009016# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9017# if it is not required, since it creates a dependency of the shared library
9018# to LIBS. This, in turn, means that applications linking the shared libpython
9019# don't need to link LIBS explicitly. The default should be only changed
9020# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009021
9022echo "$as_me:$LINENO: checking SHLIBS" >&5
9023echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9024case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009025 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009026 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009027esac
9028echo "$as_me:$LINENO: result: $SHLIBS" >&5
9029echo "${ECHO_T}$SHLIBS" >&6
9030
9031
Guido van Rossum627b2d71993-12-24 10:39:16 +00009032# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009033
9034echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9035echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9036if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9037 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009038else
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009040LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009041cat >conftest.$ac_ext <<_ACEOF
9042#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009043#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009044
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009045/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009046#ifdef __cplusplus
9047extern "C"
9048#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009049/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009050 builtin and then its argument prototype would still apply. */
9051char dlopen ();
9052#ifdef F77_DUMMY_MAIN
9053# ifdef __cplusplus
9054 extern "C"
9055# endif
9056 int F77_DUMMY_MAIN() { return 1; }
9057#endif
9058int
9059main ()
9060{
9061dlopen ();
9062 ;
9063 return 0;
9064}
9065_ACEOF
9066rm -f conftest.$ac_objext conftest$ac_exeext
9067if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9068 (eval $ac_link) 2>&5
9069 ac_status=$?
9070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9071 (exit $ac_status); } &&
9072 { ac_try='test -s conftest$ac_exeext'
9073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9074 (eval $ac_try) 2>&5
9075 ac_status=$?
9076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9077 (exit $ac_status); }; }; then
9078 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009079else
Martin v. Löwis11437992002-04-12 09:54:03 +00009080 echo "$as_me: failed program was:" >&5
9081cat conftest.$ac_ext >&5
9082ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009083fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009084rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9085LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009086fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009087echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9088echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9089if test $ac_cv_lib_dl_dlopen = yes; then
9090 cat >>confdefs.h <<_ACEOF
9091#define HAVE_LIBDL 1
9092_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009093
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009094 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009095
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009096fi
9097 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009098
9099echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9100echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9101if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9102 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009103else
Martin v. Löwis11437992002-04-12 09:54:03 +00009104 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009105LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009106cat >conftest.$ac_ext <<_ACEOF
9107#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009108#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009109
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009110/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009111#ifdef __cplusplus
9112extern "C"
9113#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009114/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009115 builtin and then its argument prototype would still apply. */
9116char shl_load ();
9117#ifdef F77_DUMMY_MAIN
9118# ifdef __cplusplus
9119 extern "C"
9120# endif
9121 int F77_DUMMY_MAIN() { return 1; }
9122#endif
9123int
9124main ()
9125{
9126shl_load ();
9127 ;
9128 return 0;
9129}
9130_ACEOF
9131rm -f conftest.$ac_objext conftest$ac_exeext
9132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9133 (eval $ac_link) 2>&5
9134 ac_status=$?
9135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9136 (exit $ac_status); } &&
9137 { ac_try='test -s conftest$ac_exeext'
9138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9139 (eval $ac_try) 2>&5
9140 ac_status=$?
9141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9142 (exit $ac_status); }; }; then
9143 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009144else
Martin v. Löwis11437992002-04-12 09:54:03 +00009145 echo "$as_me: failed program was:" >&5
9146cat conftest.$ac_ext >&5
9147ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009148fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009149rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9150LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009151fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009152echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9153echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9154if test $ac_cv_lib_dld_shl_load = yes; then
9155 cat >>confdefs.h <<_ACEOF
9156#define HAVE_LIBDLD 1
9157_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009158
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009159 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009160
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009161fi
9162 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009163
9164echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9165echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9166if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9167 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009168else
Martin v. Löwis11437992002-04-12 09:54:03 +00009169 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009170LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009171cat >conftest.$ac_ext <<_ACEOF
9172#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009173#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009174
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009175/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009176#ifdef __cplusplus
9177extern "C"
9178#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009179/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009180 builtin and then its argument prototype would still apply. */
9181char sem_init ();
9182#ifdef F77_DUMMY_MAIN
9183# ifdef __cplusplus
9184 extern "C"
9185# endif
9186 int F77_DUMMY_MAIN() { return 1; }
9187#endif
9188int
9189main ()
9190{
9191sem_init ();
9192 ;
9193 return 0;
9194}
9195_ACEOF
9196rm -f conftest.$ac_objext conftest$ac_exeext
9197if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9198 (eval $ac_link) 2>&5
9199 ac_status=$?
9200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9201 (exit $ac_status); } &&
9202 { ac_try='test -s conftest$ac_exeext'
9203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9204 (eval $ac_try) 2>&5
9205 ac_status=$?
9206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9207 (exit $ac_status); }; }; then
9208 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009209else
Martin v. Löwis11437992002-04-12 09:54:03 +00009210 echo "$as_me: failed program was:" >&5
9211cat conftest.$ac_ext >&5
9212ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009213fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009214rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9215LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009216fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009217echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9218echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9219if test $ac_cv_lib_rt_sem_init = yes; then
9220 cat >>confdefs.h <<_ACEOF
9221#define HAVE_LIBRT 1
9222_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009223
9224 LIBS="-lrt $LIBS"
9225
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009226fi
9227 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009228
9229# checks for system dependent C++ extensions support
9230case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009231 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9232echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9233 cat >conftest.$ac_ext <<_ACEOF
9234#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009235#include "confdefs.h"
9236#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009237#ifdef F77_DUMMY_MAIN
9238# ifdef __cplusplus
9239 extern "C"
9240# endif
9241 int F77_DUMMY_MAIN() { return 1; }
9242#endif
9243int
9244main ()
9245{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009246loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009247 ;
9248 return 0;
9249}
9250_ACEOF
9251rm -f conftest.$ac_objext conftest$ac_exeext
9252if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9253 (eval $ac_link) 2>&5
9254 ac_status=$?
9255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9256 (exit $ac_status); } &&
9257 { ac_try='test -s conftest$ac_exeext'
9258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9259 (eval $ac_try) 2>&5
9260 ac_status=$?
9261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9262 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009263
Martin v. Löwis11437992002-04-12 09:54:03 +00009264cat >>confdefs.h <<\_ACEOF
9265#define AIX_GENUINE_CPLUSPLUS 1
9266_ACEOF
9267
9268 echo "$as_me:$LINENO: result: yes" >&5
9269echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009270else
Martin v. Löwis11437992002-04-12 09:54:03 +00009271 echo "$as_me: failed program was:" >&5
9272cat conftest.$ac_ext >&5
9273echo "$as_me:$LINENO: result: no" >&5
9274echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009275fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009276rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009277 *) ;;
9278esac
9279
Guido van Rossum70c7f481998-03-26 18:44:10 +00009280# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9281# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009282# BeOS' sockets are stashed in libnet.
9283case "$ac_sys_system" in
9284IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009285*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009286echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9287echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9288if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9289 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009290else
Martin v. Löwis11437992002-04-12 09:54:03 +00009291 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009292LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009293cat >conftest.$ac_ext <<_ACEOF
9294#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009295#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009296
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009297/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009298#ifdef __cplusplus
9299extern "C"
9300#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009301/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009302 builtin and then its argument prototype would still apply. */
9303char t_open ();
9304#ifdef F77_DUMMY_MAIN
9305# ifdef __cplusplus
9306 extern "C"
9307# endif
9308 int F77_DUMMY_MAIN() { return 1; }
9309#endif
9310int
9311main ()
9312{
9313t_open ();
9314 ;
9315 return 0;
9316}
9317_ACEOF
9318rm -f conftest.$ac_objext conftest$ac_exeext
9319if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9320 (eval $ac_link) 2>&5
9321 ac_status=$?
9322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9323 (exit $ac_status); } &&
9324 { ac_try='test -s conftest$ac_exeext'
9325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9326 (eval $ac_try) 2>&5
9327 ac_status=$?
9328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9329 (exit $ac_status); }; }; then
9330 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009331else
Martin v. Löwis11437992002-04-12 09:54:03 +00009332 echo "$as_me: failed program was:" >&5
9333cat conftest.$ac_ext >&5
9334ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009335fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009336rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9337LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009338fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009339echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9340echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9341if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009342 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009343fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009344 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009345echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9346echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9347if test "${ac_cv_lib_socket_socket+set}" = set; then
9348 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009349else
Martin v. Löwis11437992002-04-12 09:54:03 +00009350 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009351LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009352cat >conftest.$ac_ext <<_ACEOF
9353#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009354#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009355
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009356/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009357#ifdef __cplusplus
9358extern "C"
9359#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009360/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 builtin and then its argument prototype would still apply. */
9362char socket ();
9363#ifdef F77_DUMMY_MAIN
9364# ifdef __cplusplus
9365 extern "C"
9366# endif
9367 int F77_DUMMY_MAIN() { return 1; }
9368#endif
9369int
9370main ()
9371{
9372socket ();
9373 ;
9374 return 0;
9375}
9376_ACEOF
9377rm -f conftest.$ac_objext conftest$ac_exeext
9378if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9379 (eval $ac_link) 2>&5
9380 ac_status=$?
9381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9382 (exit $ac_status); } &&
9383 { ac_try='test -s conftest$ac_exeext'
9384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9385 (eval $ac_try) 2>&5
9386 ac_status=$?
9387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9388 (exit $ac_status); }; }; then
9389 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009390else
Martin v. Löwis11437992002-04-12 09:54:03 +00009391 echo "$as_me: failed program was:" >&5
9392cat conftest.$ac_ext >&5
9393ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009394fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009395rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9396LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009397fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009398echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9399echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9400if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009401 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009402fi
9403 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009404;;
9405esac
9406case "$ac_sys_system" in
9407BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009408echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9409echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9410if test "${ac_cv_lib_net_socket+set}" = set; then
9411 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009412else
Martin v. Löwis11437992002-04-12 09:54:03 +00009413 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009414LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009415cat >conftest.$ac_ext <<_ACEOF
9416#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009417#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009418
Guido van Rossumad678af1998-10-02 14:42:15 +00009419/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009420#ifdef __cplusplus
9421extern "C"
9422#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009423/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009424 builtin and then its argument prototype would still apply. */
9425char socket ();
9426#ifdef F77_DUMMY_MAIN
9427# ifdef __cplusplus
9428 extern "C"
9429# endif
9430 int F77_DUMMY_MAIN() { return 1; }
9431#endif
9432int
9433main ()
9434{
9435socket ();
9436 ;
9437 return 0;
9438}
9439_ACEOF
9440rm -f conftest.$ac_objext conftest$ac_exeext
9441if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9442 (eval $ac_link) 2>&5
9443 ac_status=$?
9444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9445 (exit $ac_status); } &&
9446 { ac_try='test -s conftest$ac_exeext'
9447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9448 (eval $ac_try) 2>&5
9449 ac_status=$?
9450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9451 (exit $ac_status); }; }; then
9452 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009453else
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 echo "$as_me: failed program was:" >&5
9455cat conftest.$ac_ext >&5
9456ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009457fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009458rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9459LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009460fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009461echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9462echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9463if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009464 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009465fi
9466 # BeOS
9467;;
9468esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009469
Martin v. Löwis11437992002-04-12 09:54:03 +00009470echo "$as_me:$LINENO: checking for --with-libs" >&5
9471echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9472
Guido van Rossuma68acba1996-07-31 17:36:39 +00009473# Check whether --with-libs or --without-libs was given.
9474if test "${with_libs+set}" = set; then
9475 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009476
9477echo "$as_me:$LINENO: result: $withval" >&5
9478echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009479LIBS="$withval $LIBS"
9480
9481else
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 echo "$as_me:$LINENO: result: no" >&5
9483echo "${ECHO_T}no" >&6
9484fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009485
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009486# Determine if signalmodule should be used.
9487
9488
Martin v. Löwis11437992002-04-12 09:54:03 +00009489echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9490echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9491
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009492# Check whether --with-signal-module or --without-signal-module was given.
9493if test "${with_signal_module+set}" = set; then
9494 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009495
Martin v. Löwis11437992002-04-12 09:54:03 +00009496fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009497
9498if test -z "$with_signal_module"
9499then with_signal_module="yes"
9500fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009501echo "$as_me:$LINENO: result: $with_signal_module" >&5
9502echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009503
9504if test "${with_signal_module}" = "yes"; then
9505 USE_SIGNAL_MODULE=""
9506 SIGNAL_OBJS=""
9507else
9508 USE_SIGNAL_MODULE="#"
9509 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9510fi
9511
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009512# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009513
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009514USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009515
Martin v. Löwis11437992002-04-12 09:54:03 +00009516echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9517echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9518
Guido van Rossumec2f0731997-01-22 20:54:01 +00009519
9520# Check whether --with-dec-threads or --without-dec-threads was given.
9521if test "${with_dec_threads+set}" = set; then
9522 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009523
9524echo "$as_me:$LINENO: result: $withval" >&5
9525echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009526LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009527if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009528 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009529fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009530else
Martin v. Löwis11437992002-04-12 09:54:03 +00009531 echo "$as_me:$LINENO: result: no" >&5
9532echo "${ECHO_T}no" >&6
9533fi;
9534
9535# Templates for things AC_DEFINEd more than once.
9536# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009537
9538
Martin v. Löwis11437992002-04-12 09:54:03 +00009539
9540
9541
9542
9543
9544echo "$as_me:$LINENO: checking for --with-threads" >&5
9545echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9546
Guido van Rossumec2f0731997-01-22 20:54:01 +00009547# Check whether --with-threads or --without-threads was given.
9548if test "${with_threads+set}" = set; then
9549 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009550
Martin v. Löwis11437992002-04-12 09:54:03 +00009551fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009552
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009553# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009554
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009555# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009556if test "${with_thread+set}" = set; then
9557 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009558
Martin v. Löwis11437992002-04-12 09:54:03 +00009559with_threads=$with_thread
9560fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009561
9562if test -z "$with_threads"
9563then with_threads="yes"
9564fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009565echo "$as_me:$LINENO: result: $with_threads" >&5
9566echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009567
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009568
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009569if test "$with_threads" = "no"
9570then
9571 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009572elif test "$ac_cv_pthread_is_default" = yes
9573then
Martin v. Löwis11437992002-04-12 09:54:03 +00009574 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009575#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009576_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009577
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009578 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009579 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009580#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009581_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009582
9583 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009584 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009585elif test "$ac_cv_kpthread" = "yes"
9586then
9587 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009588 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009589#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009590_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009591
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009592 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009593 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009594else
9595 if test ! -z "$with_threads" -a -d "$with_threads"
9596 then LDFLAGS="$LDFLAGS -L$with_threads"
9597 fi
9598 if test ! -z "$withval" -a -d "$withval"
9599 then LDFLAGS="$LDFLAGS -L$withval"
9600 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009601
9602 # According to the POSIX spec, a pthreads implementation must
9603 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009604 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9605echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9606 cat >conftest.$ac_ext <<_ACEOF
9607#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009608#include "confdefs.h"
9609#include <unistd.h>
9610 #ifdef _POSIX_THREADS
9611 yes
9612 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009613
9614_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009615if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9616 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009617 unistd_defines_pthreads=yes
9618else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009619 unistd_defines_pthreads=no
9620fi
9621rm -f conftest*
9622
Martin v. Löwis11437992002-04-12 09:54:03 +00009623 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9624echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009625
Martin v. Löwis11437992002-04-12 09:54:03 +00009626 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009627#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009628_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009629
Martin v. Löwis11437992002-04-12 09:54:03 +00009630 if test "${ac_cv_header_cthreads_h+set}" = set; then
9631 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9632echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9633if test "${ac_cv_header_cthreads_h+set}" = set; then
9634 echo $ECHO_N "(cached) $ECHO_C" >&6
9635fi
9636echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9637echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009638else
Martin v. Löwis11437992002-04-12 09:54:03 +00009639 # Is the header compilable?
9640echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9641echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9642cat >conftest.$ac_ext <<_ACEOF
9643#line $LINENO "configure"
9644#include "confdefs.h"
9645$ac_includes_default
9646#include <cthreads.h>
9647_ACEOF
9648rm -f conftest.$ac_objext
9649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9650 (eval $ac_compile) 2>&5
9651 ac_status=$?
9652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9653 (exit $ac_status); } &&
9654 { ac_try='test -s conftest.$ac_objext'
9655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9656 (eval $ac_try) 2>&5
9657 ac_status=$?
9658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9659 (exit $ac_status); }; }; then
9660 ac_header_compiler=yes
9661else
9662 echo "$as_me: failed program was:" >&5
9663cat conftest.$ac_ext >&5
9664ac_header_compiler=no
9665fi
9666rm -f conftest.$ac_objext conftest.$ac_ext
9667echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9668echo "${ECHO_T}$ac_header_compiler" >&6
9669
9670# Is the header present?
9671echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9672echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9673cat >conftest.$ac_ext <<_ACEOF
9674#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009675#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009676#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009677_ACEOF
9678if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9679 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9680 ac_status=$?
9681 egrep -v '^ *\+' conftest.er1 >conftest.err
9682 rm -f conftest.er1
9683 cat conftest.err >&5
9684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9685 (exit $ac_status); } >/dev/null; then
9686 if test -s conftest.err; then
9687 ac_cpp_err=$ac_c_preproc_warn_flag
9688 else
9689 ac_cpp_err=
9690 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009691else
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 ac_cpp_err=yes
9693fi
9694if test -z "$ac_cpp_err"; then
9695 ac_header_preproc=yes
9696else
9697 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009698 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009700fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009701rm -f conftest.err conftest.$ac_ext
9702echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9703echo "${ECHO_T}$ac_header_preproc" >&6
9704
9705# So? What about this header?
9706case $ac_header_compiler:$ac_header_preproc in
9707 yes:no )
9708 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9709echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9710 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9711echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9712 no:yes )
9713 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9714echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9715 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9716echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9717 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9718echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9719esac
9720echo "$as_me:$LINENO: checking for cthreads.h" >&5
9721echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9722if test "${ac_cv_header_cthreads_h+set}" = set; then
9723 echo $ECHO_N "(cached) $ECHO_C" >&6
9724else
9725 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009726fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009727echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9728echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9729
9730fi
9731if test $ac_cv_header_cthreads_h = yes; then
9732 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009733#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009734_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009735
Martin v. Löwis11437992002-04-12 09:54:03 +00009736 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009737#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009738_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009739
Martin v. Löwis11437992002-04-12 09:54:03 +00009740
9741cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009742#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009743_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009744
9745 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009746 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009747else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009748
Martin v. Löwis11437992002-04-12 09:54:03 +00009749 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9750 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9751echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9752if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9753 echo $ECHO_N "(cached) $ECHO_C" >&6
9754fi
9755echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9756echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009757else
Martin v. Löwis11437992002-04-12 09:54:03 +00009758 # Is the header compilable?
9759echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9760echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9761cat >conftest.$ac_ext <<_ACEOF
9762#line $LINENO "configure"
9763#include "confdefs.h"
9764$ac_includes_default
9765#include <mach/cthreads.h>
9766_ACEOF
9767rm -f conftest.$ac_objext
9768if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9769 (eval $ac_compile) 2>&5
9770 ac_status=$?
9771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9772 (exit $ac_status); } &&
9773 { ac_try='test -s conftest.$ac_objext'
9774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9775 (eval $ac_try) 2>&5
9776 ac_status=$?
9777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778 (exit $ac_status); }; }; then
9779 ac_header_compiler=yes
9780else
9781 echo "$as_me: failed program was:" >&5
9782cat conftest.$ac_ext >&5
9783ac_header_compiler=no
9784fi
9785rm -f conftest.$ac_objext conftest.$ac_ext
9786echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9787echo "${ECHO_T}$ac_header_compiler" >&6
9788
9789# Is the header present?
9790echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9791echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9792cat >conftest.$ac_ext <<_ACEOF
9793#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009794#include "confdefs.h"
9795#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009796_ACEOF
9797if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9798 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9799 ac_status=$?
9800 egrep -v '^ *\+' conftest.er1 >conftest.err
9801 rm -f conftest.er1
9802 cat conftest.err >&5
9803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9804 (exit $ac_status); } >/dev/null; then
9805 if test -s conftest.err; then
9806 ac_cpp_err=$ac_c_preproc_warn_flag
9807 else
9808 ac_cpp_err=
9809 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009810else
Martin v. Löwis11437992002-04-12 09:54:03 +00009811 ac_cpp_err=yes
9812fi
9813if test -z "$ac_cpp_err"; then
9814 ac_header_preproc=yes
9815else
9816 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009817 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009818 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009819fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009820rm -f conftest.err conftest.$ac_ext
9821echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9822echo "${ECHO_T}$ac_header_preproc" >&6
9823
9824# So? What about this header?
9825case $ac_header_compiler:$ac_header_preproc in
9826 yes:no )
9827 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9828echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9829 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9830echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9831 no:yes )
9832 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9833echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9834 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9835echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9836 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9837echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9838esac
9839echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9840echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9841if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9842 echo $ECHO_N "(cached) $ECHO_C" >&6
9843else
9844 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009845fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009846echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9847echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9848
9849fi
9850if test $ac_cv_header_mach_cthreads_h = yes; then
9851 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009852#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009853_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009854
Martin v. Löwis11437992002-04-12 09:54:03 +00009855 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009856#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009857_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009858
Martin v. Löwis11437992002-04-12 09:54:03 +00009859
9860cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009861#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009862_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009863
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009864 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009865else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009866
Martin v. Löwis11437992002-04-12 09:54:03 +00009867 echo "$as_me:$LINENO: checking for --with-pth" >&5
9868echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9869
9870# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009871if test "${with_pth+set}" = set; then
9872 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009873
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 echo "$as_me:$LINENO: result: $withval" >&5
9875echo "${ECHO_T}$withval" >&6
9876 cat >>confdefs.h <<\_ACEOF
9877#define WITH_THREAD 1
9878_ACEOF
9879
9880
9881cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009882#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009883_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009884
Martin v. Löwis130fb172001-07-19 11:00:41 +00009885 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009886 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009887else
Martin v. Löwis11437992002-04-12 09:54:03 +00009888
9889 echo "$as_me:$LINENO: result: no" >&5
9890echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009891
9892 # Just looking for pthread_create in libpthread is not enough:
9893 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9894 # So we really have to include pthread.h, and then link.
9895 _libs=$LIBS
9896 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009897 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9898echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9899 cat >conftest.$ac_ext <<_ACEOF
9900#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009901#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009902#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009903
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009904void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009905#ifdef F77_DUMMY_MAIN
9906# ifdef __cplusplus
9907 extern "C"
9908# endif
9909 int F77_DUMMY_MAIN() { return 1; }
9910#endif
9911int
9912main ()
9913{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009914
9915pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009916 ;
9917 return 0;
9918}
9919_ACEOF
9920rm -f conftest.$ac_objext conftest$ac_exeext
9921if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9922 (eval $ac_link) 2>&5
9923 ac_status=$?
9924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9925 (exit $ac_status); } &&
9926 { ac_try='test -s conftest$ac_exeext'
9927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9928 (eval $ac_try) 2>&5
9929 ac_status=$?
9930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9931 (exit $ac_status); }; }; then
9932
9933 echo "$as_me:$LINENO: result: yes" >&5
9934echo "${ECHO_T}yes" >&6
9935 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009936#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009937_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009938
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009939 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009940 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009941else
Martin v. Löwis11437992002-04-12 09:54:03 +00009942 echo "$as_me: failed program was:" >&5
9943cat conftest.$ac_ext >&5
9944
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009945 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009946 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9947echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9948if test "${ac_cv_func_pthread_detach+set}" = set; then
9949 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009950else
Martin v. Löwis11437992002-04-12 09:54:03 +00009951 cat >conftest.$ac_ext <<_ACEOF
9952#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009953#include "confdefs.h"
9954/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009955 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009956#include <assert.h>
9957/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009958#ifdef __cplusplus
9959extern "C"
9960#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009961/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009962 builtin and then its argument prototype would still apply. */
9963char pthread_detach ();
9964char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009965
Martin v. Löwis11437992002-04-12 09:54:03 +00009966#ifdef F77_DUMMY_MAIN
9967# ifdef __cplusplus
9968 extern "C"
9969# endif
9970 int F77_DUMMY_MAIN() { return 1; }
9971#endif
9972int
9973main ()
9974{
Guido van Rossumad678af1998-10-02 14:42:15 +00009975/* The GNU C library defines this for functions which it implements
9976 to always fail with ENOSYS. Some functions are actually named
9977 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009978#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009979choke me
9980#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009981f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009982#endif
9983
Martin v. Löwis11437992002-04-12 09:54:03 +00009984 ;
9985 return 0;
9986}
9987_ACEOF
9988rm -f conftest.$ac_objext conftest$ac_exeext
9989if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9990 (eval $ac_link) 2>&5
9991 ac_status=$?
9992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9993 (exit $ac_status); } &&
9994 { ac_try='test -s conftest$ac_exeext'
9995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9996 (eval $ac_try) 2>&5
9997 ac_status=$?
9998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9999 (exit $ac_status); }; }; then
10000 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010001else
Martin v. Löwis11437992002-04-12 09:54:03 +000010002 echo "$as_me: failed program was:" >&5
10003cat conftest.$ac_ext >&5
10004ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010005fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010006rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010007fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010008echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10009echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10010if test $ac_cv_func_pthread_detach = yes; then
10011 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010012#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010013_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010014
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010015 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010016 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010017else
Guido van Rossumad678af1998-10-02 14:42:15 +000010018
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010019 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10020 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10021echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10022if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10023 echo $ECHO_N "(cached) $ECHO_C" >&6
10024fi
10025echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10026echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10027else
10028 # Is the header compilable?
10029echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10030echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10031cat >conftest.$ac_ext <<_ACEOF
10032#line $LINENO "configure"
10033#include "confdefs.h"
10034$ac_includes_default
10035#include <atheos/threads.h>
10036_ACEOF
10037rm -f conftest.$ac_objext
10038if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10039 (eval $ac_compile) 2>&5
10040 ac_status=$?
10041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10042 (exit $ac_status); } &&
10043 { ac_try='test -s conftest.$ac_objext'
10044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10045 (eval $ac_try) 2>&5
10046 ac_status=$?
10047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10048 (exit $ac_status); }; }; then
10049 ac_header_compiler=yes
10050else
10051 echo "$as_me: failed program was:" >&5
10052cat conftest.$ac_ext >&5
10053ac_header_compiler=no
10054fi
10055rm -f conftest.$ac_objext conftest.$ac_ext
10056echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10057echo "${ECHO_T}$ac_header_compiler" >&6
10058
10059# Is the header present?
10060echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10061echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10062cat >conftest.$ac_ext <<_ACEOF
10063#line $LINENO "configure"
10064#include "confdefs.h"
10065#include <atheos/threads.h>
10066_ACEOF
10067if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10068 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10069 ac_status=$?
10070 egrep -v '^ *\+' conftest.er1 >conftest.err
10071 rm -f conftest.er1
10072 cat conftest.err >&5
10073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10074 (exit $ac_status); } >/dev/null; then
10075 if test -s conftest.err; then
10076 ac_cpp_err=$ac_c_preproc_warn_flag
10077 else
10078 ac_cpp_err=
10079 fi
10080else
10081 ac_cpp_err=yes
10082fi
10083if test -z "$ac_cpp_err"; then
10084 ac_header_preproc=yes
10085else
10086 echo "$as_me: failed program was:" >&5
10087 cat conftest.$ac_ext >&5
10088 ac_header_preproc=no
10089fi
10090rm -f conftest.err conftest.$ac_ext
10091echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10092echo "${ECHO_T}$ac_header_preproc" >&6
10093
10094# So? What about this header?
10095case $ac_header_compiler:$ac_header_preproc in
10096 yes:no )
10097 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10098echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10099 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10100echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10101 no:yes )
10102 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10103echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10104 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10105echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10106 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10107echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10108esac
10109echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10110echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10111if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10112 echo $ECHO_N "(cached) $ECHO_C" >&6
10113else
10114 ac_cv_header_atheos_threads_h=$ac_header_preproc
10115fi
10116echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10117echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10118
10119fi
10120if test $ac_cv_header_atheos_threads_h = yes; then
10121 cat >>confdefs.h <<\_ACEOF
10122#define WITH_THREAD 1
10123_ACEOF
10124
10125
10126cat >>confdefs.h <<\_ACEOF
10127#define ATHEOS_THREADS 1
10128_ACEOF
10129
10130 THREADOBJ="Python/thread.o"
10131else
10132
Martin v. Löwis11437992002-04-12 09:54:03 +000010133 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10134 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10135echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10136if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10137 echo $ECHO_N "(cached) $ECHO_C" >&6
10138fi
10139echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10140echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010141else
Martin v. Löwis11437992002-04-12 09:54:03 +000010142 # Is the header compilable?
10143echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10144echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10145cat >conftest.$ac_ext <<_ACEOF
10146#line $LINENO "configure"
10147#include "confdefs.h"
10148$ac_includes_default
10149#include <kernel/OS.h>
10150_ACEOF
10151rm -f conftest.$ac_objext
10152if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10153 (eval $ac_compile) 2>&5
10154 ac_status=$?
10155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10156 (exit $ac_status); } &&
10157 { ac_try='test -s conftest.$ac_objext'
10158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10159 (eval $ac_try) 2>&5
10160 ac_status=$?
10161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10162 (exit $ac_status); }; }; then
10163 ac_header_compiler=yes
10164else
10165 echo "$as_me: failed program was:" >&5
10166cat conftest.$ac_ext >&5
10167ac_header_compiler=no
10168fi
10169rm -f conftest.$ac_objext conftest.$ac_ext
10170echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10171echo "${ECHO_T}$ac_header_compiler" >&6
10172
10173# Is the header present?
10174echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10175echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10176cat >conftest.$ac_ext <<_ACEOF
10177#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010178#include "confdefs.h"
10179#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010180_ACEOF
10181if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10182 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10183 ac_status=$?
10184 egrep -v '^ *\+' conftest.er1 >conftest.err
10185 rm -f conftest.er1
10186 cat conftest.err >&5
10187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10188 (exit $ac_status); } >/dev/null; then
10189 if test -s conftest.err; then
10190 ac_cpp_err=$ac_c_preproc_warn_flag
10191 else
10192 ac_cpp_err=
10193 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010194else
Martin v. Löwis11437992002-04-12 09:54:03 +000010195 ac_cpp_err=yes
10196fi
10197if test -z "$ac_cpp_err"; then
10198 ac_header_preproc=yes
10199else
10200 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010201 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010202 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010203fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010204rm -f conftest.err conftest.$ac_ext
10205echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10206echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010207
Martin v. Löwis11437992002-04-12 09:54:03 +000010208# So? What about this header?
10209case $ac_header_compiler:$ac_header_preproc in
10210 yes:no )
10211 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10212echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10213 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10214echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10215 no:yes )
10216 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10217echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10218 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10219echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10220 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10221echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10222esac
10223echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10224echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10225if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10226 echo $ECHO_N "(cached) $ECHO_C" >&6
10227else
10228 ac_cv_header_kernel_OS_h=$ac_header_preproc
10229fi
10230echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10231echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10232
10233fi
10234if test $ac_cv_header_kernel_OS_h = yes; then
10235 cat >>confdefs.h <<\_ACEOF
10236#define WITH_THREAD 1
10237_ACEOF
10238
10239
10240cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010241#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010242_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010243
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010244 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010245else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010246
Martin v. Löwis11437992002-04-12 09:54:03 +000010247 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10248echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10249if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10250 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010251else
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010253LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010254cat >conftest.$ac_ext <<_ACEOF
10255#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010256#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010257
Greg Steinadf63d62000-07-05 10:38:09 +000010258/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010259#ifdef __cplusplus
10260extern "C"
10261#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010262/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010263 builtin and then its argument prototype would still apply. */
10264char pthread_create ();
10265#ifdef F77_DUMMY_MAIN
10266# ifdef __cplusplus
10267 extern "C"
10268# endif
10269 int F77_DUMMY_MAIN() { return 1; }
10270#endif
10271int
10272main ()
10273{
10274pthread_create ();
10275 ;
10276 return 0;
10277}
10278_ACEOF
10279rm -f conftest.$ac_objext conftest$ac_exeext
10280if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10281 (eval $ac_link) 2>&5
10282 ac_status=$?
10283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10284 (exit $ac_status); } &&
10285 { ac_try='test -s conftest$ac_exeext'
10286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10287 (eval $ac_try) 2>&5
10288 ac_status=$?
10289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10290 (exit $ac_status); }; }; then
10291 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010292else
Martin v. Löwis11437992002-04-12 09:54:03 +000010293 echo "$as_me: failed program was:" >&5
10294cat conftest.$ac_ext >&5
10295ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010296fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010297rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10298LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010299fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010300echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10301echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10302if test $ac_cv_lib_pthreads_pthread_create = yes; then
10303 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010304#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010305_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010306
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010307 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010308 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010309 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010310else
Greg Steinadf63d62000-07-05 10:38:09 +000010311
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10313echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10314if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10315 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010316else
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010318LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010319cat >conftest.$ac_ext <<_ACEOF
10320#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010321#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010322
Guido van Rossum49545951997-12-02 19:28:29 +000010323/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010324#ifdef __cplusplus
10325extern "C"
10326#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010327/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010328 builtin and then its argument prototype would still apply. */
10329char pthread_create ();
10330#ifdef F77_DUMMY_MAIN
10331# ifdef __cplusplus
10332 extern "C"
10333# endif
10334 int F77_DUMMY_MAIN() { return 1; }
10335#endif
10336int
10337main ()
10338{
10339pthread_create ();
10340 ;
10341 return 0;
10342}
10343_ACEOF
10344rm -f conftest.$ac_objext conftest$ac_exeext
10345if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10346 (eval $ac_link) 2>&5
10347 ac_status=$?
10348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10349 (exit $ac_status); } &&
10350 { ac_try='test -s conftest$ac_exeext'
10351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10352 (eval $ac_try) 2>&5
10353 ac_status=$?
10354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10355 (exit $ac_status); }; }; then
10356 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010357else
Martin v. Löwis11437992002-04-12 09:54:03 +000010358 echo "$as_me: failed program was:" >&5
10359cat conftest.$ac_ext >&5
10360ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010361fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010362rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10363LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010364fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010365echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10366echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10367if test $ac_cv_lib_c_r_pthread_create = yes; then
10368 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010369#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010370_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010371
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010372 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010373 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010374 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010375else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010376
Martin v. Löwis11437992002-04-12 09:54:03 +000010377 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10378echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10379if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10380 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010381else
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010383LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010384cat >conftest.$ac_ext <<_ACEOF
10385#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010386#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010387
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010388/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010389#ifdef __cplusplus
10390extern "C"
10391#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010392/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010393 builtin and then its argument prototype would still apply. */
10394char __d6_pthread_create ();
10395#ifdef F77_DUMMY_MAIN
10396# ifdef __cplusplus
10397 extern "C"
10398# endif
10399 int F77_DUMMY_MAIN() { return 1; }
10400#endif
10401int
10402main ()
10403{
10404__d6_pthread_create ();
10405 ;
10406 return 0;
10407}
10408_ACEOF
10409rm -f conftest.$ac_objext conftest$ac_exeext
10410if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10411 (eval $ac_link) 2>&5
10412 ac_status=$?
10413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10414 (exit $ac_status); } &&
10415 { ac_try='test -s conftest$ac_exeext'
10416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10417 (eval $ac_try) 2>&5
10418 ac_status=$?
10419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10420 (exit $ac_status); }; }; then
10421 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010422else
Martin v. Löwis11437992002-04-12 09:54:03 +000010423 echo "$as_me: failed program was:" >&5
10424cat conftest.$ac_ext >&5
10425ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010426fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010427rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10428LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010429fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010430echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10431echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10432if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10433 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010434#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010435_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010436
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010437 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010438 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010439 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010440else
Guido van Rossum49545951997-12-02 19:28:29 +000010441
Martin v. Löwis11437992002-04-12 09:54:03 +000010442 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10443echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10444if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10445 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010446else
Martin v. Löwis11437992002-04-12 09:54:03 +000010447 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010448LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010449cat >conftest.$ac_ext <<_ACEOF
10450#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010451#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010452
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010453/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010454#ifdef __cplusplus
10455extern "C"
10456#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010457/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010458 builtin and then its argument prototype would still apply. */
10459char __pthread_create_system ();
10460#ifdef F77_DUMMY_MAIN
10461# ifdef __cplusplus
10462 extern "C"
10463# endif
10464 int F77_DUMMY_MAIN() { return 1; }
10465#endif
10466int
10467main ()
10468{
10469__pthread_create_system ();
10470 ;
10471 return 0;
10472}
10473_ACEOF
10474rm -f conftest.$ac_objext conftest$ac_exeext
10475if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10476 (eval $ac_link) 2>&5
10477 ac_status=$?
10478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10479 (exit $ac_status); } &&
10480 { ac_try='test -s conftest$ac_exeext'
10481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10482 (eval $ac_try) 2>&5
10483 ac_status=$?
10484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10485 (exit $ac_status); }; }; then
10486 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010487else
Martin v. Löwis11437992002-04-12 09:54:03 +000010488 echo "$as_me: failed program was:" >&5
10489cat conftest.$ac_ext >&5
10490ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010491fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010492rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10493LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010494fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010495echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10496echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10497if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10498 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010499#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010500_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010501
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010502 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010503 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010504 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010505else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010506
Martin v. Löwis11437992002-04-12 09:54:03 +000010507 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10508echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10509if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10510 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010511else
Martin v. Löwis11437992002-04-12 09:54:03 +000010512 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010513LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010514cat >conftest.$ac_ext <<_ACEOF
10515#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010516#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010517
Guido van Rossumb93a8621998-05-07 13:27:32 +000010518/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010519#ifdef __cplusplus
10520extern "C"
10521#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010522/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010523 builtin and then its argument prototype would still apply. */
10524char pthread_create ();
10525#ifdef F77_DUMMY_MAIN
10526# ifdef __cplusplus
10527 extern "C"
10528# endif
10529 int F77_DUMMY_MAIN() { return 1; }
10530#endif
10531int
10532main ()
10533{
10534pthread_create ();
10535 ;
10536 return 0;
10537}
10538_ACEOF
10539rm -f conftest.$ac_objext conftest$ac_exeext
10540if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10541 (eval $ac_link) 2>&5
10542 ac_status=$?
10543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10544 (exit $ac_status); } &&
10545 { ac_try='test -s conftest$ac_exeext'
10546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10547 (eval $ac_try) 2>&5
10548 ac_status=$?
10549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10550 (exit $ac_status); }; }; then
10551 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010552else
Martin v. Löwis11437992002-04-12 09:54:03 +000010553 echo "$as_me: failed program was:" >&5
10554cat conftest.$ac_ext >&5
10555ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010556fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010557rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10558LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010559fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010560echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10561echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10562if test $ac_cv_lib_cma_pthread_create = yes; then
10563 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010564#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010565_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010566
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010567 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010568 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010569 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010570else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010571
Martin v. Löwis130fb172001-07-19 11:00:41 +000010572 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010573fi
10574
Guido van Rossum627b2d71993-12-24 10:39:16 +000010575
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010576fi
10577
Guido van Rossum0be3e491997-05-22 20:33:33 +000010578fi
10579
Guido van Rossum49545951997-12-02 19:28:29 +000010580fi
10581
Guido van Rossumb93a8621998-05-07 13:27:32 +000010582fi
10583
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010584fi
10585
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010586
Michael W. Hudson54241132001-12-07 15:38:26 +000010587fi
10588
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010589
10590fi
10591
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010593rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10594fi;
10595fi
10596
10597
10598fi
10599
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010600
Michael W. Hudson54241132001-12-07 15:38:26 +000010601
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010602 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010603 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010604
10605cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010606#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010607_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010608
10609 fi
10610
Martin v. Löwis11437992002-04-12 09:54:03 +000010611 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10612echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10613 if test "${ac_cv_pthread_system_supported+set}" = set; then
10614 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010615else
10616 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010617 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010618else
Martin v. Löwis11437992002-04-12 09:54:03 +000010619 cat >conftest.$ac_ext <<_ACEOF
10620#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010621#include "confdefs.h"
10622#include <pthread.h>
10623 void *foo(void *parm) {
10624 return NULL;
10625 }
10626 main() {
10627 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010628 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010629 if (pthread_attr_init(&attr)) exit(-1);
10630 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010631 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010632 exit(0);
10633 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010634_ACEOF
10635rm -f conftest$ac_exeext
10636if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10637 (eval $ac_link) 2>&5
10638 ac_status=$?
10639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10640 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10642 (eval $ac_try) 2>&5
10643 ac_status=$?
10644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10645 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010646 ac_cv_pthread_system_supported=yes
10647else
Martin v. Löwis11437992002-04-12 09:54:03 +000010648 echo "$as_me: program exited with status $ac_status" >&5
10649echo "$as_me: failed program was:" >&5
10650cat conftest.$ac_ext >&5
10651( exit $ac_status )
10652ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010653fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010654rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010655fi
10656
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010657fi
10658
Martin v. Löwis11437992002-04-12 09:54:03 +000010659 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10660echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010661 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010662
10663cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010664#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010665_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010666
10667 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010668
10669for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010670do
Martin v. Löwis11437992002-04-12 09:54:03 +000010671as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10672echo "$as_me:$LINENO: checking for $ac_func" >&5
10673echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10674if eval "test \"\${$as_ac_var+set}\" = set"; then
10675 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010676else
Martin v. Löwis11437992002-04-12 09:54:03 +000010677 cat >conftest.$ac_ext <<_ACEOF
10678#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010679#include "confdefs.h"
10680/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010681 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010682#include <assert.h>
10683/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010684#ifdef __cplusplus
10685extern "C"
10686#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010687/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010688 builtin and then its argument prototype would still apply. */
10689char $ac_func ();
10690char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010691
Martin v. Löwis11437992002-04-12 09:54:03 +000010692#ifdef F77_DUMMY_MAIN
10693# ifdef __cplusplus
10694 extern "C"
10695# endif
10696 int F77_DUMMY_MAIN() { return 1; }
10697#endif
10698int
10699main ()
10700{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010701/* The GNU C library defines this for functions which it implements
10702 to always fail with ENOSYS. Some functions are actually named
10703 something starting with __ and the normal name is an alias. */
10704#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10705choke me
10706#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010707f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010708#endif
10709
Martin v. Löwis11437992002-04-12 09:54:03 +000010710 ;
10711 return 0;
10712}
10713_ACEOF
10714rm -f conftest.$ac_objext conftest$ac_exeext
10715if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10716 (eval $ac_link) 2>&5
10717 ac_status=$?
10718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10719 (exit $ac_status); } &&
10720 { ac_try='test -s conftest$ac_exeext'
10721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10722 (eval $ac_try) 2>&5
10723 ac_status=$?
10724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10725 (exit $ac_status); }; }; then
10726 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010727else
Martin v. Löwis11437992002-04-12 09:54:03 +000010728 echo "$as_me: failed program was:" >&5
10729cat conftest.$ac_ext >&5
10730eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010731fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010732rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010733fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010734echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10735echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10736if test `eval echo '${'$as_ac_var'}'` = yes; then
10737 cat >>confdefs.h <<_ACEOF
10738#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10739_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010740
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010741fi
10742done
10743
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010744 fi
10745
Martin v. Löwis11437992002-04-12 09:54:03 +000010746 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10747echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10748if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10749 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010750else
Martin v. Löwis11437992002-04-12 09:54:03 +000010751 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010752LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010753cat >conftest.$ac_ext <<_ACEOF
10754#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010755#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010756
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010757/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010758#ifdef __cplusplus
10759extern "C"
10760#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010761/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010762 builtin and then its argument prototype would still apply. */
10763char usconfig ();
10764#ifdef F77_DUMMY_MAIN
10765# ifdef __cplusplus
10766 extern "C"
10767# endif
10768 int F77_DUMMY_MAIN() { return 1; }
10769#endif
10770int
10771main ()
10772{
10773usconfig ();
10774 ;
10775 return 0;
10776}
10777_ACEOF
10778rm -f conftest.$ac_objext conftest$ac_exeext
10779if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10780 (eval $ac_link) 2>&5
10781 ac_status=$?
10782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10783 (exit $ac_status); } &&
10784 { ac_try='test -s conftest$ac_exeext'
10785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10786 (eval $ac_try) 2>&5
10787 ac_status=$?
10788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10789 (exit $ac_status); }; }; then
10790 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010791else
Martin v. Löwis11437992002-04-12 09:54:03 +000010792 echo "$as_me: failed program was:" >&5
10793cat conftest.$ac_ext >&5
10794ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010795fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010796rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10797LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010798fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010799echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10800echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10801if test $ac_cv_lib_mpc_usconfig = yes; then
10802 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010803#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010804_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010805
Martin v. Löwis130fb172001-07-19 11:00:41 +000010806 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010807 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010808 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010809fi
10810
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010811
Martin v. Löwis11437992002-04-12 09:54:03 +000010812 if test $posix_threads != "yes"; then
10813 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10814echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10815if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10816 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010817else
Martin v. Löwis11437992002-04-12 09:54:03 +000010818 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010819LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010820cat >conftest.$ac_ext <<_ACEOF
10821#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010822#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010823
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010824/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010825#ifdef __cplusplus
10826extern "C"
10827#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010828/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010829 builtin and then its argument prototype would still apply. */
10830char thr_create ();
10831#ifdef F77_DUMMY_MAIN
10832# ifdef __cplusplus
10833 extern "C"
10834# endif
10835 int F77_DUMMY_MAIN() { return 1; }
10836#endif
10837int
10838main ()
10839{
10840thr_create ();
10841 ;
10842 return 0;
10843}
10844_ACEOF
10845rm -f conftest.$ac_objext conftest$ac_exeext
10846if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10847 (eval $ac_link) 2>&5
10848 ac_status=$?
10849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10850 (exit $ac_status); } &&
10851 { ac_try='test -s conftest$ac_exeext'
10852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10853 (eval $ac_try) 2>&5
10854 ac_status=$?
10855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10856 (exit $ac_status); }; }; then
10857 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010858else
Martin v. Löwis11437992002-04-12 09:54:03 +000010859 echo "$as_me: failed program was:" >&5
10860cat conftest.$ac_ext >&5
10861ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010862fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010863rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10864LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010865fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010866echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10867echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10868if test $ac_cv_lib_thread_thr_create = yes; then
10869 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010870#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010871_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010872
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010873 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010874 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010875 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010876fi
10877
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010878 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010879
Martin v. Löwis130fb172001-07-19 11:00:41 +000010880 if test "$USE_THREAD_MODULE" != "#"
10881 then
10882 # If the above checks didn't disable threads, (at least) OSF1
10883 # needs this '-threads' argument during linking.
10884 case $ac_sys_system in
10885 OSF1) LDLAST=-threads;;
10886 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010887 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010888
10889 if test "$posix_threads" = yes -a \
10890 "$ac_sys_system" = "SunOS" -a \
10891 "$ac_sys_release" = "5.6"; then
10892
10893cat >>confdefs.h <<\_ACEOF
10894#define HAVE_PTHREAD_DESTRUCTOR 1
10895_ACEOF
10896
10897 fi
10898
Guido van Rossum627b2d71993-12-24 10:39:16 +000010899fi
10900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010901# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010902
10903
10904echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10905echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010906# Check whether --enable-ipv6 or --disable-ipv6 was given.
10907if test "${enable_ipv6+set}" = set; then
10908 enableval="$enable_ipv6"
10909 case "$enableval" in
10910 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010911 echo "$as_me:$LINENO: result: no" >&5
10912echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010913 ipv6=no
10914 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010915 *) echo "$as_me:$LINENO: result: yes" >&5
10916echo "${ECHO_T}yes" >&6
10917 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010918#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010919_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010920
10921 ipv6=yes
10922 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010923 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010924else
Martin v. Löwis11437992002-04-12 09:54:03 +000010925
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010926 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010927 echo "$as_me:$LINENO: result: no" >&5
10928echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010929 ipv6=no
10930
10931else
Martin v. Löwis11437992002-04-12 09:54:03 +000010932 cat >conftest.$ac_ext <<_ACEOF
10933#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010934#include "confdefs.h"
10935 /* AF_INET6 available check */
10936#include <sys/types.h>
10937#include <sys/socket.h>
10938main()
10939{
10940 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10941 exit(1);
10942 else
10943 exit(0);
10944}
10945
Martin v. Löwis11437992002-04-12 09:54:03 +000010946_ACEOF
10947rm -f conftest$ac_exeext
10948if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10949 (eval $ac_link) 2>&5
10950 ac_status=$?
10951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10952 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10954 (eval $ac_try) 2>&5
10955 ac_status=$?
10956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10957 (exit $ac_status); }; }; then
10958 echo "$as_me:$LINENO: result: yes" >&5
10959echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010960 ipv6=yes
10961else
Martin v. Löwis11437992002-04-12 09:54:03 +000010962 echo "$as_me: program exited with status $ac_status" >&5
10963echo "$as_me: failed program was:" >&5
10964cat conftest.$ac_ext >&5
10965( exit $ac_status )
10966echo "$as_me:$LINENO: result: no" >&5
10967echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010968 ipv6=no
10969fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010970rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010971fi
10972
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010973if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010974 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10975echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10976 cat >conftest.$ac_ext <<_ACEOF
10977#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010978#include "confdefs.h"
10979#include <sys/types.h>
10980#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010981#ifdef F77_DUMMY_MAIN
10982# ifdef __cplusplus
10983 extern "C"
10984# endif
10985 int F77_DUMMY_MAIN() { return 1; }
10986#endif
10987int
10988main ()
10989{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010990struct sockaddr_in6 x;
10991x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010992 ;
10993 return 0;
10994}
10995_ACEOF
10996rm -f conftest.$ac_objext
10997if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10998 (eval $ac_compile) 2>&5
10999 ac_status=$?
11000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11001 (exit $ac_status); } &&
11002 { ac_try='test -s conftest.$ac_objext'
11003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11004 (eval $ac_try) 2>&5
11005 ac_status=$?
11006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11007 (exit $ac_status); }; }; then
11008 echo "$as_me:$LINENO: result: yes" >&5
11009echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011010 ipv6=yes
11011else
Martin v. Löwis11437992002-04-12 09:54:03 +000011012 echo "$as_me: failed program was:" >&5
11013cat conftest.$ac_ext >&5
11014echo "$as_me:$LINENO: result: no" >&5
11015echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011016 ipv6=no
11017fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011018rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011019fi
11020
11021if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011022 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011023#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011024_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011025
11026fi
11027
Martin v. Löwis11437992002-04-12 09:54:03 +000011028fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011029
11030ipv6type=unknown
11031ipv6lib=none
11032ipv6trylibc=no
11033
11034if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011035 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11036echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011037 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11038 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011039 case $i in
11040 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011041 cat >conftest.$ac_ext <<_ACEOF
11042#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011043#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011044
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011045#include <netinet/in.h>
11046#ifdef IPV6_INRIA_VERSION
11047yes
11048#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011049_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011050if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11051 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011052 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011053fi
11054rm -f conftest*
11055
11056 ;;
11057 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011058 cat >conftest.$ac_ext <<_ACEOF
11059#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011060#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011061
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011062#include <netinet/in.h>
11063#ifdef __KAME__
11064yes
11065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011066_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011067if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11068 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011069 ipv6type=$i;
11070 ipv6lib=inet6
11071 ipv6libdir=/usr/local/v6/lib
11072 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011073fi
11074rm -f conftest*
11075
11076 ;;
11077 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011078 cat >conftest.$ac_ext <<_ACEOF
11079#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011080#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011081
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011082#include <features.h>
11083#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11084yes
11085#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011086_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011087if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11088 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011089 ipv6type=$i;
11090 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011091fi
11092rm -f conftest*
11093
11094 ;;
11095 linux-inet6)
11096 if test -d /usr/inet6; then
11097 ipv6type=$i
11098 ipv6lib=inet6
11099 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011100 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011101 fi
11102 ;;
11103 solaris)
11104 if test -f /etc/netconfig; then
11105 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11106 ipv6type=$i
11107 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011108 fi
11109 fi
11110 ;;
11111 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011112 cat >conftest.$ac_ext <<_ACEOF
11113#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011114#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011115
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011116#include <sys/param.h>
11117#ifdef _TOSHIBA_INET6
11118yes
11119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011120_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011121if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11122 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011123 ipv6type=$i;
11124 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011125 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011126fi
11127rm -f conftest*
11128
11129 ;;
11130 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011131 cat >conftest.$ac_ext <<_ACEOF
11132#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011133#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011134
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011135#include </usr/local/v6/include/sys/v6config.h>
11136#ifdef __V6D__
11137yes
11138#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011139_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011140if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11141 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011142 ipv6type=$i;
11143 ipv6lib=v6;
11144 ipv6libdir=/usr/local/v6/lib;
11145 OPT="-I/usr/local/v6/include $OPT"
11146fi
11147rm -f conftest*
11148
11149 ;;
11150 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011151 cat >conftest.$ac_ext <<_ACEOF
11152#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011153#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011154
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011155#include <sys/param.h>
11156#ifdef _ZETA_MINAMI_INET6
11157yes
11158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011159_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11161 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011162 ipv6type=$i;
11163 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011164 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011165fi
11166rm -f conftest*
11167
11168 ;;
11169 esac
11170 if test "$ipv6type" != "unknown"; then
11171 break
11172 fi
11173 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011174 echo "$as_me:$LINENO: result: $ipv6type" >&5
11175echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011176fi
11177
11178if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11179 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11180 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11181 echo "using lib$ipv6lib"
11182 else
11183 if test $ipv6trylibc = "yes"; then
11184 echo "using libc"
11185 else
11186 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11187 echo "You need to fetch lib$ipv6lib.a from appropriate"
11188 echo 'ipv6 kit and compile beforehand.'
11189 exit 1
11190 fi
11191 fi
11192fi
11193
Jack Jansen7b8c7542002-04-14 20:12:41 +000011194# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011195echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11196echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011197
11198# Check whether --with-universal-newlines or --without-universal-newlines was given.
11199if test "${with_universal_newlines+set}" = set; then
11200 withval="$with_universal_newlines"
11201
11202fi;
11203
11204if test -z "$with_universal_newlines"
11205then with_universal_newlines="yes"
11206fi
11207if test "$with_universal_newlines" != "no"
11208then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011209
11210cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011211#define WITH_UNIVERSAL_NEWLINES 1
11212_ACEOF
11213
11214fi
11215echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11216echo "${ECHO_T}$with_universal_newlines" >&6
11217
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011218# Check for --with-doc-strings
11219echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11220echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11221
11222# Check whether --with-doc-strings or --without-doc-strings was given.
11223if test "${with_doc_strings+set}" = set; then
11224 withval="$with_doc_strings"
11225
11226fi;
11227
11228if test -z "$with_doc_strings"
11229then with_doc_strings="yes"
11230fi
11231if test "$with_doc_strings" != "no"
11232then
11233
11234cat >>confdefs.h <<\_ACEOF
11235#define WITH_DOC_STRINGS 1
11236_ACEOF
11237
11238fi
11239echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11240echo "${ECHO_T}$with_doc_strings" >&6
11241
Neil Schemenauera35c6882001-02-27 04:45:05 +000011242# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011243echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11244echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11245
Neil Schemenauera35c6882001-02-27 04:45:05 +000011246# Check whether --with-pymalloc or --without-pymalloc was given.
11247if test "${with_pymalloc+set}" = set; then
11248 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011249
Martin v. Löwis11437992002-04-12 09:54:03 +000011250fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011251
Neil Schemenauer16c22972002-03-22 15:34:49 +000011252if test -z "$with_pymalloc"
11253then with_pymalloc="yes"
11254fi
11255if test "$with_pymalloc" != "no"
11256then
Martin v. Löwis11437992002-04-12 09:54:03 +000011257
11258cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011259#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011260_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011261
11262fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011263echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11264echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011265
Barry Warsawef82cd72000-06-30 16:21:01 +000011266# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011267echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11268echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11269
Barry Warsawef82cd72000-06-30 16:21:01 +000011270# Check whether --with-wctype-functions or --without-wctype-functions was given.
11271if test "${with_wctype_functions+set}" = set; then
11272 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011273
Barry Warsawef82cd72000-06-30 16:21:01 +000011274if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011275then
11276
11277cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011278#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011279_ACEOF
11280
11281 echo "$as_me:$LINENO: result: yes" >&5
11282echo "${ECHO_T}yes" >&6
11283else echo "$as_me:$LINENO: result: no" >&5
11284echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011285fi
11286else
Martin v. Löwis11437992002-04-12 09:54:03 +000011287 echo "$as_me:$LINENO: result: no" >&5
11288echo "${ECHO_T}no" >&6
11289fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011290
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011291# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011292
Guido van Rossum98935bf2001-09-05 19:13:16 +000011293DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011294
Martin v. Löwis11437992002-04-12 09:54:03 +000011295echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11296echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11297
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011298# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011299if test "${with_sgi_dl+set}" = set; then
11300 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011301
11302echo "$as_me:$LINENO: result: $withval" >&5
11303echo "${ECHO_T}$withval" >&6
11304
11305cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011306#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011307_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011308
Guido van Rossume97ee181999-12-20 21:27:22 +000011309DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011310dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011311if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011312then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011313else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11314echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11315 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011316fi
11317DLINCLDIR=${dldir}
11318LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011319else
Martin v. Löwis11437992002-04-12 09:54:03 +000011320 echo "$as_me:$LINENO: result: no" >&5
11321echo "${ECHO_T}no" >&6
11322fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011323
Martin v. Löwis11437992002-04-12 09:54:03 +000011324echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11325echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011326
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011327# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011328if test "${with_dl_dld+set}" = set; then
11329 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011330
11331echo "$as_me:$LINENO: result: $withval" >&5
11332echo "${ECHO_T}$withval" >&6
11333
11334cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011335#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011336_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011337
Guido van Rossume97ee181999-12-20 21:27:22 +000011338DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011339dldir=`echo "$withval" | sed 's/,.*//'`
11340dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011341if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011342then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011343else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11344echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11345 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011346fi
11347DLINCLDIR=${dldir}
11348LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011349else
Martin v. Löwis11437992002-04-12 09:54:03 +000011350 echo "$as_me:$LINENO: result: no" >&5
11351echo "${ECHO_T}no" >&6
11352fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011353
Guido van Rossume97ee181999-12-20 21:27:22 +000011354# the dlopen() function means we might want to use dynload_shlib.o. some
11355# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011356
Thomas Wouters3a584202000-08-05 23:28:51 +000011357for ac_func in dlopen
11358do
Martin v. Löwis11437992002-04-12 09:54:03 +000011359as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11360echo "$as_me:$LINENO: checking for $ac_func" >&5
11361echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11362if eval "test \"\${$as_ac_var+set}\" = set"; then
11363 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011364else
Martin v. Löwis11437992002-04-12 09:54:03 +000011365 cat >conftest.$ac_ext <<_ACEOF
11366#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011367#include "confdefs.h"
11368/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011369 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011370#include <assert.h>
11371/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011372#ifdef __cplusplus
11373extern "C"
11374#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011375/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011376 builtin and then its argument prototype would still apply. */
11377char $ac_func ();
11378char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011379
Martin v. Löwis11437992002-04-12 09:54:03 +000011380#ifdef F77_DUMMY_MAIN
11381# ifdef __cplusplus
11382 extern "C"
11383# endif
11384 int F77_DUMMY_MAIN() { return 1; }
11385#endif
11386int
11387main ()
11388{
Guido van Rossume97ee181999-12-20 21:27:22 +000011389/* The GNU C library defines this for functions which it implements
11390 to always fail with ENOSYS. Some functions are actually named
11391 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011392#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011393choke me
11394#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011395f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011396#endif
11397
Martin v. Löwis11437992002-04-12 09:54:03 +000011398 ;
11399 return 0;
11400}
11401_ACEOF
11402rm -f conftest.$ac_objext conftest$ac_exeext
11403if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11404 (eval $ac_link) 2>&5
11405 ac_status=$?
11406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11407 (exit $ac_status); } &&
11408 { ac_try='test -s conftest$ac_exeext'
11409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11410 (eval $ac_try) 2>&5
11411 ac_status=$?
11412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11413 (exit $ac_status); }; }; then
11414 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011415else
Martin v. Löwis11437992002-04-12 09:54:03 +000011416 echo "$as_me: failed program was:" >&5
11417cat conftest.$ac_ext >&5
11418eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011419fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011420rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011421fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011422echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11423echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11424if test `eval echo '${'$as_ac_var'}'` = yes; then
11425 cat >>confdefs.h <<_ACEOF
11426#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11427_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011428
Guido van Rossume97ee181999-12-20 21:27:22 +000011429fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011430done
Guido van Rossume97ee181999-12-20 21:27:22 +000011431
Michael W. Hudson54241132001-12-07 15:38:26 +000011432
Guido van Rossume97ee181999-12-20 21:27:22 +000011433# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11434# loading of modules.
11435
Martin v. Löwis11437992002-04-12 09:54:03 +000011436echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11437echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011438if test -z "$DYNLOADFILE"
11439then
11440 case $ac_sys_system/$ac_sys_release in
11441 AIX*) DYNLOADFILE="dynload_aix.o";;
11442 BeOS*) DYNLOADFILE="dynload_beos.o";;
11443 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011444 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011445 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011446 *)
11447 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11448 # out any dynamic loading
11449 if test "$ac_cv_func_dlopen" = yes
11450 then DYNLOADFILE="dynload_shlib.o"
11451 else DYNLOADFILE="dynload_stub.o"
11452 fi
11453 ;;
11454 esac
11455fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011456echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11457echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011458if test "$DYNLOADFILE" != "dynload_stub.o"
11459then
Martin v. Löwis11437992002-04-12 09:54:03 +000011460
11461cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011462#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011463_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011464
11465fi
11466
Neil Schemenauer4e425612001-06-19 15:44:15 +000011467# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11468
Michael W. Hudson54241132001-12-07 15:38:26 +000011469
Martin v. Löwis11437992002-04-12 09:54:03 +000011470echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11471echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011472if test -z "$MACHDEP_OBJS"
11473then
Jack Jansene578a632001-08-15 01:27:14 +000011474 MACHDEP_OBJS=$extra_machdep_objs
11475else
11476 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011477fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011478echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11479echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011480
Guido van Rossum627b2d71993-12-24 10:39:16 +000011481# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011555
Fred Drake6b3cc522002-04-15 19:20:27 +000011556
Jack Jansen0b06be72002-06-21 14:48:38 +000011557
Martin v. Löwis0cec0ff2002-07-28 16:33:45 +000011558
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011559
Martin v. Löwis244edc82001-10-04 22:44:26 +000011560for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011561 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011562 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwis0cec0ff2002-07-28 16:33:45 +000011563 hstrerror inet_pton kill killpg lchown link lstat mkfifo mknod mktime \
11564 mremap nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011565 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011566 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011567 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011568 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011569 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011570 truncate uname unsetenv utimes waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011571do
Martin v. Löwis11437992002-04-12 09:54:03 +000011572as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11573echo "$as_me:$LINENO: checking for $ac_func" >&5
11574echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11575if eval "test \"\${$as_ac_var+set}\" = set"; then
11576 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011577else
Martin v. Löwis11437992002-04-12 09:54:03 +000011578 cat >conftest.$ac_ext <<_ACEOF
11579#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011580#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011581/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011582 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011583#include <assert.h>
11584/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011585#ifdef __cplusplus
11586extern "C"
11587#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011588/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011589 builtin and then its argument prototype would still apply. */
11590char $ac_func ();
11591char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011592
Martin v. Löwis11437992002-04-12 09:54:03 +000011593#ifdef F77_DUMMY_MAIN
11594# ifdef __cplusplus
11595 extern "C"
11596# endif
11597 int F77_DUMMY_MAIN() { return 1; }
11598#endif
11599int
11600main ()
11601{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011602/* The GNU C library defines this for functions which it implements
11603 to always fail with ENOSYS. Some functions are actually named
11604 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011605#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011606choke me
11607#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011608f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011609#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011610
Martin v. Löwis11437992002-04-12 09:54:03 +000011611 ;
11612 return 0;
11613}
11614_ACEOF
11615rm -f conftest.$ac_objext conftest$ac_exeext
11616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11617 (eval $ac_link) 2>&5
11618 ac_status=$?
11619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11620 (exit $ac_status); } &&
11621 { ac_try='test -s conftest$ac_exeext'
11622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11623 (eval $ac_try) 2>&5
11624 ac_status=$?
11625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11626 (exit $ac_status); }; }; then
11627 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011628else
Martin v. Löwis11437992002-04-12 09:54:03 +000011629 echo "$as_me: failed program was:" >&5
11630cat conftest.$ac_ext >&5
11631eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011632fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011633rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011634fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011635echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11636echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11637if test `eval echo '${'$as_ac_var'}'` = yes; then
11638 cat >>confdefs.h <<_ACEOF
11639#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11640_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011641
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011642fi
11643done
11644
Michael W. Hudson54241132001-12-07 15:38:26 +000011645
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011646# check for openpty and forkpty
11647
Martin v. Löwis11437992002-04-12 09:54:03 +000011648
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011649for ac_func in openpty
11650do
Martin v. Löwis11437992002-04-12 09:54:03 +000011651as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11652echo "$as_me:$LINENO: checking for $ac_func" >&5
11653echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11654if eval "test \"\${$as_ac_var+set}\" = set"; then
11655 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011656else
Martin v. Löwis11437992002-04-12 09:54:03 +000011657 cat >conftest.$ac_ext <<_ACEOF
11658#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011659#include "confdefs.h"
11660/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011661 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011662#include <assert.h>
11663/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011664#ifdef __cplusplus
11665extern "C"
11666#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011667/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011668 builtin and then its argument prototype would still apply. */
11669char $ac_func ();
11670char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011671
Martin v. Löwis11437992002-04-12 09:54:03 +000011672#ifdef F77_DUMMY_MAIN
11673# ifdef __cplusplus
11674 extern "C"
11675# endif
11676 int F77_DUMMY_MAIN() { return 1; }
11677#endif
11678int
11679main ()
11680{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011681/* The GNU C library defines this for functions which it implements
11682 to always fail with ENOSYS. Some functions are actually named
11683 something starting with __ and the normal name is an alias. */
11684#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11685choke me
11686#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011687f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011688#endif
11689
Martin v. Löwis11437992002-04-12 09:54:03 +000011690 ;
11691 return 0;
11692}
11693_ACEOF
11694rm -f conftest.$ac_objext conftest$ac_exeext
11695if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11696 (eval $ac_link) 2>&5
11697 ac_status=$?
11698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11699 (exit $ac_status); } &&
11700 { ac_try='test -s conftest$ac_exeext'
11701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11702 (eval $ac_try) 2>&5
11703 ac_status=$?
11704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11705 (exit $ac_status); }; }; then
11706 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011707else
Martin v. Löwis11437992002-04-12 09:54:03 +000011708 echo "$as_me: failed program was:" >&5
11709cat conftest.$ac_ext >&5
11710eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011711fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011712rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011713fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011714echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11715echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11716if test `eval echo '${'$as_ac_var'}'` = yes; then
11717 cat >>confdefs.h <<_ACEOF
11718#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11719_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011720
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011721else
Martin v. Löwis11437992002-04-12 09:54:03 +000011722 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11723echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11724if test "${ac_cv_lib_util_openpty+set}" = set; then
11725 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011726else
Martin v. Löwis11437992002-04-12 09:54:03 +000011727 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011728LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011729cat >conftest.$ac_ext <<_ACEOF
11730#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011731#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011732
Fred Drake8cef4cf2000-06-28 16:40:38 +000011733/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011734#ifdef __cplusplus
11735extern "C"
11736#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011737/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011738 builtin and then its argument prototype would still apply. */
11739char openpty ();
11740#ifdef F77_DUMMY_MAIN
11741# ifdef __cplusplus
11742 extern "C"
11743# endif
11744 int F77_DUMMY_MAIN() { return 1; }
11745#endif
11746int
11747main ()
11748{
11749openpty ();
11750 ;
11751 return 0;
11752}
11753_ACEOF
11754rm -f conftest.$ac_objext conftest$ac_exeext
11755if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11756 (eval $ac_link) 2>&5
11757 ac_status=$?
11758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11759 (exit $ac_status); } &&
11760 { ac_try='test -s conftest$ac_exeext'
11761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11762 (eval $ac_try) 2>&5
11763 ac_status=$?
11764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11765 (exit $ac_status); }; }; then
11766 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011767else
Martin v. Löwis11437992002-04-12 09:54:03 +000011768 echo "$as_me: failed program was:" >&5
11769cat conftest.$ac_ext >&5
11770ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011771fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011772rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11773LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011774fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011775echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11776echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11777if test $ac_cv_lib_util_openpty = yes; then
11778 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011779#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011780_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011781 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011782fi
11783
11784fi
11785done
11786
Martin v. Löwis11437992002-04-12 09:54:03 +000011787
Fred Drake8cef4cf2000-06-28 16:40:38 +000011788for ac_func in forkpty
11789do
Martin v. Löwis11437992002-04-12 09:54:03 +000011790as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11791echo "$as_me:$LINENO: checking for $ac_func" >&5
11792echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11793if eval "test \"\${$as_ac_var+set}\" = set"; then
11794 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011795else
Martin v. Löwis11437992002-04-12 09:54:03 +000011796 cat >conftest.$ac_ext <<_ACEOF
11797#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011798#include "confdefs.h"
11799/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011800 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011801#include <assert.h>
11802/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011803#ifdef __cplusplus
11804extern "C"
11805#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011806/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011807 builtin and then its argument prototype would still apply. */
11808char $ac_func ();
11809char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011810
Martin v. Löwis11437992002-04-12 09:54:03 +000011811#ifdef F77_DUMMY_MAIN
11812# ifdef __cplusplus
11813 extern "C"
11814# endif
11815 int F77_DUMMY_MAIN() { return 1; }
11816#endif
11817int
11818main ()
11819{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011820/* The GNU C library defines this for functions which it implements
11821 to always fail with ENOSYS. Some functions are actually named
11822 something starting with __ and the normal name is an alias. */
11823#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11824choke me
11825#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011826f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011827#endif
11828
Martin v. Löwis11437992002-04-12 09:54:03 +000011829 ;
11830 return 0;
11831}
11832_ACEOF
11833rm -f conftest.$ac_objext conftest$ac_exeext
11834if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11835 (eval $ac_link) 2>&5
11836 ac_status=$?
11837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11838 (exit $ac_status); } &&
11839 { ac_try='test -s conftest$ac_exeext'
11840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11841 (eval $ac_try) 2>&5
11842 ac_status=$?
11843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11844 (exit $ac_status); }; }; then
11845 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011846else
Martin v. Löwis11437992002-04-12 09:54:03 +000011847 echo "$as_me: failed program was:" >&5
11848cat conftest.$ac_ext >&5
11849eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011850fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011851rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011852fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011853echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11854echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11855if test `eval echo '${'$as_ac_var'}'` = yes; then
11856 cat >>confdefs.h <<_ACEOF
11857#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11858_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011859
Fred Drake8cef4cf2000-06-28 16:40:38 +000011860else
Martin v. Löwis11437992002-04-12 09:54:03 +000011861 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11862echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11863if test "${ac_cv_lib_util_forkpty+set}" = set; then
11864 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011865else
Martin v. Löwis11437992002-04-12 09:54:03 +000011866 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011867LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011868cat >conftest.$ac_ext <<_ACEOF
11869#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011870#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011871
Fred Drake8cef4cf2000-06-28 16:40:38 +000011872/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011873#ifdef __cplusplus
11874extern "C"
11875#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011876/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011877 builtin and then its argument prototype would still apply. */
11878char forkpty ();
11879#ifdef F77_DUMMY_MAIN
11880# ifdef __cplusplus
11881 extern "C"
11882# endif
11883 int F77_DUMMY_MAIN() { return 1; }
11884#endif
11885int
11886main ()
11887{
11888forkpty ();
11889 ;
11890 return 0;
11891}
11892_ACEOF
11893rm -f conftest.$ac_objext conftest$ac_exeext
11894if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11895 (eval $ac_link) 2>&5
11896 ac_status=$?
11897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11898 (exit $ac_status); } &&
11899 { ac_try='test -s conftest$ac_exeext'
11900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11901 (eval $ac_try) 2>&5
11902 ac_status=$?
11903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11904 (exit $ac_status); }; }; then
11905 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011906else
Martin v. Löwis11437992002-04-12 09:54:03 +000011907 echo "$as_me: failed program was:" >&5
11908cat conftest.$ac_ext >&5
11909ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011910fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011911rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11912LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011913fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011914echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11915echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11916if test $ac_cv_lib_util_forkpty = yes; then
11917 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011918#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011919_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011920 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011921fi
11922
11923fi
11924done
11925
Jack Jansendd19cf82001-12-06 22:36:17 +000011926
Michael W. Hudson54241132001-12-07 15:38:26 +000011927# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011928
11929
11930
11931
11932
11933
Fred Drake8cef4cf2000-06-28 16:40:38 +000011934for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11935do
Martin v. Löwis11437992002-04-12 09:54:03 +000011936as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11937echo "$as_me:$LINENO: checking for $ac_func" >&5
11938echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11939if eval "test \"\${$as_ac_var+set}\" = set"; then
11940 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011941else
Martin v. Löwis11437992002-04-12 09:54:03 +000011942 cat >conftest.$ac_ext <<_ACEOF
11943#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011944#include "confdefs.h"
11945/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011946 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011947#include <assert.h>
11948/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011949#ifdef __cplusplus
11950extern "C"
11951#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011952/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011953 builtin and then its argument prototype would still apply. */
11954char $ac_func ();
11955char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011956
Martin v. Löwis11437992002-04-12 09:54:03 +000011957#ifdef F77_DUMMY_MAIN
11958# ifdef __cplusplus
11959 extern "C"
11960# endif
11961 int F77_DUMMY_MAIN() { return 1; }
11962#endif
11963int
11964main ()
11965{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011966/* The GNU C library defines this for functions which it implements
11967 to always fail with ENOSYS. Some functions are actually named
11968 something starting with __ and the normal name is an alias. */
11969#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11970choke me
11971#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011972f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011973#endif
11974
Martin v. Löwis11437992002-04-12 09:54:03 +000011975 ;
11976 return 0;
11977}
11978_ACEOF
11979rm -f conftest.$ac_objext conftest$ac_exeext
11980if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11981 (eval $ac_link) 2>&5
11982 ac_status=$?
11983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11984 (exit $ac_status); } &&
11985 { ac_try='test -s conftest$ac_exeext'
11986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11987 (eval $ac_try) 2>&5
11988 ac_status=$?
11989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11990 (exit $ac_status); }; }; then
11991 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011992else
Martin v. Löwis11437992002-04-12 09:54:03 +000011993 echo "$as_me: failed program was:" >&5
11994cat conftest.$ac_ext >&5
11995eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011996fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011997rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011998fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011999echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12000echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12001if test `eval echo '${'$as_ac_var'}'` = yes; then
12002 cat >>confdefs.h <<_ACEOF
12003#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12004_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012005
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012006fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012007done
12008
Michael W. Hudson54241132001-12-07 15:38:26 +000012009
Martin v. Löwis11437992002-04-12 09:54:03 +000012010
12011
12012
12013
12014
Martin v. Löwis1142de32002-03-29 16:28:31 +000012015for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000012016do
Martin v. Löwis11437992002-04-12 09:54:03 +000012017as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12018echo "$as_me:$LINENO: checking for $ac_func" >&5
12019echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12020if eval "test \"\${$as_ac_var+set}\" = set"; then
12021 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012022else
Martin v. Löwis11437992002-04-12 09:54:03 +000012023 cat >conftest.$ac_ext <<_ACEOF
12024#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012025#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012026/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012027 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012028#include <assert.h>
12029/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012030#ifdef __cplusplus
12031extern "C"
12032#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012033/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012034 builtin and then its argument prototype would still apply. */
12035char $ac_func ();
12036char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012037
Martin v. Löwis11437992002-04-12 09:54:03 +000012038#ifdef F77_DUMMY_MAIN
12039# ifdef __cplusplus
12040 extern "C"
12041# endif
12042 int F77_DUMMY_MAIN() { return 1; }
12043#endif
12044int
12045main ()
12046{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012047/* The GNU C library defines this for functions which it implements
12048 to always fail with ENOSYS. Some functions are actually named
12049 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012050#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012051choke me
12052#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012053f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012054#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012055
Martin v. Löwis11437992002-04-12 09:54:03 +000012056 ;
12057 return 0;
12058}
12059_ACEOF
12060rm -f conftest.$ac_objext conftest$ac_exeext
12061if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12062 (eval $ac_link) 2>&5
12063 ac_status=$?
12064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12065 (exit $ac_status); } &&
12066 { ac_try='test -s conftest$ac_exeext'
12067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12068 (eval $ac_try) 2>&5
12069 ac_status=$?
12070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12071 (exit $ac_status); }; }; then
12072 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012073else
Martin v. Löwis11437992002-04-12 09:54:03 +000012074 echo "$as_me: failed program was:" >&5
12075cat conftest.$ac_ext >&5
12076eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012077fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012078rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000012079fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012080echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12081echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12082if test `eval echo '${'$as_ac_var'}'` = yes; then
12083 cat >>confdefs.h <<_ACEOF
12084#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12085_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000012086
Martin v. Löwis1142de32002-03-29 16:28:31 +000012087else
Martin v. Löwis11437992002-04-12 09:54:03 +000012088 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012089fi
12090done
12091
12092
Martin v. Löwis11437992002-04-12 09:54:03 +000012093
Martin v. Löwis1142de32002-03-29 16:28:31 +000012094for ac_func in getpgrp
12095do
Martin v. Löwis11437992002-04-12 09:54:03 +000012096as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12097echo "$as_me:$LINENO: checking for $ac_func" >&5
12098echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12099if eval "test \"\${$as_ac_var+set}\" = set"; then
12100 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000012101else
Martin v. Löwis11437992002-04-12 09:54:03 +000012102 cat >conftest.$ac_ext <<_ACEOF
12103#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012104#include "confdefs.h"
12105/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000012107#include <assert.h>
12108/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012109#ifdef __cplusplus
12110extern "C"
12111#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012112/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012113 builtin and then its argument prototype would still apply. */
12114char $ac_func ();
12115char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012116
Martin v. Löwis11437992002-04-12 09:54:03 +000012117#ifdef F77_DUMMY_MAIN
12118# ifdef __cplusplus
12119 extern "C"
12120# endif
12121 int F77_DUMMY_MAIN() { return 1; }
12122#endif
12123int
12124main ()
12125{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012126/* The GNU C library defines this for functions which it implements
12127 to always fail with ENOSYS. Some functions are actually named
12128 something starting with __ and the normal name is an alias. */
12129#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12130choke me
12131#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012132f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012133#endif
12134
Martin v. Löwis11437992002-04-12 09:54:03 +000012135 ;
12136 return 0;
12137}
12138_ACEOF
12139rm -f conftest.$ac_objext conftest$ac_exeext
12140if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12141 (eval $ac_link) 2>&5
12142 ac_status=$?
12143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12144 (exit $ac_status); } &&
12145 { ac_try='test -s conftest$ac_exeext'
12146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12147 (eval $ac_try) 2>&5
12148 ac_status=$?
12149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12150 (exit $ac_status); }; }; then
12151 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012152else
Martin v. Löwis11437992002-04-12 09:54:03 +000012153 echo "$as_me: failed program was:" >&5
12154cat conftest.$ac_ext >&5
12155eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012156fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012157rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012158fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012159echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12160echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12161if test `eval echo '${'$as_ac_var'}'` = yes; then
12162 cat >>confdefs.h <<_ACEOF
12163#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12164_ACEOF
12165 cat >conftest.$ac_ext <<_ACEOF
12166#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012167#include "confdefs.h"
12168#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012169#ifdef F77_DUMMY_MAIN
12170# ifdef __cplusplus
12171 extern "C"
12172# endif
12173 int F77_DUMMY_MAIN() { return 1; }
12174#endif
12175int
12176main ()
12177{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012178getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012179 ;
12180 return 0;
12181}
12182_ACEOF
12183rm -f conftest.$ac_objext
12184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12185 (eval $ac_compile) 2>&5
12186 ac_status=$?
12187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12188 (exit $ac_status); } &&
12189 { ac_try='test -s conftest.$ac_objext'
12190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12191 (eval $ac_try) 2>&5
12192 ac_status=$?
12193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12194 (exit $ac_status); }; }; then
12195
12196cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012197#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012198_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012199
Martin v. Löwis11437992002-04-12 09:54:03 +000012200
Guido van Rossumf78abae1997-01-21 22:02:36 +000012201else
Martin v. Löwis11437992002-04-12 09:54:03 +000012202 echo "$as_me: failed program was:" >&5
12203cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012204fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012205rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012206
Guido van Rossum627b2d71993-12-24 10:39:16 +000012207fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012208done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012209
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012210echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12211echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12212if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012213 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012214else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012215 if test "$cross_compiling" = yes; then
12216 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12217echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12218 { (exit 1); exit 1; }; }
12219else
Martin v. Löwis11437992002-04-12 09:54:03 +000012220 cat >conftest.$ac_ext <<_ACEOF
12221#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012222#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012223#if HAVE_UNISTD_H
12224# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012225#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012226
Martin v. Löwis11437992002-04-12 09:54:03 +000012227#ifdef F77_DUMMY_MAIN
12228# ifdef __cplusplus
12229 extern "C"
12230# endif
12231 int F77_DUMMY_MAIN() { return 1; }
12232#endif
12233int
12234main ()
12235{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012236/* If this system has a BSD-style setpgrp which takes arguments,
12237 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12238 exit successfully. */
12239 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012240 ;
12241 return 0;
12242}
12243_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012244rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012245if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12246 (eval $ac_link) 2>&5
12247 ac_status=$?
12248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012249 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12251 (eval $ac_try) 2>&5
12252 ac_status=$?
12253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12254 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012255 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012256else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012257 echo "$as_me: program exited with status $ac_status" >&5
12258echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012259cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012260( exit $ac_status )
12261ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012262fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012263rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012264fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012265fi
12266echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12267echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12268if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012269
12270cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012271#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012272_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012273
12274fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012275
Martin v. Löwis11437992002-04-12 09:54:03 +000012276
Thomas Wouters3a584202000-08-05 23:28:51 +000012277for ac_func in gettimeofday
12278do
Martin v. Löwis11437992002-04-12 09:54:03 +000012279as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12280echo "$as_me:$LINENO: checking for $ac_func" >&5
12281echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12282if eval "test \"\${$as_ac_var+set}\" = set"; then
12283 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012284else
Martin v. Löwis11437992002-04-12 09:54:03 +000012285 cat >conftest.$ac_ext <<_ACEOF
12286#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012287#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012288/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012289 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012290#include <assert.h>
12291/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012292#ifdef __cplusplus
12293extern "C"
12294#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012295/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012296 builtin and then its argument prototype would still apply. */
12297char $ac_func ();
12298char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012299
Martin v. Löwis11437992002-04-12 09:54:03 +000012300#ifdef F77_DUMMY_MAIN
12301# ifdef __cplusplus
12302 extern "C"
12303# endif
12304 int F77_DUMMY_MAIN() { return 1; }
12305#endif
12306int
12307main ()
12308{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012309/* The GNU C library defines this for functions which it implements
12310 to always fail with ENOSYS. Some functions are actually named
12311 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012312#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012313choke me
12314#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012315f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012316#endif
12317
Martin v. Löwis11437992002-04-12 09:54:03 +000012318 ;
12319 return 0;
12320}
12321_ACEOF
12322rm -f conftest.$ac_objext conftest$ac_exeext
12323if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12324 (eval $ac_link) 2>&5
12325 ac_status=$?
12326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12327 (exit $ac_status); } &&
12328 { ac_try='test -s conftest$ac_exeext'
12329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12330 (eval $ac_try) 2>&5
12331 ac_status=$?
12332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12333 (exit $ac_status); }; }; then
12334 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012335else
Martin v. Löwis11437992002-04-12 09:54:03 +000012336 echo "$as_me: failed program was:" >&5
12337cat conftest.$ac_ext >&5
12338eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012339fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012340rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012341fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012342echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12343echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12344if test `eval echo '${'$as_ac_var'}'` = yes; then
12345 cat >>confdefs.h <<_ACEOF
12346#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12347_ACEOF
12348 cat >conftest.$ac_ext <<_ACEOF
12349#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012350#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012351#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012352#ifdef F77_DUMMY_MAIN
12353# ifdef __cplusplus
12354 extern "C"
12355# endif
12356 int F77_DUMMY_MAIN() { return 1; }
12357#endif
12358int
12359main ()
12360{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012361gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012362 ;
12363 return 0;
12364}
12365_ACEOF
12366rm -f conftest.$ac_objext
12367if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12368 (eval $ac_compile) 2>&5
12369 ac_status=$?
12370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12371 (exit $ac_status); } &&
12372 { ac_try='test -s conftest.$ac_objext'
12373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12374 (eval $ac_try) 2>&5
12375 ac_status=$?
12376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12377 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012378 :
12379else
Martin v. Löwis11437992002-04-12 09:54:03 +000012380 echo "$as_me: failed program was:" >&5
12381cat conftest.$ac_ext >&5
12382
12383cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012384#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012385_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012386
Martin v. Löwis11437992002-04-12 09:54:03 +000012387
Guido van Rossum627b2d71993-12-24 10:39:16 +000012388fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012389rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012390
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012391fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012392done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012393
Michael W. Hudson54241132001-12-07 15:38:26 +000012394
12395
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012396# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012397# for [no]getaddrinfo in netdb.h.
12398echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12399echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12400cat >conftest.$ac_ext <<_ACEOF
12401#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012402#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012403
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012404#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012405#include <sys/socket.h>
12406#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012407#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012408
Martin v. Löwis11437992002-04-12 09:54:03 +000012409#ifdef F77_DUMMY_MAIN
12410# ifdef __cplusplus
12411 extern "C"
12412# endif
12413 int F77_DUMMY_MAIN() { return 1; }
12414#endif
12415int
12416main ()
12417{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012418
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012419getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012420
Martin v. Löwis11437992002-04-12 09:54:03 +000012421 ;
12422 return 0;
12423}
12424_ACEOF
12425rm -f conftest.$ac_objext conftest$ac_exeext
12426if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12427 (eval $ac_link) 2>&5
12428 ac_status=$?
12429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12430 (exit $ac_status); } &&
12431 { ac_try='test -s conftest$ac_exeext'
12432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12433 (eval $ac_try) 2>&5
12434 ac_status=$?
12435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12436 (exit $ac_status); }; }; then
12437
12438echo "$as_me:$LINENO: result: yes" >&5
12439echo "${ECHO_T}yes" >&6
12440echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12441echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012442if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012443 echo "$as_me:$LINENO: result: buggy" >&5
12444echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012445buggygetaddrinfo=yes
12446else
Martin v. Löwis11437992002-04-12 09:54:03 +000012447 cat >conftest.$ac_ext <<_ACEOF
12448#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012449#include "confdefs.h"
12450
12451#include <sys/types.h>
12452#include <netdb.h>
12453#include <string.h>
12454#include <sys/socket.h>
12455#include <netinet/in.h>
12456
12457main()
12458{
12459 int passive, gaierr, inet4 = 0, inet6 = 0;
12460 struct addrinfo hints, *ai, *aitop;
12461 char straddr[INET6_ADDRSTRLEN], strport[16];
12462
12463 for (passive = 0; passive <= 1; passive++) {
12464 memset(&hints, 0, sizeof(hints));
12465 hints.ai_family = AF_UNSPEC;
12466 hints.ai_flags = passive ? AI_PASSIVE : 0;
12467 hints.ai_socktype = SOCK_STREAM;
12468 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12469 (void)gai_strerror(gaierr);
12470 goto bad;
12471 }
12472 for (ai = aitop; ai; ai = ai->ai_next) {
12473 if (ai->ai_addr == NULL ||
12474 ai->ai_addrlen == 0 ||
12475 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12476 straddr, sizeof(straddr), strport, sizeof(strport),
12477 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12478 goto bad;
12479 }
12480 switch (ai->ai_family) {
12481 case AF_INET:
12482 if (strcmp(strport, "54321") != 0) {
12483 goto bad;
12484 }
12485 if (passive) {
12486 if (strcmp(straddr, "0.0.0.0") != 0) {
12487 goto bad;
12488 }
12489 } else {
12490 if (strcmp(straddr, "127.0.0.1") != 0) {
12491 goto bad;
12492 }
12493 }
12494 inet4++;
12495 break;
12496 case AF_INET6:
12497 if (strcmp(strport, "54321") != 0) {
12498 goto bad;
12499 }
12500 if (passive) {
12501 if (strcmp(straddr, "::") != 0) {
12502 goto bad;
12503 }
12504 } else {
12505 if (strcmp(straddr, "::1") != 0) {
12506 goto bad;
12507 }
12508 }
12509 inet6++;
12510 break;
12511 case AF_UNSPEC:
12512 goto bad;
12513 break;
12514 default:
12515 /* another family support? */
12516 break;
12517 }
12518 }
12519 }
12520
12521 if (!(inet4 == 0 || inet4 == 2))
12522 goto bad;
12523 if (!(inet6 == 0 || inet6 == 2))
12524 goto bad;
12525
12526 if (aitop)
12527 freeaddrinfo(aitop);
12528 exit(0);
12529
12530 bad:
12531 if (aitop)
12532 freeaddrinfo(aitop);
12533 exit(1);
12534}
12535
Martin v. Löwis11437992002-04-12 09:54:03 +000012536_ACEOF
12537rm -f conftest$ac_exeext
12538if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12539 (eval $ac_link) 2>&5
12540 ac_status=$?
12541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12542 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12544 (eval $ac_try) 2>&5
12545 ac_status=$?
12546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12547 (exit $ac_status); }; }; then
12548 echo "$as_me:$LINENO: result: good" >&5
12549echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012550buggygetaddrinfo=no
12551else
Martin v. Löwis11437992002-04-12 09:54:03 +000012552 echo "$as_me: program exited with status $ac_status" >&5
12553echo "$as_me: failed program was:" >&5
12554cat conftest.$ac_ext >&5
12555( exit $ac_status )
12556echo "$as_me:$LINENO: result: buggy" >&5
12557echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012558buggygetaddrinfo=yes
12559fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012560rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012561fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012562else
Martin v. Löwis11437992002-04-12 09:54:03 +000012563 echo "$as_me: failed program was:" >&5
12564cat conftest.$ac_ext >&5
12565
12566echo "$as_me:$LINENO: result: no" >&5
12567echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012568buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012569
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012570fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012571rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012572
12573if test "$buggygetaddrinfo" = "yes"; then
12574 if test "$ipv6" = "yes"; then
12575 echo 'Fatal: You must get working getaddrinfo() function.'
12576 echo ' or you can specify "--disable-ipv6"'.
12577 exit 1
12578 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012579else
Martin v. Löwis11437992002-04-12 09:54:03 +000012580
12581cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012582#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012583_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012584
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012585fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012586
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012587for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012588do
Martin v. Löwis11437992002-04-12 09:54:03 +000012589as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12590echo "$as_me:$LINENO: checking for $ac_func" >&5
12591echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12592if eval "test \"\${$as_ac_var+set}\" = set"; then
12593 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012594else
Martin v. Löwis11437992002-04-12 09:54:03 +000012595 cat >conftest.$ac_ext <<_ACEOF
12596#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012597#include "confdefs.h"
12598/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012599 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012600#include <assert.h>
12601/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012602#ifdef __cplusplus
12603extern "C"
12604#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012605/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012606 builtin and then its argument prototype would still apply. */
12607char $ac_func ();
12608char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012609
Martin v. Löwis11437992002-04-12 09:54:03 +000012610#ifdef F77_DUMMY_MAIN
12611# ifdef __cplusplus
12612 extern "C"
12613# endif
12614 int F77_DUMMY_MAIN() { return 1; }
12615#endif
12616int
12617main ()
12618{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012619/* The GNU C library defines this for functions which it implements
12620 to always fail with ENOSYS. Some functions are actually named
12621 something starting with __ and the normal name is an alias. */
12622#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12623choke me
12624#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012625f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012626#endif
12627
Martin v. Löwis11437992002-04-12 09:54:03 +000012628 ;
12629 return 0;
12630}
12631_ACEOF
12632rm -f conftest.$ac_objext conftest$ac_exeext
12633if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12634 (eval $ac_link) 2>&5
12635 ac_status=$?
12636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12637 (exit $ac_status); } &&
12638 { ac_try='test -s conftest$ac_exeext'
12639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12640 (eval $ac_try) 2>&5
12641 ac_status=$?
12642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12643 (exit $ac_status); }; }; then
12644 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012645else
Martin v. Löwis11437992002-04-12 09:54:03 +000012646 echo "$as_me: failed program was:" >&5
12647cat conftest.$ac_ext >&5
12648eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012649fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012650rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012651fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012652echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12653echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12654if test `eval echo '${'$as_ac_var'}'` = yes; then
12655 cat >>confdefs.h <<_ACEOF
12656#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12657_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012658
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012659fi
12660done
12661
Michael W. Hudson54241132001-12-07 15:38:26 +000012662
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012663# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012664echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12665echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12666if test "${ac_cv_header_time+set}" = set; then
12667 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012668else
Martin v. Löwis11437992002-04-12 09:54:03 +000012669 cat >conftest.$ac_ext <<_ACEOF
12670#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012671#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012672#include <sys/types.h>
12673#include <sys/time.h>
12674#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012675
12676#ifdef F77_DUMMY_MAIN
12677# ifdef __cplusplus
12678 extern "C"
12679# endif
12680 int F77_DUMMY_MAIN() { return 1; }
12681#endif
12682int
12683main ()
12684{
12685if ((struct tm *) 0)
12686return 0;
12687 ;
12688 return 0;
12689}
12690_ACEOF
12691rm -f conftest.$ac_objext
12692if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12693 (eval $ac_compile) 2>&5
12694 ac_status=$?
12695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12696 (exit $ac_status); } &&
12697 { ac_try='test -s conftest.$ac_objext'
12698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12699 (eval $ac_try) 2>&5
12700 ac_status=$?
12701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12702 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012703 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012704else
Martin v. Löwis11437992002-04-12 09:54:03 +000012705 echo "$as_me: failed program was:" >&5
12706cat conftest.$ac_ext >&5
12707ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012708fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012709rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012710fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012711echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12712echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012713if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012714
12715cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012716#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012717_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012718
12719fi
12720
Martin v. Löwis11437992002-04-12 09:54:03 +000012721echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12722echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12723if test "${ac_cv_struct_tm+set}" = set; then
12724 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012725else
Martin v. Löwis11437992002-04-12 09:54:03 +000012726 cat >conftest.$ac_ext <<_ACEOF
12727#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012728#include "confdefs.h"
12729#include <sys/types.h>
12730#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012731
12732#ifdef F77_DUMMY_MAIN
12733# ifdef __cplusplus
12734 extern "C"
12735# endif
12736 int F77_DUMMY_MAIN() { return 1; }
12737#endif
12738int
12739main ()
12740{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012741struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012742 ;
12743 return 0;
12744}
12745_ACEOF
12746rm -f conftest.$ac_objext
12747if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12748 (eval $ac_compile) 2>&5
12749 ac_status=$?
12750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12751 (exit $ac_status); } &&
12752 { ac_try='test -s conftest.$ac_objext'
12753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12754 (eval $ac_try) 2>&5
12755 ac_status=$?
12756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12757 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012758 ac_cv_struct_tm=time.h
12759else
Martin v. Löwis11437992002-04-12 09:54:03 +000012760 echo "$as_me: failed program was:" >&5
12761cat conftest.$ac_ext >&5
12762ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012763fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012764rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012765fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012766echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12767echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012768if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012769
12770cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012771#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012772_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012773
12774fi
12775
Martin v. Löwis11437992002-04-12 09:54:03 +000012776echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12777echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12778if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12779 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012780else
Martin v. Löwis11437992002-04-12 09:54:03 +000012781 cat >conftest.$ac_ext <<_ACEOF
12782#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012783#include "confdefs.h"
12784#include <sys/types.h>
12785#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012786
12787
12788#ifdef F77_DUMMY_MAIN
12789# ifdef __cplusplus
12790 extern "C"
12791# endif
12792 int F77_DUMMY_MAIN() { return 1; }
12793#endif
12794int
12795main ()
12796{
12797static struct tm ac_aggr;
12798if (ac_aggr.tm_zone)
12799return 0;
12800 ;
12801 return 0;
12802}
12803_ACEOF
12804rm -f conftest.$ac_objext
12805if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12806 (eval $ac_compile) 2>&5
12807 ac_status=$?
12808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12809 (exit $ac_status); } &&
12810 { ac_try='test -s conftest.$ac_objext'
12811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12812 (eval $ac_try) 2>&5
12813 ac_status=$?
12814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12815 (exit $ac_status); }; }; then
12816 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012817else
Martin v. Löwis11437992002-04-12 09:54:03 +000012818 echo "$as_me: failed program was:" >&5
12819cat conftest.$ac_ext >&5
12820ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012821fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012822rm -f conftest.$ac_objext conftest.$ac_ext
12823fi
12824echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12825echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12826if test $ac_cv_member_struct_tm_tm_zone = yes; then
12827
12828cat >>confdefs.h <<_ACEOF
12829#define HAVE_STRUCT_TM_TM_ZONE 1
12830_ACEOF
12831
12832
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012833fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012834
Martin v. Löwis11437992002-04-12 09:54:03 +000012835if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12836
12837cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012838#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012839_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012840
12841else
Martin v. Löwis11437992002-04-12 09:54:03 +000012842 echo "$as_me:$LINENO: checking for tzname" >&5
12843echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12844if test "${ac_cv_var_tzname+set}" = set; then
12845 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012846else
Martin v. Löwis11437992002-04-12 09:54:03 +000012847 cat >conftest.$ac_ext <<_ACEOF
12848#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012849#include "confdefs.h"
12850#include <time.h>
12851#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012852extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012853#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012854
12855#ifdef F77_DUMMY_MAIN
12856# ifdef __cplusplus
12857 extern "C"
12858# endif
12859 int F77_DUMMY_MAIN() { return 1; }
12860#endif
12861int
12862main ()
12863{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012864atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012865 ;
12866 return 0;
12867}
12868_ACEOF
12869rm -f conftest.$ac_objext conftest$ac_exeext
12870if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12871 (eval $ac_link) 2>&5
12872 ac_status=$?
12873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12874 (exit $ac_status); } &&
12875 { ac_try='test -s conftest$ac_exeext'
12876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12877 (eval $ac_try) 2>&5
12878 ac_status=$?
12879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12880 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012881 ac_cv_var_tzname=yes
12882else
Martin v. Löwis11437992002-04-12 09:54:03 +000012883 echo "$as_me: failed program was:" >&5
12884cat conftest.$ac_ext >&5
12885ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012886fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012887rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012888fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012889echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12890echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012891 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012892
12893cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012894#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012895_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012896
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012897 fi
12898fi
12899
Jack Jansendd19cf82001-12-06 22:36:17 +000012900
Martin v. Löwis11437992002-04-12 09:54:03 +000012901echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12902echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12903if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12904 echo $ECHO_N "(cached) $ECHO_C" >&6
12905else
12906 cat >conftest.$ac_ext <<_ACEOF
12907#line $LINENO "configure"
12908#include "confdefs.h"
12909$ac_includes_default
12910#ifdef F77_DUMMY_MAIN
12911# ifdef __cplusplus
12912 extern "C"
12913# endif
12914 int F77_DUMMY_MAIN() { return 1; }
12915#endif
12916int
12917main ()
12918{
12919static struct stat ac_aggr;
12920if (ac_aggr.st_rdev)
12921return 0;
12922 ;
12923 return 0;
12924}
12925_ACEOF
12926rm -f conftest.$ac_objext
12927if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12928 (eval $ac_compile) 2>&5
12929 ac_status=$?
12930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12931 (exit $ac_status); } &&
12932 { ac_try='test -s conftest.$ac_objext'
12933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12934 (eval $ac_try) 2>&5
12935 ac_status=$?
12936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12937 (exit $ac_status); }; }; then
12938 ac_cv_member_struct_stat_st_rdev=yes
12939else
12940 echo "$as_me: failed program was:" >&5
12941cat conftest.$ac_ext >&5
12942ac_cv_member_struct_stat_st_rdev=no
12943fi
12944rm -f conftest.$ac_objext conftest.$ac_ext
12945fi
12946echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12947echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12948if test $ac_cv_member_struct_stat_st_rdev = yes; then
12949
12950cat >>confdefs.h <<_ACEOF
12951#define HAVE_STRUCT_STAT_ST_RDEV 1
12952_ACEOF
12953
12954
12955cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012956#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012957_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012958
12959fi
12960
Martin v. Löwis11437992002-04-12 09:54:03 +000012961
12962
12963echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12964echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12965if test "${ac_cv_member_struct_stat_st_blksize+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_blksize)
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_blksize=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_blksize=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_blksize" >&5
13009echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13010if test $ac_cv_member_struct_stat_st_blksize = 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_BLKSIZE 1
13014_ACEOF
13015
13016
13017cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013018#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013019_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013020
13021fi
13022
Martin v. Löwis11437992002-04-12 09:54:03 +000013023
13024echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13025echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13026if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13027 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013028else
Martin v. Löwis11437992002-04-12 09:54:03 +000013029 cat >conftest.$ac_ext <<_ACEOF
13030#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013031#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013032$ac_includes_default
13033#ifdef F77_DUMMY_MAIN
13034# ifdef __cplusplus
13035 extern "C"
13036# endif
13037 int F77_DUMMY_MAIN() { return 1; }
13038#endif
13039int
13040main ()
13041{
13042static struct stat ac_aggr;
13043if (ac_aggr.st_blocks)
13044return 0;
13045 ;
13046 return 0;
13047}
13048_ACEOF
13049rm -f conftest.$ac_objext
13050if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13051 (eval $ac_compile) 2>&5
13052 ac_status=$?
13053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13054 (exit $ac_status); } &&
13055 { ac_try='test -s conftest.$ac_objext'
13056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13057 (eval $ac_try) 2>&5
13058 ac_status=$?
13059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13060 (exit $ac_status); }; }; then
13061 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013062else
Martin v. Löwis11437992002-04-12 09:54:03 +000013063 echo "$as_me: failed program was:" >&5
13064cat conftest.$ac_ext >&5
13065ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013066fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013067rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013068fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013069echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13070echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13071if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013072
Martin v. Löwis11437992002-04-12 09:54:03 +000013073cat >>confdefs.h <<_ACEOF
13074#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13075_ACEOF
13076
13077
13078cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013079#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013080_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013081
13082else
Martin v. Löwis11437992002-04-12 09:54:03 +000013083 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013084fi
13085
Michael W. Hudson54241132001-12-07 15:38:26 +000013086
Martin v. Löwis11437992002-04-12 09:54:03 +000013087
13088echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13089echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13090if test "${ac_cv_header_time_altzone+set}" = set; then
13091 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013092else
Martin v. Löwis11437992002-04-12 09:54:03 +000013093 cat >conftest.$ac_ext <<_ACEOF
13094#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013095#include "confdefs.h"
13096#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013097#ifdef F77_DUMMY_MAIN
13098# ifdef __cplusplus
13099 extern "C"
13100# endif
13101 int F77_DUMMY_MAIN() { return 1; }
13102#endif
13103int
13104main ()
13105{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013106return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013107 ;
13108 return 0;
13109}
13110_ACEOF
13111rm -f conftest.$ac_objext
13112if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13113 (eval $ac_compile) 2>&5
13114 ac_status=$?
13115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13116 (exit $ac_status); } &&
13117 { ac_try='test -s conftest.$ac_objext'
13118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13119 (eval $ac_try) 2>&5
13120 ac_status=$?
13121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13122 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013123 ac_cv_header_time_altzone=yes
13124else
Martin v. Löwis11437992002-04-12 09:54:03 +000013125 echo "$as_me: failed program was:" >&5
13126cat conftest.$ac_ext >&5
13127ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013128fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013129rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013130fi
13131
Martin v. Löwis11437992002-04-12 09:54:03 +000013132echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13133echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013134if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013135
13136cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013137#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013138_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013139
13140fi
13141
Guido van Rossumda88dad1995-01-26 00:46:29 +000013142was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013143echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13144echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13145cat >conftest.$ac_ext <<_ACEOF
13146#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013147#include "confdefs.h"
13148
13149#include <sys/types.h>
13150#include <sys/select.h>
13151#include <sys/time.h>
13152
Martin v. Löwis11437992002-04-12 09:54:03 +000013153#ifdef F77_DUMMY_MAIN
13154# ifdef __cplusplus
13155 extern "C"
13156# endif
13157 int F77_DUMMY_MAIN() { return 1; }
13158#endif
13159int
13160main ()
13161{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013162;
Martin v. Löwis11437992002-04-12 09:54:03 +000013163 ;
13164 return 0;
13165}
13166_ACEOF
13167rm -f conftest.$ac_objext
13168if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13169 (eval $ac_compile) 2>&5
13170 ac_status=$?
13171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13172 (exit $ac_status); } &&
13173 { ac_try='test -s conftest.$ac_objext'
13174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13175 (eval $ac_try) 2>&5
13176 ac_status=$?
13177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13178 (exit $ac_status); }; }; then
13179
13180
13181cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013182#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013183_ACEOF
13184
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013185 was_it_defined=yes
13186
Guido van Rossumf78abae1997-01-21 22:02:36 +000013187else
Martin v. Löwis11437992002-04-12 09:54:03 +000013188 echo "$as_me: failed program was:" >&5
13189cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013190fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013191rm -f conftest.$ac_objext conftest.$ac_ext
13192echo "$as_me:$LINENO: result: $was_it_defined" >&5
13193echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013194
Martin v. Löwis11437992002-04-12 09:54:03 +000013195echo "$as_me:$LINENO: checking for addrinfo" >&5
13196echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13197if test "${ac_cv_struct_addrinfo+set}" = set; then
13198 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013199else
Martin v. Löwis11437992002-04-12 09:54:03 +000013200 cat >conftest.$ac_ext <<_ACEOF
13201#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013202#include "confdefs.h"
13203
13204# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013205#ifdef F77_DUMMY_MAIN
13206# ifdef __cplusplus
13207 extern "C"
13208# endif
13209 int F77_DUMMY_MAIN() { return 1; }
13210#endif
13211int
13212main ()
13213{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013214struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013215 ;
13216 return 0;
13217}
13218_ACEOF
13219rm -f conftest.$ac_objext
13220if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13221 (eval $ac_compile) 2>&5
13222 ac_status=$?
13223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13224 (exit $ac_status); } &&
13225 { ac_try='test -s conftest.$ac_objext'
13226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13227 (eval $ac_try) 2>&5
13228 ac_status=$?
13229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13230 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013231 ac_cv_struct_addrinfo=yes
13232else
Martin v. Löwis11437992002-04-12 09:54:03 +000013233 echo "$as_me: failed program was:" >&5
13234cat conftest.$ac_ext >&5
13235ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013236fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013237rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013238fi
13239
Martin v. Löwis11437992002-04-12 09:54:03 +000013240echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13241echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013242if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013243
13244cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013245#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013246_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013247
13248fi
13249
Martin v. Löwis11437992002-04-12 09:54:03 +000013250echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13251echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13252if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13253 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013254else
Martin v. Löwis11437992002-04-12 09:54:03 +000013255 cat >conftest.$ac_ext <<_ACEOF
13256#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013257#include "confdefs.h"
13258
13259# include <sys/types.h>
13260# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013261#ifdef F77_DUMMY_MAIN
13262# ifdef __cplusplus
13263 extern "C"
13264# endif
13265 int F77_DUMMY_MAIN() { return 1; }
13266#endif
13267int
13268main ()
13269{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013270struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013271 ;
13272 return 0;
13273}
13274_ACEOF
13275rm -f conftest.$ac_objext
13276if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13277 (eval $ac_compile) 2>&5
13278 ac_status=$?
13279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13280 (exit $ac_status); } &&
13281 { ac_try='test -s conftest.$ac_objext'
13282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13283 (eval $ac_try) 2>&5
13284 ac_status=$?
13285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13286 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013287 ac_cv_struct_sockaddr_storage=yes
13288else
Martin v. Löwis11437992002-04-12 09:54:03 +000013289 echo "$as_me: failed program was:" >&5
13290cat conftest.$ac_ext >&5
13291ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013292fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013293rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013294fi
13295
Martin v. Löwis11437992002-04-12 09:54:03 +000013296echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13297echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013298if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013299
13300cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013301#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013302_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013303
13304fi
13305
Guido van Rossum627b2d71993-12-24 10:39:16 +000013306# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013307
Michael W. Hudson54241132001-12-07 15:38:26 +000013308
Martin v. Löwis11437992002-04-12 09:54:03 +000013309echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13310echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13311if test "${ac_cv_c_char_unsigned+set}" = set; then
13312 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013313else
Martin v. Löwis11437992002-04-12 09:54:03 +000013314 cat >conftest.$ac_ext <<_ACEOF
13315#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013316#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013317$ac_includes_default
13318#ifdef F77_DUMMY_MAIN
13319# ifdef __cplusplus
13320 extern "C"
13321# endif
13322 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013323#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013324int
13325main ()
13326{
13327static int test_array [1 - 2 * !(((char) -1) < 0)];
13328test_array [0] = 0
13329
13330 ;
13331 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013332}
Martin v. Löwis11437992002-04-12 09:54:03 +000013333_ACEOF
13334rm -f conftest.$ac_objext
13335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13336 (eval $ac_compile) 2>&5
13337 ac_status=$?
13338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13339 (exit $ac_status); } &&
13340 { ac_try='test -s conftest.$ac_objext'
13341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13342 (eval $ac_try) 2>&5
13343 ac_status=$?
13344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13345 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013346 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013347else
13348 echo "$as_me: failed program was:" >&5
13349cat conftest.$ac_ext >&5
13350ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013351fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013352rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013353fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013354echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13355echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013356if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013357 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013358#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013359_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013360
13361fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013362
Martin v. Löwis11437992002-04-12 09:54:03 +000013363echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13364echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13365if test "${ac_cv_prog_cc_stdc+set}" = set; then
13366 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013367else
Martin v. Löwis11437992002-04-12 09:54:03 +000013368 ac_cv_prog_cc_stdc=no
13369ac_save_CC=$CC
13370cat >conftest.$ac_ext <<_ACEOF
13371#line $LINENO "configure"
13372#include "confdefs.h"
13373#include <stdarg.h>
13374#include <stdio.h>
13375#include <sys/types.h>
13376#include <sys/stat.h>
13377/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13378struct buf { int x; };
13379FILE * (*rcsopen) (struct buf *, struct stat *, int);
13380static char *e (p, i)
13381 char **p;
13382 int i;
13383{
13384 return p[i];
13385}
13386static char *f (char * (*g) (char **, int), char **p, ...)
13387{
13388 char *s;
13389 va_list v;
13390 va_start (v,p);
13391 s = g (p, va_arg (v,int));
13392 va_end (v);
13393 return s;
13394}
13395int test (int i, double x);
13396struct s1 {int (*f) (int a);};
13397struct s2 {int (*f) (double a);};
13398int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13399int argc;
13400char **argv;
13401#ifdef F77_DUMMY_MAIN
13402# ifdef __cplusplus
13403 extern "C"
13404# endif
13405 int F77_DUMMY_MAIN() { return 1; }
13406#endif
13407int
13408main ()
13409{
13410return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13411 ;
13412 return 0;
13413}
13414_ACEOF
13415# Don't try gcc -ansi; that turns off useful extensions and
13416# breaks some systems' header files.
13417# AIX -qlanglvl=ansi
13418# Ultrix and OSF/1 -std1
13419# HP-UX 10.20 and later -Ae
13420# HP-UX older versions -Aa -D_HPUX_SOURCE
13421# SVR4 -Xc -D__EXTENSIONS__
13422for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13423do
13424 CC="$ac_save_CC $ac_arg"
13425 rm -f conftest.$ac_objext
13426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13427 (eval $ac_compile) 2>&5
13428 ac_status=$?
13429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13430 (exit $ac_status); } &&
13431 { ac_try='test -s conftest.$ac_objext'
13432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13433 (eval $ac_try) 2>&5
13434 ac_status=$?
13435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13436 (exit $ac_status); }; }; then
13437 ac_cv_prog_cc_stdc=$ac_arg
13438break
13439else
13440 echo "$as_me: failed program was:" >&5
13441cat conftest.$ac_ext >&5
13442fi
13443rm -f conftest.$ac_objext
13444done
13445rm -f conftest.$ac_ext conftest.$ac_objext
13446CC=$ac_save_CC
13447
13448fi
13449
13450case "x$ac_cv_prog_cc_stdc" in
13451 x|xno)
13452 echo "$as_me:$LINENO: result: none needed" >&5
13453echo "${ECHO_T}none needed" >&6 ;;
13454 *)
13455 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13456echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13457 CC="$CC $ac_cv_prog_cc_stdc" ;;
13458esac
13459
13460echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13461echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13462if test "${ac_cv_c_const+set}" = set; then
13463 echo $ECHO_N "(cached) $ECHO_C" >&6
13464else
13465 cat >conftest.$ac_ext <<_ACEOF
13466#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013467#include "confdefs.h"
13468
Martin v. Löwis11437992002-04-12 09:54:03 +000013469#ifdef F77_DUMMY_MAIN
13470# ifdef __cplusplus
13471 extern "C"
13472# endif
13473 int F77_DUMMY_MAIN() { return 1; }
13474#endif
13475int
13476main ()
13477{
13478/* FIXME: Include the comments suggested by Paul. */
13479#ifndef __cplusplus
13480 /* Ultrix mips cc rejects this. */
13481 typedef int charset[2];
13482 const charset x;
13483 /* SunOS 4.1.1 cc rejects this. */
13484 char const *const *ccp;
13485 char **p;
13486 /* NEC SVR4.0.2 mips cc rejects this. */
13487 struct point {int x, y;};
13488 static struct point const zero = {0,0};
13489 /* AIX XL C 1.02.0.0 rejects this.
13490 It does not let you subtract one const X* pointer from another in
13491 an arm of an if-expression whose if-part is not a constant
13492 expression */
13493 const char *g = "string";
13494 ccp = &g + (g ? g-g : 0);
13495 /* HPUX 7.0 cc rejects these. */
13496 ++ccp;
13497 p = (char**) ccp;
13498 ccp = (char const *const *) p;
13499 { /* SCO 3.2v4 cc rejects this. */
13500 char *t;
13501 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013502
Martin v. Löwis11437992002-04-12 09:54:03 +000013503 *t++ = 0;
13504 }
13505 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13506 int x[] = {25, 17};
13507 const int *foo = &x[0];
13508 ++foo;
13509 }
13510 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13511 typedef const int *iptr;
13512 iptr p = 0;
13513 ++p;
13514 }
13515 { /* AIX XL C 1.02.0.0 rejects this saying
13516 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13517 struct s { int j; const int *ap[3]; };
13518 struct s *b; b->j = 5;
13519 }
13520 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13521 const int foo = 10;
13522 }
13523#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013524
Martin v. Löwis11437992002-04-12 09:54:03 +000013525 ;
13526 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013527}
Martin v. Löwis11437992002-04-12 09:54:03 +000013528_ACEOF
13529rm -f conftest.$ac_objext
13530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13531 (eval $ac_compile) 2>&5
13532 ac_status=$?
13533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13534 (exit $ac_status); } &&
13535 { ac_try='test -s conftest.$ac_objext'
13536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13537 (eval $ac_try) 2>&5
13538 ac_status=$?
13539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13540 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013541 ac_cv_c_const=yes
13542else
Martin v. Löwis11437992002-04-12 09:54:03 +000013543 echo "$as_me: failed program was:" >&5
13544cat conftest.$ac_ext >&5
13545ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013546fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013547rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013548fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013549echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13550echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013551if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013552
13553cat >>confdefs.h <<\_ACEOF
13554#define const
13555_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013556
13557fi
13558
Michael W. Hudson54241132001-12-07 15:38:26 +000013559
Guido van Rossumda88dad1995-01-26 00:46:29 +000013560works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013561echo "$as_me:$LINENO: checking for working volatile" >&5
13562echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13563cat >conftest.$ac_ext <<_ACEOF
13564#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013565#include "confdefs.h"
13566
Martin v. Löwis11437992002-04-12 09:54:03 +000013567#ifdef F77_DUMMY_MAIN
13568# ifdef __cplusplus
13569 extern "C"
13570# endif
13571 int F77_DUMMY_MAIN() { return 1; }
13572#endif
13573int
13574main ()
13575{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013576volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013577 ;
13578 return 0;
13579}
13580_ACEOF
13581rm -f conftest.$ac_objext
13582if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13583 (eval $ac_compile) 2>&5
13584 ac_status=$?
13585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13586 (exit $ac_status); } &&
13587 { ac_try='test -s conftest.$ac_objext'
13588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13589 (eval $ac_try) 2>&5
13590 ac_status=$?
13591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13592 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013593 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013594else
Martin v. Löwis11437992002-04-12 09:54:03 +000013595 echo "$as_me: failed program was:" >&5
13596cat conftest.$ac_ext >&5
13597
13598cat >>confdefs.h <<\_ACEOF
13599#define volatile
13600_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013601
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013602
Guido van Rossum627b2d71993-12-24 10:39:16 +000013603fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013604rm -f conftest.$ac_objext conftest.$ac_ext
13605echo "$as_me:$LINENO: result: $works" >&5
13606echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013607
Guido van Rossumda88dad1995-01-26 00:46:29 +000013608works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013609echo "$as_me:$LINENO: checking for working signed char" >&5
13610echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13611cat >conftest.$ac_ext <<_ACEOF
13612#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013613#include "confdefs.h"
13614
Martin v. Löwis11437992002-04-12 09:54:03 +000013615#ifdef F77_DUMMY_MAIN
13616# ifdef __cplusplus
13617 extern "C"
13618# endif
13619 int F77_DUMMY_MAIN() { return 1; }
13620#endif
13621int
13622main ()
13623{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013624signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013625 ;
13626 return 0;
13627}
13628_ACEOF
13629rm -f conftest.$ac_objext
13630if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13631 (eval $ac_compile) 2>&5
13632 ac_status=$?
13633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13634 (exit $ac_status); } &&
13635 { ac_try='test -s conftest.$ac_objext'
13636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13637 (eval $ac_try) 2>&5
13638 ac_status=$?
13639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13640 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013641 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013642else
Martin v. Löwis11437992002-04-12 09:54:03 +000013643 echo "$as_me: failed program was:" >&5
13644cat conftest.$ac_ext >&5
13645
13646cat >>confdefs.h <<\_ACEOF
13647#define signed
13648_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013649
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013650
Guido van Rossum7f43da71994-08-01 12:15:30 +000013651fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013652rm -f conftest.$ac_objext conftest.$ac_ext
13653echo "$as_me:$LINENO: result: $works" >&5
13654echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013655
Guido van Rossumda88dad1995-01-26 00:46:29 +000013656have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013657echo "$as_me:$LINENO: checking for prototypes" >&5
13658echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13659cat >conftest.$ac_ext <<_ACEOF
13660#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013661#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013662int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013663#ifdef F77_DUMMY_MAIN
13664# ifdef __cplusplus
13665 extern "C"
13666# endif
13667 int F77_DUMMY_MAIN() { return 1; }
13668#endif
13669int
13670main ()
13671{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013672return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013673 ;
13674 return 0;
13675}
13676_ACEOF
13677rm -f conftest.$ac_objext
13678if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13679 (eval $ac_compile) 2>&5
13680 ac_status=$?
13681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13682 (exit $ac_status); } &&
13683 { ac_try='test -s conftest.$ac_objext'
13684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13685 (eval $ac_try) 2>&5
13686 ac_status=$?
13687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13688 (exit $ac_status); }; }; then
13689
13690
13691cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013692#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013693_ACEOF
13694
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013695 have_prototypes=yes
13696
Guido van Rossumf78abae1997-01-21 22:02:36 +000013697else
Martin v. Löwis11437992002-04-12 09:54:03 +000013698 echo "$as_me: failed program was:" >&5
13699cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013700fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013701rm -f conftest.$ac_objext conftest.$ac_ext
13702echo "$as_me:$LINENO: result: $have_prototypes" >&5
13703echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013704
Guido van Rossumda88dad1995-01-26 00:46:29 +000013705works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013706echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13707echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13708cat >conftest.$ac_ext <<_ACEOF
13709#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013710#include "confdefs.h"
13711
13712#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013713int foo(int x, ...) {
13714 va_list va;
13715 va_start(va, x);
13716 va_arg(va, int);
13717 va_arg(va, char *);
13718 va_arg(va, double);
13719 return 0;
13720}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013721
Martin v. Löwis11437992002-04-12 09:54:03 +000013722#ifdef F77_DUMMY_MAIN
13723# ifdef __cplusplus
13724 extern "C"
13725# endif
13726 int F77_DUMMY_MAIN() { return 1; }
13727#endif
13728int
13729main ()
13730{
Guido van Rossum90eea071996-08-30 20:58:57 +000013731return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013732 ;
13733 return 0;
13734}
13735_ACEOF
13736rm -f conftest.$ac_objext
13737if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13738 (eval $ac_compile) 2>&5
13739 ac_status=$?
13740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13741 (exit $ac_status); } &&
13742 { ac_try='test -s conftest.$ac_objext'
13743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13744 (eval $ac_try) 2>&5
13745 ac_status=$?
13746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13747 (exit $ac_status); }; }; then
13748
13749
13750cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013751#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013752_ACEOF
13753
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013754 works=yes
13755
Guido van Rossumf78abae1997-01-21 22:02:36 +000013756else
Martin v. Löwis11437992002-04-12 09:54:03 +000013757 echo "$as_me: failed program was:" >&5
13758cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013759fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013760rm -f conftest.$ac_objext conftest.$ac_ext
13761echo "$as_me:$LINENO: result: $works" >&5
13762echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013763
Guido van Rossumda88dad1995-01-26 00:46:29 +000013764if test "$have_prototypes" = yes; then
13765bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013766echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13767echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13768cat >conftest.$ac_ext <<_ACEOF
13769#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013770#include "confdefs.h"
13771#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013772#ifdef F77_DUMMY_MAIN
13773# ifdef __cplusplus
13774 extern "C"
13775# endif
13776 int F77_DUMMY_MAIN() { return 1; }
13777#endif
13778int
13779main ()
13780{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013781char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013782 ;
13783 return 0;
13784}
13785_ACEOF
13786rm -f conftest.$ac_objext
13787if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13788 (eval $ac_compile) 2>&5
13789 ac_status=$?
13790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13791 (exit $ac_status); } &&
13792 { ac_try='test -s conftest.$ac_objext'
13793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13794 (eval $ac_try) 2>&5
13795 ac_status=$?
13796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13797 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013798 :
13799else
Martin v. Löwis11437992002-04-12 09:54:03 +000013800 echo "$as_me: failed program was:" >&5
13801cat conftest.$ac_ext >&5
13802
13803cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013804#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013805_ACEOF
13806
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013807 bad_prototypes=yes
13808
Guido van Rossum627b2d71993-12-24 10:39:16 +000013809fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013810rm -f conftest.$ac_objext conftest.$ac_ext
13811echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13812echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013813fi
13814
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013815# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013816echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13817echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13818cat >conftest.$ac_ext <<_ACEOF
13819#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013820#include "confdefs.h"
13821#include <sys/types.h>
13822#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013823#ifdef F77_DUMMY_MAIN
13824# ifdef __cplusplus
13825 extern "C"
13826# endif
13827 int F77_DUMMY_MAIN() { return 1; }
13828#endif
13829int
13830main ()
13831{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013832struct sockaddr x;
13833x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 ;
13835 return 0;
13836}
13837_ACEOF
13838rm -f conftest.$ac_objext
13839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13840 (eval $ac_compile) 2>&5
13841 ac_status=$?
13842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13843 (exit $ac_status); } &&
13844 { ac_try='test -s conftest.$ac_objext'
13845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13846 (eval $ac_try) 2>&5
13847 ac_status=$?
13848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13849 (exit $ac_status); }; }; then
13850 echo "$as_me:$LINENO: result: yes" >&5
13851echo "${ECHO_T}yes" >&6
13852
13853cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013854#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013855_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013856
13857else
Martin v. Löwis11437992002-04-12 09:54:03 +000013858 echo "$as_me: failed program was:" >&5
13859cat conftest.$ac_ext >&5
13860echo "$as_me:$LINENO: result: no" >&5
13861echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013862fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013863rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013864
Guido van Rossumda88dad1995-01-26 00:46:29 +000013865va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013866echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13867echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13868cat >conftest.$ac_ext <<_ACEOF
13869#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013870#include "confdefs.h"
13871
13872#ifdef HAVE_STDARG_PROTOTYPES
13873#include <stdarg.h>
13874#else
13875#include <varargs.h>
13876#endif
13877
Martin v. Löwis11437992002-04-12 09:54:03 +000013878#ifdef F77_DUMMY_MAIN
13879# ifdef __cplusplus
13880 extern "C"
13881# endif
13882 int F77_DUMMY_MAIN() { return 1; }
13883#endif
13884int
13885main ()
13886{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013887va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013888 ;
13889 return 0;
13890}
13891_ACEOF
13892rm -f conftest.$ac_objext
13893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13894 (eval $ac_compile) 2>&5
13895 ac_status=$?
13896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13897 (exit $ac_status); } &&
13898 { ac_try='test -s conftest.$ac_objext'
13899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13900 (eval $ac_try) 2>&5
13901 ac_status=$?
13902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13903 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013904 :
13905else
Martin v. Löwis11437992002-04-12 09:54:03 +000013906 echo "$as_me: failed program was:" >&5
13907cat conftest.$ac_ext >&5
13908
13909
13910cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013911#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013912_ACEOF
13913
Guido van Rossumda88dad1995-01-26 00:46:29 +000013914 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013915
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013916fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013917rm -f conftest.$ac_objext conftest.$ac_ext
13918echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13919echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013920
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013921# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013922
13923
13924
13925echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13926echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13927if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13928 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013929else
Martin v. Löwis11437992002-04-12 09:54:03 +000013930 cat >conftest.$ac_ext <<_ACEOF
13931#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013932#include "confdefs.h"
13933/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013934 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013935#include <assert.h>
13936/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013937#ifdef __cplusplus
13938extern "C"
13939#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013940/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013941 builtin and then its argument prototype would still apply. */
13942char gethostbyname_r ();
13943char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013944
Martin v. Löwis11437992002-04-12 09:54:03 +000013945#ifdef F77_DUMMY_MAIN
13946# ifdef __cplusplus
13947 extern "C"
13948# endif
13949 int F77_DUMMY_MAIN() { return 1; }
13950#endif
13951int
13952main ()
13953{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013954/* The GNU C library defines this for functions which it implements
13955 to always fail with ENOSYS. Some functions are actually named
13956 something starting with __ and the normal name is an alias. */
13957#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13958choke me
13959#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013960f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013961#endif
13962
Martin v. Löwis11437992002-04-12 09:54:03 +000013963 ;
13964 return 0;
13965}
13966_ACEOF
13967rm -f conftest.$ac_objext conftest$ac_exeext
13968if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13969 (eval $ac_link) 2>&5
13970 ac_status=$?
13971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13972 (exit $ac_status); } &&
13973 { ac_try='test -s conftest$ac_exeext'
13974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13975 (eval $ac_try) 2>&5
13976 ac_status=$?
13977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13978 (exit $ac_status); }; }; then
13979 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013980else
Martin v. Löwis11437992002-04-12 09:54:03 +000013981 echo "$as_me: failed program was:" >&5
13982cat conftest.$ac_ext >&5
13983ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013984fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013985rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013986fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013987echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13988echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13989if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013990
Martin v. Löwis11437992002-04-12 09:54:03 +000013991 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013992#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013993_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013994
Martin v. Löwis11437992002-04-12 09:54:03 +000013995 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13996echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013997 OLD_CFLAGS=$CFLAGS
13998 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013999 cat >conftest.$ac_ext <<_ACEOF
14000#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014001#include "confdefs.h"
14002
14003# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014004
14005#ifdef F77_DUMMY_MAIN
14006# ifdef __cplusplus
14007 extern "C"
14008# endif
14009 int F77_DUMMY_MAIN() { return 1; }
14010#endif
14011int
14012main ()
14013{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014014
14015 char *name;
14016 struct hostent *he, *res;
14017 char buffer[2048];
14018 int buflen = 2048;
14019 int h_errnop;
14020
14021 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014022
14023 ;
14024 return 0;
14025}
14026_ACEOF
14027rm -f conftest.$ac_objext
14028if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14029 (eval $ac_compile) 2>&5
14030 ac_status=$?
14031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14032 (exit $ac_status); } &&
14033 { ac_try='test -s conftest.$ac_objext'
14034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14035 (eval $ac_try) 2>&5
14036 ac_status=$?
14037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14038 (exit $ac_status); }; }; then
14039
14040 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014041#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014042_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014043
Martin v. Löwis11437992002-04-12 09:54:03 +000014044
14045cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014046#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014047_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014048
Martin v. Löwis11437992002-04-12 09:54:03 +000014049 echo "$as_me:$LINENO: result: yes" >&5
14050echo "${ECHO_T}yes" >&6
14051
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014052else
Martin v. Löwis11437992002-04-12 09:54:03 +000014053 echo "$as_me: failed program was:" >&5
14054cat conftest.$ac_ext >&5
14055
14056 echo "$as_me:$LINENO: result: no" >&5
14057echo "${ECHO_T}no" >&6
14058 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14059echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14060 cat >conftest.$ac_ext <<_ACEOF
14061#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014062#include "confdefs.h"
14063
14064# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014065
14066#ifdef F77_DUMMY_MAIN
14067# ifdef __cplusplus
14068 extern "C"
14069# endif
14070 int F77_DUMMY_MAIN() { return 1; }
14071#endif
14072int
14073main ()
14074{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014075
14076 char *name;
14077 struct hostent *he;
14078 char buffer[2048];
14079 int buflen = 2048;
14080 int h_errnop;
14081
14082 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014083
14084 ;
14085 return 0;
14086}
14087_ACEOF
14088rm -f conftest.$ac_objext
14089if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14090 (eval $ac_compile) 2>&5
14091 ac_status=$?
14092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14093 (exit $ac_status); } &&
14094 { ac_try='test -s conftest.$ac_objext'
14095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14096 (eval $ac_try) 2>&5
14097 ac_status=$?
14098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14099 (exit $ac_status); }; }; then
14100
14101 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014102#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014103_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014104
Martin v. Löwis11437992002-04-12 09:54:03 +000014105
14106cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014107#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014108_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014109
Martin v. Löwis11437992002-04-12 09:54:03 +000014110 echo "$as_me:$LINENO: result: yes" >&5
14111echo "${ECHO_T}yes" >&6
14112
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014113else
Martin v. Löwis11437992002-04-12 09:54:03 +000014114 echo "$as_me: failed program was:" >&5
14115cat conftest.$ac_ext >&5
14116
14117 echo "$as_me:$LINENO: result: no" >&5
14118echo "${ECHO_T}no" >&6
14119 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14120echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14121 cat >conftest.$ac_ext <<_ACEOF
14122#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014123#include "confdefs.h"
14124
14125# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014126
14127#ifdef F77_DUMMY_MAIN
14128# ifdef __cplusplus
14129 extern "C"
14130# endif
14131 int F77_DUMMY_MAIN() { return 1; }
14132#endif
14133int
14134main ()
14135{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014136
14137 char *name;
14138 struct hostent *he;
14139 struct hostent_data data;
14140
14141 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014142
14143 ;
14144 return 0;
14145}
14146_ACEOF
14147rm -f conftest.$ac_objext
14148if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14149 (eval $ac_compile) 2>&5
14150 ac_status=$?
14151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14152 (exit $ac_status); } &&
14153 { ac_try='test -s conftest.$ac_objext'
14154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14155 (eval $ac_try) 2>&5
14156 ac_status=$?
14157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14158 (exit $ac_status); }; }; then
14159
14160 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014161#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014162_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014163
Martin v. Löwis11437992002-04-12 09:54:03 +000014164
14165cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014166#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014167_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014168
Martin v. Löwis11437992002-04-12 09:54:03 +000014169 echo "$as_me:$LINENO: result: yes" >&5
14170echo "${ECHO_T}yes" >&6
14171
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014172else
Martin v. Löwis11437992002-04-12 09:54:03 +000014173 echo "$as_me: failed program was:" >&5
14174cat conftest.$ac_ext >&5
14175
14176 echo "$as_me:$LINENO: result: no" >&5
14177echo "${ECHO_T}no" >&6
14178
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
14184
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014185fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014186rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014187 CFLAGS=$OLD_CFLAGS
14188
14189else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014190
Martin v. Löwis11437992002-04-12 09:54:03 +000014191
14192for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014193do
Martin v. Löwis11437992002-04-12 09:54:03 +000014194as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14195echo "$as_me:$LINENO: checking for $ac_func" >&5
14196echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14197if eval "test \"\${$as_ac_var+set}\" = set"; then
14198 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014199else
Martin v. Löwis11437992002-04-12 09:54:03 +000014200 cat >conftest.$ac_ext <<_ACEOF
14201#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014202#include "confdefs.h"
14203/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014204 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014205#include <assert.h>
14206/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014207#ifdef __cplusplus
14208extern "C"
14209#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014210/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014211 builtin and then its argument prototype would still apply. */
14212char $ac_func ();
14213char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014214
Martin v. Löwis11437992002-04-12 09:54:03 +000014215#ifdef F77_DUMMY_MAIN
14216# ifdef __cplusplus
14217 extern "C"
14218# endif
14219 int F77_DUMMY_MAIN() { return 1; }
14220#endif
14221int
14222main ()
14223{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014224/* The GNU C library defines this for functions which it implements
14225 to always fail with ENOSYS. Some functions are actually named
14226 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014227#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014228choke me
14229#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014230f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014231#endif
14232
Martin v. Löwis11437992002-04-12 09:54:03 +000014233 ;
14234 return 0;
14235}
14236_ACEOF
14237rm -f conftest.$ac_objext conftest$ac_exeext
14238if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14239 (eval $ac_link) 2>&5
14240 ac_status=$?
14241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14242 (exit $ac_status); } &&
14243 { ac_try='test -s conftest$ac_exeext'
14244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14245 (eval $ac_try) 2>&5
14246 ac_status=$?
14247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14248 (exit $ac_status); }; }; then
14249 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014250else
Martin v. Löwis11437992002-04-12 09:54:03 +000014251 echo "$as_me: failed program was:" >&5
14252cat conftest.$ac_ext >&5
14253eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014254fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014255rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014256fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014257echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14258echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14259if test `eval echo '${'$as_ac_var'}'` = yes; then
14260 cat >>confdefs.h <<_ACEOF
14261#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14262_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014263
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014264fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014265done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014266
Michael W. Hudson54241132001-12-07 15:38:26 +000014267
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014268fi
14269
Michael W. Hudson54241132001-12-07 15:38:26 +000014270
14271
14272
14273
14274
14275
Guido van Rossum627b2d71993-12-24 10:39:16 +000014276# checks for system services
14277# (none yet)
14278
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014279# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014280echo "$as_me:$LINENO: checking for __fpu_control" >&5
14281echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14282if test "${ac_cv_func___fpu_control+set}" = set; then
14283 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014284else
Martin v. Löwis11437992002-04-12 09:54:03 +000014285 cat >conftest.$ac_ext <<_ACEOF
14286#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014287#include "confdefs.h"
14288/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014289 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014290#include <assert.h>
14291/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014292#ifdef __cplusplus
14293extern "C"
14294#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014295/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014296 builtin and then its argument prototype would still apply. */
14297char __fpu_control ();
14298char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014299
Martin v. Löwis11437992002-04-12 09:54:03 +000014300#ifdef F77_DUMMY_MAIN
14301# ifdef __cplusplus
14302 extern "C"
14303# endif
14304 int F77_DUMMY_MAIN() { return 1; }
14305#endif
14306int
14307main ()
14308{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014309/* The GNU C library defines this for functions which it implements
14310 to always fail with ENOSYS. Some functions are actually named
14311 something starting with __ and the normal name is an alias. */
14312#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14313choke me
14314#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014315f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014316#endif
14317
Martin v. Löwis11437992002-04-12 09:54:03 +000014318 ;
14319 return 0;
14320}
14321_ACEOF
14322rm -f conftest.$ac_objext conftest$ac_exeext
14323if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14324 (eval $ac_link) 2>&5
14325 ac_status=$?
14326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14327 (exit $ac_status); } &&
14328 { ac_try='test -s conftest$ac_exeext'
14329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14330 (eval $ac_try) 2>&5
14331 ac_status=$?
14332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14333 (exit $ac_status); }; }; then
14334 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014335else
Martin v. Löwis11437992002-04-12 09:54:03 +000014336 echo "$as_me: failed program was:" >&5
14337cat conftest.$ac_ext >&5
14338ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014339fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014340rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014341fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014342echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14343echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14344if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014345 :
14346else
Martin v. Löwis11437992002-04-12 09:54:03 +000014347
14348echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14349echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14350if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14351 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014352else
Martin v. Löwis11437992002-04-12 09:54:03 +000014353 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014354LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014355cat >conftest.$ac_ext <<_ACEOF
14356#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014357#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014358
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014359/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014360#ifdef __cplusplus
14361extern "C"
14362#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014363/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014364 builtin and then its argument prototype would still apply. */
14365char __fpu_control ();
14366#ifdef F77_DUMMY_MAIN
14367# ifdef __cplusplus
14368 extern "C"
14369# endif
14370 int F77_DUMMY_MAIN() { return 1; }
14371#endif
14372int
14373main ()
14374{
14375__fpu_control ();
14376 ;
14377 return 0;
14378}
14379_ACEOF
14380rm -f conftest.$ac_objext conftest$ac_exeext
14381if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14382 (eval $ac_link) 2>&5
14383 ac_status=$?
14384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14385 (exit $ac_status); } &&
14386 { ac_try='test -s conftest$ac_exeext'
14387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14388 (eval $ac_try) 2>&5
14389 ac_status=$?
14390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14391 (exit $ac_status); }; }; then
14392 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014393else
Martin v. Löwis11437992002-04-12 09:54:03 +000014394 echo "$as_me: failed program was:" >&5
14395cat conftest.$ac_ext >&5
14396ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014397fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014398rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14399LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014400fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014401echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14402echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14403if test $ac_cv_lib_ieee___fpu_control = yes; then
14404 cat >>confdefs.h <<_ACEOF
14405#define HAVE_LIBIEEE 1
14406_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014407
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014408 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014409
Guido van Rossum627b2d71993-12-24 10:39:16 +000014410fi
14411
Michael W. Hudson54241132001-12-07 15:38:26 +000014412
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014413fi
14414
Michael W. Hudson54241132001-12-07 15:38:26 +000014415
Guido van Rossum7f253911997-05-09 02:42:48 +000014416# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014417echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14418echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14419
Guido van Rossum7f253911997-05-09 02:42:48 +000014420# Check whether --with-fpectl or --without-fpectl was given.
14421if test "${with_fpectl+set}" = set; then
14422 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014423
Guido van Rossum7f253911997-05-09 02:42:48 +000014424if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014425then
14426
14427cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014428#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014429_ACEOF
14430
14431 echo "$as_me:$LINENO: result: yes" >&5
14432echo "${ECHO_T}yes" >&6
14433else echo "$as_me:$LINENO: result: no" >&5
14434echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014435fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014436else
Martin v. Löwis11437992002-04-12 09:54:03 +000014437 echo "$as_me:$LINENO: result: no" >&5
14438echo "${ECHO_T}no" >&6
14439fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014440
Guido van Rossum7f43da71994-08-01 12:15:30 +000014441# check for --with-libm=...
14442
Guido van Rossum563e7081996-09-10 18:20:48 +000014443case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014444Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014445BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014446*) LIBM=-lm
14447esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014448echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14449echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14450
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014451# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014452if test "${with_libm+set}" = set; then
14453 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014454
Guido van Rossum7f253911997-05-09 02:42:48 +000014455if test "$withval" = no
14456then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14458echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014459elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014460then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014461 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14462echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14463else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14464echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14465 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014466fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014467else
Martin v. Löwis11437992002-04-12 09:54:03 +000014468 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14469echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14470fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014471
14472# check for --with-libc=...
14473
Martin v. Löwis11437992002-04-12 09:54:03 +000014474echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14475echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14476
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014477# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014478if test "${with_libc+set}" = set; then
14479 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014480
Guido van Rossum7f253911997-05-09 02:42:48 +000014481if test "$withval" = no
14482then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014483 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14484echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014485elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014486then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014487 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14488echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14489else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14490echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14491 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014492fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014493else
Martin v. Löwis11437992002-04-12 09:54:03 +000014494 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14495echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14496fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014497
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014498# check for hypot() in math library
14499LIBS_SAVE=$LIBS
14500LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014501
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014502for ac_func in hypot
14503do
Martin v. Löwis11437992002-04-12 09:54:03 +000014504as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14505echo "$as_me:$LINENO: checking for $ac_func" >&5
14506echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14507if eval "test \"\${$as_ac_var+set}\" = set"; then
14508 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014509else
Martin v. Löwis11437992002-04-12 09:54:03 +000014510 cat >conftest.$ac_ext <<_ACEOF
14511#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014512#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014513/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014514 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014515#include <assert.h>
14516/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014517#ifdef __cplusplus
14518extern "C"
14519#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014520/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014521 builtin and then its argument prototype would still apply. */
14522char $ac_func ();
14523char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014524
Martin v. Löwis11437992002-04-12 09:54:03 +000014525#ifdef F77_DUMMY_MAIN
14526# ifdef __cplusplus
14527 extern "C"
14528# endif
14529 int F77_DUMMY_MAIN() { return 1; }
14530#endif
14531int
14532main ()
14533{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014534/* The GNU C library defines this for functions which it implements
14535 to always fail with ENOSYS. Some functions are actually named
14536 something starting with __ and the normal name is an alias. */
14537#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14538choke me
14539#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014540f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014541#endif
14542
Martin v. Löwis11437992002-04-12 09:54:03 +000014543 ;
14544 return 0;
14545}
14546_ACEOF
14547rm -f conftest.$ac_objext conftest$ac_exeext
14548if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14549 (eval $ac_link) 2>&5
14550 ac_status=$?
14551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14552 (exit $ac_status); } &&
14553 { ac_try='test -s conftest$ac_exeext'
14554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14555 (eval $ac_try) 2>&5
14556 ac_status=$?
14557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14558 (exit $ac_status); }; }; then
14559 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014560else
Martin v. Löwis11437992002-04-12 09:54:03 +000014561 echo "$as_me: failed program was:" >&5
14562cat conftest.$ac_ext >&5
14563eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014564fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014565rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014567echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14568echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14569if test `eval echo '${'$as_ac_var'}'` = yes; then
14570 cat >>confdefs.h <<_ACEOF
14571#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14572_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014573
Michael W. Hudson54241132001-12-07 15:38:26 +000014574else
Martin v. Löwis11437992002-04-12 09:54:03 +000014575 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014576fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014577done
14578
Michael W. Hudson54241132001-12-07 15:38:26 +000014579
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014580LIBS=$LIBS_SAVE
14581
Guido van Rossumad713701997-07-10 22:42:38 +000014582# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014583echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14584echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14585if test "${ac_cv_malloc_zero+set}" = set; then
14586 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014587else
14588 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014589 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014590else
Martin v. Löwis11437992002-04-12 09:54:03 +000014591 cat >conftest.$ac_ext <<_ACEOF
14592#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014593#include "confdefs.h"
14594#include <stdio.h>
14595#ifdef HAVE_STDLIB
14596#include <stdlib.h>
14597#else
14598char *malloc(), *realloc();
14599int *free();
14600#endif
14601main() {
14602 char *p;
14603 p = malloc(0);
14604 if (p == NULL) exit(1);
14605 p = realloc(p, 0);
14606 if (p == NULL) exit(1);
14607 free(p);
14608 exit(0);
14609}
Martin v. Löwis11437992002-04-12 09:54:03 +000014610_ACEOF
14611rm -f conftest$ac_exeext
14612if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14613 (eval $ac_link) 2>&5
14614 ac_status=$?
14615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14616 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14618 (eval $ac_try) 2>&5
14619 ac_status=$?
14620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14621 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014622 ac_cv_malloc_zero=nonnull
14623else
Martin v. Löwis11437992002-04-12 09:54:03 +000014624 echo "$as_me: program exited with status $ac_status" >&5
14625echo "$as_me: failed program was:" >&5
14626cat conftest.$ac_ext >&5
14627( exit $ac_status )
14628ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014629fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014630rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014631fi
Guido van Rossumad713701997-07-10 22:42:38 +000014632fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014633 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014634echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14635echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014636if test "$ac_cv_malloc_zero" = null
14637then
Martin v. Löwis11437992002-04-12 09:54:03 +000014638
14639cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014640#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014641_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014642
14643fi
14644
Guido van Rossumef2255b2000-03-10 22:30:29 +000014645# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014646if test "${ac_cv_header_wchar_h+set}" = set; then
14647 echo "$as_me:$LINENO: checking for wchar.h" >&5
14648echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14649if test "${ac_cv_header_wchar_h+set}" = set; then
14650 echo $ECHO_N "(cached) $ECHO_C" >&6
14651fi
14652echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14653echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014654else
Martin v. Löwis11437992002-04-12 09:54:03 +000014655 # Is the header compilable?
14656echo "$as_me:$LINENO: checking wchar.h usability" >&5
14657echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14658cat >conftest.$ac_ext <<_ACEOF
14659#line $LINENO "configure"
14660#include "confdefs.h"
14661$ac_includes_default
14662#include <wchar.h>
14663_ACEOF
14664rm -f conftest.$ac_objext
14665if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14666 (eval $ac_compile) 2>&5
14667 ac_status=$?
14668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14669 (exit $ac_status); } &&
14670 { ac_try='test -s conftest.$ac_objext'
14671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14672 (eval $ac_try) 2>&5
14673 ac_status=$?
14674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14675 (exit $ac_status); }; }; then
14676 ac_header_compiler=yes
14677else
14678 echo "$as_me: failed program was:" >&5
14679cat conftest.$ac_ext >&5
14680ac_header_compiler=no
14681fi
14682rm -f conftest.$ac_objext conftest.$ac_ext
14683echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14684echo "${ECHO_T}$ac_header_compiler" >&6
14685
14686# Is the header present?
14687echo "$as_me:$LINENO: checking wchar.h presence" >&5
14688echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14689cat >conftest.$ac_ext <<_ACEOF
14690#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014691#include "confdefs.h"
14692#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014693_ACEOF
14694if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14695 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14696 ac_status=$?
14697 egrep -v '^ *\+' conftest.er1 >conftest.err
14698 rm -f conftest.er1
14699 cat conftest.err >&5
14700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14701 (exit $ac_status); } >/dev/null; then
14702 if test -s conftest.err; then
14703 ac_cpp_err=$ac_c_preproc_warn_flag
14704 else
14705 ac_cpp_err=
14706 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014707else
Martin v. Löwis11437992002-04-12 09:54:03 +000014708 ac_cpp_err=yes
14709fi
14710if test -z "$ac_cpp_err"; then
14711 ac_header_preproc=yes
14712else
14713 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014714 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014715 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014716fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014717rm -f conftest.err conftest.$ac_ext
14718echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14719echo "${ECHO_T}$ac_header_preproc" >&6
14720
14721# So? What about this header?
14722case $ac_header_compiler:$ac_header_preproc in
14723 yes:no )
14724 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14725echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14726 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14727echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14728 no:yes )
14729 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14730echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14731 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14732echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14733 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14734echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14735esac
14736echo "$as_me:$LINENO: checking for wchar.h" >&5
14737echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14738if test "${ac_cv_header_wchar_h+set}" = set; then
14739 echo $ECHO_N "(cached) $ECHO_C" >&6
14740else
14741 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014742fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014743echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14744echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14745
14746fi
14747if test $ac_cv_header_wchar_h = yes; then
14748
14749
14750cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014751#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014752_ACEOF
14753
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014754 wchar_h="yes"
14755
Guido van Rossumef2255b2000-03-10 22:30:29 +000014756else
Martin v. Löwis11437992002-04-12 09:54:03 +000014757 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014758
14759fi
14760
Michael W. Hudson54241132001-12-07 15:38:26 +000014761
Martin v. Löwis11437992002-04-12 09:54:03 +000014762
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014763# determine wchar_t size
14764if test "$wchar_h" = yes
14765then
Martin v. Löwis11437992002-04-12 09:54:03 +000014766 echo "$as_me:$LINENO: checking for wchar_t" >&5
14767echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14768if test "${ac_cv_type_wchar_t+set}" = set; then
14769 echo $ECHO_N "(cached) $ECHO_C" >&6
14770else
14771 cat >conftest.$ac_ext <<_ACEOF
14772#line $LINENO "configure"
14773#include "confdefs.h"
14774#include <wchar.h>
14775
14776#ifdef F77_DUMMY_MAIN
14777# ifdef __cplusplus
14778 extern "C"
14779# endif
14780 int F77_DUMMY_MAIN() { return 1; }
14781#endif
14782int
14783main ()
14784{
14785if ((wchar_t *) 0)
14786 return 0;
14787if (sizeof (wchar_t))
14788 return 0;
14789 ;
14790 return 0;
14791}
14792_ACEOF
14793rm -f conftest.$ac_objext
14794if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14795 (eval $ac_compile) 2>&5
14796 ac_status=$?
14797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14798 (exit $ac_status); } &&
14799 { ac_try='test -s conftest.$ac_objext'
14800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14801 (eval $ac_try) 2>&5
14802 ac_status=$?
14803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14804 (exit $ac_status); }; }; then
14805 ac_cv_type_wchar_t=yes
14806else
14807 echo "$as_me: failed program was:" >&5
14808cat conftest.$ac_ext >&5
14809ac_cv_type_wchar_t=no
14810fi
14811rm -f conftest.$ac_objext conftest.$ac_ext
14812fi
14813echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14814echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14815
14816echo "$as_me:$LINENO: checking size of wchar_t" >&5
14817echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14818if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14819 echo $ECHO_N "(cached) $ECHO_C" >&6
14820else
14821 if test "$ac_cv_type_wchar_t" = yes; then
14822 # The cast to unsigned long works around a bug in the HP C Compiler
14823 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14824 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14825 # This bug is HP SR number 8606223364.
14826 if test "$cross_compiling" = yes; then
14827 # Depending upon the size, compute the lo and hi bounds.
14828cat >conftest.$ac_ext <<_ACEOF
14829#line $LINENO "configure"
14830#include "confdefs.h"
14831#include <wchar.h>
14832
14833#ifdef F77_DUMMY_MAIN
14834# ifdef __cplusplus
14835 extern "C"
14836# endif
14837 int F77_DUMMY_MAIN() { return 1; }
14838#endif
14839int
14840main ()
14841{
14842static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14843test_array [0] = 0
14844
14845 ;
14846 return 0;
14847}
14848_ACEOF
14849rm -f conftest.$ac_objext
14850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14851 (eval $ac_compile) 2>&5
14852 ac_status=$?
14853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14854 (exit $ac_status); } &&
14855 { ac_try='test -s conftest.$ac_objext'
14856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14857 (eval $ac_try) 2>&5
14858 ac_status=$?
14859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14860 (exit $ac_status); }; }; then
14861 ac_lo=0 ac_mid=0
14862 while :; do
14863 cat >conftest.$ac_ext <<_ACEOF
14864#line $LINENO "configure"
14865#include "confdefs.h"
14866#include <wchar.h>
14867
14868#ifdef F77_DUMMY_MAIN
14869# ifdef __cplusplus
14870 extern "C"
14871# endif
14872 int F77_DUMMY_MAIN() { return 1; }
14873#endif
14874int
14875main ()
14876{
14877static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14878test_array [0] = 0
14879
14880 ;
14881 return 0;
14882}
14883_ACEOF
14884rm -f conftest.$ac_objext
14885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14886 (eval $ac_compile) 2>&5
14887 ac_status=$?
14888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14889 (exit $ac_status); } &&
14890 { ac_try='test -s conftest.$ac_objext'
14891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14892 (eval $ac_try) 2>&5
14893 ac_status=$?
14894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14895 (exit $ac_status); }; }; then
14896 ac_hi=$ac_mid; break
14897else
14898 echo "$as_me: failed program was:" >&5
14899cat conftest.$ac_ext >&5
14900ac_lo=`expr $ac_mid + 1`
14901 if test $ac_lo -le $ac_mid; then
14902 ac_lo= ac_hi=
14903 break
14904 fi
14905 ac_mid=`expr 2 '*' $ac_mid + 1`
14906fi
14907rm -f conftest.$ac_objext conftest.$ac_ext
14908 done
14909else
14910 echo "$as_me: failed program was:" >&5
14911cat conftest.$ac_ext >&5
14912cat >conftest.$ac_ext <<_ACEOF
14913#line $LINENO "configure"
14914#include "confdefs.h"
14915#include <wchar.h>
14916
14917#ifdef F77_DUMMY_MAIN
14918# ifdef __cplusplus
14919 extern "C"
14920# endif
14921 int F77_DUMMY_MAIN() { return 1; }
14922#endif
14923int
14924main ()
14925{
14926static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14927test_array [0] = 0
14928
14929 ;
14930 return 0;
14931}
14932_ACEOF
14933rm -f conftest.$ac_objext
14934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14935 (eval $ac_compile) 2>&5
14936 ac_status=$?
14937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14938 (exit $ac_status); } &&
14939 { ac_try='test -s conftest.$ac_objext'
14940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14941 (eval $ac_try) 2>&5
14942 ac_status=$?
14943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14944 (exit $ac_status); }; }; then
14945 ac_hi=-1 ac_mid=-1
14946 while :; do
14947 cat >conftest.$ac_ext <<_ACEOF
14948#line $LINENO "configure"
14949#include "confdefs.h"
14950#include <wchar.h>
14951
14952#ifdef F77_DUMMY_MAIN
14953# ifdef __cplusplus
14954 extern "C"
14955# endif
14956 int F77_DUMMY_MAIN() { return 1; }
14957#endif
14958int
14959main ()
14960{
14961static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14962test_array [0] = 0
14963
14964 ;
14965 return 0;
14966}
14967_ACEOF
14968rm -f conftest.$ac_objext
14969if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14970 (eval $ac_compile) 2>&5
14971 ac_status=$?
14972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14973 (exit $ac_status); } &&
14974 { ac_try='test -s conftest.$ac_objext'
14975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14976 (eval $ac_try) 2>&5
14977 ac_status=$?
14978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14979 (exit $ac_status); }; }; then
14980 ac_lo=$ac_mid; break
14981else
14982 echo "$as_me: failed program was:" >&5
14983cat conftest.$ac_ext >&5
14984ac_hi=`expr '(' $ac_mid ')' - 1`
14985 if test $ac_mid -le $ac_hi; then
14986 ac_lo= ac_hi=
14987 break
14988 fi
14989 ac_mid=`expr 2 '*' $ac_mid`
14990fi
14991rm -f conftest.$ac_objext conftest.$ac_ext
14992 done
14993else
14994 echo "$as_me: failed program was:" >&5
14995cat conftest.$ac_ext >&5
14996ac_lo= ac_hi=
14997fi
14998rm -f conftest.$ac_objext conftest.$ac_ext
14999fi
15000rm -f conftest.$ac_objext conftest.$ac_ext
15001# Binary search between lo and hi bounds.
15002while test "x$ac_lo" != "x$ac_hi"; do
15003 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15004 cat >conftest.$ac_ext <<_ACEOF
15005#line $LINENO "configure"
15006#include "confdefs.h"
15007#include <wchar.h>
15008
15009#ifdef F77_DUMMY_MAIN
15010# ifdef __cplusplus
15011 extern "C"
15012# endif
15013 int F77_DUMMY_MAIN() { return 1; }
15014#endif
15015int
15016main ()
15017{
15018static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15019test_array [0] = 0
15020
15021 ;
15022 return 0;
15023}
15024_ACEOF
15025rm -f conftest.$ac_objext
15026if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15027 (eval $ac_compile) 2>&5
15028 ac_status=$?
15029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15030 (exit $ac_status); } &&
15031 { ac_try='test -s conftest.$ac_objext'
15032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15033 (eval $ac_try) 2>&5
15034 ac_status=$?
15035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15036 (exit $ac_status); }; }; then
15037 ac_hi=$ac_mid
15038else
15039 echo "$as_me: failed program was:" >&5
15040cat conftest.$ac_ext >&5
15041ac_lo=`expr '(' $ac_mid ')' + 1`
15042fi
15043rm -f conftest.$ac_objext conftest.$ac_ext
15044done
15045case $ac_lo in
15046?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15047'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15048echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15049 { (exit 1); exit 1; }; } ;;
15050esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015051else
15052 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015053 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15054echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15055 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015056else
Martin v. Löwis11437992002-04-12 09:54:03 +000015057 cat >conftest.$ac_ext <<_ACEOF
15058#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015059#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015060#include <wchar.h>
15061
15062long longval () { return (long) (sizeof (wchar_t)); }
15063unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015064#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015065#include <stdlib.h>
15066#ifdef F77_DUMMY_MAIN
15067# ifdef __cplusplus
15068 extern "C"
15069# endif
15070 int F77_DUMMY_MAIN() { return 1; }
15071#endif
15072int
15073main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015074{
Martin v. Löwis11437992002-04-12 09:54:03 +000015075
15076 FILE *f = fopen ("conftest.val", "w");
15077 if (! f)
15078 exit (1);
15079 if (((long) (sizeof (wchar_t))) < 0)
15080 {
15081 long i = longval ();
15082 if (i != ((long) (sizeof (wchar_t))))
15083 exit (1);
15084 fprintf (f, "%ld\n", i);
15085 }
15086 else
15087 {
15088 unsigned long i = ulongval ();
15089 if (i != ((long) (sizeof (wchar_t))))
15090 exit (1);
15091 fprintf (f, "%lu\n", i);
15092 }
15093 exit (ferror (f) || fclose (f) != 0);
15094
15095 ;
15096 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015097}
Martin v. Löwis11437992002-04-12 09:54:03 +000015098_ACEOF
15099rm -f conftest$ac_exeext
15100if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15101 (eval $ac_link) 2>&5
15102 ac_status=$?
15103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15104 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15106 (eval $ac_try) 2>&5
15107 ac_status=$?
15108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15109 (exit $ac_status); }; }; then
15110 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015111else
Martin v. Löwis11437992002-04-12 09:54:03 +000015112 echo "$as_me: program exited with status $ac_status" >&5
15113echo "$as_me: failed program was:" >&5
15114cat conftest.$ac_ext >&5
15115( exit $ac_status )
15116{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15117echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15118 { (exit 1); exit 1; }; }
15119fi
15120rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15121fi
15122fi
15123rm -f conftest.val
15124else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015125 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015126fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015127fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015128echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15129echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15130cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015131#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015132_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015133
Michael W. Hudson54241132001-12-07 15:38:26 +000015134
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015135fi
15136
Martin v. Löwis11437992002-04-12 09:54:03 +000015137echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15138echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015139# Check whether --enable-unicode or --disable-unicode was given.
15140if test "${enable_unicode+set}" = set; then
15141 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015142
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015143else
15144 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015145fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015146
15147if test $enable_unicode = yes
15148then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015149 # Without any arguments, Py_UNICODE defaults to two-byte mode
15150 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015151fi
15152
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015153
15154
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015155case "$enable_unicode" in
15156ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015157 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015158#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015159_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015160
15161 ;;
15162ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015163 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015164#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015165_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015166
15167 ;;
15168esac
15169
Michael W. Hudson54241132001-12-07 15:38:26 +000015170
Martin v. Löwis11437992002-04-12 09:54:03 +000015171
15172
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015173
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015174if test "$enable_unicode" = "no"
15175then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015176 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015177 echo "$as_me:$LINENO: result: not used" >&5
15178echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015179else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015180 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015181
15182cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015183#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015184_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015185
15186 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15187 then
15188 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015189
Martin v. Löwis11437992002-04-12 09:54:03 +000015190cat >>confdefs.h <<\_ACEOF
15191#define HAVE_USABLE_WCHAR_T 1
15192_ACEOF
15193
15194 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015195#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015196_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015197
15198 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15199 then
15200 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015202#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015203_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015204
15205 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15206 then
15207 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015208 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015209#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015210_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015211
15212 else
15213 PY_UNICODE_TYPE="no type found"
15214 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015215 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15216echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015217fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015218
15219# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015220echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15221echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15222if test "${ac_cv_c_bigendian+set}" = set; then
15223 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015224else
Martin v. Löwis11437992002-04-12 09:54:03 +000015225 # See if sys/param.h defines the BYTE_ORDER macro.
15226cat >conftest.$ac_ext <<_ACEOF
15227#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015228#include "confdefs.h"
15229#include <sys/types.h>
15230#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015231
Martin v. Löwis11437992002-04-12 09:54:03 +000015232#ifdef F77_DUMMY_MAIN
15233# ifdef __cplusplus
15234 extern "C"
15235# endif
15236 int F77_DUMMY_MAIN() { return 1; }
15237#endif
15238int
15239main ()
15240{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015241#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15242 bogus endian macros
15243#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015244
15245 ;
15246 return 0;
15247}
15248_ACEOF
15249rm -f conftest.$ac_objext
15250if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15251 (eval $ac_compile) 2>&5
15252 ac_status=$?
15253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15254 (exit $ac_status); } &&
15255 { ac_try='test -s conftest.$ac_objext'
15256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15257 (eval $ac_try) 2>&5
15258 ac_status=$?
15259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15260 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015261 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015262cat >conftest.$ac_ext <<_ACEOF
15263#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015264#include "confdefs.h"
15265#include <sys/types.h>
15266#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015267
Martin v. Löwis11437992002-04-12 09:54:03 +000015268#ifdef F77_DUMMY_MAIN
15269# ifdef __cplusplus
15270 extern "C"
15271# endif
15272 int F77_DUMMY_MAIN() { return 1; }
15273#endif
15274int
15275main ()
15276{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015277#if BYTE_ORDER != BIG_ENDIAN
15278 not big endian
15279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015280
15281 ;
15282 return 0;
15283}
15284_ACEOF
15285rm -f conftest.$ac_objext
15286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15287 (eval $ac_compile) 2>&5
15288 ac_status=$?
15289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15290 (exit $ac_status); } &&
15291 { ac_try='test -s conftest.$ac_objext'
15292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15293 (eval $ac_try) 2>&5
15294 ac_status=$?
15295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15296 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015297 ac_cv_c_bigendian=yes
15298else
Martin v. Löwis11437992002-04-12 09:54:03 +000015299 echo "$as_me: failed program was:" >&5
15300cat conftest.$ac_ext >&5
15301ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015302fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015303rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015304else
Martin v. Löwis11437992002-04-12 09:54:03 +000015305 echo "$as_me: failed program was:" >&5
15306cat conftest.$ac_ext >&5
15307# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015308if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015309 # try to guess the endianess by grep'ing values into an object file
15310 ac_cv_c_bigendian=unknown
15311 cat >conftest.$ac_ext <<_ACEOF
15312#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015313#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015314short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15315short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15316void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15317short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15318short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15319void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15320#ifdef F77_DUMMY_MAIN
15321# ifdef __cplusplus
15322 extern "C"
15323# endif
15324 int F77_DUMMY_MAIN() { return 1; }
15325#endif
15326int
15327main ()
15328{
15329 _ascii (); _ebcdic ();
15330 ;
15331 return 0;
15332}
15333_ACEOF
15334rm -f conftest.$ac_objext
15335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15336 (eval $ac_compile) 2>&5
15337 ac_status=$?
15338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15339 (exit $ac_status); } &&
15340 { ac_try='test -s conftest.$ac_objext'
15341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15342 (eval $ac_try) 2>&5
15343 ac_status=$?
15344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15345 (exit $ac_status); }; }; then
15346 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15347 ac_cv_c_bigendian=yes
15348fi
15349if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15350 if test "$ac_cv_c_bigendian" = unknown; then
15351 ac_cv_c_bigendian=no
15352 else
15353 # finding both strings is unlikely to happen, but who knows?
15354 ac_cv_c_bigendian=unknown
15355 fi
15356fi
15357else
15358 echo "$as_me: failed program was:" >&5
15359cat conftest.$ac_ext >&5
15360fi
15361rm -f conftest.$ac_objext conftest.$ac_ext
15362else
15363 cat >conftest.$ac_ext <<_ACEOF
15364#line $LINENO "configure"
15365#include "confdefs.h"
15366int
15367main ()
15368{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015369 /* Are we little or big endian? From Harbison&Steele. */
15370 union
15371 {
15372 long l;
15373 char c[sizeof (long)];
15374 } u;
15375 u.l = 1;
15376 exit (u.c[sizeof (long) - 1] == 1);
15377}
Martin v. Löwis11437992002-04-12 09:54:03 +000015378_ACEOF
15379rm -f conftest$ac_exeext
15380if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15381 (eval $ac_link) 2>&5
15382 ac_status=$?
15383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15384 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15386 (eval $ac_try) 2>&5
15387 ac_status=$?
15388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15389 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015390 ac_cv_c_bigendian=no
15391else
Martin v. Löwis11437992002-04-12 09:54:03 +000015392 echo "$as_me: program exited with status $ac_status" >&5
15393echo "$as_me: failed program was:" >&5
15394cat conftest.$ac_ext >&5
15395( exit $ac_status )
15396ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015397fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015398rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015399fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015400fi
15401rm -f conftest.$ac_objext conftest.$ac_ext
15402fi
15403echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15404echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15405case $ac_cv_c_bigendian in
15406 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015407
Martin v. Löwis11437992002-04-12 09:54:03 +000015408cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015409#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015410_ACEOF
15411 ;;
15412 no)
15413 ;;
15414 *)
15415 { { echo "$as_me:$LINENO: error: unknown endianess
15416presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15417echo "$as_me: error: unknown endianess
15418presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15419 { (exit 1); exit 1; }; } ;;
15420esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015421
Michael W. Hudson54241132001-12-07 15:38:26 +000015422
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015423# Check whether right shifting a negative integer extends the sign bit
15424# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015425echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15426echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15427if test "${ac_cv_rshift_extends_sign+set}" = set; then
15428 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015429else
Martin v. Löwis11437992002-04-12 09:54:03 +000015430
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015431if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015432 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015433else
Martin v. Löwis11437992002-04-12 09:54:03 +000015434 cat >conftest.$ac_ext <<_ACEOF
15435#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015436#include "confdefs.h"
15437
15438int main()
15439{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015440 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015441}
15442
Martin v. Löwis11437992002-04-12 09:54:03 +000015443_ACEOF
15444rm -f conftest$ac_exeext
15445if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15446 (eval $ac_link) 2>&5
15447 ac_status=$?
15448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15449 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15451 (eval $ac_try) 2>&5
15452 ac_status=$?
15453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15454 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015455 ac_cv_rshift_extends_sign=yes
15456else
Martin v. Löwis11437992002-04-12 09:54:03 +000015457 echo "$as_me: program exited with status $ac_status" >&5
15458echo "$as_me: failed program was:" >&5
15459cat conftest.$ac_ext >&5
15460( exit $ac_status )
15461ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015462fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015463rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15464fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015465fi
15466
Martin v. Löwis11437992002-04-12 09:54:03 +000015467echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15468echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015469if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015470then
Martin v. Löwis11437992002-04-12 09:54:03 +000015471
15472cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015473#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015474_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015475
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015476fi
15477
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015478# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015479echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15480echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15481if test "${ac_cv_have_getc_unlocked+set}" = set; then
15482 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015483else
Martin v. Löwis11437992002-04-12 09:54:03 +000015484
15485cat >conftest.$ac_ext <<_ACEOF
15486#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015487#include "confdefs.h"
15488#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015489#ifdef F77_DUMMY_MAIN
15490# ifdef __cplusplus
15491 extern "C"
15492# endif
15493 int F77_DUMMY_MAIN() { return 1; }
15494#endif
15495int
15496main ()
15497{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015498
15499 FILE *f = fopen("/dev/null", "r");
15500 flockfile(f);
15501 getc_unlocked(f);
15502 funlockfile(f);
15503
Martin v. Löwis11437992002-04-12 09:54:03 +000015504 ;
15505 return 0;
15506}
15507_ACEOF
15508rm -f conftest.$ac_objext conftest$ac_exeext
15509if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15510 (eval $ac_link) 2>&5
15511 ac_status=$?
15512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15513 (exit $ac_status); } &&
15514 { ac_try='test -s conftest$ac_exeext'
15515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15516 (eval $ac_try) 2>&5
15517 ac_status=$?
15518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15519 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015520 ac_cv_have_getc_unlocked=yes
15521else
Martin v. Löwis11437992002-04-12 09:54:03 +000015522 echo "$as_me: failed program was:" >&5
15523cat conftest.$ac_ext >&5
15524ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015525fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015526rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015527fi
15528
Martin v. Löwis11437992002-04-12 09:54:03 +000015529echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15530echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015531if test "$ac_cv_have_getc_unlocked" = yes
15532then
Martin v. Löwis11437992002-04-12 09:54:03 +000015533
15534cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015535#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015536_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015537
15538fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015539
Martin v. Löwis0daad592001-09-30 21:09:59 +000015540# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015541echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15542echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15543if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15544 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015545else
Martin v. Löwis11437992002-04-12 09:54:03 +000015546 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015547LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015548cat >conftest.$ac_ext <<_ACEOF
15549#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015550#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015551
Guido van Rossum353ae582001-07-10 16:45:32 +000015552/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015553#ifdef __cplusplus
15554extern "C"
15555#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015556/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015557 builtin and then its argument prototype would still apply. */
15558char rl_pre_input_hook ();
15559#ifdef F77_DUMMY_MAIN
15560# ifdef __cplusplus
15561 extern "C"
15562# endif
15563 int F77_DUMMY_MAIN() { return 1; }
15564#endif
15565int
15566main ()
15567{
15568rl_pre_input_hook ();
15569 ;
15570 return 0;
15571}
15572_ACEOF
15573rm -f conftest.$ac_objext conftest$ac_exeext
15574if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15575 (eval $ac_link) 2>&5
15576 ac_status=$?
15577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15578 (exit $ac_status); } &&
15579 { ac_try='test -s conftest$ac_exeext'
15580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15581 (eval $ac_try) 2>&5
15582 ac_status=$?
15583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15584 (exit $ac_status); }; }; then
15585 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015586else
Martin v. Löwis11437992002-04-12 09:54:03 +000015587 echo "$as_me: failed program was:" >&5
15588cat conftest.$ac_ext >&5
15589ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015590fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015591rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15592LIBS=$ac_check_lib_save_LIBS
15593fi
15594echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15595echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15596if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015597
Martin v. Löwis11437992002-04-12 09:54:03 +000015598cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015599#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015600_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015601
Martin v. Löwis0daad592001-09-30 21:09:59 +000015602fi
15603
Michael W. Hudson54241132001-12-07 15:38:26 +000015604
Martin v. Löwis0daad592001-09-30 21:09:59 +000015605# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015606echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15607echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15608if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15609 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015610else
Martin v. Löwis11437992002-04-12 09:54:03 +000015611 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015612LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015613cat >conftest.$ac_ext <<_ACEOF
15614#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015615#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015616
Martin v. Löwis0daad592001-09-30 21:09:59 +000015617/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015618#ifdef __cplusplus
15619extern "C"
15620#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015621/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015622 builtin and then its argument prototype would still apply. */
15623char rl_completion_matches ();
15624#ifdef F77_DUMMY_MAIN
15625# ifdef __cplusplus
15626 extern "C"
15627# endif
15628 int F77_DUMMY_MAIN() { return 1; }
15629#endif
15630int
15631main ()
15632{
15633rl_completion_matches ();
15634 ;
15635 return 0;
15636}
15637_ACEOF
15638rm -f conftest.$ac_objext conftest$ac_exeext
15639if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15640 (eval $ac_link) 2>&5
15641 ac_status=$?
15642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15643 (exit $ac_status); } &&
15644 { ac_try='test -s conftest$ac_exeext'
15645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15646 (eval $ac_try) 2>&5
15647 ac_status=$?
15648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15649 (exit $ac_status); }; }; then
15650 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015651else
Martin v. Löwis11437992002-04-12 09:54:03 +000015652 echo "$as_me: failed program was:" >&5
15653cat conftest.$ac_ext >&5
15654ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015655fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015656rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15657LIBS=$ac_check_lib_save_LIBS
15658fi
15659echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15660echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15661if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015662
Martin v. Löwis11437992002-04-12 09:54:03 +000015663cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015664#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015665_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015666
Guido van Rossum353ae582001-07-10 16:45:32 +000015667fi
15668
Jack Jansendd19cf82001-12-06 22:36:17 +000015669
Martin v. Löwis11437992002-04-12 09:54:03 +000015670echo "$as_me:$LINENO: checking for broken nice()" >&5
15671echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15672if test "${ac_cv_broken_nice+set}" = set; then
15673 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015674else
Martin v. Löwis11437992002-04-12 09:54:03 +000015675
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015676if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015677 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015678else
Martin v. Löwis11437992002-04-12 09:54:03 +000015679 cat >conftest.$ac_ext <<_ACEOF
15680#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015681#include "confdefs.h"
15682
15683int main()
15684{
15685 int val1 = nice(1);
15686 if (val1 != -1 && val1 == nice(2))
15687 exit(0);
15688 exit(1);
15689}
15690
Martin v. Löwis11437992002-04-12 09:54:03 +000015691_ACEOF
15692rm -f conftest$ac_exeext
15693if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15694 (eval $ac_link) 2>&5
15695 ac_status=$?
15696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15697 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15699 (eval $ac_try) 2>&5
15700 ac_status=$?
15701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15702 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015703 ac_cv_broken_nice=yes
15704else
Martin v. Löwis11437992002-04-12 09:54:03 +000015705 echo "$as_me: program exited with status $ac_status" >&5
15706echo "$as_me: failed program was:" >&5
15707cat conftest.$ac_ext >&5
15708( exit $ac_status )
15709ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015710fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015711rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15712fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015713fi
15714
Martin v. Löwis11437992002-04-12 09:54:03 +000015715echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15716echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015717if test "$ac_cv_broken_nice" = yes
15718then
Martin v. Löwis11437992002-04-12 09:54:03 +000015719
15720cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015721#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015722_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015723
15724fi
15725
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015726# Look for subsecond timestamps in struct stat
15727echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
15728echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
15729if test "${ac_cv_stat_tv_nsec+set}" = set; then
15730 echo $ECHO_N "(cached) $ECHO_C" >&6
15731else
15732 cat >conftest.$ac_ext <<_ACEOF
15733#line $LINENO "configure"
15734#include "confdefs.h"
15735#include <sys/stat.h>
15736#ifdef F77_DUMMY_MAIN
15737# ifdef __cplusplus
15738 extern "C"
15739# endif
15740 int F77_DUMMY_MAIN() { return 1; }
15741#endif
15742int
15743main ()
15744{
15745
15746struct stat st;
15747st.st_mtim.tv_nsec = 1;
15748
15749 ;
15750 return 0;
15751}
15752_ACEOF
15753rm -f conftest.$ac_objext
15754if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15755 (eval $ac_compile) 2>&5
15756 ac_status=$?
15757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15758 (exit $ac_status); } &&
15759 { ac_try='test -s conftest.$ac_objext'
15760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15761 (eval $ac_try) 2>&5
15762 ac_status=$?
15763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15764 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015765 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015766else
15767 echo "$as_me: failed program was:" >&5
15768cat conftest.$ac_ext >&5
15769ac_cv_stat_tv_nsec=no
15770fi
15771rm -f conftest.$ac_objext conftest.$ac_ext
15772fi
15773
15774echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
15775echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
15776if test "$ac_cv_stat_tv_nsec" = yes
15777then
15778
15779cat >>confdefs.h <<\_ACEOF
15780#define HAVE_STAT_TV_NSEC 1
15781_ACEOF
15782
15783fi
15784
Jack Jansen666b1e72001-10-31 12:11:48 +000015785# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015786echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15787echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15788if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15789 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015790else
Martin v. Löwis11437992002-04-12 09:54:03 +000015791 cat >conftest.$ac_ext <<_ACEOF
15792#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015793#include "confdefs.h"
15794#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015795#ifdef F77_DUMMY_MAIN
15796# ifdef __cplusplus
15797 extern "C"
15798# endif
15799 int F77_DUMMY_MAIN() { return 1; }
15800#endif
15801int
15802main ()
15803{
Jack Jansen666b1e72001-10-31 12:11:48 +000015804
15805 int rtn;
15806 rtn = mvwdelch(0,0,0);
15807
Martin v. Löwis11437992002-04-12 09:54:03 +000015808 ;
15809 return 0;
15810}
15811_ACEOF
15812rm -f conftest.$ac_objext
15813if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15814 (eval $ac_compile) 2>&5
15815 ac_status=$?
15816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15817 (exit $ac_status); } &&
15818 { ac_try='test -s conftest.$ac_objext'
15819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15820 (eval $ac_try) 2>&5
15821 ac_status=$?
15822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15823 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015824 ac_cv_mvwdelch_is_expression=yes
15825else
Martin v. Löwis11437992002-04-12 09:54:03 +000015826 echo "$as_me: failed program was:" >&5
15827cat conftest.$ac_ext >&5
15828ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015829fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015830rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015831fi
15832
Martin v. Löwis11437992002-04-12 09:54:03 +000015833echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15834echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015835
15836if test "$ac_cv_mvwdelch_is_expression" = yes
15837then
Martin v. Löwis11437992002-04-12 09:54:03 +000015838
15839cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015840#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015841_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015842
15843fi
15844
Martin v. Löwis11437992002-04-12 09:54:03 +000015845echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15846echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15847if test "${ac_cv_window_has_flags+set}" = set; then
15848 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015849else
Martin v. Löwis11437992002-04-12 09:54:03 +000015850 cat >conftest.$ac_ext <<_ACEOF
15851#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015852#include "confdefs.h"
15853#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015854#ifdef F77_DUMMY_MAIN
15855# ifdef __cplusplus
15856 extern "C"
15857# endif
15858 int F77_DUMMY_MAIN() { return 1; }
15859#endif
15860int
15861main ()
15862{
Jack Jansen666b1e72001-10-31 12:11:48 +000015863
15864 WINDOW *w;
15865 w->_flags = 0;
15866
Martin v. Löwis11437992002-04-12 09:54:03 +000015867 ;
15868 return 0;
15869}
15870_ACEOF
15871rm -f conftest.$ac_objext
15872if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15873 (eval $ac_compile) 2>&5
15874 ac_status=$?
15875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15876 (exit $ac_status); } &&
15877 { ac_try='test -s conftest.$ac_objext'
15878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15879 (eval $ac_try) 2>&5
15880 ac_status=$?
15881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15882 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015883 ac_cv_window_has_flags=yes
15884else
Martin v. Löwis11437992002-04-12 09:54:03 +000015885 echo "$as_me: failed program was:" >&5
15886cat conftest.$ac_ext >&5
15887ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015888fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015889rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015890fi
15891
Martin v. Löwis11437992002-04-12 09:54:03 +000015892echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15893echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015894
Jack Jansen666b1e72001-10-31 12:11:48 +000015895
15896if test "$ac_cv_window_has_flags" = yes
15897then
Martin v. Löwis11437992002-04-12 09:54:03 +000015898
15899cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015900#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015901_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015902
15903fi
15904
Guido van Rossum95713eb2000-05-18 20:53:31 +000015905# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15906# Add sys/socket.h to confdefs.h
15907cat >> confdefs.h <<\EOF
15908#ifdef HAVE_SYS_SOCKET_H
15909#include <sys/socket.h>
15910#endif
15911EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015912echo "$as_me:$LINENO: checking for socklen_t" >&5
15913echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15914if test "${ac_cv_type_socklen_t+set}" = set; then
15915 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015916else
Martin v. Löwis11437992002-04-12 09:54:03 +000015917 cat >conftest.$ac_ext <<_ACEOF
15918#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015919#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015920$ac_includes_default
15921#ifdef F77_DUMMY_MAIN
15922# ifdef __cplusplus
15923 extern "C"
15924# endif
15925 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015927int
15928main ()
15929{
15930if ((socklen_t *) 0)
15931 return 0;
15932if (sizeof (socklen_t))
15933 return 0;
15934 ;
15935 return 0;
15936}
15937_ACEOF
15938rm -f conftest.$ac_objext
15939if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15940 (eval $ac_compile) 2>&5
15941 ac_status=$?
15942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15943 (exit $ac_status); } &&
15944 { ac_try='test -s conftest.$ac_objext'
15945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15946 (eval $ac_try) 2>&5
15947 ac_status=$?
15948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15949 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015950 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015951else
Martin v. Löwis11437992002-04-12 09:54:03 +000015952 echo "$as_me: failed program was:" >&5
15953cat conftest.$ac_ext >&5
15954ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015955fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015956rm -f conftest.$ac_objext conftest.$ac_ext
15957fi
15958echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15959echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15960if test $ac_cv_type_socklen_t = yes; then
15961 :
15962else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015963
Martin v. Löwis11437992002-04-12 09:54:03 +000015964cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015965#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015966_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015967
15968fi
15969
Michael W. Hudson54241132001-12-07 15:38:26 +000015970
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015971#AC_MSG_CHECKING(for Modules/Setup)
15972#if test ! -f Modules/Setup ; then
15973# if test ! -d Modules ; then
15974# mkdir Modules
15975# fi
15976# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15977# AC_MSG_RESULT(creating)
15978#else
15979# AC_MSG_RESULT(already exists)
15980#fi
15981
Michael W. Hudson54241132001-12-07 15:38:26 +000015982
15983
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015984for h in `(cd $srcdir;echo Python/thread_*.h)`
15985do
15986 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15987done
15988
Michael W. Hudson54241132001-12-07 15:38:26 +000015989
Jack Jansen0b06be72002-06-21 14:48:38 +000015990SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000015991echo "$as_me:$LINENO: checking for build directories" >&5
15992echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015993for dir in $SRCDIRS; do
15994 if test ! -d $dir; then
15995 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015996 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015997done
Martin v. Löwis11437992002-04-12 09:54:03 +000015998echo "$as_me:$LINENO: result: done" >&5
15999echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000016000
Guido van Rossum627b2d71993-12-24 10:39:16 +000016001# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000016002ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
16003cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016004# This file is a shell script that caches the results of configure
16005# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016006# scripts and configure runs, see configure's option --config-cache.
16007# It is not useful on other systems. If it contains results you don't
16008# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016009#
Martin v. Löwis11437992002-04-12 09:54:03 +000016010# config.status only pays attention to the cache file if you give it
16011# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016012#
Martin v. Löwis11437992002-04-12 09:54:03 +000016013# `ac_cv_env_foo' variables (set or unset) will be overriden when
16014# loading this file, other *unset* `ac_cv_foo' will be assigned the
16015# following values.
16016
16017_ACEOF
16018
Guido van Rossumf78abae1997-01-21 22:02:36 +000016019# The following way of writing the cache mishandles newlines in values,
16020# but we know of no workaround that is simple, portable, and efficient.
16021# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016022# Ultrix sh set writes to stderr and can't be redirected directly,
16023# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000016024{
16025 (set) 2>&1 |
16026 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16027 *ac_space=\ *)
16028 # `set' does not quote correctly, so add quotes (double-quote
16029 # substitution turns \\\\ into \\, and sed turns \\ into \).
16030 sed -n \
16031 "s/'/'\\\\''/g;
16032 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16033 ;;
16034 *)
16035 # `set' quotes correctly as required by POSIX, so do not add quotes.
16036 sed -n \
16037 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16038 ;;
16039 esac;
16040} |
16041 sed '
16042 t clear
16043 : clear
16044 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16045 t end
16046 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16047 : end' >>confcache
16048if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016049 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016050 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16051 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016052 else
16053 echo "not updating unwritable cache $cache_file"
16054 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016055fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016056rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016057
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016058test "x$prefix" = xNONE && prefix=$ac_default_prefix
16059# Let make expand exec_prefix.
16060test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016061
Martin v. Löwis11437992002-04-12 09:54:03 +000016062# VPATH may cause trouble with some makes, so we remove $(srcdir),
16063# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16064# trailing colons and then remove the whole line if VPATH becomes empty
16065# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016066if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016067 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16068s/:*\$(srcdir):*/:/;
16069s/:*\${srcdir}:*/:/;
16070s/:*@srcdir@:*/:/;
16071s/^\([^=]*=[ ]*\):*/\1/;
16072s/:*$//;
16073s/^[^=]*=[ ]*$//;
16074}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016075fi
16076
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016077DEFS=-DHAVE_CONFIG_H
16078
Martin v. Löwis11437992002-04-12 09:54:03 +000016079
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016080: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016081ac_clean_files_save=$ac_clean_files
16082ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16083{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16084echo "$as_me: creating $CONFIG_STATUS" >&6;}
16085cat >$CONFIG_STATUS <<_ACEOF
16086#! $SHELL
16087# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016088# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016089# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016090# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016091
Martin v. Löwis11437992002-04-12 09:54:03 +000016092debug=false
16093SHELL=\${CONFIG_SHELL-$SHELL}
16094_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016095
Martin v. Löwis11437992002-04-12 09:54:03 +000016096cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016097
Martin v. Löwis11437992002-04-12 09:54:03 +000016098## --------------------- ##
16099## M4sh Initialization. ##
16100## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016101
Martin v. Löwis11437992002-04-12 09:54:03 +000016102# Be Bourne compatible
16103if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16104 emulate sh
16105 NULLCMD=:
16106elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16107 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016108fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016109
Martin v. Löwis11437992002-04-12 09:54:03 +000016110# NLS nuisances.
16111# Support unset when possible.
16112if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16113 as_unset=unset
16114else
16115 as_unset=false
16116fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016117
Martin v. Löwis11437992002-04-12 09:54:03 +000016118(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16119 { $as_unset LANG || test "${LANG+set}" != set; } ||
16120 { LANG=C; export LANG; }
16121(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16122 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16123 { LC_ALL=C; export LC_ALL; }
16124(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16125 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16126 { LC_TIME=C; export LC_TIME; }
16127(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16128 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16129 { LC_CTYPE=C; export LC_CTYPE; }
16130(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16131 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16132 { LANGUAGE=C; export LANGUAGE; }
16133(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16134 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16135 { LC_COLLATE=C; export LC_COLLATE; }
16136(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16137 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16138 { LC_NUMERIC=C; export LC_NUMERIC; }
16139(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16140 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16141 { LC_MESSAGES=C; export LC_MESSAGES; }
16142
16143
16144# Name of the executable.
16145as_me=`(basename "$0") 2>/dev/null ||
16146$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16147 X"$0" : 'X\(//\)$' \| \
16148 X"$0" : 'X\(/\)$' \| \
16149 . : '\(.\)' 2>/dev/null ||
16150echo X/"$0" |
16151 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16152 /^X\/\(\/\/\)$/{ s//\1/; q; }
16153 /^X\/\(\/\).*/{ s//\1/; q; }
16154 s/.*/./; q'`
16155
16156# PATH needs CR, and LINENO needs CR and PATH.
16157# Avoid depending upon Character Ranges.
16158as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16159as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16160as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16161as_cr_digits='0123456789'
16162as_cr_alnum=$as_cr_Letters$as_cr_digits
16163
16164# The user is always right.
16165if test "${PATH_SEPARATOR+set}" != set; then
16166 echo "#! /bin/sh" >conftest.sh
16167 echo "exit 0" >>conftest.sh
16168 chmod +x conftest.sh
16169 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16170 PATH_SEPARATOR=';'
16171 else
16172 PATH_SEPARATOR=:
16173 fi
16174 rm -f conftest.sh
16175fi
16176
16177
16178 as_lineno_1=$LINENO
16179 as_lineno_2=$LINENO
16180 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16181 test "x$as_lineno_1" != "x$as_lineno_2" &&
16182 test "x$as_lineno_3" = "x$as_lineno_2" || {
16183 # Find who we are. Look in the path if we contain no path at all
16184 # relative or not.
16185 case $0 in
16186 *[\\/]* ) as_myself=$0 ;;
16187 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16188for as_dir in $PATH
16189do
16190 IFS=$as_save_IFS
16191 test -z "$as_dir" && as_dir=.
16192 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16193done
16194
16195 ;;
16196 esac
16197 # We did not find ourselves, most probably we were run as `sh COMMAND'
16198 # in which case we are not to be found in the path.
16199 if test "x$as_myself" = x; then
16200 as_myself=$0
16201 fi
16202 if test ! -f "$as_myself"; then
16203 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16204echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16205 { (exit 1); exit 1; }; }
16206 fi
16207 case $CONFIG_SHELL in
16208 '')
16209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16211do
16212 IFS=$as_save_IFS
16213 test -z "$as_dir" && as_dir=.
16214 for as_base in sh bash ksh sh5; do
16215 case $as_dir in
16216 /*)
16217 if ("$as_dir/$as_base" -c '
16218 as_lineno_1=$LINENO
16219 as_lineno_2=$LINENO
16220 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16221 test "x$as_lineno_1" != "x$as_lineno_2" &&
16222 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16223 CONFIG_SHELL=$as_dir/$as_base
16224 export CONFIG_SHELL
16225 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16226 fi;;
16227 esac
16228 done
16229done
16230;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016231 esac
16232
Martin v. Löwis11437992002-04-12 09:54:03 +000016233 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16234 # uniformly replaced by the line number. The first 'sed' inserts a
16235 # line-number line before each line; the second 'sed' does the real
16236 # work. The second script uses 'N' to pair each line-number line
16237 # with the numbered line, and appends trailing '-' during
16238 # substitution so that $LINENO is not a special case at line end.
16239 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16240 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16241 sed '=' <$as_myself |
16242 sed '
16243 N
16244 s,$,-,
16245 : loop
16246 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16247 t loop
16248 s,-$,,
16249 s,^['$as_cr_digits']*\n,,
16250 ' >$as_me.lineno &&
16251 chmod +x $as_me.lineno ||
16252 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16253echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16254 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016255
Martin v. Löwis11437992002-04-12 09:54:03 +000016256 # Don't try to exec as it changes $[0], causing all sort of problems
16257 # (the dirname of $[0] is not the place where we might find the
16258 # original and so on. Autoconf is especially sensible to this).
16259 . ./$as_me.lineno
16260 # Exit status is that of the last command.
16261 exit
16262}
16263
16264
16265case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16266 *c*,-n*) ECHO_N= ECHO_C='
16267' ECHO_T=' ' ;;
16268 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16269 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16270esac
16271
16272if expr a : '\(a\)' >/dev/null 2>&1; then
16273 as_expr=expr
16274else
16275 as_expr=false
16276fi
16277
16278rm -f conf$$ conf$$.exe conf$$.file
16279echo >conf$$.file
16280if ln -s conf$$.file conf$$ 2>/dev/null; then
16281 # We could just check for DJGPP; but this test a) works b) is more generic
16282 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16283 if test -f conf$$.exe; then
16284 # Don't use ln at all; we don't have any links
16285 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016286 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016287 as_ln_s='ln -s'
16288 fi
16289elif ln conf$$.file conf$$ 2>/dev/null; then
16290 as_ln_s=ln
16291else
16292 as_ln_s='cp -p'
16293fi
16294rm -f conf$$ conf$$.exe conf$$.file
16295
16296as_executable_p="test -f"
16297
16298# Sed expression to map a string onto a valid CPP name.
16299as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16300
16301# Sed expression to map a string onto a valid variable name.
16302as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16303
16304
16305# IFS
16306# We need space, tab and new line, in precisely that order.
16307as_nl='
16308'
16309IFS=" $as_nl"
16310
16311# CDPATH.
16312$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16313
16314exec 6>&1
16315
16316# Open the log real soon, to keep \$[0] and so on meaningful, and to
16317# report actual input values of CONFIG_FILES etc. instead of their
16318# values after options handling. Logging --version etc. is OK.
16319exec 5>>config.log
16320{
16321 echo
16322 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16323## Running $as_me. ##
16324_ASBOX
16325} >&5
16326cat >&5 <<_CSEOF
16327
16328This file was extended by $as_me, which was
16329generated by GNU Autoconf 2.53. Invocation command line was
16330
16331 CONFIG_FILES = $CONFIG_FILES
16332 CONFIG_HEADERS = $CONFIG_HEADERS
16333 CONFIG_LINKS = $CONFIG_LINKS
16334 CONFIG_COMMANDS = $CONFIG_COMMANDS
16335 $ $0 $@
16336
16337_CSEOF
16338echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16339echo >&5
16340_ACEOF
16341
16342# Files that config.status was made for.
16343if test -n "$ac_config_files"; then
16344 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16345fi
16346
16347if test -n "$ac_config_headers"; then
16348 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16349fi
16350
16351if test -n "$ac_config_links"; then
16352 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16353fi
16354
16355if test -n "$ac_config_commands"; then
16356 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16357fi
16358
16359cat >>$CONFIG_STATUS <<\_ACEOF
16360
16361ac_cs_usage="\
16362\`$as_me' instantiates files from templates according to the
16363current configuration.
16364
16365Usage: $0 [OPTIONS] [FILE]...
16366
16367 -h, --help print this help, then exit
16368 -V, --version print version number, then exit
16369 -d, --debug don't remove temporary files
16370 --recheck update $as_me by reconfiguring in the same conditions
16371 --file=FILE[:TEMPLATE]
16372 instantiate the configuration file FILE
16373 --header=FILE[:TEMPLATE]
16374 instantiate the configuration header FILE
16375
16376Configuration files:
16377$config_files
16378
16379Configuration headers:
16380$config_headers
16381
16382Report bugs to <bug-autoconf@gnu.org>."
16383_ACEOF
16384
16385cat >>$CONFIG_STATUS <<_ACEOF
16386ac_cs_version="\\
16387config.status
16388configured by $0, generated by GNU Autoconf 2.53,
16389 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16390
16391Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16392Free Software Foundation, Inc.
16393This config.status script is free software; the Free Software Foundation
16394gives unlimited permission to copy, distribute and modify it."
16395srcdir=$srcdir
16396INSTALL="$INSTALL"
16397_ACEOF
16398
16399cat >>$CONFIG_STATUS <<\_ACEOF
16400# If no file are specified by the user, then we need to provide default
16401# value. By we need to know if files were specified by the user.
16402ac_need_defaults=:
16403while test $# != 0
16404do
16405 case $1 in
16406 --*=*)
16407 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16408 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16409 shift
16410 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16411 shift
16412 ;;
16413 -*);;
16414 *) # This is not an option, so the user has probably given explicit
16415 # arguments.
16416 ac_need_defaults=false;;
16417 esac
16418
16419 case $1 in
16420 # Handling of the options.
16421_ACEOF
16422cat >>$CONFIG_STATUS <<_ACEOF
16423 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16424 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16425 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16426_ACEOF
16427cat >>$CONFIG_STATUS <<\_ACEOF
16428 --version | --vers* | -V )
16429 echo "$ac_cs_version"; exit 0 ;;
16430 --he | --h)
16431 # Conflict between --help and --header
16432 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16433Try \`$0 --help' for more information." >&5
16434echo "$as_me: error: ambiguous option: $1
16435Try \`$0 --help' for more information." >&2;}
16436 { (exit 1); exit 1; }; };;
16437 --help | --hel | -h )
16438 echo "$ac_cs_usage"; exit 0 ;;
16439 --debug | --d* | -d )
16440 debug=: ;;
16441 --file | --fil | --fi | --f )
16442 shift
16443 CONFIG_FILES="$CONFIG_FILES $1"
16444 ac_need_defaults=false;;
16445 --header | --heade | --head | --hea )
16446 shift
16447 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16448 ac_need_defaults=false;;
16449
16450 # This is an error.
16451 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16452Try \`$0 --help' for more information." >&5
16453echo "$as_me: error: unrecognized option: $1
16454Try \`$0 --help' for more information." >&2;}
16455 { (exit 1); exit 1; }; } ;;
16456
16457 *) ac_config_targets="$ac_config_targets $1" ;;
16458
16459 esac
16460 shift
16461done
16462
16463_ACEOF
16464
16465
16466
16467
16468
16469cat >>$CONFIG_STATUS <<\_ACEOF
16470for ac_config_target in $ac_config_targets
16471do
16472 case "$ac_config_target" in
16473 # Handling of arguments.
16474 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16475 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16476 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16477 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16478echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16479 { (exit 1); exit 1; }; };;
16480 esac
16481done
16482
16483# If the user did not use the arguments to specify the items to instantiate,
16484# then the envvar interface is used. Set only those that are not.
16485# We use the long form for the default assignment because of an extremely
16486# bizarre bug on SunOS 4.1.3.
16487if $ac_need_defaults; then
16488 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16489 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16490fi
16491
16492# Create a temporary directory, and hook for its removal unless debugging.
16493$debug ||
16494{
16495 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16496 trap '{ (exit 1); exit 1; }' 1 2 13 15
16497}
16498
16499# Create a (secure) tmp directory for tmp files.
16500: ${TMPDIR=/tmp}
16501{
16502 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16503 test -n "$tmp" && test -d "$tmp"
16504} ||
16505{
16506 tmp=$TMPDIR/cs$$-$RANDOM
16507 (umask 077 && mkdir $tmp)
16508} ||
16509{
16510 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16511 { (exit 1); exit 1; }
16512}
16513
16514_ACEOF
16515
16516cat >>$CONFIG_STATUS <<_ACEOF
16517
16518#
16519# CONFIG_FILES section.
16520#
16521
16522# No need to generate the scripts if there are no CONFIG_FILES.
16523# This happens for instance when ./config.status config.h
16524if test -n "\$CONFIG_FILES"; then
16525 # Protect against being on the right side of a sed subst in config.status.
16526 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16527 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16528s,@SHELL@,$SHELL,;t t
16529s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16530s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16531s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16532s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16533s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16534s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16535s,@exec_prefix@,$exec_prefix,;t t
16536s,@prefix@,$prefix,;t t
16537s,@program_transform_name@,$program_transform_name,;t t
16538s,@bindir@,$bindir,;t t
16539s,@sbindir@,$sbindir,;t t
16540s,@libexecdir@,$libexecdir,;t t
16541s,@datadir@,$datadir,;t t
16542s,@sysconfdir@,$sysconfdir,;t t
16543s,@sharedstatedir@,$sharedstatedir,;t t
16544s,@localstatedir@,$localstatedir,;t t
16545s,@libdir@,$libdir,;t t
16546s,@includedir@,$includedir,;t t
16547s,@oldincludedir@,$oldincludedir,;t t
16548s,@infodir@,$infodir,;t t
16549s,@mandir@,$mandir,;t t
16550s,@build_alias@,$build_alias,;t t
16551s,@host_alias@,$host_alias,;t t
16552s,@target_alias@,$target_alias,;t t
16553s,@DEFS@,$DEFS,;t t
16554s,@ECHO_C@,$ECHO_C,;t t
16555s,@ECHO_N@,$ECHO_N,;t t
16556s,@ECHO_T@,$ECHO_T,;t t
16557s,@LIBS@,$LIBS,;t t
16558s,@VERSION@,$VERSION,;t t
16559s,@SOVERSION@,$SOVERSION,;t t
16560s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16561s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16562s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16563s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16564s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16565s,@MACHDEP@,$MACHDEP,;t t
16566s,@SGI_ABI@,$SGI_ABI,;t t
16567s,@CXX@,$CXX,;t t
16568s,@MAINOBJ@,$MAINOBJ,;t t
16569s,@EXEEXT@,$EXEEXT,;t t
16570s,@CC@,$CC,;t t
16571s,@CFLAGS@,$CFLAGS,;t t
16572s,@LDFLAGS@,$LDFLAGS,;t t
16573s,@CPPFLAGS@,$CPPFLAGS,;t t
16574s,@ac_ct_CC@,$ac_ct_CC,;t t
16575s,@OBJEXT@,$OBJEXT,;t t
16576s,@CPP@,$CPP,;t t
16577s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16578s,@LIBRARY@,$LIBRARY,;t t
16579s,@LDLIBRARY@,$LDLIBRARY,;t t
16580s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16581s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16582s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16583s,@INSTSONAME@,$INSTSONAME,;t t
16584s,@RUNSHARED@,$RUNSHARED,;t t
16585s,@LINKCC@,$LINKCC,;t t
16586s,@RANLIB@,$RANLIB,;t t
16587s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16588s,@AR@,$AR,;t t
16589s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16590s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16591s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16592s,@LN@,$LN,;t t
16593s,@OPT@,$OPT,;t t
16594s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16595s,@SO@,$SO,;t t
16596s,@LDSHARED@,$LDSHARED,;t t
16597s,@BLDSHARED@,$BLDSHARED,;t t
16598s,@CCSHARED@,$CCSHARED,;t t
16599s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16600s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016601s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000016602s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16603s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16604s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16605s,@LDLAST@,$LDLAST,;t t
16606s,@THREADOBJ@,$THREADOBJ,;t t
16607s,@DLINCLDIR@,$DLINCLDIR,;t t
16608s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16609s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16610s,@LIBOBJS@,$LIBOBJS,;t t
16611s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16612s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16613s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16614s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16615s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16616s,@LIBM@,$LIBM,;t t
16617s,@LIBC@,$LIBC,;t t
16618s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16619s,@THREADHEADERS@,$THREADHEADERS,;t t
16620s,@SRCDIRS@,$SRCDIRS,;t t
16621CEOF
16622
16623_ACEOF
16624
16625 cat >>$CONFIG_STATUS <<\_ACEOF
16626 # Split the substitutions into bite-sized pieces for seds with
16627 # small command number limits, like on Digital OSF/1 and HP-UX.
16628 ac_max_sed_lines=48
16629 ac_sed_frag=1 # Number of current file.
16630 ac_beg=1 # First line for current file.
16631 ac_end=$ac_max_sed_lines # Line after last line for current file.
16632 ac_more_lines=:
16633 ac_sed_cmds=
16634 while $ac_more_lines; do
16635 if test $ac_beg -gt 1; then
16636 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16637 else
16638 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16639 fi
16640 if test ! -s $tmp/subs.frag; then
16641 ac_more_lines=false
16642 else
16643 # The purpose of the label and of the branching condition is to
16644 # speed up the sed processing (if there are no `@' at all, there
16645 # is no need to browse any of the substitutions).
16646 # These are the two extra sed commands mentioned above.
16647 (echo ':t
16648 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16649 if test -z "$ac_sed_cmds"; then
16650 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16651 else
16652 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16653 fi
16654 ac_sed_frag=`expr $ac_sed_frag + 1`
16655 ac_beg=$ac_end
16656 ac_end=`expr $ac_end + $ac_max_sed_lines`
16657 fi
16658 done
16659 if test -z "$ac_sed_cmds"; then
16660 ac_sed_cmds=cat
16661 fi
16662fi # test -n "$CONFIG_FILES"
16663
16664_ACEOF
16665cat >>$CONFIG_STATUS <<\_ACEOF
16666for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16667 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16668 case $ac_file in
16669 - | *:- | *:-:* ) # input from stdin
16670 cat >$tmp/stdin
16671 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16672 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16673 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16674 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16675 * ) ac_file_in=$ac_file.in ;;
16676 esac
16677
16678 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16679 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16680$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16681 X"$ac_file" : 'X\(//\)[^/]' \| \
16682 X"$ac_file" : 'X\(//\)$' \| \
16683 X"$ac_file" : 'X\(/\)' \| \
16684 . : '\(.\)' 2>/dev/null ||
16685echo X"$ac_file" |
16686 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16687 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16688 /^X\(\/\/\)$/{ s//\1/; q; }
16689 /^X\(\/\).*/{ s//\1/; q; }
16690 s/.*/./; q'`
16691 { case "$ac_dir" in
16692 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16693 *) as_incr_dir=.;;
16694esac
16695as_dummy="$ac_dir"
16696for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16697 case $as_mkdir_dir in
16698 # Skip DOS drivespec
16699 ?:) as_incr_dir=$as_mkdir_dir ;;
16700 *)
16701 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16702 test -d "$as_incr_dir" ||
16703 mkdir "$as_incr_dir" ||
16704 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16705echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16706 { (exit 1); exit 1; }; }
16707 ;;
16708 esac
16709done; }
16710
16711 ac_builddir=.
16712
16713if test "$ac_dir" != .; then
16714 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16715 # A "../" for each directory in $ac_dir_suffix.
16716 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16717else
16718 ac_dir_suffix= ac_top_builddir=
16719fi
16720
16721case $srcdir in
16722 .) # No --srcdir option. We are building in place.
16723 ac_srcdir=.
16724 if test -z "$ac_top_builddir"; then
16725 ac_top_srcdir=.
16726 else
16727 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16728 fi ;;
16729 [\\/]* | ?:[\\/]* ) # Absolute path.
16730 ac_srcdir=$srcdir$ac_dir_suffix;
16731 ac_top_srcdir=$srcdir ;;
16732 *) # Relative path.
16733 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16734 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16735esac
16736# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16737# absolute.
16738ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16739ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16740ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16741ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16742
16743
16744 case $INSTALL in
16745 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16746 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16747 esac
16748
16749 if test x"$ac_file" != x-; then
16750 { echo "$as_me:$LINENO: creating $ac_file" >&5
16751echo "$as_me: creating $ac_file" >&6;}
16752 rm -f "$ac_file"
16753 fi
16754 # Let's still pretend it is `configure' which instantiates (i.e., don't
16755 # use $as_me), people would be surprised to read:
16756 # /* config.h. Generated by config.status. */
16757 if test x"$ac_file" = x-; then
16758 configure_input=
16759 else
16760 configure_input="$ac_file. "
16761 fi
16762 configure_input=$configure_input"Generated from `echo $ac_file_in |
16763 sed 's,.*/,,'` by configure."
16764
16765 # First look for the input files in the build tree, otherwise in the
16766 # src tree.
16767 ac_file_inputs=`IFS=:
16768 for f in $ac_file_in; do
16769 case $f in
16770 -) echo $tmp/stdin ;;
16771 [\\/$]*)
16772 # Absolute (can't be DOS-style, as IFS=:)
16773 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16774echo "$as_me: error: cannot find input file: $f" >&2;}
16775 { (exit 1); exit 1; }; }
16776 echo $f;;
16777 *) # Relative
16778 if test -f "$f"; then
16779 # Build tree
16780 echo $f
16781 elif test -f "$srcdir/$f"; then
16782 # Source tree
16783 echo $srcdir/$f
16784 else
16785 # /dev/null tree
16786 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16787echo "$as_me: error: cannot find input file: $f" >&2;}
16788 { (exit 1); exit 1; }; }
16789 fi;;
16790 esac
16791 done` || { (exit 1); exit 1; }
16792_ACEOF
16793cat >>$CONFIG_STATUS <<_ACEOF
16794 sed "$ac_vpsub
16795$extrasub
16796_ACEOF
16797cat >>$CONFIG_STATUS <<\_ACEOF
16798:t
16799/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16800s,@configure_input@,$configure_input,;t t
16801s,@srcdir@,$ac_srcdir,;t t
16802s,@abs_srcdir@,$ac_abs_srcdir,;t t
16803s,@top_srcdir@,$ac_top_srcdir,;t t
16804s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16805s,@builddir@,$ac_builddir,;t t
16806s,@abs_builddir@,$ac_abs_builddir,;t t
16807s,@top_builddir@,$ac_top_builddir,;t t
16808s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16809s,@INSTALL@,$ac_INSTALL,;t t
16810" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16811 rm -f $tmp/stdin
16812 if test x"$ac_file" != x-; then
16813 mv $tmp/out $ac_file
16814 else
16815 cat $tmp/out
16816 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016817 fi
16818
Martin v. Löwis11437992002-04-12 09:54:03 +000016819done
16820_ACEOF
16821cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016822
Martin v. Löwis11437992002-04-12 09:54:03 +000016823#
16824# CONFIG_HEADER section.
16825#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016826
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016827# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16828# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016829#
16830# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016831ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16832ac_dB='[ ].*$,\1#\2'
16833ac_dC=' '
16834ac_dD=',;t'
16835# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16836ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16837ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016838ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016839ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016840
Martin v. Löwis11437992002-04-12 09:54:03 +000016841for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016842 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016843 case $ac_file in
16844 - | *:- | *:-:* ) # input from stdin
16845 cat >$tmp/stdin
16846 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16847 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16848 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16849 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16850 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016851 esac
16852
Martin v. Löwis11437992002-04-12 09:54:03 +000016853 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16854echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016855
Martin v. Löwis11437992002-04-12 09:54:03 +000016856 # First look for the input files in the build tree, otherwise in the
16857 # src tree.
16858 ac_file_inputs=`IFS=:
16859 for f in $ac_file_in; do
16860 case $f in
16861 -) echo $tmp/stdin ;;
16862 [\\/$]*)
16863 # Absolute (can't be DOS-style, as IFS=:)
16864 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16865echo "$as_me: error: cannot find input file: $f" >&2;}
16866 { (exit 1); exit 1; }; }
16867 echo $f;;
16868 *) # Relative
16869 if test -f "$f"; then
16870 # Build tree
16871 echo $f
16872 elif test -f "$srcdir/$f"; then
16873 # Source tree
16874 echo $srcdir/$f
16875 else
16876 # /dev/null tree
16877 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16878echo "$as_me: error: cannot find input file: $f" >&2;}
16879 { (exit 1); exit 1; }; }
16880 fi;;
16881 esac
16882 done` || { (exit 1); exit 1; }
16883 # Remove the trailing spaces.
16884 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016885
Martin v. Löwis11437992002-04-12 09:54:03 +000016886_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016887
Martin v. Löwis11437992002-04-12 09:54:03 +000016888# Transform confdefs.h into two sed scripts, `conftest.defines' and
16889# `conftest.undefs', that substitutes the proper values into
16890# config.h.in to produce config.h. The first handles `#define'
16891# templates, and the second `#undef' templates.
16892# And first: Protect against being on the right side of a sed subst in
16893# config.status. Protect against being in an unquoted here document
16894# in config.status.
16895rm -f conftest.defines conftest.undefs
16896# Using a here document instead of a string reduces the quoting nightmare.
16897# Putting comments in sed scripts is not portable.
16898#
16899# `end' is used to avoid that the second main sed command (meant for
16900# 0-ary CPP macros) applies to n-ary macro definitions.
16901# See the Autoconf documentation for `clear'.
16902cat >confdef2sed.sed <<\_ACEOF
16903s/[\\&,]/\\&/g
16904s,[\\$`],\\&,g
16905t clear
16906: clear
16907s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16908t end
16909s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16910: end
16911_ACEOF
16912# If some macros were called several times there might be several times
16913# the same #defines, which is useless. Nevertheless, we may not want to
16914# sort them, since we want the *last* AC-DEFINE to be honored.
16915uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16916sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16917rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016918
16919# This sed command replaces #undef with comments. This is necessary, for
16920# example, in the case of _POSIX_SOURCE, which is predefined and required
16921# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016922cat >>conftest.undefs <<\_ACEOF
16923s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16924_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016925
Martin v. Löwis11437992002-04-12 09:54:03 +000016926# Break up conftest.defines because some shells have a limit on the size
16927# of here documents, and old seds have small limits too (100 cmds).
16928echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16929echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16930echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16931echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016932rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016933while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016934do
Martin v. Löwis11437992002-04-12 09:54:03 +000016935 # Write a limited-size here document to $tmp/defines.sed.
16936 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16937 # Speed up: don't consider the non `#define' lines.
16938 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16939 # Work around the forget-to-reset-the-flag bug.
16940 echo 't clr' >>$CONFIG_STATUS
16941 echo ': clr' >>$CONFIG_STATUS
16942 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016943 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016944 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16945 rm -f $tmp/in
16946 mv $tmp/out $tmp/in
16947' >>$CONFIG_STATUS
16948 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16949 rm -f conftest.defines
16950 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016951done
Martin v. Löwis11437992002-04-12 09:54:03 +000016952rm -f conftest.defines
16953echo ' fi # egrep' >>$CONFIG_STATUS
16954echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016955
Martin v. Löwis11437992002-04-12 09:54:03 +000016956# Break up conftest.undefs because some shells have a limit on the size
16957# of here documents, and old seds have small limits too (100 cmds).
16958echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16959rm -f conftest.tail
16960while grep . conftest.undefs >/dev/null
16961do
16962 # Write a limited-size here document to $tmp/undefs.sed.
16963 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16964 # Speed up: don't consider the non `#undef'
16965 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16966 # Work around the forget-to-reset-the-flag bug.
16967 echo 't clr' >>$CONFIG_STATUS
16968 echo ': clr' >>$CONFIG_STATUS
16969 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16970 echo 'CEOF
16971 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16972 rm -f $tmp/in
16973 mv $tmp/out $tmp/in
16974' >>$CONFIG_STATUS
16975 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16976 rm -f conftest.undefs
16977 mv conftest.tail conftest.undefs
16978done
16979rm -f conftest.undefs
16980
16981cat >>$CONFIG_STATUS <<\_ACEOF
16982 # Let's still pretend it is `configure' which instantiates (i.e., don't
16983 # use $as_me), people would be surprised to read:
16984 # /* config.h. Generated by config.status. */
16985 if test x"$ac_file" = x-; then
16986 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016987 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016988 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016989 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016990 cat $tmp/in >>$tmp/config.h
16991 rm -f $tmp/in
16992 if test x"$ac_file" != x-; then
16993 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16994 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16995echo "$as_me: $ac_file is unchanged" >&6;}
16996 else
16997 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16998$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16999 X"$ac_file" : 'X\(//\)[^/]' \| \
17000 X"$ac_file" : 'X\(//\)$' \| \
17001 X"$ac_file" : 'X\(/\)' \| \
17002 . : '\(.\)' 2>/dev/null ||
17003echo X"$ac_file" |
17004 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17005 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17006 /^X\(\/\/\)$/{ s//\1/; q; }
17007 /^X\(\/\).*/{ s//\1/; q; }
17008 s/.*/./; q'`
17009 { case "$ac_dir" in
17010 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17011 *) as_incr_dir=.;;
17012esac
17013as_dummy="$ac_dir"
17014for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17015 case $as_mkdir_dir in
17016 # Skip DOS drivespec
17017 ?:) as_incr_dir=$as_mkdir_dir ;;
17018 *)
17019 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17020 test -d "$as_incr_dir" ||
17021 mkdir "$as_incr_dir" ||
17022 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17023echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17024 { (exit 1); exit 1; }; }
17025 ;;
17026 esac
17027done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017028
Martin v. Löwis11437992002-04-12 09:54:03 +000017029 rm -f $ac_file
17030 mv $tmp/config.h $ac_file
17031 fi
17032 else
17033 cat $tmp/config.h
17034 rm -f $tmp/config.h
17035 fi
17036done
17037_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017038
Martin v. Löwis11437992002-04-12 09:54:03 +000017039cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017040
Martin v. Löwis11437992002-04-12 09:54:03 +000017041{ (exit 0); exit 0; }
17042_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017043chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000017044ac_clean_files=$ac_clean_files_save
17045
17046
17047# configure is writing to config.log, and then calls config.status.
17048# config.status does its own redirection, appending to config.log.
17049# Unfortunately, on DOS this fails, as config.log is still kept open
17050# by configure, so config.status won't be able to write to it; its
17051# output is simply discarded. So we exec the FD to /dev/null,
17052# effectively closing config.log, so it can be properly (re)opened and
17053# appended to by config.status. When coming back to configure, we
17054# need to make the FD available again.
17055if test "$no_create" != yes; then
17056 ac_cs_success=:
17057 exec 5>/dev/null
17058 $SHELL $CONFIG_STATUS || ac_cs_success=false
17059 exec 5>>config.log
17060 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17061 # would make configure fail if this is the last instruction.
17062 $ac_cs_success || { (exit 1); exit 1; }
17063fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017064
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017065
17066echo "creating Setup"
17067if test ! -f Modules/Setup
17068then
17069 cp $srcdir/Modules/Setup.dist Modules/Setup
17070fi
17071
17072echo "creating Setup.local"
17073if test ! -f Modules/Setup.local
17074then
17075 echo "# Edit this file for local setup changes" >Modules/Setup.local
17076fi
17077
17078echo "creating Makefile"
17079$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17080 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017081 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017082mv config.c Modules